Index: src/compiler/js-intrinsic-lowering.cc |
diff --git a/src/compiler/js-intrinsic-lowering.cc b/src/compiler/js-intrinsic-lowering.cc |
index 5e063a7bff04f811175c940758a267d66b43367c..2a3bdf8fa85bfe3dd54589852432fdefce70d93a 100644 |
--- a/src/compiler/js-intrinsic-lowering.cc |
+++ b/src/compiler/js-intrinsic-lowering.cc |
@@ -16,9 +16,11 @@ namespace v8 { |
namespace internal { |
namespace compiler { |
-JSIntrinsicLowering::JSIntrinsicLowering(Editor* editor, JSGraph* jsgraph) |
+JSIntrinsicLowering::JSIntrinsicLowering(Editor* editor, JSGraph* jsgraph, |
+ DeoptimizationMode mode) |
: AdvancedReducer(editor), |
jsgraph_(jsgraph), |
+ mode_(mode), |
simplified_(jsgraph->zone()) {} |
@@ -103,9 +105,7 @@ Reduction JSIntrinsicLowering::ReduceConstructDouble(Node* node) { |
Reduction JSIntrinsicLowering::ReduceDeoptimizeNow(Node* node) { |
- // TODO(jarin): This should not depend on the global flag. |
- if (!FLAG_turbo_deoptimization) return NoChange(); |
- |
+ if (mode() != kDeoptimizationEnabled) return NoChange(); |
Node* frame_state = NodeProperties::GetFrameStateInput(node, 0); |
DCHECK_EQ(frame_state->opcode(), IrOpcode::kFrameState); |