From: Peter Bex <[email protected]>
Subject: Re: [Chicken-hackers] [PATCH] use inline safe block-accessors
Date: Fri, 12 Oct 2012 20:40:45 +0200
> On Tue, Oct 09, 2012 at 05:07:48AM -0400, Felix wrote:
>> The attached patch provides a more efficient implementation of low-level
>> block accessors ("##sys#block-ref"/"##sys#block-set!", usually needed
>> for record-structures, and "matchable". These primitives are safe (in
>> contrast to "##sys#slot"/"##sys#setslot"), in that they handle invalid
>> slot-indices. The new C-level equivalents "C_i_fast_block_ref" and
>> "C_i_fast_block_set" are defined in chicken.h as inline functions.
>
> Unless I'm mistaken, this changes the semantics of block-ref by returning
> (void) rather than raising an error. That doesn't seem particularly safe
> to me, and may lead to deferred errors which will be harder to debug.
> Why does this behavior need to be changed?
To make the accessors C inline functions, I wanted to avoid a call to
the (not exported) error raising routine. But you're right. I'll add
an export to runtime.c and change this patch accordingly.
cheers,
felix
_______________________________________________
Chicken-hackers mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/chicken-hackers