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

Unified Diff: pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart

Issue 1126423002: Avoid reparsing metadata expressions (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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/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 =
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/new_emitter/model_emitter.dart ('k') | tests/compiler/dart2js_extra/23404_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698