| Index: src/compiler/js-generic-lowering.cc
|
| diff --git a/src/compiler/js-generic-lowering.cc b/src/compiler/js-generic-lowering.cc
|
| index 699f7dd60569f8f6abe14767b1ca9325849ace9b..68cc1cea9053358bbd5a065647e8300b83bdc56e 100644
|
| --- a/src/compiler/js-generic-lowering.cc
|
| +++ b/src/compiler/js-generic-lowering.cc
|
| @@ -292,6 +292,14 @@ REPLACE_UNIMPLEMENTED(JSDebugger)
|
| #undef REPLACE_UNIMPLEMENTED
|
|
|
|
|
| +static CallDescriptor::DeoptimizationSupport DeoptimizationSupportForNode(
|
| + Node* node) {
|
| + return OperatorProperties::CanLazilyDeoptimize(node->op())
|
| + ? CallDescriptor::kCanDeoptimize
|
| + : CallDescriptor::kCannotDeoptimize;
|
| +}
|
| +
|
| +
|
| void JSGenericLowering::ReplaceWithCompareIC(Node* node, Token::Value token,
|
| bool pure) {
|
| BinaryOpICStub stub(isolate(), Token::ADD); // TODO(mstarzinger): Hack.
|
| @@ -324,7 +332,8 @@ void JSGenericLowering::ReplaceWithCompareIC(Node* node, Token::Value token,
|
| void JSGenericLowering::ReplaceWithICStubCall(Node* node,
|
| HydrogenCodeStub* stub) {
|
| CodeStubInterfaceDescriptor* d = stub->GetInterfaceDescriptor();
|
| - CallDescriptor* desc = linkage()->GetStubCallDescriptor(d);
|
| + CallDescriptor* desc = linkage()->GetStubCallDescriptor(
|
| + d, 0, DeoptimizationSupportForNode(node));
|
| Node* stub_code = CodeConstant(stub->GetCode());
|
| PatchInsertInput(node, 0, stub_code);
|
| PatchOperator(node, common()->Call(desc));
|
| @@ -355,12 +364,8 @@ void JSGenericLowering::ReplaceWithRuntimeCall(Node* node,
|
| Operator::Property props = node->op()->properties();
|
| const Runtime::Function* fun = Runtime::FunctionForId(f);
|
| int nargs = (nargs_override < 0) ? fun->nargs : nargs_override;
|
| - CallDescriptor::DeoptimizationSupport deopt =
|
| - OperatorProperties::CanLazilyDeoptimize(node->op())
|
| - ? CallDescriptor::kCanDeoptimize
|
| - : CallDescriptor::kCannotDeoptimize;
|
| - CallDescriptor* desc =
|
| - linkage()->GetRuntimeCallDescriptor(f, nargs, props, deopt);
|
| + CallDescriptor* desc = linkage()->GetRuntimeCallDescriptor(
|
| + f, nargs, props, DeoptimizationSupportForNode(node));
|
| Node* ref = ExternalConstant(ExternalReference(f, isolate()));
|
| Node* arity = Int32Constant(nargs);
|
| if (!centrystub_constant_.is_set()) {
|
| @@ -508,7 +513,8 @@ Node* JSGenericLowering::LowerJSCallConstruct(Node* node) {
|
| int arity = OpParameter<int>(node);
|
| CallConstructStub stub(isolate(), NO_CALL_CONSTRUCTOR_FLAGS);
|
| CodeStubInterfaceDescriptor* d = GetInterfaceDescriptor(isolate(), &stub);
|
| - CallDescriptor* desc = linkage()->GetStubCallDescriptor(d, arity);
|
| + CallDescriptor* desc = linkage()->GetStubCallDescriptor(
|
| + d, arity, DeoptimizationSupportForNode(node));
|
| Node* stub_code = CodeConstant(stub.GetCode());
|
| Node* construct = NodeProperties::GetValueInput(node, 0);
|
| PatchInsertInput(node, 0, stub_code);
|
| @@ -524,7 +530,8 @@ Node* JSGenericLowering::LowerJSCallFunction(Node* node) {
|
| CallParameters p = OpParameter<CallParameters>(node);
|
| CallFunctionStub stub(isolate(), p.arity - 2, p.flags);
|
| CodeStubInterfaceDescriptor* d = GetInterfaceDescriptor(isolate(), &stub);
|
| - CallDescriptor* desc = linkage()->GetStubCallDescriptor(d, p.arity - 1);
|
| + CallDescriptor* desc = linkage()->GetStubCallDescriptor(
|
| + d, p.arity - 1, DeoptimizationSupportForNode(node));
|
| Node* stub_code = CodeConstant(stub.GetCode());
|
| PatchInsertInput(node, 0, stub_code);
|
| PatchOperator(node, common()->Call(desc));
|
|
|