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

Unified Diff: pkg/compiler/lib/src/js_backend/codegen/codegen.dart

Issue 1148343004: Remove ConstantExpression.value (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Update 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 | « pkg/compiler/lib/src/js_backend/backend.dart ('k') | pkg/compiler/lib/src/js_backend/codegen/glue.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_backend/codegen/codegen.dart
diff --git a/pkg/compiler/lib/src/js_backend/codegen/codegen.dart b/pkg/compiler/lib/src/js_backend/codegen/codegen.dart
index ed8c803cbf88fab50cb10e712280b665d928326c..aabb7a3f1b3c0caa96f4b419ef4b54c493e5889a 100644
--- a/pkg/compiler/lib/src/js_backend/codegen/codegen.dart
+++ b/pkg/compiler/lib/src/js_backend/codegen/codegen.dart
@@ -173,9 +173,9 @@ class CodeGenerator extends tree_ir.StatementVisitor
js.Expression toString(tree_ir.Expression input) {
bool useDirectly = input is tree_ir.Constant &&
- (input.expression.value.isString ||
- input.expression.value.isInt ||
- input.expression.value.isBool);
+ (input.value.isString ||
+ input.value.isInt ||
+ input.value.isBool);
js.Expression value = visitExpression(input);
if (useDirectly) {
return value;
@@ -205,11 +205,11 @@ class CodeGenerator extends tree_ir.StatementVisitor
@override
js.Expression visitConstant(tree_ir.Constant node) {
- return buildConstant(node.expression.value);
+ return buildConstant(node.value);
}
js.Expression compileConstant(ParameterElement parameter) {
- return buildConstant(glue.getConstantForVariable(parameter).value);
+ return buildConstant(glue.getConstantValueForVariable(parameter));
}
// TODO(karlklose): get rid of the selector argument.
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend.dart ('k') | pkg/compiler/lib/src/js_backend/codegen/glue.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698