From: charlie
Subject: Sbcl repeatedly giving me optimization messages at runtime.
Date: 
Message-ID: <1134775348.525017.52100@g49g2000cwa.googlegroups.com>
My IFS Designer application was just being tested with sbcl and there's
a problem. It would seem that for every point I draw to the sdl:surface
sbcl warns me about an optimization note regarding sdl:event-loop. An
IFS requires 1000s of points to be drawn so this is quite nasty.
The message is the same as the note I get at compile time:
; note: unable to
;   optimize
; because:
;   could not optimize away %SAP-ALIEN: forced to do runtime
; allocation of alien-value structure
;
; compilation unit finished
;   printed 1 note
; in: LAMBDA NIL
;     (SB-ALIEN-INTERNALS:NATURALIZE
;    (SB-SYS:SAP+ SB-ALIEN::SAP (/ SB-ALIEN::OFFSET SB-VM:N-BYTE-BITS))
;    '#<SB-ALIEN-INTERNALS:ALIEN-RECORD-TYPE (STRUCT SDL:SURFACE
;                                                    (SDL::FLAGS
(UNSIGNED 32))
;                                                    (FORMAT (* #))
;                                                    (SDL::W (SIGNED
32))
;                                                    (SDL::H (SIGNED
32))
;                                                    (SDL::PITCH
(UNSIGNED 16))
;
etc.
Cmucl also warns me about exactly the same thing (in the same way) but
only at compile time. Sbcl also warns me about this when I compile the
example1.lisp that comes with it but come run-time all is well.
I'm not declaring any optimization prefences anywhere in my code fyi.
Any ideas, further tests, message inhibition suggestions.
Cheers,
Charlie.
From: Paul F. Dietz
Subject: Re: Sbcl repeatedly giving me optimization messages at runtime.
Date: 
Message-ID: <43A369ED.5060402@dls.net>
Understand that SBCL compile even when you call EVAL (except
in very trivial cases).

The solution is to not call EVAL.

	Paul

charlie wrote:
> My IFS Designer application was just being tested with sbcl and there's
> a problem. It would seem that for every point I draw to the sdl:surface
> sbcl warns me about an optimization note regarding sdl:event-loop. An
> IFS requires 1000s of points to be drawn so this is quite nasty.
> The message is the same as the note I get at compile time:
> ; note: unable to
> ;   optimize
> ; because:
> ;   could not optimize away %SAP-ALIEN: forced to do runtime
> ; allocation of alien-value structure
> ;
> ; compilation unit finished
> ;   printed 1 note
> ; in: LAMBDA NIL
> ;     (SB-ALIEN-INTERNALS:NATURALIZE
> ;    (SB-SYS:SAP+ SB-ALIEN::SAP (/ SB-ALIEN::OFFSET SB-VM:N-BYTE-BITS))
> ;    '#<SB-ALIEN-INTERNALS:ALIEN-RECORD-TYPE (STRUCT SDL:SURFACE
> ;                                                    (SDL::FLAGS
> (UNSIGNED 32))
> ;                                                    (FORMAT (* #))
> ;                                                    (SDL::W (SIGNED
> 32))
> ;                                                    (SDL::H (SIGNED
> 32))
> ;                                                    (SDL::PITCH
> (UNSIGNED 16))
> ;
> etc.
> Cmucl also warns me about exactly the same thing (in the same way) but
> only at compile time. Sbcl also warns me about this when I compile the
> example1.lisp that comes with it but come run-time all is well.
> I'm not declaring any optimization prefences anywhere in my code fyi.
> Any ideas, further tests, message inhibition suggestions.
> Cheers,
> Charlie.
>