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

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

Issue 1873573004: Serialize TreeElements (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Check only the last test to avoid timeout. 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/common/resolution.dart ('k') | pkg/compiler/lib/src/library_loader.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/compiler.dart
diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart
index 3d03876821b687f7785b322174289f74bd86e975..1b01849c9558a21ac442383036edcd05909a46f6 100644
--- a/pkg/compiler/lib/src/compiler.dart
+++ b/pkg/compiler/lib/src/compiler.dart
@@ -1894,6 +1894,25 @@ class _CompilerResolution implements Resolution {
}
@override
+ bool hasResolvedAst(Element element) {
+ return element is AstElement &&
+ hasBeenResolved(element) &&
+ element.hasResolvedAst;
+ }
+
+ @override
+ ResolvedAst getResolvedAst(Element element) {
+ if (hasResolvedAst(element)) {
+ AstElement astElement = element;
+ return astElement.resolvedAst;
+ }
+ assert(invariant(element, hasResolvedAst(element),
+ message: "ResolvedAst not available for $element."));
+ return null;
+ }
+
+
+ @override
bool hasResolutionImpact(Element element) {
return _resolutionImpactCache.containsKey(element);
}
« no previous file with comments | « pkg/compiler/lib/src/common/resolution.dart ('k') | pkg/compiler/lib/src/library_loader.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698