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

Unified Diff: pkg/compiler/lib/src/js_emitter/lazy_emitter/model_emitter.dart

Issue 1617083002: Base JavaScript code position computation on JavaScript tracer. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 4 years, 11 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/lazy_emitter/model_emitter.dart
diff --git a/pkg/compiler/lib/src/js_emitter/lazy_emitter/model_emitter.dart b/pkg/compiler/lib/src/js_emitter/lazy_emitter/model_emitter.dart
index 96838acd777085862c3102e24640a8cd5e9b6da4..a0b9b48febbbf092a5110f6b4422ed9c347de940 100644
--- a/pkg/compiler/lib/src/js_emitter/lazy_emitter/model_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/lazy_emitter/model_emitter.dart
@@ -159,15 +159,16 @@ class ModelEmitter {
program.finalizers.forEach((js.TokenFinalizer f) => f.finalizeTokens());
+ // TODO(johnnniwinther): Support source maps in this emitter.
for (int i = 0; i < fragmentsCode.length; ++i) {
- String code = js.prettyPrint(fragmentsCode[i], compiler).getText();
+ String code = js.createCodeBuffer(fragmentsCode[i], compiler).getText();
totalSize += code.length;
compiler.outputProvider(fragments[i+1].outputFileName, deferredExtension)
..add(code)
..close();
}
- String mainCode = js.prettyPrint(mainAst, compiler).getText();
+ String mainCode = js.createCodeBuffer(mainAst, compiler).getText();
compiler.outputProvider(mainFragment.outputFileName, 'js')
..add(buildGeneratedBy(compiler))
..add(mainCode)
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart ('k') | pkg/compiler/lib/src/js_emitter/metadata_collector.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698