summaryrefslogtreecommitdiff
path: root/libguile/objcodes.h
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2009-07-24 10:12:01 +0200
committerAndy Wingo <wingo@pobox.com>2009-07-24 10:12:01 +0200
commitccf77d955c875ce95473098af96da9e1bec0b7eb (patch)
tree5099763a4862add99f8fecb4c999689bb2c29bc3 /libguile/objcodes.h
parent476e35728136b2d504855f3e2e4922ed72a41101 (diff)
downloadguile-ccf77d955c875ce95473098af96da9e1bec0b7eb.tar.gz
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.
Diffstat (limited to 'libguile/objcodes.h')
-rw-r--r--libguile/objcodes.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/libguile/objcodes.h b/libguile/objcodes.h
index 6727e23e8..d50f6dc94 100644
--- a/libguile/objcodes.h
+++ b/libguile/objcodes.h
@@ -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 */