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 18 July 2012 22:01, Charles Turner <chturne@gmail.com> wrote:
> On 18 July 2012 21:29, Helmut Eller <eller.helmut@gmail.com> wrote:
>> Without some small test case it's pretty hard to say what is going on.
>
> Anything involving DEFUN's seems to cause it.

I've narrowed it down to the following:

When I first compile some of my primitives codes, I get warnings like

primitives.lisp:264:1: warning - no declaration seen for {COMMON-LISP}:*PACKAGE*

in cases such as (defun test (&optional (name *package*)) ...) [I'm
using a standard Lambda btw, not my modified one]. Compiling again
omits these warnings, but does finish up with the
<unknown>: Literals: Internal error:java.lang.Error: no method to
construct ClassType gnu.kawa.lispexpr.LispPackage

If I *then* recompile gnu.commonlisp.lang.CommonLisp, which slurps the
resulting class file from above in [I find it unsavory that the class
file is produced in light of this error], now I get the Literals error
when I try to *compile* any source file containing a DEFUN. I've never
been content with how I initialise the *PACKAGE* variable. I'd like it
to be fluid variable, such as *print-right-margin*, but I couldn't get
that to work at the time, for now I'm wondering if there is anything
wrong with my current initialisation approach:

CommonLisp:
defProcStFld("*package*", "gnu.kawa.lispexpr.LispPackage", "currentPackage");

I've override Language#getSymbol in CommonLisp to search in the
current lisp package before using the current environment, and I've
previously put *PACKAGE* in the CL package, as that is the current
package at boot time. So getSymbol(*package*) successfully finds
COMMON-LISP:*PACKAGE*. Then defProcStdFld is supposed to pop this
symbol in the function space.

currentPackage is defined like so in LispPackage

public static final LispPackage CLNamespace = (LispPackage)
valueOf("COMMON-LISP");
public static LispPackage currentPackage = CLNamespace;

I'm wondering why it takes two compilations to remove the warning
above. And why after the second, I get the Literals error.

Charles.


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