summaryrefslogtreecommitdiff
path: root/uscript/us_debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'uscript/us_debug.c')
-rw-r--r--uscript/us_debug.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/uscript/us_debug.c b/uscript/us_debug.c
index d4c6cdf..496b191 100644
--- a/uscript/us_debug.c
+++ b/uscript/us_debug.c
@@ -42,13 +42,13 @@ int print_instruction(struct us_proto *proto, int idx)
);
return idx + 2 + upvalc * 2;
}
+ case BC_SMALL_INT:
case BC_ARR:
- case BC_SET_UPVAL:
case BC_GET_UPVAL:
- case BC_SET_LOCAL:
+ case BC_SET_UPVAL:
case BC_GET_LOCAL:
- case BC_CALL:
- case BC_SMALL_INT: {
+ case BC_SET_LOCAL:
+ case BC_CALL: {
fprintf(
stderr,
"%d\n",
@@ -57,8 +57,8 @@ int print_instruction(struct us_proto *proto, int idx)
return idx + 2;
}
case BC_JMP:
- case BC_LOOP:
- case BC_FALSEY_JMP: {
+ case BC_FALSEY_JMP:
+ case BC_LOOP: {
u16 jmp = (u16)(proto->bytecode[idx + 1] << 8) | proto->bytecode[idx + 2];
int dst = idx + jmp + 3;
if (instruction == BC_LOOP) {
@@ -71,9 +71,8 @@ int print_instruction(struct us_proto *proto, int idx)
);
return idx + 3;
}
- case BC_PRINT:
- case BC_TRUE:
case BC_FALSE:
+ case BC_TRUE:
case BC_ZILCH:
case BC_GET_INDEX:
case BC_SET_INDEX:
@@ -84,15 +83,16 @@ int print_instruction(struct us_proto *proto, int idx)
case BC_MULT:
case BC_DIV:
case BC_MOD:
+ case BC_GT:
+ case BC_GTE:
+ case BC_LT:
+ case BC_LTE:
case BC_NEG:
case BC_NOT:
- case BC_CONCAT:
case BC_EQL:
case BC_NEQL:
- case BC_GT:
- case BC_LT:
- case BC_GTE:
- case BC_LTE:
+ case BC_CONCAT:
+ case BC_PRINT:
case BC_RET:
putc('\n', stderr);
return idx + 1;