[vala/wip/effectfree: 11/12] codegen: Use temporary variables for parameter access
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/effectfree: 11/12] codegen: Use temporary variables for parameter access
- Date: Thu, 16 Jun 2011 11:02:11 +0000 (UTC)
commit 4f3c02f1b07adaa68657223637155ad8d6045e99
Author: Luca Bruno <lucabru src gnome org>
Date: Thu Jun 16 12:21:55 2011 +0200
codegen: Use temporary variables for parameter access
codegen/valaccodememberaccessmodule.vala | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/codegen/valaccodememberaccessmodule.vala b/codegen/valaccodememberaccessmodule.vala
index 836d740..a85ee44 100644
--- a/codegen/valaccodememberaccessmodule.vala
+++ b/codegen/valaccodememberaccessmodule.vala
@@ -336,6 +336,10 @@ public abstract class Vala.CCodeMemberAccessModule : CCodeControlFlowModule {
expr.target_value = get_parameter_cvalue (param);
} else {
expr.target_value = load_parameter (param);
+ if (param.name != "this" && !(expr.parent_node is MemberAccess && expr.target_value.value_type.is_real_non_null_struct_type ())) {
+ var temp_value = create_temp_value (expr.target_value.value_type, expr.target_value, expr);
+ expr.target_value = temp_value;
+ }
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]