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

Unified Diff: pkg/compiler/lib/src/js_backend/runtime_types.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: Comments 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/runtime_types.dart
diff --git a/pkg/compiler/lib/src/js_backend/runtime_types.dart b/pkg/compiler/lib/src/js_backend/runtime_types.dart
index e14487fc3a36b13665ab1f83497fef4b3cf23228..937703692faf049174143f2f3316d143294a8521 100644
--- a/pkg/compiler/lib/src/js_backend/runtime_types.dart
+++ b/pkg/compiler/lib/src/js_backend/runtime_types.dart
@@ -550,15 +550,16 @@ class RuntimeTypes {
}
}
- String getTypeRepresentationWithHashes(DartType type,
- OnVariableCallback onVariable) {
+ jsAst.Expression getTypeRepresentationWithPlaceholders(DartType type,
+ OnVariableCallback onVariable) {
// Create a type representation. For type variables call the original
// callback for side effects and return a template placeholder.
+ int positions = 0;
jsAst.Expression representation = getTypeRepresentation(type, (variable) {
onVariable(variable);
- return new jsAst.LiteralString('#');
+ return new jsAst.InterpolatedExpression(positions++);
});
- return jsAst.prettyPrint(representation, compiler).buffer.toString();
+ return representation;
}
jsAst.Expression getTypeRepresentation(
« no previous file with comments | « pkg/compiler/lib/src/js_backend/constant_emitter.dart ('k') | pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698