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; |