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

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

Issue 2684783003: Refactor ConstantSystem (Closed)
Patch Set: Updated cf. comments. Created 3 years, 10 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/evaluation.dart ('k') | pkg/compiler/lib/src/js_backend/backend.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/constants/expressions.dart
diff --git a/pkg/compiler/lib/src/constants/expressions.dart b/pkg/compiler/lib/src/constants/expressions.dart
index 10803a8609477a27b95ee541d6f2c7932c7b1747..6ed3a6f392d89c281a2bdffadc099e2721f0530c 100644
--- a/pkg/compiler/lib/src/constants/expressions.dart
+++ b/pkg/compiler/lib/src/constants/expressions.dart
@@ -482,8 +482,12 @@ class MapConstantExpression extends ConstantExpression {
ConstantValue value = values[index].evaluate(environment, constantSystem);
valueMap[key] = value;
}
- return constantSystem.createMap(environment.compiler, type,
- valueMap.keys.toList(), valueMap.values.toList());
+ return constantSystem.createMap(
+ environment.commonElements,
+ environment.backendClasses,
+ type,
+ valueMap.keys.toList(),
+ valueMap.values.toList());
}
ConstantExpression apply(NormalizedArguments arguments) {
@@ -734,7 +738,8 @@ class SymbolConstantExpression extends ConstantExpression {
@override
ConstantValue evaluate(
Environment environment, ConstantSystem constantSystem) {
- return constantSystem.createSymbol(environment.compiler, name);
+ return constantSystem.createSymbol(
+ environment.commonElements, environment.backendClasses, name);
}
@override
@@ -769,7 +774,8 @@ class TypeConstantExpression extends ConstantExpression {
@override
ConstantValue evaluate(
Environment environment, ConstantSystem constantSystem) {
- return constantSystem.createType(environment.compiler, type);
+ return constantSystem.createType(
+ environment.commonElements, environment.backendClasses, type);
}
@override
« no previous file with comments | « pkg/compiler/lib/src/constants/evaluation.dart ('k') | pkg/compiler/lib/src/js_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698