[vala/wip/effectfree: 30/40] codegen: Use create_temp_value in store_property



commit 2a0c26ecf8f7a67c1fe52f694759e6dfc5394f5c
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 7e17094..f29fbff 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -5317,11 +5317,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]