From: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - 2008-11-24 11:58:15
|
On Mon, Nov 24, 2008 at 12:30 PM, Ville Voutilainen <vil...@gm...> wrote: > On Mon, Nov 24, 2008 at 12:51 PM, XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX wrote: >> I've also found the cause: in jvm.lisp, there's a function P1-FUNCTION >> which wraps the body of an anonymous lambda in a BLOCK. The problem is >> that this block should propably be nameless, but actually is called >> NIL... (which of course interferes with the implied block created by >> PROG). > > Would there be any chance to avoid this block-wrapping? I fear it may cause > other problems. The standard forbids wrapping a lambda body in a block, > although it's not explicit about the issue. > >> I think it would be best to gensym the name of the block, or name it >> 'jvm::technically-required-block or something alike and unlikely to be >> used by any program. > > If we do this, I'd say we should at least gensym the name. The other solution > sounds hackish and may bite us later, and will be very annoying to debug. Well, I'd like to fix the immediate problem, to have some air/time to fix the block-wrapping in general. I must say that my current understanding of the compiler does not allow me to estimate the ripple effects of eliminating the block: it could be an assumption that every function (including lambdas) have a wrapping block - technically [for example just because a block struct carries around some function oriented fields or something]. A definite solution could be to extend the block struct with a marker which will eliminate the actual block in the generated code - or something like it. But.. I agree, it's not nice to have the block where it's not explicitly or implicitly required. Bye, Erik. |