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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/js_backend/custom_elements_analysis.dart

Issue 304153014: Remove element from DynamicType. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix infinite loop. Created 6 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 unified diff | Download patch | Annotate | Revision Log
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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 CustomElementsAnalysisJoin joinFor(Enqueuer enqueuer) => 66 CustomElementsAnalysisJoin joinFor(Enqueuer enqueuer) =>
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); 70 classElement.ensureResolved(compiler);
71 if (!Elements.isNativeOrExtendsNative(classElement)) return; 71 if (!Elements.isNativeOrExtendsNative(classElement)) return;
72 if (classElement.isMixinApplication) return; 72 if (classElement.isMixinApplication) return;
73 joinFor(enqueuer).instantiatedClasses.add(classElement); 73 joinFor(enqueuer).instantiatedClasses.add(classElement);
74 } 74 }
75 75
76 void registerTypeLiteral(Element element, Enqueuer enqueuer) { 76 void registerTypeLiteral(DartType type, Enqueuer enqueuer) {
77 // In codegen we see the TypeConstants instead. 77 // In codegen we see the TypeConstants instead.
78 if (!enqueuer.isResolutionQueue) return; 78 if (!enqueuer.isResolutionQueue) return;
79 79
80 if (element.isClass) { 80 if (type.isInterfaceType) {
81 // TODO(sra): If we had a flow query from the type literal expression to 81 // TODO(sra): If we had a flow query from the type literal expression to
82 // the Type argument of the metadata lookup, we could tell if this type 82 // the Type argument of the metadata lookup, we could tell if this type
83 // literal is really a demand for the metadata. 83 // literal is really a demand for the metadata.
84 resolutionJoin.selectedClasses.add(element); 84 resolutionJoin.selectedClasses.add(type.element);
85 } else { 85 } else if (type.isTypeVariable) {
86 // This is a type parameter of a parameterized class. 86 // This is a type parameter of a parameterized class.
87 // TODO(sra): Is there a way to determine which types are bound to the 87 // TODO(sra): Is there a way to determine which types are bound to the
88 // parameter? 88 // parameter?
89 resolutionJoin.allClassesSelected = true; 89 resolutionJoin.allClassesSelected = true;
90 } 90 }
91 } 91 }
92 92
93 void registerTypeConstant(Element element, Enqueuer enqueuer) { 93 void registerTypeConstant(Element element, Enqueuer enqueuer) {
94 assert(element.isClass); 94 assert(element.isClass);
95 assert(!enqueuer.isResolutionQueue); 95 assert(!enqueuer.isResolutionQueue);
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 result.add(member); 192 result.add(member);
193 } 193 }
194 } 194 }
195 } 195 }
196 classElement.forEachMember(selectGenerativeConstructors, 196 classElement.forEachMember(selectGenerativeConstructors,
197 includeBackendMembers: false, 197 includeBackendMembers: false,
198 includeSuperAndInjectedMembers: false); 198 includeSuperAndInjectedMembers: false);
199 return result; 199 return result;
200 } 200 }
201 } 201 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698