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

Unified Diff: lib/compiler/implementation/js_backend/emitter.dart

Issue 10915122: Fix source locations for inlined and patched functions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 years, 3 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
« no previous file with comments | « lib/compiler/implementation/js/printer.dart ('k') | lib/compiler/implementation/leg.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/js_backend/emitter.dart
diff --git a/lib/compiler/implementation/js_backend/emitter.dart b/lib/compiler/implementation/js_backend/emitter.dart
index 85cd4919ed4fe15daf750437849cd527e5c07895..3c146c527d2313d654345332a7cf0577e2806f2a 100644
--- a/lib/compiler/implementation/js_backend/emitter.dart
+++ b/lib/compiler/implementation/js_backend/emitter.dart
@@ -1302,19 +1302,7 @@ if (typeof document != 'undefined' && document.readyState != 'complete') {
String buildSourceMap(CodeBuffer buffer, SourceFile compiledFile) {
SourceMapBuilder sourceMapBuilder = new SourceMapBuilder();
- buffer.forEachSourceLocation((Element element, Token token, int offset) {
- if (element == null) {
- sourceMapBuilder.addMapping(null, null, null, offset);
- return;
- }
- SourceFile sourceFile = element.getCompilationUnit().script.file;
- String sourceName = null;
- if (token.kind === IDENTIFIER_TOKEN) {
- sourceName = token.slowToString();
- }
- sourceMapBuilder.addMapping(
- sourceFile, token.charOffset, sourceName, offset);
- });
+ buffer.forEachSourceLocation(sourceMapBuilder.addMapping);
return sourceMapBuilder.build(compiledFile);
}
}
« no previous file with comments | « lib/compiler/implementation/js/printer.dart ('k') | lib/compiler/implementation/leg.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698