[armedbear-devel] IRONCLAD cannot be compiled on ABCL now

Mark Evenson evenson at panix.com
Fri Jul 8 08:52:32 UTC 2011

On 7/7/11 12:32 , Mark Evenson wrote:
> On 7/7/11 11:07 AM, Chun Tian (binghe) wrote:
>> (defconstant a #.(make-array '(8 256) :element-type '(unsigned-byte
>> 32) :initial-element 0))
> Reproduced and filed [as ticket #156][1]
> [1]: http://trac.common-lisp.net/armedbear/ticket/156

[r13380][1] addresses this ticket allowing the form to be compiled again.

[r13380]: http://trac.common-lisp.net/armedbear/changeset/13380

But the compilation of the form probably doesn't do what you want.  The 
ABCL compiler currently dumps such forms in their READ form to be read 
at load time rather than constructing JVM code to initialize the value. 
  This has two consequences for your usage here:  first, since the 
string has to be derserialized by the Lisp reader there is almost no 
conceivable JVM implementation that will make this usage faster.  And 
the potentially more serious problem is that since the Lisp reader 
syntax doesn't specify the underlying array type, at runtime one gets an 
array who's BASE-ELEMENT-TYPE is T rather than (UNSIGNED-BYTE 32) which 
is probably less efficient.

Does anyone know if ANSI requires us to restore the compiled type at 
runtime?   Or is the requirement to have "at least" the type specified 
in the MAKE-ARRAY call?

@Alan:  I value your intuition that the sharpsign dot form here isn't 
portable.  But is there a specific part of CLHS that you are thinking 
about here that I could pore over?

"A screaming comes across the sky.  It has happened before, but there
is nothing to compare to it now."

More information about the armedbear-devel mailing list