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/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: Break a long line. 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 | « no previous file | lib/compiler/implementation/resolver.dart » ('j') | lib/compiler/implementation/resolver.dart » ('J')
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 e7fd419fe8e40f786ddeb86a9f6bb3045cb97802..943d5225cf8b3d2400a8d9a377abbc5a466adfc0 100644
--- a/lib/compiler/implementation/elements/elements.dart
+++ b/lib/compiler/implementation/elements/elements.dart
@@ -333,11 +333,20 @@ 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);
position() => findMyName(token);
+
+ Type computeType(Compiler compiler) {
+ if (cachedType === null) {
+ cachedType = new InterfaceType(name, this);
ahe 2012/04/19 08:20:06 This could be set in the constructor.
karlklose 2012/04/25 11:45:43 Done.
+ }
+ return cachedType;
+ }
}
class VariableElement extends Element {
« no previous file with comments | « no previous file | lib/compiler/implementation/resolver.dart » ('j') | lib/compiler/implementation/resolver.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698