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

Unified Diff: pkg/compiler/lib/src/inferrer/type_graph_nodes.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
Index: pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
diff --git a/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart b/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
index 3a38bda26a2d4e5600382c9f80fb593b145e4a20..403716fc20b19a040bc038a3868bf1f4efa2b3c6 100644
--- a/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
+++ b/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
@@ -464,7 +464,7 @@ class MemberTypeInformation extends ElementTypeInformation
TypeMask handleSpecialCases(InferrerEngine inferrer) {
if (element.isField &&
(!inferrer.backend.canFieldBeUsedForGlobalOptimizations(element) ||
- inferrer.annotations.assumeDynamic(element))) {
+ inferrer.assumeDynamic(element))) {
// Do not infer types for fields that have a corresponding annotation or
// are assigned by synthesized calls
@@ -521,7 +521,7 @@ class MemberTypeInformation extends ElementTypeInformation
Compiler compiler = inferrer.compiler;
if (!compiler.options.trustTypeAnnotations &&
!compiler.options.enableTypeAssertions &&
- !inferrer.annotations.trustTypeAnnotations(element)) {
+ !inferrer.trustTypeAnnotations(element)) {
return mask;
}
if (element.isGenerativeConstructor || element.isSetter) {
@@ -618,7 +618,7 @@ class ParameterTypeInformation extends ElementTypeInformation {
TypeMask handleSpecialCases(InferrerEngine inferrer) {
if (!inferrer.backend.canFunctionParametersBeUsedForGlobalOptimizations(
element.functionDeclaration) ||
- inferrer.annotations.assumeDynamic(declaration)) {
+ inferrer.assumeDynamic(declaration)) {
// Do not infer types for parameters that have a corresponding annotation
// or that are assigned by synthesized calls.
giveUp(inferrer);
@@ -667,7 +667,7 @@ class ParameterTypeInformation extends ElementTypeInformation {
TypeMask potentiallyNarrowType(TypeMask mask, InferrerEngine inferrer) {
Compiler compiler = inferrer.compiler;
if (!compiler.options.trustTypeAnnotations &&
- !inferrer.annotations.trustTypeAnnotations(declaration)) {
+ !inferrer.trustTypeAnnotations(declaration)) {
return mask;
}
// When type assertions are enabled (aka checked mode), we have to always
« no previous file with comments | « pkg/compiler/lib/src/inferrer/inferrer_engine.dart ('k') | pkg/compiler/lib/src/js_backend/annotations.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698