Bug 26753

Summary: Suspicious yoyo behavior when stepping through if condition
Product: [Eclipse Project] JDT Reporter: Philipe Mulet <philippe_mulet>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.1   
Target Milestone: 2.1 M4   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Philipe Mulet CLA 2002-11-20 06:54:42 EST
Build 2.1-M3

When stepping through code like:

if (this.binding.declaringClass.isLocalType() 
    && !currentScope.isDefinedInType(this.binding.declaringClass)) {
    ...
}

where the condition evaluates to true, the first line is highlighted again 
after the second one has completed. Seems non optimal.
Comment 1 Olivier Thomann CLA 2002-11-20 14:56:17 EST
This is due to the codeStream.recordPositionsFrom(pc, this.sourceStart); at the
end of the AND_AND_Expression code generation. The source start of this
expression is on the same line than the if keyword. Therefore we explicitely ask
the compiler to remember that the last pc (position 12() should be mapped to the
start of the && expression.
If we don't want it, we should remove this line.
Comment 2 Olivier Thomann CLA 2002-11-20 15:32:45 EST
Or if we don't want to remove these calls, we need to ensure that we don't add 
a new entry when an entry for the corresponding pc already exists.
Comment 3 Philipe Mulet CLA 2002-11-21 09:51:00 EST
Extra bytecodes associated with optimized boolean code gen should only be 
appended to existing entries, and not recorded individually.

Need some testing.
Comment 4 Olivier Thomann CLA 2002-11-21 13:25:17 EST
Fixed and released in 2.1 stream.
Regression tests added.
Comment 5 David Audel CLA 2002-12-17 10:58:27 EST
Verified.