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

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

Issue 555123002: Filter abstract classes when computing candidate classes for custom elements. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 codegenJoin.allClassesSelected = true; 63 codegenJoin.allClassesSelected = true;
64 } 64 }
65 65
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 if (classElement.isAbstract) return;
73 joinFor(enqueuer).instantiatedClasses.add(classElement); 74 joinFor(enqueuer).instantiatedClasses.add(classElement);
74 } 75 }
75 76
76 void registerTypeLiteral(DartType type, Registry registry) { 77 void registerTypeLiteral(DartType type, Registry registry) {
77 assert(registry.isForResolution); 78 assert(registry.isForResolution);
78 // In codegen we see the TypeConstants instead. 79 // In codegen we see the TypeConstants instead.
79 if (!registry.isForResolution) return; 80 if (!registry.isForResolution) return;
80 81
81 if (type.isInterfaceType) { 82 if (type.isInterfaceType) {
82 // TODO(sra): If we had a flow query from the type literal expression to 83 // TODO(sra): If we had a flow query from the type literal expression to
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 result.add(member); 198 result.add(member);
198 } 199 }
199 } 200 }
200 } 201 }
201 classElement.forEachMember(selectGenerativeConstructors, 202 classElement.forEachMember(selectGenerativeConstructors,
202 includeBackendMembers: false, 203 includeBackendMembers: false,
203 includeSuperAndInjectedMembers: false); 204 includeSuperAndInjectedMembers: false);
204 return result; 205 return result;
205 } 206 }
206 } 207 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698