stdlib tester, fixes, switch to builtins as pseudo functions (use call), remove negative closure offset possibility

This commit is contained in:
ProgramSnail 2025-03-30 09:34:50 +03:00
parent 905632aab6
commit 43088ec9f9
10 changed files with 321 additions and 131 deletions

View file

@ -125,6 +125,14 @@ static inline void s_popn(size_t n) {
// ------ complex operations ------
static inline void s_swap_tops() {
// NOTE: can be optimized
void *x = s_pop();
void *y = s_pop();
s_push(x);
s_push(y);
}
// for some reason does not work in sexp constructor, probably connected with gc
// behaviour
static inline void s_put_nth(size_t n, void *val) {