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

Unified Diff: pkg/compiler/lib/src/compiler.dart

Issue 893963005: Refactor handling of source map information. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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/compiler.dart
diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart
index a99134f8ba338f2b050ebcd486949a9b934f1a00..8725d9225b8cf4dc6e94f3cf5e39c4ebddbe9d9b 100644
--- a/pkg/compiler/lib/src/compiler.dart
+++ b/pkg/compiler/lib/src/compiler.dart
@@ -1906,12 +1906,9 @@ abstract class Compiler implements DiagnosticListener {
SourceSpan spanFromHInstruction(HInstruction instruction) {
Element element = _elementFromHInstruction(instruction);
if (element == null) element = currentElement;
- var position = instruction.sourcePosition;
+ SourceInformation position = instruction.sourceInformation;
if (position == null) return spanFromElement(element);
- Token token = position.token;
- if (token == null) return spanFromElement(element);
- Uri uri = element.compilationUnit.script.readableUri;
- return spanFromTokens(token, token, uri);
+ return position.sourceSpan;
}
/**
« no previous file with comments | « no previous file | pkg/compiler/lib/src/dart2jslib.dart » ('j') | pkg/compiler/lib/src/io/source_information.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698