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

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

Issue 1917863002: Replace _analyzeElementEagerly with Resolution.ensureResolved (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: dartfmt 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/compile_time_constants.dart ('k') | tests/compiler/dart2js/analyze_test_test.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 bc7dfe0e3982787e6b721aac2a3806c6eb67e300..ad93a0f9026008265afa2bc8dc8cc67e87b40cd7 100644
--- a/pkg/compiler/lib/src/compiler.dart
+++ b/pkg/compiler/lib/src/compiler.dart
@@ -1847,6 +1847,14 @@ class _CompilerResolution implements Resolution {
}
@override
+ void ensureResolved(Element element) {
+ if (compiler.serialization.isDeserialized(element)) {
+ return;
+ }
+ computeWorldImpact(element);
+ }
+
+ @override
bool hasResolvedAst(Element element) {
assert(invariant(element, element.isDeclaration,
message: "Element $element must be the declaration."));
@@ -1875,6 +1883,12 @@ class _CompilerResolution implements Resolution {
}
@override
+ ResolvedAst computeResolvedAst(Element element) {
+ ensureResolved(element);
+ return getResolvedAst(element);
+ }
+
+ @override
bool hasResolutionImpact(Element element) {
assert(invariant(element, element.isDeclaration,
message: "Element $element must be the declaration."));
« no previous file with comments | « pkg/compiler/lib/src/compile_time_constants.dart ('k') | tests/compiler/dart2js/analyze_test_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698