[maglev] Fix OOB element load deopt loop

Only emit the deopting bounds check for element loads that have
STANDARD_LOAD feedback.

Bug: v8:7700
Change-Id: I80a2d2319379e0560e4d1e4defdec663bdcbfb0d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3952135
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83709}
This commit is contained in:
Leszek Swirski 2022-10-14 11:27:20 +02:00 committed by V8 LUCI CQ
parent a096dea08d
commit f7a328b4cd

View File

@ -1473,6 +1473,12 @@ bool MaglevGraphBuilder::TryBuildElementAccess(
return false; return false;
} }
// TODO(leszeks): Add non-deopting bounds check (has to support undefined
// values).
if (feedback.keyed_mode().load_mode() != STANDARD_LOAD) {
return false;
}
// TODO(victorgomes): Add fast path for loading from HeapConstant. // TODO(victorgomes): Add fast path for loading from HeapConstant.
// TODO(victorgomes): Add fast path for loading from String. // TODO(victorgomes): Add fast path for loading from String.