Added some debugging output to `vvi` when jumping to uninitialized labels.
authorAaron Taylor <ataylor@subgeniuskitty.com>
Fri, 19 Jul 2019 22:56:00 +0000 (15:56 -0700)
committerAaron Taylor <ataylor@subgeniuskitty.com>
Fri, 19 Jul 2019 22:56:00 +0000 (15:56 -0700)
vv_interpreter.c

index 1d5d906..6dde3e8 100644 (file)
@@ -126,7 +126,10 @@ parse_label(uint8_t * code, size_t * pc)
 uint16_t
 check_label(size_t * labels, uint16_t label, size_t * pc)
 {
-    if(!labels[label]) ws_die(pc, "uninitialized label (forgot an include?)");
+    if (!labels[label]) {
+        fprintf(stderr, "Trying to process label 0x%X.\n", label);
+        ws_die(pc, "uninitialized label (forgot an include?)");
+    }
     return label;
 }