@@ -160,7 +160,7 @@ typedef uint32_t MCode;
160160
161161/* Stack snapshot header. */
162162typedef struct SnapShot {
163- uint16_t mapofs ; /* Offset into snapshot map. */
163+ uint32_t mapofs ; /* Offset into snapshot map. */
164164 IRRef1 ref ; /* First IR ref for this snapshot. */
165165 uint8_t nslots ; /* Number of valid slots. */
166166 uint8_t topslot ; /* Maximum frame extent. */
@@ -227,17 +227,15 @@ typedef enum {
227227/* Trace object. */
228228typedef struct GCtrace {
229229 GCHeader ;
230- uint8_t topslot ; /* Top stack slot already checked to be allocated. */
231- uint8_t linktype ; /* Type of link. */
230+ uint16_t nsnap ; /* Number of snapshots. */
232231 IRRef nins ; /* Next IR instruction. Biased with REF_BIAS. */
233232#if LJ_GC64
234233 uint32_t unused_gc64 ;
235234#endif
236235 GCRef gclist ;
237236 IRIns * ir ; /* IR instructions/constants. Biased with REF_BIAS. */
238237 IRRef nk ; /* Lowest IR constant. Biased with REF_BIAS. */
239- uint16_t nsnap ; /* Number of snapshots. */
240- uint16_t nsnapmap ; /* Number of snapshot map elements. */
238+ uint32_t nsnapmap ; /* Number of snapshot map elements. */
241239 SnapShot * snap ; /* Snapshot array. */
242240 SnapEntry * snapmap ; /* Snapshot map. */
243241 GCRef startpt ; /* Starting prototype. */
@@ -254,6 +252,8 @@ typedef struct GCtrace {
254252 TraceNo1 nextroot ; /* Next root trace for same prototype. */
255253 TraceNo1 nextside ; /* Next side trace of same root trace. */
256254 uint8_t sinktags ; /* Trace has SINK tags. */
255+ uint8_t topslot ; /* Top stack slot already checked to be allocated. */
256+ uint8_t linktype ; /* Type of link. */
257257 uint8_t unused1 ;
258258#ifdef LUAJIT_USE_GDBJIT
259259 void * gdbjit_entry ; /* GDB JIT entry. */
0 commit comments