Commit 7d6c85e
committed
[JSC] ASSERTION FAILED: child(0)->type() == phi->type()
rdar://147364146
https://bugs.webkit.org/show_bug.cgi?id=290009
Reviewed by Yusuke Suzuki.
Array allocation sinking introduced cases where Upsilon edges may come from nodes
with result types like double or int52, instead of the previously assumed JS result
type. This breaks assumptions made during Phi construction, which always expected
NodeResultJS.
This patch adds `fixUpsilonEdge()`, a pass that ensures Upsilon inputs match the
expected Phi result type by inserting appropriate ValueRep nodes when needed.
* JSTests/stress/array-allocation-sink-upsilon-with-double-value.js: Added.
(test):
* Source/JavaScriptCore/dfg/DFGFlushFormat.h:
Canonical link: https://commits.webkit.org/292572@main1 parent b9ce71c commit 7d6c85e
2 files changed
Lines changed: 50 additions & 0 deletions
File tree
- JSTests/stress
- Source/JavaScriptCore/dfg
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
Lines changed: 36 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
862 | 862 | | |
863 | 863 | | |
864 | 864 | | |
| 865 | + | |
865 | 866 | | |
866 | 867 | | |
867 | 868 | | |
| |||
2819 | 2820 | | |
2820 | 2821 | | |
2821 | 2822 | | |
| 2823 | + | |
| 2824 | + | |
| 2825 | + | |
| 2826 | + | |
| 2827 | + | |
| 2828 | + | |
| 2829 | + | |
| 2830 | + | |
| 2831 | + | |
| 2832 | + | |
| 2833 | + | |
| 2834 | + | |
| 2835 | + | |
| 2836 | + | |
| 2837 | + | |
| 2838 | + | |
| 2839 | + | |
| 2840 | + | |
| 2841 | + | |
| 2842 | + | |
| 2843 | + | |
| 2844 | + | |
| 2845 | + | |
| 2846 | + | |
| 2847 | + | |
| 2848 | + | |
| 2849 | + | |
| 2850 | + | |
| 2851 | + | |
| 2852 | + | |
| 2853 | + | |
| 2854 | + | |
| 2855 | + | |
| 2856 | + | |
| 2857 | + | |
2822 | 2858 | | |
2823 | 2859 | | |
2824 | 2860 | | |
| |||
0 commit comments