Bug 26753 - Suspicious yoyo behavior when stepping through if condition
Summary: Suspicious yoyo behavior when stepping through if condition
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1 M4   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-11-20 06:54 EST by Philipe Mulet CLA
Modified: 2002-12-17 10:58 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.