| Index: src/compiler/simplified-lowering.cc
|
| diff --git a/src/compiler/simplified-lowering.cc b/src/compiler/simplified-lowering.cc
|
| index dedcfe6bce3c489db416f4948c99ad2bd3ce314e..38df48e18ef186a466d630ff8805e4f87689eb5b 100644
|
| --- a/src/compiler/simplified-lowering.cc
|
| +++ b/src/compiler/simplified-lowering.cc
|
| @@ -1241,19 +1241,16 @@ class RepresentationSelector {
|
| case IrOpcode::kObjectIsNumber: {
|
| ProcessInput(node, 0, UseInfo::AnyTagged());
|
| SetOutput(node, NodeOutputInfo::Bool());
|
| - if (lower()) lowering->DoObjectIsNumber(node);
|
| break;
|
| }
|
| case IrOpcode::kObjectIsReceiver: {
|
| ProcessInput(node, 0, UseInfo::AnyTagged());
|
| SetOutput(node, NodeOutputInfo::Bool());
|
| - if (lower()) lowering->DoObjectIsReceiver(node);
|
| break;
|
| }
|
| case IrOpcode::kObjectIsSmi: {
|
| ProcessInput(node, 0, UseInfo::AnyTagged());
|
| SetOutput(node, NodeOutputInfo::Bool());
|
| - if (lower()) lowering->DoObjectIsSmi(node);
|
| break;
|
| }
|
|
|
| @@ -1591,80 +1588,6 @@ void SimplifiedLowering::DoStoreBuffer(Node* node) {
|
| }
|
|
|
|
|
| -void SimplifiedLowering::DoObjectIsNumber(Node* node) {
|
| - Node* input = NodeProperties::GetValueInput(node, 0);
|
| - // TODO(bmeurer): Optimize somewhat based on input type.
|
| - Node* check = IsSmi(input);
|
| - Node* branch = graph()->NewNode(common()->Branch(), check, graph()->start());
|
| - Node* if_true = graph()->NewNode(common()->IfTrue(), branch);
|
| - Node* vtrue = jsgraph()->Int32Constant(1);
|
| - Node* if_false = graph()->NewNode(common()->IfFalse(), branch);
|
| - Node* vfalse = graph()->NewNode(
|
| - machine()->WordEqual(), LoadHeapObjectMap(input, if_false),
|
| - jsgraph()->HeapConstant(isolate()->factory()->heap_number_map()));
|
| - Node* control = graph()->NewNode(common()->Merge(2), if_true, if_false);
|
| - node->ReplaceInput(0, vtrue);
|
| - node->AppendInput(graph()->zone(), vfalse);
|
| - node->AppendInput(graph()->zone(), control);
|
| - NodeProperties::ChangeOp(node, common()->Phi(MachineRepresentation::kBit, 2));
|
| -}
|
| -
|
| -
|
| -void SimplifiedLowering::DoObjectIsReceiver(Node* node) {
|
| - Node* input = NodeProperties::GetValueInput(node, 0);
|
| - // TODO(bmeurer): Optimize somewhat based on input type.
|
| - STATIC_ASSERT(LAST_TYPE == LAST_JS_RECEIVER_TYPE);
|
| - Node* check = IsSmi(input);
|
| - Node* branch = graph()->NewNode(common()->Branch(), check, graph()->start());
|
| - Node* if_true = graph()->NewNode(common()->IfTrue(), branch);
|
| - Node* vtrue = jsgraph()->Int32Constant(0);
|
| - Node* if_false = graph()->NewNode(common()->IfFalse(), branch);
|
| - Node* vfalse =
|
| - graph()->NewNode(machine()->Uint32LessThanOrEqual(),
|
| - jsgraph()->Uint32Constant(FIRST_JS_RECEIVER_TYPE),
|
| - LoadMapInstanceType(LoadHeapObjectMap(input, if_false)));
|
| - Node* control = graph()->NewNode(common()->Merge(2), if_true, if_false);
|
| - node->ReplaceInput(0, vtrue);
|
| - node->AppendInput(graph()->zone(), vfalse);
|
| - node->AppendInput(graph()->zone(), control);
|
| - NodeProperties::ChangeOp(node, common()->Phi(MachineRepresentation::kBit, 2));
|
| -}
|
| -
|
| -
|
| -void SimplifiedLowering::DoObjectIsSmi(Node* node) {
|
| - node->ReplaceInput(0,
|
| - graph()->NewNode(machine()->WordAnd(), node->InputAt(0),
|
| - jsgraph()->IntPtrConstant(kSmiTagMask)));
|
| - node->AppendInput(graph()->zone(), jsgraph()->IntPtrConstant(kSmiTag));
|
| - NodeProperties::ChangeOp(node, machine()->WordEqual());
|
| -}
|
| -
|
| -
|
| -Node* SimplifiedLowering::IsSmi(Node* value) {
|
| - return graph()->NewNode(
|
| - machine()->WordEqual(),
|
| - graph()->NewNode(machine()->WordAnd(), value,
|
| - jsgraph()->IntPtrConstant(kSmiTagMask)),
|
| - jsgraph()->IntPtrConstant(kSmiTag));
|
| -}
|
| -
|
| -
|
| -Node* SimplifiedLowering::LoadHeapObjectMap(Node* object, Node* control) {
|
| - return graph()->NewNode(
|
| - machine()->Load(MachineType::AnyTagged()), object,
|
| - jsgraph()->IntPtrConstant(HeapObject::kMapOffset - kHeapObjectTag),
|
| - graph()->start(), control);
|
| -}
|
| -
|
| -
|
| -Node* SimplifiedLowering::LoadMapInstanceType(Node* map) {
|
| - return graph()->NewNode(
|
| - machine()->Load(MachineType::Uint8()), map,
|
| - jsgraph()->IntPtrConstant(Map::kInstanceTypeOffset - kHeapObjectTag),
|
| - graph()->start(), graph()->start());
|
| -}
|
| -
|
| -
|
| Node* SimplifiedLowering::StringComparison(Node* node) {
|
| Operator::Properties properties = node->op()->properties();
|
| Callable callable = CodeFactory::StringCompare(isolate());
|
|
|