From: Luca Bruno Date: Tue, 14 Jun 2011 09:59:40 +0000 (+0200) Subject: codegen: Use create_temp_value in store_property X-Git-Tag: 0.13.2~181 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=97b23cbbe96b5f2b7fab599ebf89de9523595643;p=thirdparty%2Fvala.git codegen: Use create_temp_value in store_property --- diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala index cfcb5a46d..12361b696 100644 --- a/codegen/valaccodebasemodule.vala +++ b/codegen/valaccodebasemodule.vala @@ -5322,11 +5322,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)); } }