Hi,
On 25 Nov 2012, at 23:58, Juan Jose Garcia-Ripoll
<[email protected]> wrote:
> On Sun, Nov 25, 2012 at 9:11 PM, Pascal Costanza <[email protected]> wrote:
> Next error: slot-unbound errors should not be optimized away as far as I can
> tell. Or is there anything in specifications (CL or MOP) that allows
> implementors to do that?
>
> There are various things conflicting here:
>
> 1* There was a typo in the macroexpander for ECL's core functions (not for
> user functions, AFAIK), which used instance-ref instead of safe-instance-ref.
> I am uploading a fix tonight, after some further tests.
OK.
> 2* There was a problem in the compiler with optimization settings by which
> (optimize speed) implied (safety 0) in some contexts. Hopefully this has ben
> solved, too.
OK.
> 3* There is nothing in the Hyperspec or the MOP that explains how errors are
> handled under different optimization settings. Typically, a declaration of
> low safety leads to AREF, structure accessors and in this case slot accessors
> be inlined assuming that no error will take place. This is the interpretation
> I have used in various points in ECL. I believe it is sensible, but I am open
> to other arguments. This interpretation was activated by the point 2 above.
I don't think the HyperSpec allows for that interpretation. The entry for
slot-value is specific that slot-unbound is called when a slot is unbound, and
the entry for slot-unbound specifies that the default method signals an error
of type unbound-slot. There are no exceptions specified for unsafe code. This
is actually important, since the whole slot-unbound and slot-missing protocols
can be used to define reasonable semantics, for example to define
hash-table-based slots, and user code needs to be able to rely on the correct
workings of user-defined extensions here even for unsafe code.
However, the entry for defclass allows for adding new class options or slot
options, with which you could enable such an optimization (which then becomes a
safe assumption for user code).
Pascal
--
Pascal Costanza
------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Ecls-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ecls-list