Skip to content

Commit 80af2ef

Browse files
authored
JIT: fix build breaks with EMIT_TRACK_STACK_DEPTH=0 (#121997)
And then set it to 0 for Wasm.
1 parent 3b3270b commit 80af2ef

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/coreclr/jit/emit.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10514,6 +10514,10 @@ void emitter::emitStackKillArgs(BYTE* addr, unsigned count, unsigned char callIn
1051410514
}
1051510515
}
1051610516

10517+
/*****************************************************************************/
10518+
#endif // EMIT_TRACK_STACK_DEPTH
10519+
/*****************************************************************************/
10520+
1051710521
/*****************************************************************************
1051810522
* A helper for recording a relocation with the EE.
1051910523
*/
@@ -10603,9 +10607,6 @@ void emitter::emitRecordCallSite(ULONG instrOffset, /* IN */
1060310607
#endif // defined(DEBUG)
1060410608
}
1060510609

10606-
/*****************************************************************************/
10607-
#endif // EMIT_TRACK_STACK_DEPTH
10608-
/*****************************************************************************/
1060910610
/*****************************************************************************/
1061010611

1061110612
#ifdef DEBUG

src/coreclr/jit/emit.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3455,16 +3455,15 @@ class emitter
34553455

34563456
void emitStackKillArgs(BYTE* addr, unsigned count, unsigned char callInstrSize);
34573457

3458-
void emitRecordGCcall(BYTE* codePos, unsigned char callInstrSize);
3459-
3460-
bool emitLastInsIsCallWithGC();
3461-
34623458
// Helpers for the above
34633459

34643460
void emitStackPushLargeStk(BYTE* addr, GCtype gcType, unsigned count = 1);
34653461
void emitStackPopLargeStk(BYTE* addr, bool isCall, unsigned char callInstrSize, unsigned count = 1);
34663462
#endif // EMIT_TRACK_STACK_DEPTH
34673463

3464+
bool emitLastInsIsCallWithGC();
3465+
void emitRecordGCcall(BYTE* codePos, unsigned char callInstrSize);
3466+
34683467
/* Liveness of stack variables, and registers */
34693468

34703469
void emitUpdateLiveGCvars(VARSET_VALARG_TP vars, BYTE* addr);

src/coreclr/jit/targetwasm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747
// TODO-WASM-CQ: measure if "CSE_CONSTS" is beneficial.
4848
#define CSE_CONSTS 1 // Enable if we want to CSE constants
49-
#define EMIT_TRACK_STACK_DEPTH 1 // TODO-WASM: set to 0.
49+
#define EMIT_TRACK_STACK_DEPTH 0 // No need to track arg pushes/pops
5050
#define EMIT_GENERATE_GCINFO 0 // Codegen and emit not responsible for GC liveness tracking and GCInfo generation
5151

5252
// Since we don't have a fixed register set on WASM, we set most of the following register defines to 'none'-like values.

0 commit comments

Comments
 (0)