[vala/wip/effectfree: 1/12] Emit left-handed side of assignment when it's a field or parameter access



commit 6b482cfe7d6da21d24759b2ef788241de97851f4
Author: Luca Bruno <lucabru src gnome org>
Date:   Wed Jun 15 12:27:23 2011 +0200

    Emit left-handed side of assignment when it's a field or parameter access

 vala/valaassignment.vala |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/vala/valaassignment.vala b/vala/valaassignment.vala
index 342dbb4..c7af099 100644
--- a/vala/valaassignment.vala
+++ b/vala/valaassignment.vala
@@ -504,14 +504,14 @@ public class Vala.Assignment : Expression {
 				return;
 			}
 
-			if (field != null) {
+			if (instance && ma.inner != null && property != null) {
+				ma.inner.emit (codegen);
+			} else {
 				// always process full lvalue
 				// current codegen depends on it
 				// should be removed when moving codegen from
-				// visit_assignment to emit_store_field
+				// visit_assignment to emit_store_field/local/param
 				ma.emit (codegen);
-			} else if (instance && ma.inner != null) {
-				ma.inner.emit (codegen);
 			}
 		} else if (ea != null) {
 			// always process full lvalue



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