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 | Extending Common Lisp support


On 06/20/2012 09:30 PM, Jamison Hope wrote:

Helmut was right that this is a namespace bug. When loading the
kawa.lib.std_syntax module, all of the non-exported fields are
loaded as a result of the loop in ModuleInfo#setupModuleExp.
This calls language.declFromField(...) to generate each Declaration.
For Macro fields, this is not returning Declarations with the
PROCEDURE flag set.

but notice that it's already got a "fvalue instanceof Syntax" check;
maybe we can just use that? Perhaps we just need Declaration#setSyntax
to set the PROCEDURE flag?

Perhaps the problem isn't that we need to set PROCEDURE flag - but that we need to check the IS_SYNTAX flag. I.e. in Lisp2#getNamespaceOf we could do:

    if (decl.getFlag(Declaration.PROCEDURE|Declaration.IS_SYNTAX))
      return FUNCTION_NAMESPACE;
    else
      return VALUE_NAMESPACE;

I can think of several ways to fix this, and I'm not sure which is
the best/most correct. We need to recognize kawa.lang.Macro
(or should that be kawa.lang.Syntax?), but it looks like it's a minor
no-no to reference kawa.lang.* classes from gnu.kawa.*.

Well, it's not very consistent. I would like reduce cross-package circular references, which means being more clear about what belongs in which package. -- --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]