View | Details | Raw Unified | Return to bug 195317 | Differences between
and this patch

Collapse All | Expand All

(-)compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java (+10 lines)
Lines 5872-5877 Link Here
5872
		}
5872
		}
5873
	}
5873
	}
5874
}
5874
}
5875
/**
5876
 * Remove all entries in pcToSourceMap table that are beyond this.position
5877
 */
5878
public void removeUnusedPcToSourceMapEntries() {
5879
	if (this.pcToSourceMapSize != 0) {
5880
		while (pcToSourceMap[pcToSourceMapSize - 2] > this.position) {
5881
			this.pcToSourceMapSize -= 2;
5882
		}
5883
	}
5884
}
5875
public void removeVariable(LocalVariableBinding localBinding) {
5885
public void removeVariable(LocalVariableBinding localBinding) {
5876
	if (localBinding == null) return;
5886
	if (localBinding == null) return;
5877
	if (localBinding.initializationCount > 0) {
5887
	if (localBinding.initializationCount > 0) {
(-)compiler/org/eclipse/jdt/internal/compiler/codegen/BranchLabel.java (-8 / +4 lines)
Lines 205-218 Link Here
205
				this.codeStream.position = (this.position -= 3);
205
				this.codeStream.position = (this.position -= 3);
206
				this.codeStream.classFileOffset -= 3;
206
				this.codeStream.classFileOffset -= 3;
207
				this.forwardReferenceCount--;
207
				this.forwardReferenceCount--;
208
				// also update the PCs in the related debug attributes
209
				/* OLD CODE
210
					int index = codeStream.pcToSourceMapSize - 1;
211
						while ((index >= 0) && (codeStream.pcToSourceMap[index][1] == oldPosition)) {
212
							codeStream.pcToSourceMap[index--][1] = position;
213
						}
214
				*/
215
				// Beginning of new code
216
				if (this.codeStream.lastEntryPC == oldPosition) {
208
				if (this.codeStream.lastEntryPC == oldPosition) {
217
					this.codeStream.lastEntryPC = this.position;
209
					this.codeStream.lastEntryPC = this.position;
218
				}
210
				}
Lines 233-238 Link Here
233
						}
225
						}
234
					}
226
					}
235
				}
227
				}
228
				if ((this.codeStream.generateAttributes & ClassFileConstants.ATTR_LINES) != 0) {
229
					// we need to remove all entries that is beyond this.position inside the pcToSourcerMap table
230
					this.codeStream.removeUnusedPcToSourceMapEntries();
231
				}
236
			}
232
			}
237
		}
233
		}
238
		for (int i = 0; i < this.forwardReferenceCount; i++) {
234
		for (int i = 0; i < this.forwardReferenceCount; i++) {

Return to bug 195317