Index: src/ppc/deoptimizer-ppc.cc |
diff --git a/src/ppc/deoptimizer-ppc.cc b/src/ppc/deoptimizer-ppc.cc |
index d8fbbfd12803a2feb1ec36c1ed0b5a9a48a0b63e..e4f642b1272ee911425e31a45b71d6f7de817968 100644 |
--- a/src/ppc/deoptimizer-ppc.cc |
+++ b/src/ppc/deoptimizer-ppc.cc |
@@ -162,7 +162,12 @@ void Deoptimizer::TableEntryGenerator::Generate() { |
// Allocate a new deoptimizer object. |
// Pass six arguments in r3 to r8. |
__ PrepareCallCFunction(6, r8); |
+ __ li(r3, Operand::Zero()); |
+ Label context_check; |
+ __ LoadP(r4, MemOperand(fp, CommonFrameConstants::kContextOrFrameTypeOffset)); |
+ __ JumpIfSmi(r4, &context_check); |
__ LoadP(r3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
+ __ bind(&context_check); |
__ li(r4, Operand(type())); // bailout type, |
// r5: bailout id already loaded. |
// r6: code address or 0 already loaded. |