Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(170)

Unified Diff: dart/lib/compiler/implementation/ssa/codegen.dart

Issue 10854163: Implement super.foo = expression. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review comments and fix a crash Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dart/lib/compiler/implementation/ssa/builder.dart ('k') | dart/lib/compiler/implementation/ssa/nodes.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/lib/compiler/implementation/ssa/codegen.dart
diff --git a/dart/lib/compiler/implementation/ssa/codegen.dart b/dart/lib/compiler/implementation/ssa/codegen.dart
index 70014cfcd8bfc91f94cb528b58f17d69770a2186..6f87ea455a5999f76a1fa208714540b72bda284e 100644
--- a/dart/lib/compiler/implementation/ssa/codegen.dart
+++ b/dart/lib/compiler/implementation/ssa/codegen.dart
@@ -1499,7 +1499,14 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
SourceString name = superMethod.name;
fieldName = compiler.namer.instanceFieldName(library, name);
}
- push(new js.PropertyAccess.field(new js.This(), fieldName), node);
+ js.PropertyAccess access =
+ new js.PropertyAccess.field(new js.This(), fieldName);
+ if (node.isSetter) {
+ use(node.value);
+ push(new js.Assignment(access, pop()), node);
+ } else {
+ push(access, node);
+ }
} else {
String methodName;
if (superMethod.kind == ElementKind.FUNCTION ||
« no previous file with comments | « dart/lib/compiler/implementation/ssa/builder.dart ('k') | dart/lib/compiler/implementation/ssa/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698