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

Unified Diff: pkg/compiler/lib/src/js_backend/constant_emitter.dart

Issue 1140703006: dart2js: Construct the entire output as a single AST before printing. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
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_backend/constant_emitter.dart
diff --git a/pkg/compiler/lib/src/js_backend/constant_emitter.dart b/pkg/compiler/lib/src/js_backend/constant_emitter.dart
index 1b3e95fed7efa0b9fb1b0a6ff69d9d1e2ac6fc74..0d3ce4ffc976a6059fb00c6ca12ed29f1806b5a9 100644
--- a/pkg/compiler/lib/src/js_backend/constant_emitter.dart
+++ b/pkg/compiler/lib/src/js_backend/constant_emitter.dart
@@ -296,11 +296,11 @@ class ConstantEmitter
backend.classNeedsRti(type.element)) {
InterfaceType interface = type;
RuntimeTypes rti = backend.rti;
- Iterable<String> arguments = interface.typeArguments
+ Iterable<jsAst.Expression> arguments = interface.typeArguments
.map((DartType type) =>
rti.getTypeRepresentationWithHashes(type, (_){}));
jsAst.Expression argumentList =
- new jsAst.LiteralString('[${arguments.join(', ')}]');
+ new jsAst.ArrayInitializer(arguments.toList());
return new jsAst.Call(getHelperProperty(backend.getSetRuntimeTypeInfo()),
[value, argumentList]);
}
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_backend/runtime_types.dart » ('j') | pkg/compiler/lib/src/js_backend/runtime_types.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698