Repository navigation
Commit 80ed48b
[wasi][prototype] Model wasm class-init helper as value-returning in the JIT
Completes gate #2 (91d9e36). That change made corelib InitClass/
InitInstantiatedClass (InitHelpers.cs) return void* so the compiled
call_indirect signature matches the interpreter's value-returning portable
entry point convention, but the JIT caller side still typed
CORINFO_HELP_INITCLASS/INITINSTCLASS as TYP_VOID. On wasm the R2R caller
therefore emitted a (...)->() call_indirect while the runtime dispatches the
cold class-init through the i32-returning thunk, trapping with
"function signature mismatch" on the first R2R class-init.
Model the class-init helpers as value-returning (TYP_I_IMPL) on wasm at the
five sites that create them (fgGetStaticsCCtorHelper, impInitClass runtime
lookup, and the three fgInitThisClass generic-lookup cases). The helper
result is pushed and discarded via the existing unused-value drop in wasm
codegen.
Fixes the residual overflow bucket of dotnet#129622 (conv_ovf, 127931,
indexMinusOne now pass under R2R in both interpreted- and R2R-corelib
configs) and removes the class-init signature-mismatch trap in dotnet#130634.
No regression in the previously passing type-load tests.
Prototype-only; for the future WASI R2R PR.
Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 2902374a-f352-4c46-bcec-8a35c97733ae1 parent 1155368 commit 80ed48b
4 files changed
Lines changed: 18 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3358 | 3358 | | |
3359 | 3359 | | |
3360 | 3360 | | |
| 3361 | + | |
| 3362 | + | |
| 3363 | + | |
| 3364 | + | |
| 3365 | + | |
| 3366 | + | |
| 3367 | + | |
| 3368 | + | |
| 3369 | + | |
| 3370 | + | |
| 3371 | + | |
| 3372 | + | |
3361 | 3373 | | |
3362 | 3374 | | |
3363 | 3375 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
766 | 766 | | |
767 | 767 | | |
768 | 768 | | |
769 | | - | |
| 769 | + | |
770 | 770 | | |
771 | 771 | | |
772 | 772 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3909 | 3909 | | |
3910 | 3910 | | |
3911 | 3911 | | |
3912 | | - | |
| 3912 | + | |
3913 | 3913 | | |
3914 | 3914 | | |
3915 | 3915 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14565 | 14565 | | |
14566 | 14566 | | |
14567 | 14567 | | |
14568 | | - | |
| 14568 | + | |
14569 | 14569 | | |
14570 | 14570 | | |
14571 | 14571 | | |
14572 | 14572 | | |
14573 | 14573 | | |
14574 | 14574 | | |
14575 | | - | |
| 14575 | + | |
14576 | 14576 | | |
14577 | 14577 | | |
14578 | 14578 | | |
14579 | 14579 | | |
14580 | 14580 | | |
14581 | 14581 | | |
14582 | | - | |
| 14582 | + | |
| 14583 | + | |
14583 | 14584 | | |
14584 | 14585 | | |
14585 | 14586 | | |
| |||
0 commit comments