Index: src/arm/deoptimizer-arm.cc |
diff --git a/src/arm/deoptimizer-arm.cc b/src/arm/deoptimizer-arm.cc |
index 21436ff550bfacfbbacf4c60b36426f008b2bf1a..3ea7222dfe90d9211bffa37966ad661235a32615 100644 |
--- a/src/arm/deoptimizer-arm.cc |
+++ b/src/arm/deoptimizer-arm.cc |
@@ -156,7 +156,12 @@ void Deoptimizer::TableEntryGenerator::Generate() { |
// Allocate a new deoptimizer object. |
// Pass four arguments in r0 to r3 and fifth argument on stack. |
__ PrepareCallCFunction(6, r5); |
+ __ mov(r0, Operand(0)); |
+ Label context_check; |
+ __ ldr(r1, MemOperand(fp, CommonFrameConstants::kContextOrFrameTypeOffset)); |
+ __ JumpIfSmi(r1, &context_check); |
__ ldr(r0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
+ __ bind(&context_check); |
__ mov(r1, Operand(type())); // bailout type, |
// r2: bailout id already loaded. |
// r3: code address or 0 already loaded. |