Commit ec8c6b9
authored
deps: V8: cherry-pick 657d8de27427
Original commit message:
[maglev] Fix throwing node inside eager inlining
This commit refactors the exception handling logic to correctly identify
and associate nodes with their respective `catch` blocks, even
when multiple levels of inlining are involved.
Previously, the check `!IsInsideTryBlock() && !is_eager_inline()` was
insufficient to determine if catch block inside `CatchDetails` was
already created.
Specifically, consider the case where:
1. Function `bar` is non-eagerly inlined into `foo`.
2. `foo` contains a `catch` block.
3. `bar` calls `in_bar`, which is eagerly inlined.
4. A node within `in_bar` can `throw`.
In this scenario, `is_eager_inline` would be true when compiling
`in_bar`, leading to an incorrect assumption that the catch block didn't exist yet.
This change addresses the issue by propagating a boolean value via
`CatchDetails`. This boolean accurately indicates whether a `catch`
block is present in the call chain, allowing for correct exception
handling regardless of inlining depth or eagerness.
Fixed: 417768368
Change-Id: Ic52f72f302b4dc644bdcad939addf98111bc525b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6563500
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#100380}
Refs: v8/v8@657d8de
PR-URL: #62784
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>1 parent b881658 commit ec8c6b9
3 files changed
Lines changed: 43 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
| 181 | + | |
181 | 182 | | |
182 | 183 | | |
183 | 184 | | |
| |||
1220 | 1221 | | |
1221 | 1222 | | |
1222 | 1223 | | |
1223 | | - | |
| 1224 | + | |
| 1225 | + | |
1224 | 1226 | | |
1225 | 1227 | | |
1226 | 1228 | | |
| |||
1276 | 1278 | | |
1277 | 1279 | | |
1278 | 1280 | | |
1279 | | - | |
| 1281 | + | |
1280 | 1282 | | |
1281 | 1283 | | |
1282 | 1284 | | |
| |||
1286 | 1288 | | |
1287 | 1289 | | |
1288 | 1290 | | |
1289 | | - | |
| 1291 | + | |
| 1292 | + | |
1290 | 1293 | | |
1291 | 1294 | | |
1292 | 1295 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
0 commit comments