Compiling class library with less memory (was: Re: [kaffe] java errors)

Dalibor Topic robilad@yahoo.com
Fri, 9 Aug 2002 03:03:22 -0700 (PDT)


Ciao Fabio,
--- FAbel <klm@lmib.org> wrote:
> I got the same error now that I'm compiling kaffe
> for ARM via Skiff Cluster 
> Project
> http://www.handhelds.org/projects/skiffcluster.html
> 
> my working dir is /home/guest/fabio@lmib.org/kaffe/
> logon the ipaqs because the other have limited ram
> and classes doesn't 
> compile.
> 
> these are some error from kjc
> 
> [ parsed java/lang/ArrayStoreException.java in 19 ms
> ]
> [ parsed java/lang/Boolean.java in 134 ms ]
> [ parsed java/lang/Byte.java in 214 ms ]
> java.lang.ArrayIndexOutOfBoundsException
>         at
>
at.dms.kjc.KjcScanner.nextTokenImpl(KjcScanner.java:984)
>         at 
>
at.dms.compiler.tools.antlr.extra.Scanner.nextToken(Scanner.java:66)
>         at 
>
at.dms.compiler.tools.antlr.runtime.TokenBuffer.fill(TokenBuffer.java:80)
>         at 
>
at.dms.compiler.tools.antlr.runtime.TokenBuffer.LA(TokenBuffer.java:93)
>         at
>
at.dms.compiler.tools.antlr.runtime.LLkParser.LA(LLkParser.java:64)
>         at
>
at.dms.kjc.KjcParser.jVariableInitializer(KjcParser.java:2614)
>         at
>
at.dms.kjc.KjcParser.jVariableDeclarator(KjcParser.java:2582)
>         at
>
at.dms.kjc.KjcParser.jVariableDefinitions(KjcParser.java:593)
>         at
> at.dms.kjc.KjcParser.jMember(KjcParser.java:1384)
>         at
>
at.dms.kjc.KjcParser.jClassBlock(KjcParser.java:1218)
>         at
>
at.dms.kjc.KjcParser.jClassDefinition(KjcParser.java:429)
>         at
>
at.dms.kjc.KjcParser.jTypeDefinition(KjcParser.java:174)
>         at
>
at.dms.kjc.KjcParser.jCompilationUnit(KjcParser.java:52)
>         at at.dms.kjc.Main.parseFile(Main.java:344)
>         at at.dms.kjc.Main.run(Main.java:147)
>         at at.dms.kjc.Main.compile(Main.java:69)
>         at at.dms.kjc.Main.main(Main.java:60)

I've talked with Patrick Tullmann about a similar
issue on his test setup. A workaround may be to
compile the packages separately. 

Unfortunately, the easy fix (doing a for loop over
Klasses_jar_SRCS in the Makefile and compiling each
package separately instead of all at once + adding
libraries/javalib to CPATH) doesn't work with our
version of kjc. Kjc wants to see all files that belong
together on the command line, otherwise you get errors
because it doesn't greedily look around for files it
can't find like Sun's javac or jikes do. I don't know
if there is a way to persuade kjc to just parse a
file, but not generate output for it.

Trying to find subsets of package and compile them in
a given order is not easy. You'd have to start with
java.lang, and that one imports classes from java.io,
java.lang.reflect, java.net, java.security, java.util,
etc . I think in the end everything uses everything ;)

Workaround for now : use jikes. But I'd definitely
like to see some proposals on the issue.

best regards,

dalibor topic

__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com