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

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

Issue 1803303002: Move all flags to CompilerOptions (first step to stop passing the compiler to (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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/native/behavior.dart
diff --git a/pkg/compiler/lib/src/native/behavior.dart b/pkg/compiler/lib/src/native/behavior.dart
index 3921b8e8f15ed194aa74802380f9f4656778fa98..d0fd80fae80dafaef387537d68d6255e80b377f4 100644
--- a/pkg/compiler/lib/src/native/behavior.dart
+++ b/pkg/compiler/lib/src/native/behavior.dart
@@ -706,8 +706,8 @@ class NativeBehavior {
// but otherwise we would include a lot of code by default).
// TODO(sigmund,sra): consider doing something better for numeric types.
behavior.typesReturned.add(
- !isInterop || compiler.trustJSInteropTypeAnnotations ? returnType
- : const DynamicType());
+ !isInterop || compiler.options.trustJSInteropTypeAnnotations
+ ? returnType : const DynamicType());
if (!type.returnType.isVoid) {
// Declared types are nullable.
behavior.typesReturned.add(compiler.coreTypes.nullType);
@@ -734,8 +734,8 @@ class NativeBehavior {
bool isInterop = compiler.backend.isJsInterop(field);
// TODO(sigmund,sra): consider doing something better for numeric types.
behavior.typesReturned.add(
- !isInterop || compiler.trustJSInteropTypeAnnotations ? type
- : const DynamicType());
+ !isInterop || compiler.options.trustJSInteropTypeAnnotations
+ ? type : const DynamicType());
// Declared types are nullable.
behavior.typesReturned.add(resolution.coreTypes.nullType);
behavior._capture(type, resolution,
@@ -859,7 +859,7 @@ class NativeBehavior {
typesInstantiated.add(type);
}
- if (!compiler.trustJSInteropTypeAnnotations ||
+ if (!compiler.options.trustJSInteropTypeAnnotations ||
type.isDynamic || type.isObject) {
// By saying that only JS-interop types can be created, we prevent
// pulling in every other native type (e.g. all of dart:html) when a
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart ('k') | pkg/compiler/lib/src/native/enqueue.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698