This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [GSoC] Parameter protocols in CL


On 07/16/2012 08:49 AM, Charles Turner wrote:
I'm struggling to find where the optional parameter handling actually
happens. I.e., where it check whether a parameter has actually been
passed and decides whether or not to use the default parameter.
Compilation#enterFunction (sp? maybe, away from dev machine) looked
like it does this, but the code isn't executed from an interactive
environment IIUC.

It most definitely is - the compiler is "always" used, even for eval and the repl. (Exception are when evaluating a non-syntax-rules macro, or if !ModuleExp.compilerAvailable().)

The other thing to note is that Kawa uses overloading to handle
optional parameters - see LambdaExp#addMethodFor.  If there are
N optional parameters, (N+1) methods are compiled.
--
	--Per Bothner
per@bothner.com   http://per.bothner.com/



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]