summaryrefslogtreecommitdiffstats
path: root/compile.c
diff options
context:
space:
mode:
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/compile.c b/compile.c
index de9c14c3..d305c5c8 100644
--- a/compile.c
+++ b/compile.c
@@ -507,13 +507,7 @@ static int compile(struct locfile* locations, struct bytecode* bc, block b) {
int var_frame_idx = 0;
bc->nsubfunctions = 0;
errors += expand_call_arglist(locations, &b);
- if (bc->parent) {
- // functions should end in a return
- b = BLOCK(b, gen_op_simple(RET));
- } else {
- // the toplevel should YIELD;BACKTRACK; when it finds an answer
- b = BLOCK(b, gen_op_simple(YIELD), gen_op_simple(BACKTRACK));
- }
+ b = BLOCK(b, gen_op_simple(RET));
for (inst* curr = b.first; curr; curr = curr->next) {
if (!curr->next) assert(curr == b.last);
int length = opcode_describe(curr->op)->length;