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

Unified Diff: dart/frog/leg/elements/elements.dart

Issue 9839004: Fix co19 crashes (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 9 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 | « no previous file | dart/frog/leg/scanner/listener.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/frog/leg/elements/elements.dart
diff --git a/dart/frog/leg/elements/elements.dart b/dart/frog/leg/elements/elements.dart
index 3d17f19db5d40200fcb5a146d01313ff9488fd9d..9decaba052c00923c59662494a57461091ebbc9a 100644
--- a/dart/frog/leg/elements/elements.dart
+++ b/dart/frog/leg/elements/elements.dart
@@ -317,19 +317,25 @@ class LibraryElement extends CompilationUnitElement {
class PrefixElement extends Element {
Map<SourceString, Element> imported;
+ Token firstPosition;
- PrefixElement(SourceString prefix, Element enclosing)
+ PrefixElement(SourceString prefix, Element enclosing, this.firstPosition)
: imported = new Map<SourceString, Element>(),
super(prefix, ElementKind.PREFIX, enclosing);
lookupLocalMember(SourceString memberName) => imported[memberName];
Type computeType(Compiler compiler) => compiler.types.dynamicType;
+
+ Token position() => firstPosition;
}
class TypedefElement extends Element {
- TypedefElement(SourceString name, Element enclosing)
+ Token token;
+ TypedefElement(SourceString name, Element enclosing, this.token)
: super(name, ElementKind.TYPEDEF, enclosing);
+
+ position() => findMyName(token);
}
class VariableElement extends Element {
« no previous file with comments | « no previous file | dart/frog/leg/scanner/listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698