Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
65535 bytes method code limit?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
aloha.kakuikanu  
View profile  
 More options Mar 1 2007, 4:24 pm
Newsgroups: comp.lang.java.machine
From: "aloha.kakuikanu" <aloha.kakuik...@yahoo.com>
Date: 1 Mar 2007 13:24:13 -0800
Local: Thurs, Mar 1 2007 4:24 pm
Subject: 65535 bytes method code limit?
I'm getting:

"The code of method mTokens() is exceeding the 65535 bytes limit"

The method is antlr generated, so I struggle to find any workaround.
Perhaps I'm missing some magic JVM parameter setting? Aren't 16 bit
integers relics of the past century?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris Uppal  
View profile  
 More options Mar 1 2007, 5:04 pm
Newsgroups: comp.lang.java.machine
From: "Chris Uppal" <chris.up...@metagnostic.REMOVE-THIS.org>
Date: Thu, 1 Mar 2007 22:04:29 -0000
Local: Thurs, Mar 1 2007 5:04 pm
Subject: Re: 65535 bytes method code limit?

aloha.kakuikanu wrote:
> "The code of method mTokens() is exceeding the 65535 bytes limit"

> The method is antlr generated, so I struggle to find any workaround.
> Perhaps I'm missing some magic JVM parameter setting? Aren't 16 bit
> integers relics of the past century?

It's a hard limit in Java, I'm afraid.  No way around it (with current versions
of Java) because it's a limit of the classfile format itself, rather than a
limit of the Java compiler, or of the JVM.

(Actually, the limit in the classfile is rather more complicated than that, and
you can, structurally, have more than 64K bytes of bytecode per method, but
there are various auxiliary structures in the classfile which do have a 64K
limits.)

    -- chris


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Florian Weimer  
View profile  
 More options Mar 2 2007, 7:45 am
Newsgroups: comp.lang.java.machine
From: Florian Weimer <f...@deneb.enyo.de>
Date: Fri, 02 Mar 2007 13:45:31 +0100
Local: Fri, Mar 2 2007 7:45 am
Subject: Re: 65535 bytes method code limit?
* aloha kakuikanu:

> I'm getting:

> "The code of method mTokens() is exceeding the 65535 bytes limit"

> The method is antlr generated, so I struggle to find any workaround.
> Perhaps I'm missing some magic JVM parameter setting?

Anything that compiles to class files in a straightforward way will
hit this limit, as Chris explained.

There are basically two workarounds: Use a compiler that synthesizes
additional classes to work around the limit (I don't know if one
exists), or a compiler that does not compile to class files, such as
an earlier GCJ version.  The latter approach might work if your
intention is to get the code running.  (Nowadays, GCJ uses class files
as well.)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Roedy Green  
View profile  
 More options May 25 2007, 4:35 am
Newsgroups: comp.lang.java.machine
From: Roedy Green <see_webs...@mindprod.com.invalid>
Date: Fri, 25 May 2007 08:35:05 GMT
Local: Fri, May 25 2007 4:35 am
Subject: Re: 65535 bytes method code limit?
On 1 Mar 2007 13:24:13 -0800, "aloha.kakuikanu"
<aloha.kakuik...@yahoo.com> wrote, quoted or indirectly quoted someone
who said :

>Perhaps I'm missing some magic JVM parameter setting? Aren't 16 bit
>integers relics of the past century?

Nope. Using 32 bit addressing would double the size of a class file.
It is rare to blow the limit unless you are mechanically generating
code.
--

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
glen herrmannsfeldt  
View profile  
 More options May 31 2007, 5:48 pm
Newsgroups: comp.lang.java.machine
From: glen herrmannsfeldt <g...@ugcs.caltech.edu>
Date: Thu, 31 May 2007 13:48:57 -0800
Local: Thurs, May 31 2007 5:48 pm
Subject: Re: 65535 bytes method code limit?

Roedy Green wrote:
> On 1 Mar 2007 13:24:13 -0800, "aloha.kakuikanu"
> <aloha.kakuik...@yahoo.com> wrote, quoted or indirectly quoted someone
>>Perhaps I'm missing some magic JVM parameter setting? Aren't 16 bit
>>integers relics of the past century?
> Nope. Using 32 bit addressing would double the size of a class file.
> It is rare to blow the limit unless you are mechanically generating
> code.

If you used an escape or prefix code for larger addresses it wouldn't
double the size.  I believe that might have been part of the
design, but was never (as far as I know) implemented.  Yes, it is
exactly mechanically generated code that needs this.

(The IBM z/OS system only allows code below the 2GB bar.  There
has been discussion on the need for this restriction, but again
it is only machine generated code that is likely to cause problems.)

-- glen


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »