Repository navigation
JIT: fix build breaks with EMIT_TRACK_STACK_DEPTH=0 - #121997
Conversation
And then set it to 0 for Wasm.
|
@dotnet/jit-contrib @SingleAccretion PTAL |
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
|
LGTM. Do we potentially want to track stack depth later though for when we're using the linear memory stack? |
There was a problem hiding this comment.
Pull request overview
This PR fixes build breaks that occur when EMIT_TRACK_STACK_DEPTH is set to 0, then sets it to 0 for the WebAssembly target. WebAssembly doesn't need to track argument pushes/pops on the stack, so disabling this tracking is appropriate for the platform.
- Moved
emitRecordGCcall()andemitLastInsIsCallWithGC()declarations outside theEMIT_TRACK_STACK_DEPTHconditional guard in emit.h - Adjusted the
#endifplacement in emit.cpp to keep GC call recording functions available whenEMIT_TRACK_STACK_DEPTH=0 - Set
EMIT_TRACK_STACK_DEPTHto 0 for WASM in targetwasm.h with an updated comment
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/coreclr/jit/targetwasm.h | Changed EMIT_TRACK_STACK_DEPTH from 1 to 0 and updated the comment to clarify WASM doesn't need to track arg pushes/pops |
| src/coreclr/jit/emit.h | Moved emitRecordGCcall() and emitLastInsIsCallWithGC() declarations outside the EMIT_TRACK_STACK_DEPTH guard so they're available for GC tracking even when stack depth tracking is disabled |
| src/coreclr/jit/emit.cpp | Moved the #endif // EMIT_TRACK_STACK_DEPTH earlier to keep only stack-tracking functions guarded, while making GC call recording functions available unconditionally |
I don't think so. The code this define relates to is only needed for |
And then set it to 0 for Wasm.