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



commit 53c901d405e9bae9128b7bf7a2bb81fdb263eb63
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]