Commit 2c30ab66 authored by bmeurer's avatar bmeurer Committed by Commit bot

Revert of [turbofan] Relax effects and context for...

Revert of [turbofan] Relax effects and context for JSToNumber(x:plain-primitive). (patchset #1 id:1 of https://codereview.chromium.org/799413002/)

Reason for revert:
Performance regressions on primes and corrections benchmarks.

Original issue's description:
> [turbofan] Relax effects and context for JSToNumber(x:plain-primitive).
>
> TEST=unittests
> R=svenpanne@chromium.org
>
> Committed: https://chromium.googlesource.com/v8/v8/+/75484e8d16866eba7aa9c3b87841cd6ce2f466b8

TBR=svenpanne@chromium.org
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/806103002

Cr-Commit-Position: refs/heads/master@{#25831}
parent 8e7b7dae
......@@ -18,6 +18,7 @@ namespace compiler {
// TODO(turbofan): js-typed-lowering improvements possible
// - immediately put in type bounds for all new nodes
// - relax effects from generic but not-side-effecting operations
// - relax effects for ToNumber(mixed)
// Relax the effects of {node} by immediately replacing effect uses of {node}
......@@ -730,9 +731,6 @@ Reduction JSTypedLowering::ReduceJSToNumber(Node* node) {
node->ReplaceInput(i, value);
}
node->TrimInputCount(input_count);
} else {
// JSToNumber(x:plain-primitive,context) => JSToNumber(x,no-context)
node->ReplaceInput(1, jsgraph()->NoContextConstant());
}
return Changed(node);
}
......
......@@ -196,23 +196,6 @@ TEST_F(JSTypedLoweringTest, JSToBooleanWithSelect) {
}
// -----------------------------------------------------------------------------
// JSToNumber
TEST_F(JSTypedLoweringTest, JSToNumberWithPlainPrimitive) {
Node* const input = Parameter(Type::PlainPrimitive(), 0);
Node* const context = Parameter(Type::Any(), 1);
Node* const effect = graph()->start();
Node* const control = graph()->start();
Reduction r = Reduce(graph()->NewNode(javascript()->ToNumber(), input,
context, effect, control));
ASSERT_TRUE(r.Changed());
EXPECT_THAT(r.replacement(), IsToNumber(input, IsNumberConstant(0),
graph()->start(), control));
}
// -----------------------------------------------------------------------------
// JSStrictEqual
......
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