| Index: src/compiler/mips/code-generator-mips.cc
|
| diff --git a/src/compiler/mips/code-generator-mips.cc b/src/compiler/mips/code-generator-mips.cc
|
| index b808856dc011e6654514067036386be82d137e2c..e72e0224aa1904198943a60462bf97b1c8971e61 100644
|
| --- a/src/compiler/mips/code-generator-mips.cc
|
| +++ b/src/compiler/mips/code-generator-mips.cc
|
| @@ -7,6 +7,7 @@
|
| #include "src/compiler/gap-resolver.h"
|
| #include "src/compiler/node-matchers.h"
|
| #include "src/compiler/node-properties-inl.h"
|
| +#include "src/compiler/osr.h"
|
| #include "src/mips/macro-assembler-mips.h"
|
| #include "src/scopes.h"
|
|
|
| @@ -879,6 +880,22 @@ void CodeGenerator::AssemblePrologue() {
|
| StandardFrameConstants::kFixedFrameSizeFromFp);
|
| }
|
| int stack_slots = frame()->GetSpillSlotCount();
|
| +
|
| + if (info()->is_osr()) {
|
| + // TurboFan OSR-compiled functions cannot be entered directly.
|
| + // TODO(titzer): put an abort into the header of OSR functions on mips.
|
| +
|
| + // Unoptimized code jumps directly to this entrypoint while the unoptimized
|
| + // frame is still on the stack. Optimized code uses OSR values directly from
|
| + // the unoptimized frame. Thus, all that needs to be done is to allocate the
|
| + // remaining stack slots.
|
| + if (FLAG_code_comments) __ RecordComment("-- OSR entrypoint --");
|
| + osr_pc_offset_ = __ pc_offset();
|
| + size_t unoptimized_slots = OsrHelper(info()).UnoptimizedFrameSlots();
|
| + DCHECK(stack_slots >= static_cast<int>(unoptimized_slots));
|
| + stack_slots -= unoptimized_slots;
|
| + }
|
| +
|
| if (stack_slots > 0) {
|
| __ Subu(sp, sp, Operand(stack_slots * kPointerSize));
|
| }
|
|
|