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

Unified Diff: pkg/compiler/lib/src/common_elements.dart

Issue 3008793002: Use the entity model for dump_info. (Closed)
Patch Set: respond to comments 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 side-by-side diff with in-line comments
Download patch
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..aa98d034e98a3bd413c54c9f4807010fb7e90df3 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,22 @@ 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`.
+ // TODO(redemption): Remove the 'ensureResolved' parameter
void forEachConstructor(
- ClassEntity cls, void f(ConstructorEntity constructor));
+ ClassEntity cls, void f(ConstructorEntity constructor),
+ {bool ensureResolved: true});
/// 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 +1348,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.
///

Powered by Google App Engine
This is Rietveld 408576698