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

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

Issue 2543753004: Move processing of instance members from ResolutionEnqueuer to ResolutionWorldBuilderImpl (Closed)
Patch Set: Updated cf. comments. Created 4 years 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
« no previous file with comments | « pkg/compiler/lib/src/enqueue.dart ('k') | pkg/compiler/lib/src/universe/world_builder.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 library dart2js.js.enqueue; 5 library dart2js.js.enqueue;
6 6
7 import 'dart:collection' show Queue; 7 import 'dart:collection' show Queue;
8 8
9 import '../common/backend_api.dart' show Backend; 9 import '../common/backend_api.dart' show Backend;
10 import '../common/codegen.dart' show CodegenWorkItem; 10 import '../common/codegen.dart' show CodegenWorkItem;
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 if (!cls.isAbstract || isNative || mirrorUsage) { 156 if (!cls.isAbstract || isNative || mirrorUsage) {
157 _processInstantiatedClass(cls); 157 _processInstantiatedClass(cls);
158 } 158 }
159 }); 159 });
160 } 160 }
161 161
162 bool checkNoEnqueuedInvokedInstanceMethods() { 162 bool checkNoEnqueuedInvokedInstanceMethods() {
163 return strategy.checkEnqueuerConsistency(this); 163 return strategy.checkEnqueuerConsistency(this);
164 } 164 }
165 165
166 void checkClass(ClassElement cls) {
167 cls.implementation.forEachMember(processInstantiatedClassMember);
168 }
169
166 void processInstantiatedClassMember(ClassElement cls, Element member) { 170 void processInstantiatedClassMember(ClassElement cls, Element member) {
167 assert(invariant(member, member.isDeclaration)); 171 assert(invariant(member, member.isDeclaration));
168 if (isProcessed(member)) return; 172 if (isProcessed(member)) return;
169 if (!member.isInstanceMember) return; 173 if (!member.isInstanceMember) return;
170 String memberName = member.name; 174 String memberName = member.name;
171 175
172 if (member.isField) { 176 if (member.isField) {
173 // The obvious thing to test here would be "member.isNative", 177 // The obvious thing to test here would be "member.isNative",
174 // however, that only works after metadata has been parsed/analyzed, 178 // however, that only works after metadata has been parsed/analyzed,
175 // and that may not have happened yet. 179 // and that may not have happened yet.
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 503
500 @override 504 @override
501 Iterable<ClassElement> get processedClasses => _processedClasses; 505 Iterable<ClassElement> get processedClasses => _processedClasses;
502 } 506 }
503 507
504 void removeFromSet(Map<String, Set<Element>> map, Element element) { 508 void removeFromSet(Map<String, Set<Element>> map, Element element) {
505 Set<Element> set = map[element.name]; 509 Set<Element> set = map[element.name];
506 if (set == null) return; 510 if (set == null) return;
507 set.remove(element); 511 set.remove(element);
508 } 512 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/enqueue.dart ('k') | pkg/compiler/lib/src/universe/world_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698