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

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

Issue 2590913002: Add WorkItemBuilder to abstract WorkItem creation from the enqueuers. (Closed)
Patch Set: 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
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.world; 5 library dart2js.world;
6 6
7 import 'cache_strategy.dart'; 7 import 'cache_strategy.dart';
8 import 'closure.dart' show SynthesizedCallMethodElementX; 8 import 'closure.dart' show SynthesizedCallMethodElementX;
9 import 'common/backend_api.dart' show BackendClasses; 9 import 'common/backend_api.dart' show BackendClasses;
10 import 'common.dart'; 10 import 'common.dart';
11 import 'core_types.dart' show CoreTypes, CoreClasses, CommonElements; 11 import 'core_types.dart' show CoreTypes, CoreClasses, CommonElements;
12 import 'dart_types.dart'; 12 import 'dart_types.dart';
13 import 'elements/elements.dart' 13 import 'elements/elements.dart'
14 show 14 show
15 ClassElement, 15 ClassElement,
16 Element, 16 Element,
17 FunctionElement, 17 FunctionElement,
18 MemberElement,
18 MixinApplicationElement, 19 MixinApplicationElement,
19 TypedefElement, 20 TypedefElement,
20 FieldElement; 21 FieldElement;
21 import 'js_backend/backend.dart' show JavaScriptBackend; 22 import 'js_backend/backend.dart' show JavaScriptBackend;
22 import 'ordered_typeset.dart'; 23 import 'ordered_typeset.dart';
23 import 'types/masks.dart' show CommonMasks, FlatTypeMask, TypeMask; 24 import 'types/masks.dart' show CommonMasks, FlatTypeMask, TypeMask;
24 import 'universe/class_set.dart'; 25 import 'universe/class_set.dart';
25 import 'universe/function_set.dart' show FunctionSet; 26 import 'universe/function_set.dart' show FunctionSet;
26 import 'universe/selector.dart' show Selector; 27 import 'universe/selector.dart' show Selector;
27 import 'universe/side_effects.dart' show SideEffects; 28 import 'universe/side_effects.dart' show SideEffects;
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 void registerClosureClass(ClassElement cls); 332 void registerClosureClass(ClassElement cls);
332 } 333 }
333 334
334 abstract class OpenWorld implements World { 335 abstract class OpenWorld implements World {
335 /// Called to add [cls] to the set of known classes. 336 /// Called to add [cls] to the set of known classes.
336 /// 337 ///
337 /// This ensures that class hierarchy queries can be performed on [cls] and 338 /// This ensures that class hierarchy queries can be performed on [cls] and
338 /// classes that extend or implement it. 339 /// classes that extend or implement it.
339 void registerClass(ClassElement cls); 340 void registerClass(ClassElement cls);
340 341
341 void registerUsedElement(Element element); 342 void registerUsedElement(MemberElement element);
342 void registerTypedef(TypedefElement typedef); 343 void registerTypedef(TypedefElement typedef);
343 344
344 ClosedWorld closeWorld(DiagnosticReporter reporter); 345 ClosedWorld closeWorld(DiagnosticReporter reporter);
345 346
346 /// Returns an iterable over all mixin applications that mixin [cls]. 347 /// Returns an iterable over all mixin applications that mixin [cls].
347 Iterable<MixinApplicationElement> allMixinUsesOf(ClassElement cls); 348 Iterable<MixinApplicationElement> allMixinUsesOf(ClassElement cls);
348 } 349 }
349 350
350 class WorldImpl implements ClosedWorld, ClosedWorldRefiner, OpenWorld { 351 class WorldImpl implements ClosedWorld, ClosedWorldRefiner, OpenWorld {
351 bool _closed = false; 352 bool _closed = false;
(...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after
1227 /// Only the class itself is included. 1228 /// Only the class itself is included.
1228 EXACT, 1229 EXACT,
1229 1230
1230 /// The class and all subclasses (transitively) are included. 1231 /// The class and all subclasses (transitively) are included.
1231 SUBCLASS, 1232 SUBCLASS,
1232 1233
1233 /// The class and all classes that implement or subclass it (transitively) 1234 /// The class and all classes that implement or subclass it (transitively)
1234 /// are included. 1235 /// are included.
1235 SUBTYPE, 1236 SUBTYPE,
1236 } 1237 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698