diff --git a/src/compiler/backend/arm64/code-generator-arm64.cc b/src/compiler/backend/arm64/code-generator-arm64.cc index ceb05f0c63..c8cc520762 100644 --- a/src/compiler/backend/arm64/code-generator-arm64.cc +++ b/src/compiler/backend/arm64/code-generator-arm64.cc @@ -3397,13 +3397,14 @@ void CodeGenerator::PrepareForDeoptimizationExits( __ bind(&jump_deoptimization_or_resume_entry_labels_[j]); __ LoadEntryFromBuiltin(Deoptimizer::GetDeoptWithResumeBuiltin(reason), scratch); + __ Jump(scratch); } } else { __ bind(&jump_deoptimization_entry_labels_[i]); __ LoadEntryFromBuiltin(Deoptimizer::GetDeoptimizationEntry(kind), scratch); + __ Jump(scratch); } - __ Jump(scratch); } } diff --git a/test/mjsunit/regress/regress-1225561.js b/test/mjsunit/regress/regress-1225561.js new file mode 100644 index 0000000000..5ec2d665ad --- /dev/null +++ b/test/mjsunit/regress/regress-1225561.js @@ -0,0 +1,27 @@ +// Copyright 2021 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Flags: --allow-natives-syntax --turboprop --turbo-dynamic-map-checks + +function bar(obj) { + return Object.getPrototypeOf(obj); +} + +function foo(a, b) { + try { + a.a; + } catch (e) {} + try { + b[bar()] = 1; + } catch (e) {} +} + +var arg = { + a: 10, +}; + +%PrepareFunctionForOptimization(foo); +foo(arg); +%OptimizeFunctionOnNextCall(foo); +foo();