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

Unified Diff: pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.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/cps_ir/cps_ir_builder_task.dart
diff --git a/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart b/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart
index 695727466c650071dcad8026bc0c248baddbe336..d41d08a7dbea1d5d15abbe329e8eaac8e297ea54 100644
--- a/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart
+++ b/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart
@@ -1312,7 +1312,7 @@ class IrBuilderVisitor extends ast.Visitor<ir.Primitive>
/// This is also where we should add type checks in checked mode, but this
/// is not supported yet.
ir.Primitive checkType(ir.Primitive value, DartType dartType) {
- if (!compiler.trustTypeAnnotations) return value;
+ if (!compiler.options.trustTypeAnnotations) return value;
TypeMask type = typeMaskSystem.subtypesOf(dartType).nullable();
return irBuilder.addPrimitive(new ir.Refinement(value, type));
}
@@ -1869,7 +1869,7 @@ class IrBuilderVisitor extends ast.Visitor<ir.Primitive>
@override
ir.Primitive visitAssert(ast.Assert node) {
assert(irBuilder.isOpen);
- if (compiler.enableUserAssertions) {
+ if (compiler.options.enableUserAssertions) {
return giveup(node, 'assert in checked mode not implemented');
} else {
// The call to assert and its argument expression must be ignored
@@ -3505,7 +3505,7 @@ class IrBuilderVisitor extends ast.Visitor<ir.Primitive>
value = backend.mustRetainMetadata;
break;
case 'USE_CONTENT_SECURITY_POLICY':
- value = compiler.useContentSecurityPolicy;
+ value = compiler.options.useContentSecurityPolicy;
break;
default:
internalError(node, 'Unknown internal flag "$name".');
@@ -4247,7 +4247,7 @@ class GlobalProgramInformation {
}
bool get trustJSInteropTypeAnnotations =>
- _compiler.trustJSInteropTypeAnnotations;
+ _compiler.options.trustJSInteropTypeAnnotations;
bool isNative(ClassElement element) => _backend.isNative(element);

Powered by Google App Engine
This is Rietveld 408576698