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

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

Issue 1121233002: Add ConstantExpression.evaluate. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments Created 5 years, 7 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 | « no previous file | pkg/compiler/lib/src/compiler.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/compile_time_constants.dart
diff --git a/pkg/compiler/lib/src/compile_time_constants.dart b/pkg/compiler/lib/src/compile_time_constants.dart
index f9da31435ca5dca9a65e61feff9cbba2eccb75cd..24ea34cf314b3ab394d3f93a9a03b599d3535bb2 100644
--- a/pkg/compiler/lib/src/compile_time_constants.dart
+++ b/pkg/compiler/lib/src/compile_time_constants.dart
@@ -339,7 +339,7 @@ class CompileTimeConstantEvaluator extends Visitor<AstConstant> {
DartType type = elements.getType(node);
return new AstConstant(
context, node, new ListConstantExpression(
- new ListConstantValue(type, argumentValues),
+ constantSystem.createList(type, argumentValues),
type,
argumentExpressions));
}
@@ -470,11 +470,9 @@ class CompileTimeConstantEvaluator extends Visitor<AstConstant> {
}
AstConstant makeTypeConstant(Node node, DartType elementType) {
- DartType constantType =
- compiler.backend.typeImplementation.computeType(compiler);
return new AstConstant(
context, node, new TypeConstantExpression(
- new TypeConstantValue(elementType, constantType),
+ constantSystem.createType(compiler, elementType),
elementType));
}
« no previous file with comments | « no previous file | pkg/compiler/lib/src/compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698