| Index: src/compiler/js-generic-lowering.cc
|
| diff --git a/src/compiler/js-generic-lowering.cc b/src/compiler/js-generic-lowering.cc
|
| index fe4fe652760b071f6bcc1d949abfa35ae0ed1e2b..699f7dd60569f8f6abe14767b1ca9325849ace9b 100644
|
| --- a/src/compiler/js-generic-lowering.cc
|
| +++ b/src/compiler/js-generic-lowering.cc
|
| @@ -382,35 +382,15 @@ Node* JSGenericLowering::LowerBranch(Node* node) {
|
|
|
|
|
| Node* JSGenericLowering::LowerJSUnaryNot(Node* node) {
|
| - ToBooleanStub stub(isolate());
|
| - CodeStubInterfaceDescriptor* d = stub.GetInterfaceDescriptor();
|
| - CallDescriptor* desc = linkage()->GetStubCallDescriptor(d);
|
| - Node* to_bool =
|
| - graph()->NewNode(common()->Call(desc), CodeConstant(stub.GetCode()),
|
| - NodeProperties::GetValueInput(node, 0),
|
| - NodeProperties::GetContextInput(node),
|
| - NodeProperties::GetEffectInput(node),
|
| - NodeProperties::GetControlInput(node));
|
| - node->ReplaceInput(0, to_bool);
|
| - PatchInsertInput(node, 1, SmiConstant(Token::EQ));
|
| - ReplaceWithRuntimeCall(node, Runtime::kBooleanize);
|
| + ToBooleanStub stub(isolate(), ToBooleanStub::RESULT_AS_INVERSE_ODDBALL);
|
| + ReplaceWithICStubCall(node, &stub);
|
| return node;
|
| }
|
|
|
|
|
| Node* JSGenericLowering::LowerJSToBoolean(Node* node) {
|
| - ToBooleanStub stub(isolate());
|
| - CodeStubInterfaceDescriptor* d = stub.GetInterfaceDescriptor();
|
| - CallDescriptor* desc = linkage()->GetStubCallDescriptor(d);
|
| - Node* to_bool =
|
| - graph()->NewNode(common()->Call(desc), CodeConstant(stub.GetCode()),
|
| - NodeProperties::GetValueInput(node, 0),
|
| - NodeProperties::GetContextInput(node),
|
| - NodeProperties::GetEffectInput(node),
|
| - NodeProperties::GetControlInput(node));
|
| - node->ReplaceInput(0, to_bool);
|
| - PatchInsertInput(node, 1, SmiConstant(Token::NE));
|
| - ReplaceWithRuntimeCall(node, Runtime::kBooleanize);
|
| + ToBooleanStub stub(isolate(), ToBooleanStub::RESULT_AS_ODDBALL);
|
| + ReplaceWithICStubCall(node, &stub);
|
| return node;
|
| }
|
|
|
|
|