### 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.4 diff -u -r1.4 BranchLabel.java --- compiler/org/eclipse/jdt/internal/compiler/codegen/BranchLabel.java 3 Apr 2006 13:51:37 -0000 1.4 +++ compiler/org/eclipse/jdt/internal/compiler/codegen/BranchLabel.java 19 Apr 2006 20:05:50 -0000 @@ -176,21 +176,9 @@ this.codeStream.classFileOffset -= 3; this.forwardReferenceCount--; // also update the PCs in the related debug attributes - /* OLD CODE - int index = codeStream.pcToSourceMapSize - 1; - while ((index >= 0) && (codeStream.pcToSourceMap[index][1] == oldPosition)) { - codeStream.pcToSourceMap[index--][1] = position; - } - */ - // Beginning of new code - int index = this.codeStream.pcToSourceMapSize - 2; if (this.codeStream.lastEntryPC == oldPosition) { this.codeStream.lastEntryPC = this.position; } - if ((index >= 0) && (this.codeStream.pcToSourceMap[index] == this.position)) { - this.codeStream.pcToSourceMapSize-=2; - } - // end of new code if ((this.codeStream.generateAttributes & ClassFileConstants.ATTR_VARS) != 0) { LocalVariableBinding locals[] = this.codeStream.locals; for (int i = 0, max = locals.length; i < max; 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.132 diff -u -r1.132 CodeStream.java --- compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java 3 Apr 2006 13:51:36 -0000 1.132 +++ compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java 19 Apr 2006 20:05:50 -0000 @@ -5832,6 +5832,8 @@ pcToSourceMap[pcToSourceMapSize++] = lastEntryPC; pcToSourceMap[pcToSourceMapSize++] = lineNumber; } + } else if (startPC == pcToSourceMap[pcToSourceMapSize - 2]) { + pcToSourceMap[pcToSourceMapSize - 1] = lineNumber; } else { // we can safely add the new entry. The endPC of the previous entry is not in conflit with the startPC of the new entry. pcToSourceMap[pcToSourceMapSize++] = startPC; Index: compiler/org/eclipse/jdt/internal/compiler/ast/ForeachStatement.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ForeachStatement.java,v retrieving revision 1.35 diff -u -r1.35 ForeachStatement.java --- compiler/org/eclipse/jdt/internal/compiler/ast/ForeachStatement.java 28 Mar 2006 20:29:56 -0000 1.35 +++ compiler/org/eclipse/jdt/internal/compiler/ast/ForeachStatement.java 19 Apr 2006 20:05:50 -0000 @@ -283,12 +283,12 @@ switch(this.kind) { case ARRAY : codeStream.iinc(this.indexVariable.resolvedPosition, 1); + codeStream.recordPositionsFrom(continuationPC, this.elementVariable.sourceStart); break; case RAW_ITERABLE : case GENERIC_ITERABLE : break; } - codeStream.recordPositionsFrom(continuationPC, this.elementVariable.sourceStart); } if (this.postCollectionInitStateIndex != -1) {