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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart

Issue 228003005: Remove redundancy in source map entries. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Changed command path. Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/source_map_builder.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart2js.js_emitter; 5 part of dart2js.js_emitter;
6 6
7 /** 7 /**
8 * Generates the code for all used classes in the program. Static fields (even 8 * Generates the code for all used classes in the program. Static fields (even
9 * in classes) are ignored, since they can be treated as non-class elements. 9 * in classes) are ignored, since they can be treated as non-class elements.
10 * 10 *
(...skipping 1678 matching lines...) Expand 10 before | Expand all | Expand 10 after
1689 return '// Generated by dart2js, the Dart to JavaScript compiler$suffix.\n'; 1689 return '// Generated by dart2js, the Dart to JavaScript compiler$suffix.\n';
1690 } 1690 }
1691 1691
1692 void outputSourceMap(String code, CodeBuffer buffer, String name, 1692 void outputSourceMap(String code, CodeBuffer buffer, String name,
1693 [Uri sourceMapUri, Uri fileUri]) { 1693 [Uri sourceMapUri, Uri fileUri]) {
1694 if (!generateSourceMap) return; 1694 if (!generateSourceMap) return;
1695 // Create a source file for the compilation output. This allows using 1695 // Create a source file for the compilation output. This allows using
1696 // [:getLine:] to transform offsets to line numbers in [SourceMapBuilder]. 1696 // [:getLine:] to transform offsets to line numbers in [SourceMapBuilder].
1697 SourceFile compiledFile = new StringSourceFile(null, code); 1697 SourceFile compiledFile = new StringSourceFile(null, code);
1698 SourceMapBuilder sourceMapBuilder = 1698 SourceMapBuilder sourceMapBuilder =
1699 new SourceMapBuilder(sourceMapUri, fileUri); 1699 new SourceMapBuilder(sourceMapUri, fileUri, compiledFile);
1700 buffer.forEachSourceLocation(sourceMapBuilder.addMapping); 1700 buffer.forEachSourceLocation(sourceMapBuilder.addMapping);
1701 String sourceMap = sourceMapBuilder.build(compiledFile); 1701 String sourceMap = sourceMapBuilder.build();
1702 compiler.outputProvider(name, 'js.map') 1702 compiler.outputProvider(name, 'js.map')
1703 ..add(sourceMap) 1703 ..add(sourceMap)
1704 ..close(); 1704 ..close();
1705 } 1705 }
1706 1706
1707 void registerReadTypeVariable(TypeVariableElement element) { 1707 void registerReadTypeVariable(TypeVariableElement element) {
1708 readTypeVariables.add(element); 1708 readTypeVariables.add(element);
1709 } 1709 }
1710 } 1710 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/source_map_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698