aboutsummaryrefslogtreecommitdiffstats
path: root/stack.c
diff options
context:
space:
mode:
authordan <[email protected]>2023-05-29 15:26:26 -0400
committerdan <[email protected]>2023-05-29 15:26:26 -0400
commitc2138b3ba1d49ff93bdebe9b76aca7c356b46689 (patch)
tree4c53e16cca23852d8eef427edbffb1c0a43f70d2 /stack.c
parentb72c271d8731e1f67fdef29cd64726dfce893fe7 (diff)
downloadforth-c2138b3ba1d49ff93bdebe9b76aca7c356b46689.tar.gz
forth-c2138b3ba1d49ff93bdebe9b76aca7c356b46689.tar.bz2
forth-c2138b3ba1d49ff93bdebe9b76aca7c356b46689.zip
feat: add jit-compiled optype ; add more new commands
Diffstat (limited to 'stack.c')
-rw-r--r--stack.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/stack.c b/stack.c
index 617e621..e1f0281 100644
--- a/stack.c
+++ b/stack.c
@@ -61,6 +61,9 @@ void stack_roll(stack *s) {
s->start[i] = s->start[i+1];
}
s->start[i] = newtop;
+ } else {
+ // no item found
+ stack_push(s, 0);
}
}