fold extended scope free into no parent pointer case

This commit is contained in:
dzaima 2022-02-02 14:03:43 +02:00
parent eca92b6a5d
commit d9c0e38c12

View File

@ -10,6 +10,9 @@
#undef JIT_START #undef JIT_START
#define JIT_START -1 #define JIT_START -1
#endif #endif
#ifndef EXT_ONLY_GLOBAL
#define EXT_ONLY_GLOBAL 1
#endif
enum { enum {
PUSH = 0x00, // N; push object from objs[N] PUSH = 0x00, // N; push object from objs[N]
@ -235,6 +238,9 @@ usz getPageSize(void);
DEF_FREE(scope) { DEF_FREE(scope) {
Scope* c = (Scope*)x; Scope* c = (Scope*)x;
if (LIKELY(c->psc!=NULL)) ptr_decR(c->psc); if (LIKELY(c->psc!=NULL)) ptr_decR(c->psc);
#if EXT_ONLY_GLOBAL
else
#endif
if (RARE(c->ext!=NULL)) ptr_decR(c->ext); if (RARE(c->ext!=NULL)) ptr_decR(c->ext);
ptr_decR(c->body); ptr_decR(c->body);
u16 am = c->varAm; u16 am = c->varAm;