GSOC | Extending Common Lisp support
Per Bothner
per@bothner.com
Mon Jun 4 04:43:00 GMT 2012
On 06/03/2012 09:11 PM, Jamison Hope wrote:
> One way to fix this (which ends up fixing my simple test) is to change
> function.java to do the lookup:
> Declaration decl = tr.lookup(name, Language.FUNCTION_NAMESPACE);
> if (decl != null)
> {
> return new ReferenceExp(name, decl);
> }
> ReferenceExp rexp = new ReferenceExp(name);
> rexp.setProcedureName(true);
> ...
>
This seems cleaner:
Declaration decl = tr.lookup(name, Language.FUNCTION_NAMESPACE);
ReferenceExp rexp = new ReferenceExp(name, decl);
rexp.setProcedureName(true);
I do think doing setProcedureName is reasonable also when we
find the declaration. Even if the flag isn't needed, it just
seems more consistent.
> Is that a valid change to make?
Seems reasonable.
>I *think* that calling tr.lookup() from
> within function.rewriteForm() will do the appropriate lexical search,
> but I'm still a little fuzzy about what's supposed to happen when in the
> various Syntax methods.
You think *I'm* not a little fuzzy on what's supposed to happen? :-)
--
--Per Bothner
per@bothner.com http://per.bothner.com/
More information about the Kawa
mailing list