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

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: 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
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 68557551eabeaedf1eb02b1e7c558e8db6f76b43..046e4eb45748e8815f1e3c9e8b5883daa803afc4 100644
--- a/lib/compiler/implementation/js_backend/emitter.dart
+++ b/lib/compiler/implementation/js_backend/emitter.dart
@@ -1286,19 +1286,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);
}
}

Powered by Google App Engine
This is Rietveld 408576698