Index: pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart |
diff --git a/pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart b/pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart |
index bcc7977e3e670553270f27bc82353834e27090b5..b1e5bb213adfeab73eec83a7457b303a510e8d9b 100644 |
--- a/pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart |
+++ b/pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart |
@@ -665,12 +665,11 @@ class OldEmitter implements Emitter { |
void emitMetadata(Program program, CodeOutput output, OutputUnit outputUnit) { |
- jsAst.Expression constructList(List<String> list) { |
- String listAsString = list == null ? '[]' : '[${list.join(",")}]'; |
- return js.uncachedExpressionTemplate(listAsString).instantiate([]); |
+ jsAst.Expression constructList(List<jsAst.Expression> list) { |
+ return new jsAst.ArrayInitializer(list == null ? [] : list); |
} |
- List<String> types = program.metadataTypes[outputUnit]; |
+ List<jsAst.Expression> types = program.metadataTypes[outputUnit]; |
if (outputUnit == compiler.deferredLoadTask.mainOutputUnit) { |
jsAst.Expression metadataAccess = |