[vala/emitlocal: 8/8] codegen: Use create_temp_value in visit_binary_expression



commit 900992f9e8c9785b64766ecc76849db991682038
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 985c2df..d82249f 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -4827,17 +4827,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]