Index: src/mips/deoptimizer-mips.cc |
diff --git a/src/mips/deoptimizer-mips.cc b/src/mips/deoptimizer-mips.cc |
index 0caaa4c9d4f82033ad4b42b730261612633e3a79..090e52c4aebe81dc12b5f8bbda943f54fd2fd37b 100644 |
--- a/src/mips/deoptimizer-mips.cc |
+++ b/src/mips/deoptimizer-mips.cc |
@@ -160,10 +160,15 @@ void Deoptimizer::TableEntryGenerator::Generate() { |
__ Subu(t0, fp, t0); |
// Allocate a new deoptimizer object. |
- // Pass four arguments in a0 to a3 and fifth & sixth arguments on stack. |
__ PrepareCallCFunction(6, t1); |
+ // Pass four arguments in a0 to a3 and fifth & sixth arguments on stack. |
+ __ mov(a0, zero_reg); |
+ Label context_check; |
+ __ lw(a1, MemOperand(fp, CommonFrameConstants::kContextOrFrameTypeOffset)); |
+ __ JumpIfSmi(a1, &context_check); |
__ lw(a0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
- __ li(a1, Operand(type())); // bailout type, |
+ __ bind(&context_check); |
+ __ li(a1, Operand(type())); // Bailout type. |
// a2: bailout id already loaded. |
// a3: code address or 0 already loaded. |
__ sw(t0, CFunctionArgumentOperand(5)); // Fp-to-sp delta. |