Index: src/arm64/deoptimizer-arm64.cc |
diff --git a/src/arm64/deoptimizer-arm64.cc b/src/arm64/deoptimizer-arm64.cc |
index 57ddfcf67143478d426e007640dfba9e3862847e..a70104fcc28992db7656326f5e9126a7c6e4c0e3 100644 |
--- a/src/arm64/deoptimizer-arm64.cc |
+++ b/src/arm64/deoptimizer-arm64.cc |
@@ -131,7 +131,12 @@ void Deoptimizer::TableEntryGenerator::Generate() { |
__ Sub(fp_to_sp, fp, fp_to_sp); |
// Allocate a new deoptimizer object. |
+ __ Mov(x0, 0); |
+ Label context_check; |
+ __ Ldr(x1, MemOperand(fp, CommonFrameConstants::kContextOrFrameTypeOffset)); |
+ __ JumpIfSmi(x1, &context_check); |
__ Ldr(x0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
+ __ bind(&context_check); |
__ Mov(x1, type()); |
// Following arguments are already loaded: |
// - x2: bailout id |