Index: src/compiler/js-intrinsic-lowering.cc |
diff --git a/src/compiler/js-intrinsic-lowering.cc b/src/compiler/js-intrinsic-lowering.cc |
index f4a886f88ca41b915d5d37a562ebfac045af25be..0039d1d4c3ee9f89ca80dc6d6be8abdc1b8eb9de 100644 |
--- a/src/compiler/js-intrinsic-lowering.cc |
+++ b/src/compiler/js-intrinsic-lowering.cc |
@@ -92,6 +92,8 @@ Reduction JSIntrinsicLowering::Reduce(Node* node) { |
return ReduceGetTypeFeedbackVector(node); |
case Runtime::kInlineGetCallerJSFunction: |
return ReduceGetCallerJSFunction(node); |
+ case Runtime::kInlineThrowNotDateError: |
+ return ReduceThrowNotDateError(node); |
default: |
break; |
} |
@@ -494,6 +496,23 @@ Reduction JSIntrinsicLowering::ReduceGetCallerJSFunction(Node* node) { |
} |
+Reduction JSIntrinsicLowering::ReduceThrowNotDateError(Node* node) { |
+ if (mode() != kDeoptimizationEnabled) return NoChange(); |
+ Node* const frame_state = NodeProperties::GetFrameStateInput(node, 1); |
+ Node* const effect = NodeProperties::GetEffectInput(node); |
+ Node* const control = NodeProperties::GetControlInput(node); |
+ |
+ // TODO(bmeurer): Move MergeControlToEnd() to the AdvancedReducer. |
+ Node* deoptimize = |
+ graph()->NewNode(common()->Deoptimize(), frame_state, effect, control); |
+ NodeProperties::MergeControlToEnd(graph(), common(), deoptimize); |
+ |
+ node->set_op(common()->Dead()); |
+ node->TrimInputCount(0); |
+ return Changed(node); |
+} |
+ |
+ |
Reduction JSIntrinsicLowering::Change(Node* node, const Operator* op, Node* a, |
Node* b) { |
node->set_op(op); |