Chromium Code Reviews| Index: pkg/compiler/lib/src/common_elements.dart |
| diff --git a/pkg/compiler/lib/src/common_elements.dart b/pkg/compiler/lib/src/common_elements.dart |
| index 86d62ea491d0f213d9421b18c281973a01eac4f2..336a1db52b941e2cbab8647fd7531d329c6746f6 100644 |
| --- a/pkg/compiler/lib/src/common_elements.dart |
| +++ b/pkg/compiler/lib/src/common_elements.dart |
| @@ -14,6 +14,7 @@ import 'elements/types.dart'; |
| import 'js_backend/backend.dart' show JavaScriptBackend; |
| import 'js_backend/constant_system_javascript.dart'; |
| import 'js_backend/native_data.dart' show NativeBasicData; |
| +import 'constants/expressions.dart' show ConstantExpression; |
| import 'universe/call_structure.dart' show CallStructure; |
| import 'universe/selector.dart' show Selector; |
| import 'universe/call_structure.dart'; |
| @@ -1252,13 +1253,21 @@ abstract class ElementEnvironment { |
| ClassEntity cls, void f(ClassEntity declarer, MemberEntity member)); |
| /// Calls [f] for every constructor declared in [cls]. |
| + /// |
| + /// Will ensure that the class and all constructors are resolved if |
| + /// [ensureResolved] is `true`. |
| void forEachConstructor( |
| - ClassEntity cls, void f(ConstructorEntity constructor)); |
| + ClassEntity cls, void f(ConstructorEntity constructor), |
| + {bool ensureResolved: true}); |
|
Siggi Cherem (dart-lang)
2017/08/30 17:30:42
since we don't really have "resolution" in the new
Harry Terkelsen
2017/08/30 21:28:50
Done, except for classes I'm still asking if it wa
|
| /// Calls [f] for every constructor body in [cls]. |
| void forEachConstructorBody( |
| ClassEntity cls, void f(ConstructorBodyEntity constructorBody)); |
| + /// Calls [f] for each nested closure in [member]. |
| + void forEachNestedClosure( |
| + MemberEntity member, void f(FunctionEntity closure)); |
| + |
| /// Returns the superclass of [cls]. |
| /// |
| /// If [skipUnnamedMixinApplications] is `true`, unnamed mixin applications |
| @@ -1338,6 +1347,9 @@ abstract class ElementEnvironment { |
| /// Returns the type of the [local] function. |
| FunctionType getLocalFunctionType(Local local); |
| + /// Gets the constant value of [field], or `null` if [field] is non-const. |
| + ConstantExpression getFieldConstant(FieldEntity field); |
| + |
| /// Returns the 'unaliased' type of [type]. For typedefs this is the function |
| /// type it is an alias of, for other types it is the type itself. |
| /// |
| @@ -1364,4 +1376,10 @@ abstract class ElementEnvironment { |
| /// Returns the function type that is an alias of a [typedef]. |
| FunctionType getFunctionTypeOfTypedef(TypedefEntity typedef); |
| + |
| + /// Returns `true` if [entity] has been resolved. |
| + bool hasBeenResolved(Entity entity); |
| + |
| + /// Returns `true` if [cls] has been resolved. |
| + bool hasClassBeenResolved(ClassEntity cls); |
| } |