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

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

Issue 2854013002: Make JavaScriptBackend.processAnnotations element-model agnostic (Closed)
Patch Set: Fix and check declaration invariant. Created 3 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
« no previous file with comments | « pkg/compiler/lib/src/common_elements.dart ('k') | pkg/compiler/lib/src/inferrer/type_graph_nodes.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/inferrer/inferrer_engine.dart
diff --git a/pkg/compiler/lib/src/inferrer/inferrer_engine.dart b/pkg/compiler/lib/src/inferrer/inferrer_engine.dart
index 152f2f4e23d29d89175aa71889a9d1eb3ecec486..ca21ba8bbe3153668f82dd167a87a6ab19446e25 100644
--- a/pkg/compiler/lib/src/inferrer/inferrer_engine.dart
+++ b/pkg/compiler/lib/src/inferrer/inferrer_engine.dart
@@ -85,6 +85,17 @@ class InferrerEngine {
CommonElements get commonElements => closedWorld.commonElements;
+ /// Returns `true` if [element] has an `@AssumeDynamic()` annotation.
+ bool assumeDynamic(Element element) {
+ return element is MemberElement && optimizerHints.assumeDynamic(element);
+ }
+
+ /// Returns `true` if [element] has an `@TrustTypeAnnotations()` annotation.
+ bool trustTypeAnnotations(Element element) {
+ return element is MemberElement &&
+ optimizerHints.trustTypeAnnotations(element);
+ }
+
/**
* Applies [f] to all elements in the universe that match
* [selector] and [mask]. If [f] returns false, aborts the iteration.
@@ -226,7 +237,7 @@ class InferrerEngine {
}
JavaScriptBackend get backend => compiler.backend;
- OptimizerHintsForTests get annotations => backend.annotations;
+ OptimizerHintsForTests get optimizerHints => backend.optimizerHints;
DiagnosticReporter get reporter => compiler.reporter;
CommonMasks get commonMasks => closedWorld.commonMasks;
« no previous file with comments | « pkg/compiler/lib/src/common_elements.dart ('k') | pkg/compiler/lib/src/inferrer/type_graph_nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698