-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
Copy pathworld.dart
67 lines (49 loc) · 2.3 KB
/
world.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
library;
import 'elements/entities.dart';
import 'elements/types.dart';
import 'js_backend/annotations.dart';
import 'universe/class_hierarchy.dart';
import 'universe/selector.dart' show Selector;
abstract class World {}
abstract class BuiltWorld {
ClassHierarchy get classHierarchy;
/// Calls [f] for each live generic method.
void forEachGenericMethod(void Function(FunctionEntity) f);
/// All types that are checked either through is, as or checked mode checks.
Iterable<DartType> get isChecks;
/// All type variables named in recipes.
Set<TypeVariableType> get namedTypeVariables;
/// All directly instantiated types, that is, the types of
/// [directlyInstantiatedClasses].
// TODO(johnniwinther): Improve semantic precision.
Iterable<InterfaceType> get instantiatedTypes;
// TODO(johnniwinther): Clean up these getters.
/// Methods in instantiated classes that are potentially closurized.
Iterable<FunctionEntity> get closurizedMembers;
/// Static or top level methods that are closurized.
Iterable<FunctionEntity> get closurizedStatics;
/// Properties (fields and getters) which can be called as generic functions.
Map<MemberEntity, DartType> get genericCallableProperties;
/// Type variables used as type literals.
Iterable<TypeVariableType> get typeVariableTypeLiterals;
/// Live user-defined 'noSuchMethod' implementations.
Iterable<FunctionEntity> get userNoSuchMethods;
AnnotationsData get annotationsData;
/// Calls [f] for each live generic instance methods.
void forEachGenericInstanceMethod(void Function(FunctionEntity) f);
/// Live generic local functions.
Iterable<Local> get genericLocalFunctions;
/// Call [f] for each generic [function] with the type arguments passed
/// through static calls to [function].
void forEachStaticTypeArgument(
void Function(Entity function, Set<DartType> typeArguments) f,
);
/// Call [f] for each generic [selector] with the type arguments passed
/// through dynamic calls to [selector].
void forEachDynamicTypeArgument(
void Function(Selector selector, Set<DartType> typeArguments) f,
);
}