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

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

Issue 1935933002: Fix source information positions for deserialized patched elements. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fixes Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart ('k') | pkg/compiler/lib/src/elements/modelx.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/elements/elements.dart
diff --git a/pkg/compiler/lib/src/elements/elements.dart b/pkg/compiler/lib/src/elements/elements.dart
index 0216f562bad7ca5d9890368b7f1163ed73076d8d..ad854f514e0ee5b05d09aa013487b3c144c4671a 100644
--- a/pkg/compiler/lib/src/elements/elements.dart
+++ b/pkg/compiler/lib/src/elements/elements.dart
@@ -1686,6 +1686,10 @@ abstract class ResolvedAst {
/// The [TreeElements] containing the resolution data for [node]. This only
/// available of [kind] is `ResolvedAstKind.PARSED`.
TreeElements get elements;
+
+ /// Returns the uri for the source file defining [node] and [body]. This
+ /// only available if [kind] is `ResolvedAstKind.PARSED`.
+ Uri get sourceUri;
}
/// [ResolvedAst] implementation used for elements whose semantics is defined in
@@ -1695,8 +1699,10 @@ class ParsedResolvedAst implements ResolvedAst {
final Node node;
final Node body;
final TreeElements elements;
+ final Uri sourceUri;
- ParsedResolvedAst(this.element, this.node, this.body, this.elements);
+ ParsedResolvedAst(
+ this.element, this.node, this.body, this.elements, this.sourceUri);
ResolvedAstKind get kind => ResolvedAstKind.PARSED;
@@ -1726,6 +1732,11 @@ class SynthesizedResolvedAst implements ResolvedAst {
throw new UnsupportedError('$this does not have a body AST node');
}
+ @override
+ Uri get sourceUri {
+ throw new UnsupportedError('$this does not have a source URI');
+ }
+
String toString() => '$kind:$element';
}
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart ('k') | pkg/compiler/lib/src/elements/modelx.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698