Commit da766ef7 authored by Benedikt Meurer's avatar Benedikt Meurer Committed by Commit Bot

[turbofan] Remove leftover support code for the AstGraphBuilder.

R=mstarzinger@chromium.org

Bug: v8:6409
Change-Id: I676a61593a5b5e5df50990ded6f1882d8b7d0159
Reviewed-on: https://chromium-review.googlesource.com/612280Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47309}
parent 7840db46
......@@ -1093,35 +1093,27 @@ class RepresentationSelector {
ProcessInput(node, 0, UseInfo::AnyTagged()); // Parameters.
ProcessInput(node, 1, UseInfo::AnyTagged()); // Registers.
// Expression stack/accumulator.
if (node->InputAt(2)->opcode() == IrOpcode::kStateValues ||
node->InputAt(2)->opcode() == IrOpcode::kTypedStateValues) {
// TODO(turbofan): This should only be produced by AST graph builder.
// Remove once we switch to bytecode graph builder exclusively.
ProcessInput(node, 2, UseInfo::AnyTagged());
} else {
// Accumulator is a special flower - we need to remember its type in
// a singleton typed-state-values node (as if it was a singleton
// state-values node).
if (propagate()) {
EnqueueInput(node, 2, UseInfo::Any());
} else if (lower()) {
Zone* zone = jsgraph_->zone();
Node* accumulator = node->InputAt(2);
if (accumulator == jsgraph_->OptimizedOutConstant()) {
node->ReplaceInput(2, jsgraph_->SingleDeadTypedStateValues());
} else {
ZoneVector<MachineType>* types =
new (zone->New(sizeof(ZoneVector<MachineType>)))
ZoneVector<MachineType>(1, zone);
(*types)[0] = DeoptMachineTypeOf(
GetInfo(accumulator)->representation(), TypeOf(accumulator));
node->ReplaceInput(2, jsgraph_->graph()->NewNode(
jsgraph_->common()->TypedStateValues(
types, SparseInputMask::Dense()),
accumulator));
}
// Accumulator is a special flower - we need to remember its type in
// a singleton typed-state-values node (as if it was a singleton
// state-values node).
if (propagate()) {
EnqueueInput(node, 2, UseInfo::Any());
} else if (lower()) {
Zone* zone = jsgraph_->zone();
Node* accumulator = node->InputAt(2);
if (accumulator == jsgraph_->OptimizedOutConstant()) {
node->ReplaceInput(2, jsgraph_->SingleDeadTypedStateValues());
} else {
ZoneVector<MachineType>* types =
new (zone->New(sizeof(ZoneVector<MachineType>)))
ZoneVector<MachineType>(1, zone);
(*types)[0] = DeoptMachineTypeOf(GetInfo(accumulator)->representation(),
TypeOf(accumulator));
node->ReplaceInput(
2, jsgraph_->graph()->NewNode(jsgraph_->common()->TypedStateValues(
types, SparseInputMask::Dense()),
accumulator));
}
}
......
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