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('.'); |