Repository navigation
Commit cd506b1
committed
[JSC] Object allocation sinking should escape allocations without recursion
https://bugs.webkit.org/show_bug.cgi?id=328024
Reviewed by Yusuke Suzuki.
LocalHeap::escapeAllocation called itself for each field of the escaping
allocation, so the recursion was as deep as the chain of allocations. A function
that creates a few thousand nested objects overflowed the stack of the thread
compiling it. This patch uses a worklist instead.
Test: JSTests/stress/allocation-sinking-escape-long-chain-of-allocations.js
* JSTests/stress/allocation-sinking-escape-long-chain-of-allocations.js: Added.
(runNearStackLimit.t):
(runNearStackLimit):
(let.object.runNearStackLimit):
* Source/JavaScriptCore/dfg/DFGObjectAllocationSinkingPhase.cpp:
Canonical link: https://commits.webkit.org/324187@main1 parent 9f224fe commit cd506b1
2 files changed
Lines changed: 47 additions & 9 deletions
File tree
- JSTests/stress
- Source/JavaScriptCore/dfg
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
735 | 735 | | |
736 | 736 | | |
737 | 737 | | |
738 | | - | |
739 | | - | |
740 | | - | |
| 738 | + | |
| 739 | + | |
741 | 740 | | |
742 | | - | |
743 | | - | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
744 | 745 | | |
745 | | - | |
746 | | - | |
| 746 | + | |
| 747 | + | |
747 | 748 | | |
748 | | - | |
749 | | - | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
750 | 755 | | |
751 | 756 | | |
752 | 757 | | |
| |||
0 commit comments