[vala/wip/effectfree: 29/39] codegen: Use create_temp_value in store_property



commit f31e8f94cf35238514ccb2416e6c1ee0ec5ec679
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 5ac62e7..01a5892 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -5310,11 +5310,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]