Encode the length of constant lists/vectors on 2 octets instead of 1.
authorLudovic Courtes <ludovic.courtes@laas.fr>
Mon, 2 Jan 2006 18:04:04 +0000 (18:04 +0000)
committerLudovic Courtès <ludo@gnu.org>
Fri, 25 Apr 2008 17:09:30 +0000 (19:09 +0200)
commit23b587b0a1e73940b167f67a1d1f7273b7fc5f79
treeb13145d5d256e41427bcd5efbfc59e1161d4d89b
parenta55572bf3d9f2cc596a9367de6394b55f429b966
Encode the length of constant lists/vectors on 2 octets instead of 1.

* module/system/vm/assemble.scm (dump-object!): New sub-procedure
  `too-long'.  For `list' and `vector', encode the length on 2 octets
  instead of 1 and report an error if a list/vector is longer than 65535.

* module/system/vm/disasm.scm (original-value): New sub-procedure
  `list-or-vector?'; when true, return the number of elements for that
  list/vector.

* src/vm_system.c (list): Fetch the length as a two-octet integer.
  (vector): Likewise.

* testsuite/t-basic-contructs.scm: New.

* testsuite/Makefile.am (vm_test_files): Added the above file.

* module/system/vm/core.scm (load-compiled): Added a bit of
  documentation.

git-archimport-id: lcourtes@laas.fr--2005-mobile/guile-vm--mobile--0.6--patch-11
module/system/vm/assemble.scm
module/system/vm/core.scm
module/system/vm/disasm.scm
src/vm_system.c
testsuite/Makefile.am
testsuite/t-basic-contructs.scm [new file with mode: 0644]