Commit 165dd87
[maglev] Record phi use as smi when eliding a write barrier
We can only elide the write barrier under the assumption that
the phi's type will remain a Smi.
If we don't record its tagged usage at this bytecode offset, the
phi representation selector might later change its representation
to int32. It will then emit a `Int32ToNumber` before
`StoreTaggedFieldNoWriteBarrier`.
This is incorrect because it could allocate a heap number,
potentially promoting it to old space during a GC and requiring a
write barrier.
Fixed: 362784006
Change-Id: I775d7cc151189c12f59fc5ff0edccada1665f230
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5830348
Auto-Submit: Victor Gomes <[email protected]>
Reviewed-by: Patrick Thier <[email protected]>
Commit-Queue: Victor Gomes <[email protected]>
Commit-Queue: Patrick Thier <[email protected]>
Cr-Commit-Position: refs/heads/main@{#95916}1 parent 6210313 commit 165dd87
2 files changed
Lines changed: 23 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4307 | 4307 | | |
4308 | 4308 | | |
4309 | 4309 | | |
4310 | | - | |
| 4310 | + | |
| 4311 | + | |
| 4312 | + | |
| 4313 | + | |
4311 | 4314 | | |
4312 | 4315 | | |
4313 | 4316 | | |
| |||
| 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 | + | |
0 commit comments