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] |
> > The reason is that on java5 the cond-expand tag > string-normalize-unicode is false, so we get the equivalent of: > > (define (string-normalize-nfd (str :: string)) :: string > (error "unicode string normalization not available")) > > The complaint is that the never-returns value of is incompatible > with the return value of string. Which is true - but we should > allow it anyway. And that was the intention, but there was > a little bug - incorrect variable reuse. Should be fixed > in the attached patch. The attached patch did the job. I was able to compile Kawa latest version with java5. Thank you. From my observation, the patch you made to change the data structures fix the OutOfMemory problem well enough since I did not hit yet. But I faced another problem related with compilation and it could be a regression. Where my code compiled fine on 1.12, it was not able to compile with latest version. After some some research, it may be caused by the way the code is constructed. In the module I'm trying to compile (module.scm), we define a class via `define-simple-class` (let say its called <Simple>) and inside one of its method, we call a procedure defined in the same module. In this procedure, we create an instance of class <Simple> and use to compute a result which is returned. When commenting the line calling the procedure in the method, the compilation pass. Maybe it pass as a side effects just because some analysis did not occur because the procedure call was commented out. I tried to reproduce the problem with a stripped down version of the module but I was not able to do so. I will try to upgrade my test file to see if I can reproduce the problem in the upcoming week. I attached the file so my explanations are easier to follow. Exception Messages (Exceptions are trimmed down a bit, tell me if you want the full ones) (compiling src/com/package/module.scm to com.package.module) src/com/package/module.scm:1512:49: caught exception in inline-compiler for com.package.kawa.ListHolder com.package.kawa.ListHolder.put(java.lang.Object) - java.lang.ArrayIndexOutOfBoundsException: 21 gnu.bytecode.Variable.freeLocal(Variable.java:142) gnu.bytecode.Scope.freeLocals(Scope.java:153) gnu.bytecode.CodeAttr.popScope(CodeAttr.java:652) gnu.expr.ScopeExp.popScope(ScopeExp.java:34) gnu.expr.LetExp.compile(LetExp.java:194) gnu.expr.Expression.compileNotePosition(Expression.java:156) gnu.expr.Expression.compileWithPosition(Expression.java:127) gnu.expr.LetExp.compile(LetExp.java:163) gnu.expr.Expression.compileNotePosition(Expression.java:156) gnu.expr.Expression.compileWithPosition(Expression.java:127) gnu.expr.LetExp.compile(LetExp.java:193) gnu.expr.Expression.compileNotePosition(Expression.java:156) gnu.expr.Expression.compileWithPosition(Expression.java:127) ... src/org/package/module.scm:1543: internal error while compiling src/org/package/module.scm java.lang.Error: at PC 358: SP at end of 'then' was 2 while SP at end of 'else' was 0 at gnu.bytecode.CodeAttr.emitFi(CodeAttr.java:1917) at gnu.expr.IfExp.compile(IfExp.java:143) at gnu.expr.IfExp.compile(IfExp.java:52) at gnu.expr.Expression.compileNotePosition(Expression.java:156) at gnu.expr.Expression.compileWithPosition(Expression.java:127) at gnu.expr.BeginExp.compile(BeginExp.java:145) at gnu.expr.Expression.compileNotePosition(Expression.java:156) at gnu.expr.Expression.compileWithPosition(Expression.java:127) at gnu.expr.IfExp.compile(IfExp.java:123) at gnu.expr.IfExp.compile(IfExp.java:52) at gnu.expr.Expression.compileWithPosition(Expression.java:130) at gnu.expr.LetExp.compile(LetExp.java:193) Thanks again for your valuable help. I hope you don't find I'm harassing you :) > > -- > --Per Bothner > per@bothner.com http://per.bothner.com/
Attachment:
partial-class.scm
Description: Binary data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |