At 21/11/00 08:12 -0800, Steve Haflich wrote:
> From: Francis Leboutte <algo.be at f.leboutte>
>
> In ACL5 (Win NT), it seems that the names of automatically created
> functions by Defstruct are declared inline. Even with the following
> compiler settings:
> (proclaim '(optimize (speed 0) (safety 3) (space 0) (debug 3)))
>
> Does someone know how to control this?
>
>I haven't tested, but I suspect declare/declaim notinline will have
>the desired effect.
Yes, according to the documentation: 'The compiler will observe the
notinline declaration, however, so you can suppress inlining of specific
functions if you want'.
>That's the only _portable_ way to control function inlining.
I don't see any portability problem in using a global compiler switch to
turn automatic inlining off at development time.
Finally I have found in the documentation a compiler switch that does the job:
>Defstruct accessors will be compiled inline under two conditions:
>The structure is not of type list. (Accessors for structures of type list
>are never inlined).
>The values of speed and safety are such that the compiler switch
>comp:verify-non-generic-switch returns nil. Using the default value, that
>switch will return nil when speed is 3 and safety is 0 or 1.
However this doesn't seem to be applied to defstruct accessors (default
setting for safety and speed is 1). I'll send a bug report for this.
Notice the initial comp:verify-non-generic-switch function works correctly :
;; 4 arguments function : safety, space, speed, and debug
comp:verify-non-generic-switch
;;;> #<Function SPEED < 3 OR SAFETY > 1 @ #x2006871a>
(funcall comp:verify-non-generic-switch 1 1 1 1)
;;;> t
(funcall comp:verify-non-generic-switch 1 1 3 1)
;;;> nil
Thank you,
Francis Leboutte
www.algo.be
Visit www.climatevoice.org and take action