[vala/emitlocal: 15/16] codegen: Use create_temp_value in store_property
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/emitlocal: 15/16] codegen: Use create_temp_value in store_property
- Date: Tue, 14 Jun 2011 12:07:27 +0000 (UTC)
commit 867f78c859ba3a185dfa57a7ea623454de17c7c0
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 1c3f406..725abb6 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -5311,11 +5311,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]