Skip to content

Commit a75bbcb

Browse files
committed
jit: document non-recordable snapshots
1 parent 7982fae commit a75bbcb

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

src/lj_crecord.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2384,10 +2384,11 @@ static int crec_call(jit_State *J, RecordFFData *rd, GCcdata *cd)
23842384
IRType t;
23852385

23862386
#if !defined(LJ_FFI_CALLXS_TEST_ACTIVATE)
2387-
/* Default safety boundary: first-time callbacks still need ACTIVE ->
2388-
** SUSPENDED publication, and boxed results need pre-rooted storage before
2389-
** arbitrary generic calls can record by default. The test activation uses
2390-
** this exact production seam for the already non-allocating return class. */
2387+
/* Default recorder safety boundary: first-time callbacks still need
2388+
** ACTIVE -> SUSPENDED publication, and boxed results need pre-rooted
2389+
** storage before arbitrary generic calls can record by default. The test
2390+
** activation uses this exact production seam for the nonallocating
2391+
** result-handoff classes. */
23912392
lj_trace_err(J, LJ_TRERR_BLACKL);
23922393
#else
23932394
/* Until continuation/pcall/tail-return handoff has its own exact snapshot

src/lj_ffrecord.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ static void LJ_FASTCALL recff_next(jit_State *J, RecordFFData *rd)
662662

663663
/* -- Math library fast functions ----------------------------------------- */
664664

665-
/* Materialize the current caller state for a future generic native call.
665+
/* Materialize the current caller state for a generic native call.
666666
** Keep the snapshot number out of the IR: LOOP substitution copies and
667667
** reindexes snapshots, while backward assembly already tracks the matching
668668
** snapshot for the copied marker.

src/lj_jit.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ typedef struct SnapShot {
221221
uint8_t count; /* Count of taken exits for this snapshot. */
222222
} SnapShot;
223223

224-
#define SNAPCOUNT_DONE 255 /* Already compiled and linked a side trace. */
224+
#define SNAPCOUNT_DONE 255 /* Side trace linked, or exit is non-recordable. */
225225

226226
/* Compressed snapshot entry. */
227227
typedef uint32_t SnapEntry;

0 commit comments

Comments
 (0)