[maglev] Fix catch prediction lookup

Missing predicate updates when implementing TF-compatible exception
handling.

Bug: v8:7700
Change-Id: I6b50f67d15e4a98879d651be196d4032bfc46100
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3891258
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83142}
This commit is contained in:
Leszek Swirski 2022-09-12 16:50:02 +02:00 committed by V8 LUCI CQ
parent 0381aead84
commit 66b788de9f

View File

@ -2288,7 +2288,7 @@ Object Isolate::UnwindAndFindHandler() {
namespace {
HandlerTable::CatchPrediction PredictException(JavaScriptFrame* frame) {
HandlerTable::CatchPrediction prediction;
if (frame->is_turbofan()) {
if (frame->is_optimized()) {
if (frame->LookupExceptionHandlerInTable(nullptr, nullptr) > 0) {
// This optimized frame will catch. It's handler table does not include
// exception prediction, and we need to use the corresponding handler
@ -2368,6 +2368,7 @@ Isolate::CatchType Isolate::PredictExceptionCatcher() {
case StackFrame::INTERPRETED:
case StackFrame::BASELINE:
case StackFrame::TURBOFAN:
case StackFrame::MAGLEV:
case StackFrame::BUILTIN: {
JavaScriptFrame* js_frame = JavaScriptFrame::cast(frame);
Isolate::CatchType prediction = ToCatchType(PredictException(js_frame));