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

Side by Side Diff: pkg/compiler/lib/src/enqueue.dart

Issue 2996723002: Support typedef type literals (Closed)
Patch Set: Cleanup Created 3 years, 4 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) 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.enqueue; 5 library dart2js.enqueue;
6 6
7 import 'dart:collection' show Queue; 7 import 'dart:collection' show Queue;
8 8
9 import 'common/tasks.dart' show CompilerTask; 9 import 'common/tasks.dart' show CompilerTask;
10 import 'common/work.dart' show WorkItem; 10 import 'common/work.dart' show WorkItem;
11 import 'common.dart'; 11 import 'common.dart';
12 import 'common_elements.dart' show ElementEnvironment; 12 import 'common_elements.dart' show ElementEnvironment;
13 import 'constants/values.dart'; 13 import 'constants/values.dart';
14 import 'compiler.dart' show Compiler; 14 import 'compiler.dart' show Compiler;
15 import 'options.dart'; 15 import 'options.dart';
16 import 'elements/entities.dart'; 16 import 'elements/entities.dart';
17 import 'elements/resolution_types.dart' show ResolutionTypedefType;
18 import 'elements/types.dart'; 17 import 'elements/types.dart';
19 import 'js_backend/enqueuer.dart'; 18 import 'js_backend/enqueuer.dart';
20 import 'universe/world_builder.dart'; 19 import 'universe/world_builder.dart';
21 import 'universe/use.dart' 20 import 'universe/use.dart'
22 show 21 show
23 ConstantUse, 22 ConstantUse,
24 DynamicUse, 23 DynamicUse,
25 StaticUse, 24 StaticUse,
26 StaticUseKind, 25 StaticUseKind,
27 TypeUse, 26 TypeUse,
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 case TypeUseKind.CATCH_TYPE: 359 case TypeUseKind.CATCH_TYPE:
361 _registerIsCheck(type); 360 _registerIsCheck(type);
362 break; 361 break;
363 case TypeUseKind.CHECKED_MODE_CHECK: 362 case TypeUseKind.CHECKED_MODE_CHECK:
364 if (_options.enableTypeAssertions) { 363 if (_options.enableTypeAssertions) {
365 _registerIsCheck(type); 364 _registerIsCheck(type);
366 } 365 }
367 break; 366 break;
368 case TypeUseKind.TYPE_LITERAL: 367 case TypeUseKind.TYPE_LITERAL:
369 if (type.isTypedef) { 368 if (type.isTypedef) {
370 ResolutionTypedefType typedef = type; 369 TypedefType typedef = type;
371 worldBuilder.registerTypedef(typedef.element); 370 worldBuilder.registerTypedef(typedef.element);
372 } 371 }
373 break; 372 break;
374 } 373 }
375 } 374 }
376 375
377 void _registerIsCheck(DartType type) { 376 void _registerIsCheck(DartType type) {
378 _worldBuilder.registerIsCheck(type); 377 _worldBuilder.registerIsCheck(type);
379 } 378 }
380 379
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 final Entity element; 595 final Entity element;
597 final DeferredActionFunction action; 596 final DeferredActionFunction action;
598 597
599 DeferredAction(this.element, this.action); 598 DeferredAction(this.element, this.action);
600 } 599 }
601 600
602 /// Interface for creating work items for enqueued member entities. 601 /// Interface for creating work items for enqueued member entities.
603 abstract class WorkItemBuilder { 602 abstract class WorkItemBuilder {
604 WorkItem createWorkItem(covariant MemberEntity entity); 603 WorkItem createWorkItem(covariant MemberEntity entity);
605 } 604 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698