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

Side by Side Diff: pkg/compiler/lib/src/js_backend/custom_elements_analysis.dart

Issue 1397043002: Introduce BackendImpact to separate enqueueing from data. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Remove Feature.NEW_SYMBOL Created 5 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of js_backend; 5 part of js_backend;
6 6
7 /** 7 /**
8 * Support for Custom Elements. 8 * Support for Custom Elements.
9 * 9 *
10 * The support for custom elements the compiler builds a table that maps the 10 * The support for custom elements the compiler builds a table that maps the
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 enqueuer.isResolutionQueue ? resolutionJoin : codegenJoin; 67 enqueuer.isResolutionQueue ? resolutionJoin : codegenJoin;
68 68
69 void registerInstantiatedClass(ClassElement classElement, Enqueuer enqueuer) { 69 void registerInstantiatedClass(ClassElement classElement, Enqueuer enqueuer) {
70 classElement.ensureResolved(compiler.resolution); 70 classElement.ensureResolved(compiler.resolution);
71 if (!Elements.isNativeOrExtendsNative(classElement)) return; 71 if (!Elements.isNativeOrExtendsNative(classElement)) return;
72 if (classElement.isMixinApplication) return; 72 if (classElement.isMixinApplication) return;
73 if (classElement.isAbstract) return; 73 if (classElement.isAbstract) return;
74 joinFor(enqueuer).instantiatedClasses.add(classElement); 74 joinFor(enqueuer).instantiatedClasses.add(classElement);
75 } 75 }
76 76
77 void registerTypeLiteral(DartType type, Registry registry) { 77 void registerTypeLiteral(DartType type) {
78 assert(registry.isForResolution);
79 // In codegen we see the TypeConstants instead.
80 if (!registry.isForResolution) return;
sigurdm 2015/10/09 10:55:38 What??
Johnni Winther 2015/10/09 11:35:56 Yeah!
81
82 if (type.isInterfaceType) { 78 if (type.isInterfaceType) {
83 // TODO(sra): If we had a flow query from the type literal expression to 79 // TODO(sra): If we had a flow query from the type literal expression to
84 // the Type argument of the metadata lookup, we could tell if this type 80 // the Type argument of the metadata lookup, we could tell if this type
85 // literal is really a demand for the metadata. 81 // literal is really a demand for the metadata.
86 resolutionJoin.selectedClasses.add(type.element); 82 resolutionJoin.selectedClasses.add(type.element);
87 } else if (type.isTypeVariable) { 83 } else if (type.isTypeVariable) {
88 // This is a type parameter of a parameterized class. 84 // This is a type parameter of a parameterized class.
89 // TODO(sra): Is there a way to determine which types are bound to the 85 // TODO(sra): Is there a way to determine which types are bound to the
90 // parameter? 86 // parameter?
91 resolutionJoin.allClassesSelected = true; 87 resolutionJoin.allClassesSelected = true;
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 result.add(member); 193 result.add(member);
198 } 194 }
199 } 195 }
200 } 196 }
201 classElement.forEachMember(selectGenerativeConstructors, 197 classElement.forEachMember(selectGenerativeConstructors,
202 includeBackendMembers: false, 198 includeBackendMembers: false,
203 includeSuperAndInjectedMembers: false); 199 includeSuperAndInjectedMembers: false);
204 return result; 200 return result;
205 } 201 }
206 } 202 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698