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

Unified Diff: pkg/compiler/lib/src/constants/evaluation.dart

Issue 2669703003: Refactor ConstantExpression/ConstantConstructor to use entities. (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « pkg/compiler/lib/src/constants/constructors.dart ('k') | pkg/compiler/lib/src/constants/expressions.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/constants/evaluation.dart
diff --git a/pkg/compiler/lib/src/constants/evaluation.dart b/pkg/compiler/lib/src/constants/evaluation.dart
index 5b2428b04ec3c89dfd80fae2ec21a6f1802b07f6..3856e521ebfccb7145ac10e0929b92d7be923097 100644
--- a/pkg/compiler/lib/src/constants/evaluation.dart
+++ b/pkg/compiler/lib/src/constants/evaluation.dart
@@ -5,7 +5,12 @@
library dart2js.constants.evaluation;
import '../compiler.dart' show Compiler;
+import '../elements/elements.dart';
+import '../elements/entities.dart';
+import '../elements/resolution_types.dart';
+import '../elements/types.dart';
import '../universe/call_structure.dart' show CallStructure;
+import 'constructors.dart';
import 'expressions.dart';
/// Environment used for evaluating constant expressions.
@@ -16,6 +21,20 @@ abstract class Environment {
/// Read environments string passed in using the '-Dname=value' option.
String readFromEnvironment(String name);
+
+ /// Returns the [ConstantExpression] for the value of the constant [local].
+ ConstantExpression getLocalConstant(Local local);
+
+ /// Returns the [ConstantExpression] for the value of the constant [field].
+ ConstantExpression getFieldConstant(FieldEntity field);
+
+ /// Returns the [ConstantConstructor] corresponding to the constant
+ /// [constructor].
+ ConstantConstructor getConstructorConstant(ConstructorEntity constructor);
+
+ /// Performs the substitution of the type arguments of [target] for their
+ /// corresponding type variables in [type].
+ InterfaceType substByContext(InterfaceType base, InterfaceType target);
}
/// The normalized arguments passed to a const constructor computed from the
« no previous file with comments | « pkg/compiler/lib/src/constants/constructors.dart ('k') | pkg/compiler/lib/src/constants/expressions.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698