X-Git-Url: http://git.subgeniuskitty.com/vvhitespace/.git/blobdiff_plain/e5b4dad90ea7fbc4cbe1be5ac7f5c7b77b433b29..519b6ab41c6a7c2abd44c9dcffb2a9b63c762442:/vv_interpreter.c?ds=inline diff --git a/vv_interpreter.c b/vv_interpreter.c index 8fac7c2..aa88505 100644 --- a/vv_interpreter.c +++ b/vv_interpreter.c @@ -236,8 +236,11 @@ process_imp_flowcontrol(uint8_t * code, size_t * pc, int32_t ** sp, uint32_t * l break; case '\t': /* Call a subroutine. */ - *((*rsp)++) = *pc; - *pc = labels[parse_label(code, pc)]; + { + size_t temp_pc = labels[parse_label(code, pc)]; + *((*rsp)++) = *pc; + *pc = temp_pc; + } break; case '\n': /* Jump unconditionally to a label. */ @@ -254,10 +257,12 @@ process_imp_flowcontrol(uint8_t * code, size_t * pc, int32_t ** sp, uint32_t * l switch (next_code_byte(code,pc)) { case ' ': /* Jump to a label if TOS == 0 */ + /* TODO: Does WS pop or peek the TOS? */ if (stack_peek(sp,0) == 0) *pc = labels[parse_label(code, pc)]; break; case '\t': /* Jump to a label if TOS < 0. */ + /* TODO: Does WS pop or peek the TOS? */ if (stack_peek(sp,0) < 0) *pc = labels[parse_label(code, pc)]; break; case '\n':