[vala/emitlocal] codegen: Use create_temp_value in visit_end_full_expression
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/emitlocal] codegen: Use create_temp_value in visit_end_full_expression
- Date: Tue, 14 Jun 2011 10:02:51 +0000 (UTC)
commit 4a81ff228d7e89ad8da748b6dbbf2b2ee60e7237
Author: Luca Bruno <lucabru src gnome org>
Date: Tue Jun 14 11:17:10 2011 +0200
codegen: Use create_temp_value in visit_end_full_expression
codegen/valaccodebasemodule.vala | 11 +++--------
1 files changed, 3 insertions(+), 8 deletions(-)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index 7a4ee49..7eb51e7 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -3045,20 +3045,15 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
expr_type = expr.target_type;
}
- full_expr_var = get_temp_variable (expr_type, true, expr, false);
- emit_temp_var (full_expr_var);
-
- ccode.add_assignment (get_variable_cexpression (full_expr_var.name), get_cvalue (expr));
+ var temp_value = create_temp_value (expr_type, false, expr);
+ store_value (temp_value, expr.target_value);
+ expr.target_value = temp_value;
}
foreach (var value in temp_ref_values) {
ccode.add_expression (destroy_value (value));
}
- if (full_expr_var != null) {
- set_cvalue (expr, get_variable_cexpression (full_expr_var.name));
- }
-
temp_ref_values.clear ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]