This is the mail archive of the kawa@sources.redhat.com 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: tentative fluid-let patch


Per, thanks for the patch.

I just gave it a try tonight and I'm getting some errors. Now, this is with your patch applied to our modified sources, so there may be some interactions going on, but I thought I'd let you know what I'm seeing in case it is a weakness in the patch. In the mean time, I'll see if I can reproduce these with straight CVS Kawa sources + your patch.

This first error I'm getting in a file that uses "define" to define a couple of variables and then uses them in fluid-lets. The line it's complaining about looks like this:

(define *CURRENT-COORD-SEXP* #f)

The module has a "module-export"; if I explicitly export the variable, the compile succeeds. Here's what I'm getting at compile time; the exception/stack trace is something I added to help me debug these kinds of problems:

----------------------------------------
cook: java kawa.repl --module-static-run --warn-undefined-variable
--warn-as-error -C com/merced/cube/query/CubeQuery.scm
(compiling com/merced/cube/query/CubeQuery.scm)
error: com/merced/cube/query/CubeQuery.scm:153:1: cannot convert literal (of type java.lang.Boolean) to gnu.mapping.Location
java.lang.Exception: Stack trace
at java.lang.Thread.dumpStack(Thread.java:1064)
at gnu.text.SourceMessages.error(SourceMessages.java:58)
at gnu.text.SourceMessages.error(SourceMessages.java:117)
at gnu.expr.Compilation.error(Compilation.java:2202)
at gnu.expr.Compilation.compileConstant(Compilation.java:445)
at gnu.expr.QuoteExp.compile(QuoteExp.java:55)
at gnu.expr.Expression.compile(Expression.java:151)
at gnu.expr.SetExp.compile(SetExp.java:272)
at gnu.expr.Expression.compileNotePosition(Expression.java:141)
at gnu.expr.Expression.compileWithPosition(Expression.java:112)
at gnu.kawa.functions.AppendValues.compile(AppendValues.java:49)
at gnu.expr.ApplyExp.compile(ApplyExp.java:167)
at gnu.expr.ApplyExp.compile(ApplyExp.java:117)
at gnu.expr.Expression.compileWithPosition(Expression.java:130)
at gnu.expr.LambdaExp.compileBody(LambdaExp.java:1426)
at gnu.expr.Compilation.addClass(Compilation.java:1880)
at gnu.expr.Compilation.compile(Compilation.java:903)
at gnu.expr.Compilation.compileToFiles(Compilation.java:941)
at kawa.lang.CompileFile.compile_to_files(CompileFile.java:70)
at kawa.repl.processArgs(repl.java:407)
at kawa.repl.main(repl.java:657)
----------------------------------------


In this next error, the compiler is giving this error compiling one file that's requiring another file (Fetch.scm) that's also using "define" and fluid-let. The line in Fetch it's complaining about looks like this:

(define *MAX-DEPTH* (make-initial-depth))

Here's what I'm seeing:

----------------------------------------
cook: java kawa.repl --module-static-run --warn-undefined-variable
--warn-as-error -C com/merced/devtools/hammer/Hammer.scm
(compiling com/merced/devtools/hammer/Hammer.scm)
Internal error while compiling com/merced/devtools/hammer/Hammer.scm
java.lang.ExceptionInInitializerError
at sun.misc.Unsafe.ensureClassInitialized(Native Method)
at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:20)
at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:122)
at java.lang.reflect.Field.acquireFieldAccessor(Field.java:779)
at java.lang.reflect.Field.getFieldAccessor(Field.java:760)
at java.lang.reflect.Field.get(Field.java:228)
at kawa.standard.require.importDefinitions(require.java:214)
at kawa.standard.require.scanForDefinitions(require.java:141)
at kawa.lang.Syntax.scanForm(Syntax.java:64)
at kawa.lang.Translator.scanForm(Translator.java:948)
at gnu.kawa.lispexpr.LispLanguage.parse(LispLanguage.java:56)
at gnu.expr.Language.parse(Language.java:434)
at kawa.lang.CompileFile.read(CompileFile.java:37)
at kawa.lang.CompileFile.read(CompileFile.java:20)
at kawa.lang.CompileFile.compile_to_files(CompileFile.java:65)
at kawa.repl.processArgs(repl.java:407)
at kawa.repl.main(repl.java:657)
Caused by: java.lang.ClassCastException
at com.merced.devtools.hammer.Fetch.run(Fetch.scm:59)
at gnu.expr.ModuleBody.run(ModuleBody.java:56)
at gnu.expr.ModuleBody.run(ModuleBody.java:32)
at com.merced.devtools.hammer.Fetch.<clinit>(Fetch.scm)
... 17 more
----------------------------------------


Dean

Per Bothner wrote:
This is a preliminary patch that fixes a few problems with fluid
bindings.  It fixes Dean's test-case from Monday, and it also
fixes Savannah bug #11859.  I.e. fluid-let works on lexical
bindings, in a I-think reasonable manner.

I think the basic concept is solid, but it probably needs a little
bit of cleaning up and more testing.


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