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

Unified Diff: pkg/compiler/lib/src/elements/modelx.dart

Issue 2925263002: A step towards handling `new Object()` in compile_from_dill_test (Closed)
Patch Set: Updated cf. comments Created 3 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
« no previous file with comments | « pkg/compiler/lib/src/elements/elements.dart ('k') | pkg/compiler/lib/src/js_backend/namer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/elements/modelx.dart
diff --git a/pkg/compiler/lib/src/elements/modelx.dart b/pkg/compiler/lib/src/elements/modelx.dart
index bf12be6392c2b8aaab0b8f03fa20186f58f1e70d..b193876080eaceaeecf540740849ca3ea8284f98 100644
--- a/pkg/compiler/lib/src/elements/modelx.dart
+++ b/pkg/compiler/lib/src/elements/modelx.dart
@@ -2483,20 +2483,17 @@ class ConstructorBodyElementX extends BaseFunctionElementX
if (node.hasEmptyBody) return null;
ClassElement classElement = constructor.enclosingClass;
ConstructorBodyElement bodyElement;
- classElement.forEachBackendMember((Element backendMember) {
- if (backendMember.isGenerativeConstructorBody) {
- ConstructorBodyElement body = backendMember;
- if (body.constructor == constructor) {
- // TODO(kasperl): Find a way of stopping the iteration
- // through the backend members.
- bodyElement = backendMember;
- }
+ classElement.forEachConstructorBody((ConstructorBodyElement body) {
+ if (body.constructor == constructor) {
+ // TODO(kasperl): Find a way of stopping the iteration
+ // through the backend members.
+ bodyElement = body;
}
});
if (bodyElement == null) {
bodyElement =
new ConstructorBodyElementX(constructorResolvedAst, constructor);
- classElement.addBackendMember(bodyElement);
+ classElement.addConstructorBody(bodyElement);
if (constructor.isPatch) {
// Create origin body element for patched constructors.
@@ -2504,7 +2501,7 @@ class ConstructorBodyElementX extends BaseFunctionElementX
ConstructorBodyElementX origin = new ConstructorBodyElementX(
constructorResolvedAst, constructor.origin);
origin.applyPatch(patch);
- classElement.origin.addBackendMember(bodyElement.origin);
+ classElement.origin.addConstructorBody(bodyElement.origin);
}
}
assert(bodyElement.isGenerativeConstructorBody);
« no previous file with comments | « pkg/compiler/lib/src/elements/elements.dart ('k') | pkg/compiler/lib/src/js_backend/namer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698