nlocs is now 16 bits wide
authorAndy Wingo <wingo@pobox.com>
Fri, 24 Jul 2009 08:12:01 +0000 (10:12 +0200)
committerAndy Wingo <wingo@pobox.com>
Fri, 24 Jul 2009 08:12:01 +0000 (10:12 +0200)
commitccf77d955c875ce95473098af96da9e1bec0b7eb
tree5099763a4862add99f8fecb4c999689bb2c29bc3
parent476e35728136b2d504855f3e2e4922ed72a41101
nlocs is now 16 bits wide

* libguile/objcodes.h (struct scm_objcode): Remove the "unused" field --
  the old "nexts" -- and expand nlocs to 16 bits.

* module/language/assembly/compile-bytecode.scm (write-bytecode): Write
  the nlocs as a uint16.

* module/language/assembly/decompile-bytecode.scm (decode-load-program):
  Decompile 16-bit nlocs. It seems this decompilation is little-endian
  :-/

* test-suite/tests/asm-to-bytecode.test: Fix up to understand nlocs as a
  little-endian value. The test does the right thing regarding
  endianness.
libguile/objcodes.h
module/language/assembly/compile-bytecode.scm
module/language/assembly/decompile-bytecode.scm
test-suite/tests/asm-to-bytecode.test