JPython 64K limit on source-code size? 
Author Message
 JPython 64K limit on source-code size?


> I have a JPython program I'm using as a test suite.  It's generated code and
> around 74K long.  When I try to run it with JPython I get this message:

> Traceback (innermost last):
>   (no code object) at line 0
> java.lang.ClassFormatError: org/python/pycode/_pyx0 (Code of a method longer
> than 65535 bytes)


> If this 64K ceiling is indeed a basic limitation of JPython because of Java,
> I'm wondering if there is an easy way to split the file into pieces in a
> chain-like fashion.  Any ideas?

Yep, this is a java thingy.  From the stack trace, it looks like you have
a method that is >64K long.  According to Sun's JVM specification, the
maximum code allowed for any individual method is 65536 bytes:

That limit includes any code that it may have generated to initialize
variables that you declared.  For example, initializing a large array of
strings as a class or instance variable could get you up to that limit, if
you're not careful.

It doesn't look like you will need to split up your file, but you will
need to either split up your method or load your variables at run time.


Sat, 13 Oct 2001 03:00:00 GMT  
 [ 2 post ] 

 Relevant Pages 

1. 64k-source limit for a86???

2. DLLs, big code and 64K limit with MS FORTRAN v5.1 - *HELP*

3. source file size limit in 5.5

4. Source procedure size limit ?

5. CW20, code size limit?

6. 64k tag array limit?

7. 64k string limit

8. 64k limit??

9. ? seg 64k limit / linking codesegs

10. 64K limit for data segments

11. 64k Instruction Limit ??

12. 64K limit on data array


Powered by phpBB® Forum Software