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

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

Issue 1970703002: Store ResolvedAst on AstElement (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 4 years, 7 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
Index: pkg/compiler/lib/src/js_backend/backend.dart
diff --git a/pkg/compiler/lib/src/js_backend/backend.dart b/pkg/compiler/lib/src/js_backend/backend.dart
index 15b8de496ee7a89c6107e068974543cdded93b45..5f334e39e4335653c77f7b4e24d3904d812bc68a 100644
--- a/pkg/compiler/lib/src/js_backend/backend.dart
+++ b/pkg/compiler/lib/src/js_backend/backend.dart
@@ -2508,41 +2508,6 @@ class JSFrontendAccess implements Frontend {
ResolutionImpact getResolutionImpact(Element element) {
return resolution.getResolutionImpact(element);
}
-
- @override
- bool hasResolvedAst(ExecutableElement element) {
- if (element is SynthesizedCallMethodElementX) {
- return true;
- } else if (element is ConstructorBodyElementX) {
- return true;
- } else if (element is FieldElementX) {
- return true;
- } else if (element is DeferredLoaderGetterElementX) {
- return true;
- } else {
- return resolution.hasResolvedAst(element);
- }
- }
-
- @override
- ResolvedAst getResolvedAst(ExecutableElement element) {
- if (element is SynthesizedCallMethodElementX) {
- return element.resolvedAst;
- } else if (element is ConstructorBodyElementX) {
- return element.resolvedAst;
- } else if (element is DeferredLoaderGetterElementX) {
- return element.resolvedAst;
- } else if (element is FieldElementX) {
- // TODO(johnniwinther): Find a good invariant for resolution of fields.
- // Currently some but not all are resolved (maybe it has to do with
- // initializers?)
- return element.resolvedAst;
- } else {
- assert(invariant(element, resolution.hasResolvedAst(element.declaration),
- message: 'No ResolvedAst for $element'));
- return resolution.getResolvedAst(element.declaration);
- }
- }
}
/// Handling of special annotations for tests.
« no previous file with comments | « pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart ('k') | pkg/compiler/lib/src/serialization/modelz.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698