Bug 62070 - Should revisit reference recording
Summary: Should revisit reference recording
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M2   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-13 06:44 EDT by Philipe Mulet CLA
Modified: 2004-09-23 11:41 EDT (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 2004-05-13 06:44:28 EDT
Build 20040506

After addressing bug 61882, we forced to fault-in type hierarchies of all 
types for which members are further accessed. 

Thus we match javac behavior, and our expectation when doing reference 
recording for incremental builds.

Question: why does the reference recording need to trigger resolution at all ? 
It should only collect information about the types which already got resolved 
during name resolution. It would be up to the name resolution to trigger the 
proper initializations. 

I suspect the faulting-in during reference recording is unnecessary and simply 
add unnecessarily to the build state.

Fix for bug 61882 addresses short term behavior, and compliance to other 
tools, but we should clarify whether:
1- accesses to members should really force to fault-in hierarchies (suspecting 
this is just an artifact from javac implementation, and not mandated by the 
spec).
2- we really need the extra information about unresolved supertypes amongst 
dependencies (providing we disable the faulting-in behavior of (1)).
Comment 1 Philipe Mulet CLA 2004-05-13 06:45:29 EDT
Once addressed, should add regression tests along the line of: 
NegativeTest#test424-426.
Comment 2 Philipe Mulet CLA 2004-05-14 10:53:18 EDT
Got confirmation from spec lead that indeed specs do not mandate this 
behavior, and that we can freely implement smarter (lazy) behavior.

"You are correct - there is no specification for this.  The JLS assumes 
the entire program exists, and it is up to implementations to figure out what 
compilation units they need and when.
So you are free to implement the smarter behavior,  as you suggest."
Comment 3 Kent Johnson CLA 2004-07-27 16:12:19 EDT
Removing the faulting in of hierarchies addresses bug 36397.

I cannot come up with a case when we need to do it. We record dependencies as 
we walk hierarchies looking for receiver types, etc.
Comment 4 Kent Johnson CLA 2004-07-28 14:11:08 EDT
424 & 425 now compile without errors but 426 still walks the hierarchy so it 
continues to fail.
Comment 5 Kent Johnson CLA 2004-08-06 13:03:17 EDT
Needed to rework findExactMethod since it did its own hierarchy walk.

Added DependencyTests to test out changes.
Comment 6 Kent Johnson CLA 2004-08-26 11:31:17 EDT
Added DependencyTests to test out changes.
Comment 7 Frederic Fusier CLA 2004-09-23 11:41:17 EDT
Verified for 3.1 M2 with build I200409230010.