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

Unified Diff: lib/compiler/implementation/elements/elements.dart

Issue 10115026: Address the remaining review comments on http://chromiumcodereview.appspot.com/9431029. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 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 | « lib/compiler/implementation/compile_time_constants.dart ('k') | lib/compiler/implementation/resolver.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/elements/elements.dart
diff --git a/lib/compiler/implementation/elements/elements.dart b/lib/compiler/implementation/elements/elements.dart
index be1ca59a293012d48214c78478ab4762fd1bd68f..634ad99ac94c3a55602b7d21721c50f855cb675c 100644
--- a/lib/compiler/implementation/elements/elements.dart
+++ b/lib/compiler/implementation/elements/elements.dart
@@ -345,11 +345,17 @@ class PrefixElement extends Element {
}
class TypedefElement extends Element {
- Token token;
+ final Token token;
+ Type cachedType;
+
TypedefElement(SourceString name, Element enclosing, this.token)
- : super(name, ElementKind.TYPEDEF, enclosing);
+ : super(name, ElementKind.TYPEDEF, enclosing) {
+ cachedType = new InterfaceType(this);
+ }
position() => findMyName(token);
+
+ Type computeType(Compiler compiler) => cachedType;
}
class VariableElement extends Element {
@@ -729,7 +735,7 @@ class ClassElement extends ContainerElement {
Type computeType(compiler) {
if (type === null) {
- type = new InterfaceType(name, this);
+ type = new InterfaceType(this);
}
return type;
}
« no previous file with comments | « lib/compiler/implementation/compile_time_constants.dart ('k') | lib/compiler/implementation/resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698