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..82d01ed8517dbf1ac8a05e686df93870ee5effaa 100644 |
--- a/src/compiler/js-generic-lowering.cc |
+++ b/src/compiler/js-generic-lowering.cc |
@@ -349,18 +349,22 @@ void JSGenericLowering::ReplaceWithBuiltinCall(Node* node, |
} |
+static CallDescriptor::DeoptimizationSupport DeoptimizationSupportForNode( |
+ Node* node) { |
+ return OperatorProperties::CanLazilyDeoptimize(node->op()) |
+ ? CallDescriptor::kCanDeoptimize |
+ : CallDescriptor::kCannotDeoptimize; |
+} |
+ |
+ |
void JSGenericLowering::ReplaceWithRuntimeCall(Node* node, |
Runtime::FunctionId f, |
int nargs_override) { |
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()) { |
@@ -544,7 +548,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)); |