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

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

Issue 1397053002: Introduce DartType.unaliased to avoid use of Resolution in the backend. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 5 years, 2 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/dump_info.dart ('k') | pkg/compiler/lib/src/js_backend/backend.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/elements/modelx.dart
diff --git a/pkg/compiler/lib/src/elements/modelx.dart b/pkg/compiler/lib/src/elements/modelx.dart
index 488c7e11de99d809ba9f744c350b5f5bcc21c4d8..5cb0fe201d2a79407f9a3bb6e551e53aee494eb7 100644
--- a/pkg/compiler/lib/src/elements/modelx.dart
+++ b/pkg/compiler/lib/src/elements/modelx.dart
@@ -1318,7 +1318,13 @@ class TypedefElementX extends ElementX
/**
* The type annotation which defines this typedef.
*/
- DartType alias;
+ DartType aliasCache;
+
+ DartType get alias {
+ assert(invariant(this, hasBeenCheckedForCycles,
+ message: "$this has not been checked for cycles."));
+ return aliasCache;
+ }
/// [:true:] if the typedef has been checked for cyclic reference.
bool hasBeenCheckedForCycles = false;
« no previous file with comments | « pkg/compiler/lib/src/dump_info.dart ('k') | pkg/compiler/lib/src/js_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698