Commit 000dea2f authored by neis's avatar neis Committed by Commit bot

[compiler] Remove dead code from js-generic-lowering.

JSLoadContext and JSStoreContext are always reduced in js-typed-lowering.

R=mstarzinger@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2535253002
Cr-Commit-Position: refs/heads/master@{#41380}
parent 5a6483ff
...@@ -286,40 +286,12 @@ void JSGenericLowering::LowerJSOrdinaryHasInstance(Node* node) { ...@@ -286,40 +286,12 @@ void JSGenericLowering::LowerJSOrdinaryHasInstance(Node* node) {
} }
void JSGenericLowering::LowerJSLoadContext(Node* node) { void JSGenericLowering::LowerJSLoadContext(Node* node) {
const ContextAccess& access = ContextAccessOf(node->op()); UNREACHABLE(); // Eliminated in typed lowering.
for (size_t i = 0; i < access.depth(); ++i) {
node->ReplaceInput(
0, graph()->NewNode(machine()->Load(MachineType::AnyTagged()),
NodeProperties::GetValueInput(node, 0),
jsgraph()->Int32Constant(
Context::SlotOffset(Context::PREVIOUS_INDEX)),
NodeProperties::GetEffectInput(node),
graph()->start()));
}
node->ReplaceInput(1, jsgraph()->Int32Constant(Context::SlotOffset(
static_cast<int>(access.index()))));
node->AppendInput(zone(), graph()->start());
NodeProperties::ChangeOp(node, machine()->Load(MachineType::AnyTagged()));
} }
void JSGenericLowering::LowerJSStoreContext(Node* node) { void JSGenericLowering::LowerJSStoreContext(Node* node) {
const ContextAccess& access = ContextAccessOf(node->op()); UNREACHABLE(); // Eliminated in typed lowering.
for (size_t i = 0; i < access.depth(); ++i) {
node->ReplaceInput(
0, graph()->NewNode(machine()->Load(MachineType::AnyTagged()),
NodeProperties::GetValueInput(node, 0),
jsgraph()->Int32Constant(
Context::SlotOffset(Context::PREVIOUS_INDEX)),
NodeProperties::GetEffectInput(node),
graph()->start()));
}
node->ReplaceInput(2, NodeProperties::GetValueInput(node, 1));
node->ReplaceInput(1, jsgraph()->Int32Constant(Context::SlotOffset(
static_cast<int>(access.index()))));
NodeProperties::ChangeOp(
node, machine()->Store(StoreRepresentation(MachineRepresentation::kTagged,
kFullWriteBarrier)));
} }
......
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