[vala/emitlocal] codegen: Use create_temp_value in store_property



commit 26ccff59445c83b24ca81a6505038b64f72813bb
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 849b207..d687f96 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -5313,11 +5313,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]