aboutsummaryrefslogtreecommitdiff
path: root/src/lj_obj.h
diff options
context:
space:
mode:
authorMike Pall <mike>2025-11-10 18:11:26 +0100
committerMike Pall <mike>2025-11-10 18:11:26 +0100
commit5c647754a687a910ef40a097fbf8f7415561c8aa (patch)
tree239007a579b77f8f370234a42b2f25054abf2807 /src/lj_obj.h
parentfdf2379ccba1eb68ff07f8bc48541568f5bbdfbf (diff)
downloadluajit-5c647754a687a910ef40a097fbf8f7415561c8aa.tar.gz
luajit-5c647754a687a910ef40a097fbf8f7415561c8aa.tar.bz2
luajit-5c647754a687a910ef40a097fbf8f7415561c8aa.zip
Run VM events and finalizers in separate state.
Reported by Sergey Kaplun. #1403
Diffstat (limited to 'src/lj_obj.h')
-rw-r--r--src/lj_obj.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lj_obj.h b/src/lj_obj.h
index 855727bf..73b186e2 100644
--- a/src/lj_obj.h
+++ b/src/lj_obj.h
@@ -647,6 +647,7 @@ typedef struct global_State {
647 TValue tmptv, tmptv2; /* Temporary TValues. */ 647 TValue tmptv, tmptv2; /* Temporary TValues. */
648 Node nilnode; /* Fallback 1-element hash part (nil key and value). */ 648 Node nilnode; /* Fallback 1-element hash part (nil key and value). */
649 TValue registrytv; /* Anchor for registry. */ 649 TValue registrytv; /* Anchor for registry. */
650 GCRef vmthref; /* Link to VM thread. */
650 GCupval uvhead; /* Head of double-linked list of all open upvalues. */ 651 GCupval uvhead; /* Head of double-linked list of all open upvalues. */
651 int32_t hookcount; /* Instruction hook countdown. */ 652 int32_t hookcount; /* Instruction hook countdown. */
652 int32_t hookcstart; /* Start count for instruction hook counter. */ 653 int32_t hookcstart; /* Start count for instruction hook counter. */
@@ -663,6 +664,7 @@ typedef struct global_State {
663} global_State; 664} global_State;
664 665
665#define mainthread(g) (&gcref(g->mainthref)->th) 666#define mainthread(g) (&gcref(g->mainthref)->th)
667#define vmthread(g) (&gcref(g->vmthref)->th)
666#define niltv(L) \ 668#define niltv(L) \
667 check_exp(tvisnil(&G(L)->nilnode.val), &G(L)->nilnode.val) 669 check_exp(tvisnil(&G(L)->nilnode.val), &G(L)->nilnode.val)
668#define niltvg(g) \ 670#define niltvg(g) \