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

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

Issue 1939703002: Don't crash on deserialized type inference. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments + minor fix. 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
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 1e964430fe44fdb66637c0fae98c43499826248f..f5eac4a616761f00447706e87459e37312dca350 100644
--- a/pkg/compiler/lib/src/js_backend/backend.dart
+++ b/pkg/compiler/lib/src/js_backend/backend.dart
@@ -2507,24 +2507,28 @@ class JSFrontendAccess implements Frontend {
}
@override
- bool hasResolvedAst(Element element) {
+ 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(Element element) {
+ 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
« no previous file with comments | « pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart ('k') | pkg/compiler/lib/src/js_backend/js_backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698