Index: src/crankshaft/mips/lithium-codegen-mips.cc |
diff --git a/src/crankshaft/mips/lithium-codegen-mips.cc b/src/crankshaft/mips/lithium-codegen-mips.cc |
index ad988b22128c598ddd5820ee566dbe35119b90d4..df2f3711850a24fbcabec6af7d45f76a6d92d437 100644 |
--- a/src/crankshaft/mips/lithium-codegen-mips.cc |
+++ b/src/crankshaft/mips/lithium-codegen-mips.cc |
@@ -28,6 +28,7 @@ |
#include "src/crankshaft/mips/lithium-codegen-mips.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" |
@@ -202,13 +203,14 @@ 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()); |
__ li(FastNewFunctionContextDescriptor::SlotsRegister(), |
Operand(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(a1); |