[vala/wip/effectfree: 27/38] codegen: Use create_temp_value in visit_binary_expression



commit 0e4450dba81115efef5e775aa2fa636d9616298c
Author: Luca Bruno <lucabru src gnome org>
Date:   Sat Jun 11 12:21:14 2011 +0200

    codegen: Use create_temp_value in visit_binary_expression

 codegen/valaccodebasemodule.vala |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index efb4839..8545412 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -4772,17 +4772,15 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
 						set_cvalue (expr, strcat);
 					} else {
 						// convert to g_strconcat (a, b, NULL)
-						var temp_var = get_temp_variable (expr.value_type, true, null, false);
-						var temp_ref = get_variable_cexpression (temp_var.name);
-						emit_temp_var (temp_var);
+						var temp_value = create_temp_value (expr.value_type, false, expr);
 
 						var ccall = new CCodeFunctionCall (new CCodeIdentifier ("g_strconcat"));
 						ccall.add_argument (cleft);
 						ccall.add_argument (cright);
 						ccall.add_argument (new CCodeConstant("NULL"));
 
-						ccode.add_assignment (temp_ref, ccall);
-						set_cvalue (expr, temp_ref);
+						ccode.add_assignment (get_cvalue_ (temp_value), ccall);
+						expr.target_value = temp_value;
 					}
 					return;
 				}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]