| Index: src/crankshaft/x64/lithium-codegen-x64.cc
|
| diff --git a/src/crankshaft/x64/lithium-codegen-x64.cc b/src/crankshaft/x64/lithium-codegen-x64.cc
|
| index 6ee6ffa5a17356babbe6e843bf285a9246f99caa..f09af7136ece42cf3932406bf0a773856fe31871 100644
|
| --- a/src/crankshaft/x64/lithium-codegen-x64.cc
|
| +++ b/src/crankshaft/x64/lithium-codegen-x64.cc
|
| @@ -7,6 +7,7 @@
|
| #include "src/crankshaft/x64/lithium-codegen-x64.h"
|
|
|
| #include "src/base/bits.h"
|
| +#include "src/builtins/builtins-constructor.h"
|
| #include "src/code-factory.h"
|
| #include "src/code-stubs.h"
|
| #include "src/crankshaft/hydrogen-osr.h"
|
| @@ -179,11 +180,12 @@ void LCodeGen::DoPrologue(LPrologue* instr) {
|
| __ CallRuntime(Runtime::kNewScriptContext);
|
| deopt_mode = Safepoint::kLazyDeopt;
|
| } else {
|
| - if (slots <= FastNewFunctionContextStub::MaximumSlots()) {
|
| - FastNewFunctionContextStub stub(isolate(),
|
| - info()->scope()->scope_type());
|
| + if (slots <=
|
| + ConstructorBuiltinsAssembler::MaximumFunctionContextSlots()) {
|
| + Callable callable = CodeFactory::FastNewFunctionContext(
|
| + isolate(), info()->scope()->scope_type());
|
| __ Set(FastNewFunctionContextDescriptor::SlotsRegister(), slots);
|
| - __ CallStub(&stub);
|
| + __ Call(callable.code(), RelocInfo::CODE_TARGET);
|
| // Result of FastNewFunctionContextStub is always in new space.
|
| need_write_barrier = false;
|
| } else {
|
|
|