fold extended scope free into no parent pointer case
This commit is contained in:
parent
eca92b6a5d
commit
d9c0e38c12
8
src/vm.h
8
src/vm.h
@ -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,7 +238,10 @@ 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 (RARE (c->ext!=NULL)) ptr_decR(c->ext);
|
#if EXT_ONLY_GLOBAL
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
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;
|
||||||
for (u32 i = 0; i < am; i++) dec(c->vars[i]);
|
for (u32 i = 0; i < am; i++) dec(c->vars[i]);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user