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

Unified Diff: pkg/compiler/lib/src/js_emitter/program_builder.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
Index: pkg/compiler/lib/src/js_emitter/program_builder.dart
diff --git a/pkg/compiler/lib/src/js_emitter/program_builder.dart b/pkg/compiler/lib/src/js_emitter/program_builder.dart
index 4d0e3b2c1b6dfe324546b974213d4ae5cb469178..af927684a318b0739ce745dc8897267a53a2abce 100644
--- a/pkg/compiler/lib/src/js_emitter/program_builder.dart
+++ b/pkg/compiler/lib/src/js_emitter/program_builder.dart
@@ -210,7 +210,7 @@ class ProgramBuilder {
StaticField _buildStaticField(Element element) {
JavaScriptConstantCompiler handler = backend.constants;
- ConstantValue initialValue = handler.getInitialValueFor(element).value;
+ ConstantValue initialValue = handler.getInitialValueFor(element);
// TODO(zarah): The holder should not be registered during building of
// a static field.
_registry.registerHolder(namer.globalObjectForConstant(initialValue));
@@ -466,16 +466,16 @@ class ProgramBuilder {
if (signature.optionalParametersAreNamed) {
optionalParameterDefaultValues = new Map<String, ConstantValue>();
signature.forEachOptionalParameter((ParameterElement parameter) {
- ConstantExpression def =
- backend.constants.getConstantForVariable(parameter);
- optionalParameterDefaultValues[parameter.name] = def.value;
+ ConstantValue def =
+ backend.constants.getConstantValueForVariable(parameter);
+ optionalParameterDefaultValues[parameter.name] = def;
});
} else {
optionalParameterDefaultValues = <ConstantValue>[];
signature.forEachOptionalParameter((ParameterElement parameter) {
- ConstantExpression def =
- backend.constants.getConstantForVariable(parameter);
- optionalParameterDefaultValues.add(def.value);
+ ConstantValue def =
+ backend.constants.getConstantValueForVariable(parameter);
+ optionalParameterDefaultValues.add(def);
});
}
return optionalParameterDefaultValues;

Powered by Google App Engine
This is Rietveld 408576698