summaryrefslogtreecommitdiffstats
path: root/vm.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2020-01-28 22:03:56 -0800
committerKaz Kylheku <kaz@kylheku.com>2020-01-28 22:03:56 -0800
commit4815f528c228711623a9bcf3dd9626c044a16f45 (patch)
tree7ee518759f4770166ee0e69256319442243057a1 /vm.c
parentabc74473ed37336a924b135e656ba40eeecc064b (diff)
downloadtxr-4815f528c228711623a9bcf3dd9626c044a16f45.tar.gz
txr-4815f528c228711623a9bcf3dd9626c044a16f45.tar.bz2
txr-4815f528c228711623a9bcf3dd9626c044a16f45.zip
vm: more info in frame level mismatch.
* vm.c (do_frame): In frame level mismatch diagnostic, identify vm descriptor, instruction offset and the expected and actual level.
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/vm.c b/vm.c
index f7ace0d3..9c8e270c 100644
--- a/vm.c
+++ b/vm.c
@@ -415,7 +415,9 @@ static void vm_do_frame(struct vm *vm, vm_word_t insn, int capturable)
int size = vm_insn_operand(insn);
if (lev != vm->lev + 1)
- uw_throwf(error_s, lit("frame level mismatch"), nao);
+ uw_throwf(error_s,
+ lit("~s: frame level mismatch at ~s: right ~s, actual ~s"),
+ vm->vd->self, unum(vm->ip), num(vm->lev + 1), num(lev), nao);
vm->lev = lev;
vm->dspl[lev].mem = coerce(val *, zalloca(size * sizeof (val *)));