chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] handling the undefined value


From: Felix
Subject: Re: [Chicken-users] handling the undefined value
Date: Fri, 19 Nov 2010 02:56:03 -0500 (EST)

From: Jörg "F. Wittenberger" <address@hidden>
Subject: Re: [Chicken-users] handling the undefined value
Date: Thu, 18 Nov 2010 22:42:42 +0100

> 
> I guess I found the reason: "-local".  Apparently it changed slightly.
> 
> At least I found a case, where one compilation unit of mine used set! to
> change the value of root-object.  Once removed the error is gone (though
> now I have a lot of trouble with the program logic ;-).
> 
> I did not catch that before, because the -local switch is there for
> quite a long time.
> 

Yes, local mode is used more aggressively recently. It implies that
toplevel definitions inside the compilation unit are not modified from
outside (other compilation units or evaluated code). This gives much
more inlining opportunities (which, in turn, gives most performance
improvements). Unfortunately, redefinitions or modifications of such
toplevel variables from other compilation units will be ineffective,
thus not following R5RS semantics. Therefore either do not compile
in local mode (implied by optimization-level 3), or use

  (declare (not inline <IDENTIFIER>))

which will prevent <IDENTIFIER> from being inlined (either completely,
or by replacing its invocation with a direct call).


cheers,
felix



reply via email to

[Prev in Thread] Current Thread [Next in Thread]