diff options
author | Andy Wingo <wingo@pobox.com> | 2014-04-15 22:00:30 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2014-04-15 22:00:30 +0200 |
commit | 4cbe4d72aab9723d57b9cd779fc99e76b545802e (patch) | |
tree | b4979b22e4220163799f4f7dd2e021ff11c91f3c /module | |
parent | c271065e542fc527313d5fb08ef0aaddabb42e72 (diff) | |
download | guile-4cbe4d72aab9723d57b9cd779fc99e76b545802e.tar.gz |
Fix rtl tests
* module/system/vm/assembler.scm (write-arities): Add a diagnostic.
* test-suite/tests/rtl.test: Fix tests to emit "definition"
instructions.
Diffstat (limited to 'module')
-rw-r--r-- | module/system/vm/assembler.scm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/module/system/vm/assembler.scm b/module/system/vm/assembler.scm index bed2bf77a..8bbe1d90e 100644 --- a/module/system/vm/assembler.scm +++ b/module/system/vm/assembler.scm @@ -1481,6 +1481,8 @@ procedure with label @var{rw-init}. @var{rw-init} may be false. If (define (write-arities asm metas headers names-port strtab) (define (write-header pos low-pc high-pc offset flags nreq nopt nlocals) + (unless (<= (+ nreq nopt) nlocals) + (error "forgot to emit definition instructions?")) (bytevector-u32-set! headers pos (* low-pc 4) (asm-endianness asm)) (bytevector-u32-set! headers (+ pos 4) (* high-pc 4) (asm-endianness asm)) (bytevector-u32-set! headers (+ pos 8) offset (asm-endianness asm)) |