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 50106 Details for
Bug 157247
[1.6] [compiler] VerifyError with StackMap frames when no local variable attributes are generated
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix for head
patch_157247_head.txt (text/plain), 5.41 KB, created by
Olivier Thomann
on 2006-09-13 20:47:17 EDT
(
hide
)
Description:
Proposed fix for head
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2006-09-13 20:47:17 EDT
Size:
5.41 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/codegen/BranchLabel.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/BranchLabel.java,v >retrieving revision 1.6 >diff -u -r1.6 BranchLabel.java >--- compiler/org/eclipse/jdt/internal/compiler/codegen/BranchLabel.java 14 Aug 2006 18:21:02 -0000 1.6 >+++ compiler/org/eclipse/jdt/internal/compiler/codegen/BranchLabel.java 14 Sep 2006 00:42:27 -0000 >@@ -221,7 +221,8 @@ > this.codeStream.pcToSourceMapSize-=2; > } > // end of new code >- if ((this.codeStream.generateAttributes & ClassFileConstants.ATTR_VARS) != 0) { >+ if ((this.codeStream.generateAttributes & ClassFileConstants.ATTR_VARS) != 0 >+ || (this.codeStream.generateAttributes & ClassFileConstants.ATTR_STACK_MAP) != 0) { > LocalVariableBinding locals[] = this.codeStream.locals; > for (int i = 0, max = locals.length; i < max; i++) { > LocalVariableBinding local = locals[i]; >Index: compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java,v >retrieving revision 1.141 >diff -u -r1.141 CodeStream.java >--- compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java 5 Sep 2006 13:50:57 -0000 1.141 >+++ compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java 14 Sep 2006 00:42:30 -0000 >@@ -202,18 +202,10 @@ > } > public void addDefinitelyAssignedVariables(Scope scope, int initStateIndex) { > // Required to fix 1PR0XVS: LFRE:WINNT - Compiler: variable table for method appears incorrect >- if ((this.generateAttributes & ClassFileConstants.ATTR_VARS) == 0) >- return; >-/* if (initStateIndex == lastInitStateIndexWhenAddingInits) >+ if (((this.generateAttributes & ClassFileConstants.ATTR_VARS) == 0) >+ && ((this.generateAttributes & ClassFileConstants.ATTR_STACK_MAP) == 0)) > return; >- lastInitStateIndexWhenAddingInits = initStateIndex; >- if (lastInitStateIndexWhenRemovingInits != initStateIndex){ >- lastInitStateIndexWhenRemovingInits = -2; // reinitialize remove index >- // remove(1)-add(1)-remove(1) -> ignore second remove >- // remove(1)-add(2)-remove(1) -> perform second remove >- } >- >-*/ for (int i = 0; i < visibleLocalsCount; i++) { >+ for (int i = 0; i < visibleLocalsCount; i++) { > LocalVariableBinding localBinding = visibleLocals[i]; > if (localBinding != null) { > // Check if the local is definitely assigned >@@ -1044,7 +1036,7 @@ > } > > // there may be some preserved locals never initialized >- if (visibleLocal.initializationCount > 0 && ((this.generateAttributes & ClassFileConstants.ATTR_VARS) != 0)){ >+ if (visibleLocal.initializationCount > 0) { > visibleLocal.recordInitializationEndPC(position); > } > visibleLocals[index--] = null; // this variable is no longer visible afterwards >@@ -1052,7 +1044,6 @@ > } > public void exitUserScope(BlockScope currentScope, LocalVariableBinding binding) { > // mark all the scope's locals as losing their definite assignment >- > if (((this.generateAttributes & ClassFileConstants.ATTR_VARS) == 0) > && ((this.generateAttributes & ClassFileConstants.ATTR_STACK_MAP) == 0)) > return; >@@ -1065,7 +1056,7 @@ > continue; > } > // there may be some preserved locals never initialized >- if (visibleLocal.initializationCount > 0 && ((this.generateAttributes & ClassFileConstants.ATTR_VARS) != 0)){ >+ if (visibleLocal.initializationCount > 0) { > visibleLocal.recordInitializationEndPC(position); > } > visibleLocals[index--] = null; // this variable is no longer visible afterwards >@@ -5740,10 +5731,8 @@ > System.arraycopy(locals, 0, locals = new LocalVariableBinding[allLocalsCounter + LOCALS_INCREMENT], 0, allLocalsCounter); > } > locals[allLocalsCounter++] = local; >- if ((this.generateAttributes & ClassFileConstants.ATTR_VARS) != 0) { >- local.initializationPCs = new int[4]; >- local.initializationCount = 0; >- } >+ local.initializationPCs = new int[4]; >+ local.initializationCount = 0; > } > > public void recordExpressionType(TypeBinding typeBinding) { >@@ -5861,7 +5850,8 @@ > public void removeNotDefinitelyAssignedVariables(Scope scope, int initStateIndex) { > // given some flow info, make sure we did not loose some variables initialization > // if this happens, then we must update their pc entries to reflect it in debug attributes >- if ((this.generateAttributes & ClassFileConstants.ATTR_VARS) == 0) >+ if (((this.generateAttributes & ClassFileConstants.ATTR_VARS) == 0) >+ && ((this.generateAttributes & ClassFileConstants.ATTR_STACK_MAP) == 0)) > return; > /* if (initStateIndex == lastInitStateIndexWhenRemovingInits) > return; >@@ -6315,7 +6305,8 @@ > this.lastEntryPC = pos; > } > // need to update the initialization endPC in case of generation of local variable attributes. >- if ((this.generateAttributes & ClassFileConstants.ATTR_VARS) != 0) { >+ if (((this.generateAttributes & ClassFileConstants.ATTR_VARS) != 0) >+ || ((this.generateAttributes & ClassFileConstants.ATTR_STACK_MAP) != 0)) { > for (int i = 0, max = this.locals.length; i < max; i++) { > LocalVariableBinding local = this.locals[i]; > if (local != null && local.declaringScope == scope && local.initializationCount > 0) {
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 157247
:
50102
|
50105
| 50106 |
50107
|
50108