Fix behaviour of stack at program termination.
This commit is contained in:
1 parent
4f747e6fff
commit
e3710c0d1f
2 files changed
+17
-16
No files matched your search
@@ -81,9 +81,11 @@ int main(int argc, char* argv[]) {
|
||||
if (argc == 1) { run_tests(); return 0; }
|
||||
block blk = compile(argv[1]);
|
||||
block_append(&blk, block_join(gen_op_simple(YIELD), gen_op_simple(BACKTRACK)));
|
||||
struct bytecode* bc = block_compile(gen_cbinding(&builtins, blk));
|
||||
blk = gen_cbinding(&builtins, blk);
|
||||
struct bytecode* bc = block_compile(blk);
|
||||
block_free(blk);
|
||||
dump_disassembly(0, bc);
|
||||
printf("\n");
|
||||
run_program(bc);
|
||||
bytecode_free(bc);
|
||||
}
|
||||
Reference in new issue
Block a user