Commit e0dd3119 authored by mstarzinger's avatar mstarzinger Committed by Commit bot

[turbofan] Remove obsolete frame-state from count op.

This removes the usage of {FrameStateBeforeAndAfter} from the graph
building for count operations. The {JSAdd} or {JSSubtract} node in
question no longer needs the frame-state attached.

R=bmeurer@chromium.org

Review-Url: https://codereview.chromium.org/2127523002
Cr-Commit-Position: refs/heads/master@{#37529}
parent d70dc1ac
......@@ -2695,7 +2695,7 @@ void AstGraphBuilder::VisitCountOperation(CountOperation* expr) {
// Create a proper eager frame state for the stores.
environment()->Push(old_value);
FrameStateBeforeAndAfter binop_states(this, expr->ToNumberId());
PrepareEagerCheckpoint(expr->ToNumberId());
old_value = environment()->Pop();
// Save result for postfix expressions at correct stack depth.
......@@ -2708,12 +2708,10 @@ void AstGraphBuilder::VisitCountOperation(CountOperation* expr) {
}
// Create node to perform +1/-1 operation.
// TODO(bmeurer): Cleanup this feedback/bailout mess!
Node* value = BuildBinaryOp(old_value, jsgraph()->OneConstant(),
expr->binary_op(), expr->CountBinOpFeedbackId());
// This should never deoptimize because we have converted to number before.
binop_states.AddToNode(value, BailoutId::None(),
OutputFrameStateCombine::Ignore());
// This should never lazy deopt because we have converted to number before.
PrepareFrameState(value, BailoutId::None());
// Store the value.
VectorSlotPair feedback = CreateVectorSlotPair(expr->CountSlot());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment