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

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

Issue 62373009: Field property naming fix - issues 14096, 14806 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review changes Created 7 years, 1 month 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: sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart b/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
index d77bd2b4c01aab63038aeee6045f4e10bb9cd0f4..ac8ad5977c9c4ddd3e57d1a304ece5d25766a0c2 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
@@ -1617,11 +1617,7 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
world.registerStaticUse(superMethod);
ClassElement superClass = superMethod.getEnclosingClass();
if (superMethod.kind == ElementKind.FIELD) {
- String fieldName = superMethod.hasFixedBackendName()
- ? superMethod.fixedBackendName()
- : node.caller.isShadowedByField(superMethod)
- ? backend.namer.shadowedFieldName(superMethod)
- : backend.namer.instanceFieldName(superMethod);
+ String fieldName = backend.namer.instanceFieldPropertyName(superMethod);
use(node.inputs[0]);
js.PropertyAccess access =
new js.PropertyAccess.field(pop(), fieldName);
@@ -1689,7 +1685,7 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
push(new js.PropertyAccess.field(pop(), 'length'), node);
}
} else {
- String name = _fieldPropertyName(element);
+ String name = backend.namer.instanceFieldPropertyName(element);
push(new js.PropertyAccess.field(pop(), name), node);
world.registerFieldGetter(element);
}
@@ -1698,7 +1694,7 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
visitFieldSet(HFieldSet node) {
Element element = node.element;
world.registerFieldSetter(element);
- String name = _fieldPropertyName(element);
+ String name = backend.namer.instanceFieldPropertyName(element);
use(node.receiver);
js.Expression receiver = pop();
use(node.value);
@@ -1706,10 +1702,6 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
node);
}
- String _fieldPropertyName(Element element) => element.hasFixedBackendName()
- ? element.fixedBackendName()
- : backend.namer.getNameOfInstanceMember(element);
-
visitLocalGet(HLocalGet node) {
use(node.receiver);
}

Powered by Google App Engine
This is Rietveld 408576698