1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-18 01:30:27 +02:00

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.
This commit is contained in:
Andy Wingo 2009-07-24 10:12:01 +02:00
parent 476e357281
commit ccf77d955c
4 changed files with 47 additions and 40 deletions

View file

@ -25,8 +25,7 @@
struct scm_objcode {
scm_t_uint8 nargs;
scm_t_uint8 nrest;
scm_t_uint8 nlocs;
scm_t_uint8 unused;
scm_t_uint16 nlocs;
scm_t_uint32 len; /* the maximum index of base[] */
scm_t_uint32 metalen; /* well, i lie. this many bytes at the end of
base[] for metadata */