Index: src/crankshaft/x87/lithium-codegen-x87.cc |
diff --git a/src/crankshaft/x87/lithium-codegen-x87.cc b/src/crankshaft/x87/lithium-codegen-x87.cc |
index 7428cbe579f9c2691fffcfd1d58416290ff0b195..9c932bc6ae8b81dd8b1496ba5758b6bcd4a05cb9 100644 |
--- a/src/crankshaft/x87/lithium-codegen-x87.cc |
+++ b/src/crankshaft/x87/lithium-codegen-x87.cc |
@@ -7,6 +7,7 @@ |
#include "src/crankshaft/x87/lithium-codegen-x87.h" |
#include "src/base/bits.h" |
+#include "src/builtins/builtins-constructor.h" |
#include "src/code-factory.h" |
#include "src/code-stubs.h" |
#include "src/codegen.h" |
@@ -146,16 +147,17 @@ 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()); |
__ mov(FastNewFunctionContextDescriptor::SlotsRegister(), |
Immediate(slots)); |
- __ CallStub(&stub); |
- // Result of FastNewFunctionContextStub is always in new space. |
+ __ Call(callable.code(), RelocInfo::CODE_TARGET); |
+ // Result of the FastNewFunctionContext builtin is always in new space. |
need_write_barrier = false; |
} else { |
- __ push(edi); |
+ __ Push(edi); |
__ Push(Smi::FromInt(info()->scope()->scope_type())); |
__ CallRuntime(Runtime::kNewFunctionContext); |
} |