Index: pkg/compiler/lib/src/js_emitter/metadata_collector.dart |
diff --git a/pkg/compiler/lib/src/js_emitter/metadata_collector.dart b/pkg/compiler/lib/src/js_emitter/metadata_collector.dart |
index a2501fd668653c3e292171c825ec0934d74f2d3f..b2f1351fd9a55ba3574fc4e2725f3fcf0ce7bc75 100644 |
--- a/pkg/compiler/lib/src/js_emitter/metadata_collector.dart |
+++ b/pkg/compiler/lib/src/js_emitter/metadata_collector.dart |
@@ -49,12 +49,12 @@ class MetadataCollector { |
if (link != null) { |
for (; !link.isEmpty; link = link.tail) { |
MetadataAnnotation annotation = link.head; |
- ConstantExpression constant = |
- _backend.constants.getConstantForMetadata(annotation); |
+ ConstantValue constant = |
+ _backend.constants.getConstantValueForMetadata(annotation); |
if (constant == null) { |
_compiler.internalError(annotation, 'Annotation value is null.'); |
} else { |
- metadata.add(_emitter.constantReference(constant.value)); |
+ metadata.add(_emitter.constantReference(constant)); |
} |
} |
} |
@@ -69,24 +69,24 @@ class MetadataCollector { |
if (signature.optionalParameterCount == 0) return const []; |
List<int> defaultValues = <int>[]; |
for (ParameterElement element in signature.optionalParameters) { |
- ConstantExpression constant = |
- _backend.constants.getConstantForVariable(element); |
+ ConstantValue constant = |
+ _backend.constants.getConstantValueForVariable(element); |
jsAst.Expression expression = (constant == null) |
? null |
- : _emitter.constantReference(constant.value); |
+ : _emitter.constantReference(constant); |
defaultValues.add(addGlobalMetadata(expression)); |
} |
return defaultValues; |
} |
int reifyMetadata(MetadataAnnotation annotation) { |
- ConstantExpression constant = |
- _backend.constants.getConstantForMetadata(annotation); |
+ ConstantValue constant = |
+ _backend.constants.getConstantValueForMetadata(annotation); |
if (constant == null) { |
_compiler.internalError(annotation, 'Annotation value is null.'); |
return -1; |
} |
- return addGlobalMetadata(_emitter.constantReference(constant.value)); |
+ return addGlobalMetadata(_emitter.constantReference(constant)); |
} |
int reifyType(DartType type, {bool ignoreTypeVariables: false}) { |