fixed a bug of not marking hcl->_undef in gc.c
This commit is contained in:
parent
e12033f81a
commit
b4eb3d9768
25
lang.txt
25
lang.txt
@ -213,3 +213,28 @@ x.show (40, 50);
|
|||||||
|
|
||||||
|
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
|
|
||||||
|
variadic arguments -> supported
|
||||||
|
|
||||||
|
multiple return variables -> supported
|
||||||
|
(defun ff(a b ::: x y z)
|
||||||
|
(set x (+ a b))
|
||||||
|
(set y (+ x x))
|
||||||
|
(set z (+ 999 x))
|
||||||
|
)
|
||||||
|
(set-r v1 v2 v3 (ff 10 20))
|
||||||
|
(printf "%d %d %d\n" v1 v2 v3)
|
||||||
|
|
||||||
|
variadic multiple return variables -> not supported as of now
|
||||||
|
|
||||||
|
(defun ff(a b ::: x y z ...) <--- can i support something like this???
|
||||||
|
(set x (+ a b))
|
||||||
|
(set y (+ x x))
|
||||||
|
(set z (+ 999 x))
|
||||||
|
)
|
||||||
|
(set-r v1 v2 v3 (ff 10 20))
|
||||||
|
(printf "%d %d %d\n" v1 v2 v3)
|
||||||
|
|
||||||
|
since va-get is used to get a variadic argument, can i create vr-put
|
||||||
|
to set a variadic return variable?
|
||||||
|
1
lib/gc.c
1
lib/gc.c
@ -310,6 +310,7 @@ static HCL_INLINE void gc_ms_mark_roots (hcl_t* hcl)
|
|||||||
hcl->processor->active->sp = HCL_SMOOI_TO_OOP(hcl->sp);
|
hcl->processor->active->sp = HCL_SMOOI_TO_OOP(hcl->sp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gc_ms_mark (hcl, hcl->_undef);
|
||||||
gc_ms_mark (hcl, hcl->_nil);
|
gc_ms_mark (hcl, hcl->_nil);
|
||||||
gc_ms_mark (hcl, hcl->_true);
|
gc_ms_mark (hcl, hcl->_true);
|
||||||
gc_ms_mark (hcl, hcl->_false);
|
gc_ms_mark (hcl, hcl->_false);
|
||||||
|
Loading…
Reference in New Issue
Block a user