Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 29255 Details for
Bug 114855
[compiler] OutOfMemoryError compiling deeply nested try-catch
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Variation on the patch which isn't performing any sorting
114855.txt (text/plain), 2.83 KB, created by
Philipe Mulet
on 2005-11-03 04:13:08 EST
(
hide
)
Description:
Variation on the patch which isn't performing any sorting
Filename:
MIME Type:
Creator:
Philipe Mulet
Created:
2005-11-03 04:13:08 EST
Size:
2.83 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/codegen/Label.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/Label.java,v >retrieving revision 1.34 >diff -u -r1.34 Label.java >--- compiler/org/eclipse/jdt/internal/compiler/codegen/Label.java 14 Oct 2005 22:43:00 -0000 1.34 >+++ compiler/org/eclipse/jdt/internal/compiler/codegen/Label.java 3 Nov 2005 09:11:36 -0000 >@@ -43,11 +43,15 @@ > /** > * Add a forward refrence for the array. > */ >-void addForwardReference(int iPos) { >+void addForwardReference(int pos) { >+ int[] refs = this.forwardReferences; >+ for (int i = 0, count = this.forwardReferenceCount; i < count; i++) { >+ if (refs[i] == pos) return; // already recorded >+ } > int length; >- if (forwardReferenceCount >= (length = forwardReferences.length)) >- System.arraycopy(forwardReferences, 0, (forwardReferences = new int[2*length]), 0, length); >- forwardReferences[forwardReferenceCount++] = iPos; >+ if (forwardReferenceCount >= (length = refs.length)) >+ System.arraycopy(refs, 0, (this.forwardReferences = new int[2*length]), 0, length); >+ this.forwardReferences[this.forwardReferenceCount++] = pos; > } > > /** >@@ -56,14 +60,22 @@ > public void appendForwardReferencesFrom(Label otherLabel) { > int otherCount = otherLabel.forwardReferenceCount; > if (otherCount == 0) return; >- int length = forwardReferences.length; >- int neededSpace = otherCount + forwardReferenceCount; >- if (neededSpace >= length){ >- System.arraycopy(forwardReferences, 0, (forwardReferences = new int[neededSpace]), 0, forwardReferenceCount); >+ int count = this.forwardReferenceCount; >+ int[] refs = this.forwardReferences; >+ int neededSpace = count + otherCount; >+ if (neededSpace >= refs.length){ >+ System.arraycopy(refs, 0, (this.forwardReferences = refs = new int[neededSpace]), 0, count); > } > // append other forward references at the end, so they will get updated as well >- System.arraycopy(otherLabel.forwardReferences, 0, forwardReferences, forwardReferenceCount, otherCount); >- forwardReferenceCount = neededSpace; >+ int[] otherRefs = otherLabel.forwardReferences; >+ otherLoop: for (int i = 0; i < otherCount; i++) { >+ int otherRef = otherRefs[i]; >+ for (int j = 0; j < count; j++) { >+ if (refs[j] == otherRef) continue otherLoop; // already recorded >+ } >+ refs[count++] = otherRef; >+ } >+ this.forwardReferenceCount = count; > } > > /* >@@ -94,7 +106,7 @@ > if (position == POS_NOT_SET) { > addForwardReference(codeStream.position); > // Leave 4 bytes free to generate the jump offset afterwards >- this.tagBits |= WIDE; >+ this.tagBits |= WIDE; > codeStream.position += 4; > codeStream.classFileOffset += 4; > } else { //Position is set. Write it!
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 114855
:
29248
|
29255
|
29265
|
29267