[vala/wip/effectfree: 30/33] codegen: Use create_temp_value in store_property
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/effectfree: 30/33] codegen: Use create_temp_value in store_property
- Date: Sat, 18 Jun 2011 14:34:29 +0000 (UTC)
commit c95aad0f6efb0c1d6f13c98a1e9c0a5f09a06f62
Author: Luca Bruno <lucabru src gnome org>
Date: Tue Jun 14 11:59:40 2011 +0200
codegen: Use create_temp_value in store_property
codegen/valaccodebasemodule.vala | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index 75080ab..86ec409 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -5291,11 +5291,9 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
// if instance is e.g. a function call, we can't take the address of the expression
// (tmp = expr, &tmp)
- var temp_var = get_temp_variable (instance.target_type, true, null, false);
- emit_temp_var (temp_var);
- ccode.add_assignment (get_variable_cexpression (temp_var.name), cinstance);
-
- cinstance = new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, get_variable_cexpression (temp_var.name));
+ var temp_value = create_temp_value (instance.target_type, false, instance);
+ store_value (temp_value, instance.target_value);
+ cinstance = new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, get_cvalue_ (temp_value));
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]