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

Side by Side Diff: lib/compiler/implementation/enqueue.dart

Issue 10919123: Reapply Issue 10911006. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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) 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 class EnqueueTask extends CompilerTask { 5 class EnqueueTask extends CompilerTask {
6 final Enqueuer codegen; 6 final Enqueuer codegen;
7 final Enqueuer resolution; 7 final Enqueuer resolution;
8 8
9 String get name => 'Enqueue'; 9 String get name => 'Enqueue';
10 10
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 compiler.resolver.checkMembers(cls); 227 compiler.resolver.checkMembers(cls);
228 } 228 }
229 229
230 if (compiler.enableTypeAssertions) { 230 if (compiler.enableTypeAssertions) {
231 // We need to register is checks and helpers for checking 231 // We need to register is checks and helpers for checking
232 // assignments to fields. 232 // assignments to fields.
233 // TODO(ngeoffray): This should really move to the backend. 233 // TODO(ngeoffray): This should really move to the backend.
234 cls.localMembers.forEach((Element member) { 234 cls.localMembers.forEach((Element member) {
235 if (!member.isInstanceMember() && !member.isField()) return; 235 if (!member.isInstanceMember() && !member.isField()) return;
236 DartType type = member.computeType(compiler); 236 DartType type = member.computeType(compiler);
237 registerIsCheck(type.element); 237 registerIsCheck(type);
238 SourceString helper = compiler.backend.getCheckedModeHelper(type); 238 SourceString helper = compiler.backend.getCheckedModeHelper(type);
239 if (helper != null) { 239 if (helper != null) {
240 Element helperElement = compiler.findHelper(helper); 240 Element helperElement = compiler.findHelper(helper);
241 registerStaticUse(helperElement); 241 registerStaticUse(helperElement);
242 } 242 }
243 }); 243 });
244 } 244 }
245 } 245 }
246 }); 246 });
247 } 247 }
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 LibraryElement library, 342 LibraryElement library,
343 DartType type) { 343 DartType type) {
344 task.measure(() { 344 task.measure(() {
345 Selector setter = new Selector.setter(setterName, library); 345 Selector setter = new Selector.setter(setterName, library);
346 registerNewSelector(setterName, 346 registerNewSelector(setterName,
347 new TypedSelector(type, setter), 347 new TypedSelector(type, setter),
348 universe.fieldSetters); 348 universe.fieldSetters);
349 }); 349 });
350 } 350 }
351 351
352 // TODO(ngeoffray): This should get a type. 352 void registerIsCheck(DartType type) {
353 void registerIsCheck(Element element) { 353 universe.isChecks.add(type);
354 universe.isChecks.add(element);
355 } 354 }
356 355
357 void forEach(f(WorkItem work)) { 356 void forEach(f(WorkItem work)) {
358 while (!queue.isEmpty()) { 357 while (!queue.isEmpty()) {
359 f(queue.removeLast()); // TODO(kasperl): Why isn't this removeFirst? 358 f(queue.removeLast()); // TODO(kasperl): Why isn't this removeFirst?
360 } 359 }
361 } 360 }
362 } 361 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/compiler.dart ('k') | lib/compiler/implementation/js_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698