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

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

Issue 10511008: Support overriding fields with fields. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 6 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
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 a7ff2777c7b95b47f546c0068e4b92f052e21dcb..17cc7a9300b51d66830893d8685a58a8bb7da06a 100644
--- a/dart/lib/compiler/implementation/ssa/codegen.dart
+++ b/dart/lib/compiler/implementation/ssa/codegen.dart
@@ -190,6 +190,7 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
SubGraph subGraph;
LibraryElement get currentLibrary() => work.element.getLibrary();
+ ClassElement get currentClass() => work.element.getEnclosingClass();
Compiler get compiler() => backend.compiler;
NativeEmitter get nativeEmitter() => backend.emitter.nativeEmitter;
Enqueuer get world() => backend.compiler.enqueuer.codegen;
@@ -1463,7 +1464,7 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
visitFieldGet(HFieldGet node) {
if (!node.isFromActivation()) {
String name =
- compiler.namer.instanceFieldName(currentLibrary, node.name);
+ compiler.namer.instanceFieldName(currentClass, node.name);
beginExpression(JSPrecedence.MEMBER_PRECEDENCE);
use(node.receiver, JSPrecedence.MEMBER_PRECEDENCE);
buffer.add('.');
@@ -1478,7 +1479,7 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
String name;
if (!node.isFromActivation()) {
name =
- compiler.namer.instanceFieldName(currentLibrary, node.name);
+ compiler.namer.instanceFieldName(currentClass, node.name);
beginExpression(JSPrecedence.ASSIGNMENT_PRECEDENCE);
use(node.receiver, JSPrecedence.MEMBER_PRECEDENCE);
buffer.add('.');

Powered by Google App Engine
This is Rietveld 408576698