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

Unified Diff: pkg/compiler/lib/src/cps_ir/type_propagation.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/type_propagation.dart
diff --git a/pkg/compiler/lib/src/cps_ir/type_propagation.dart b/pkg/compiler/lib/src/cps_ir/type_propagation.dart
index 41d33f9d17144895cbfbad9715125380117716e7..3f982d113a86b3ef175edac3e22f1be3a6aafefa 100644
--- a/pkg/compiler/lib/src/cps_ir/type_propagation.dart
+++ b/pkg/compiler/lib/src/cps_ir/type_propagation.dart
@@ -1163,7 +1163,7 @@ class TransformingVisitor extends DeepRecursiveVisitor {
return null;
}
- bool trustPrimitives = compiler.trustPrimitives;
+ bool trustPrimitives = compiler.options.trustPrimitives;
/// Check that the receiver and argument satisfy the given type checks, and
/// throw a [NoSuchMethodError] or [ArgumentError] if the check fails.
@@ -1486,7 +1486,7 @@ class TransformingVisitor extends DeepRecursiveVisitor {
Primitive list,
Primitive index,
[int checkKind = BoundsCheck.BOTH_BOUNDS | BoundsCheck.INTEGER]) {
- if (compiler.trustPrimitives) {
+ if (compiler.options.trustPrimitives) {
return cps.letPrim(new BoundsCheck.noCheck(list, cps.sourceInformation));
} else {
GetLength length = cps.letPrim(new GetLength(list));
@@ -1547,7 +1547,7 @@ class TransformingVisitor extends DeepRecursiveVisitor {
if (!typeSystem.isDefinitelyUint(newLength.type)) {
// TODO(asgerf): We could let the SetLength instruction throw for
// negative right-hand sides (see length setter in js_array.dart).
- if (compiler.trustPrimitives) {
+ if (compiler.options.trustPrimitives) {
newLength = cps.refine(newLength, typeSystem.uint32Type);
newLength.type = typeSystem.uint32Type;
} else {
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart ('k') | pkg/compiler/lib/src/dart_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698