### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core 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.145 diff -u -r1.145 CodeStream.java --- compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java 23 Oct 2006 16:48:39 -0000 1.145 +++ compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java 19 Nov 2006 16:21:58 -0000 @@ -5761,7 +5761,7 @@ if (pcToSourceMapSize > 0) { // in this case there is already an entry in the table if (pcToSourceMap[pcToSourceMapSize - 1] != lineNumber) { - if (startPC < lastEntryPC) { + if (startPC <= lastEntryPC) { // we forgot to add an entry. // search if an existing entry exists for startPC int insertionIndex = insertionIndex(pcToSourceMap, pcToSourceMapSize, startPC); @@ -5789,8 +5789,12 @@ pcToSourceMapSize += 2; } } else if (position != lastEntryPC) { // no bytecode since last entry pc - pcToSourceMap[pcToSourceMapSize++] = lastEntryPC; - pcToSourceMap[pcToSourceMapSize++] = lineNumber; + if (lastEntryPC == startPC || lastEntryPC == pcToSourceMap[pcToSourceMapSize - 2]) { + pcToSourceMap[pcToSourceMapSize - 1] = lineNumber; + } else { + pcToSourceMap[pcToSourceMapSize++] = lastEntryPC; + pcToSourceMap[pcToSourceMapSize++] = 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. 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.8 diff -u -r1.8 BranchLabel.java --- compiler/org/eclipse/jdt/internal/compiler/codegen/BranchLabel.java 14 Sep 2006 14:36:55 -0000 1.8 +++ compiler/org/eclipse/jdt/internal/compiler/codegen/BranchLabel.java 19 Nov 2006 16:21:56 -0000 @@ -213,13 +213,9 @@ } */ // 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 | ClassFileConstants.ATTR_STACK_MAP)) != 0) { LocalVariableBinding locals[] = this.codeStream.locals;