[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[VM] Maximum object vector size
From: |
Ludovic Courtès |
Subject: |
[VM] Maximum object vector size |
Date: |
Sat, 07 Mar 2009 00:31:41 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.90 (gnu/linux) |
Hello!
The object vector is limited to 256 elements, which is not so much:
scheme@(guile-user)> (compile `(define (x)
,(list 'unquote
(unfold (lambda (i) (> i 255))
number->string
1+
0))))
ERROR: Value out of range 0 to 255: 256
The error comes from `compile-bytecode.scm' trying to write an
`object-ref' instruction with an argument greater than 255.
This is an issue in practice with functions that contain large literal
lists, as in
http://git.savannah.gnu.org/gitweb/?p=skribilo.git;a=blob;f=src/guile/skribilo/engine/context.scm#l78
.
A workaround would be to use 24-bit integers for object numbers, which
would make the whole instruction 32-bit long (instead of 16-bit), a
better fit for alignment constraints.
I'll see what can be done here.
Thanks,
Ludo'.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [VM] Maximum object vector size,
Ludovic Courtès <=