Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 404690 - [1.8][compiler] revisit bridge generation after VM bug is fixed
Summary: [1.8][compiler] revisit bridge generation after VM bug is fixed
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.3   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: BETA J8   Edit
Assignee: Stephan Herrmann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 421796 (view as bug list)
Depends on:
Blocks: 380501
  Show dependency tree
 
Reported: 2013-04-01 19:54 EDT by Stephan Herrmann CLA
Modified: 2013-11-19 09:46 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Herrmann CLA 2013-04-01 19:54:36 EDT
Bug 391376 solves a problem that should actually be handled in the VM, see

  http://bugs.sun.com/view_bug.do?bug_id=8009130

Once that bug is fixed we should revisit our strategy for generating bridges.
Comment 1 Stephan Herrmann CLA 2013-04-01 19:57:57 EDT
This is the test to be updated: InterfaceMethodsTest.testSuperAccess02()
Comment 2 Srikanth Sankaran CLA 2013-11-01 02:36:44 EDT
(In reply to Stephan Herrmann from comment #0)
> Bug 391376 solves a problem that should actually be handled in the VM, see
> 
>   http://bugs.sun.com/view_bug.do?bug_id=8009130

This appears fixed.


> 
> Once that bug is fixed we should revisit our strategy for generating bridges.
Comment 3 Stephan Herrmann CLA 2013-11-19 07:19:01 EST
(In reply to Stephan Herrmann from comment #1)
> This is the test to be updated: InterfaceMethodsTest.testSuperAccess02()

The JavacHasABug excuse is no longer needed, cleaned up via bug 422051.
Comment 4 Stephan Herrmann CLA 2013-11-19 08:21:34 EST
(In reply to Stephan Herrmann from comment #0)
> Bug 391376 solves a problem that should actually be handled in the VM, see
> 
>   http://bugs.sun.com/view_bug.do?bug_id=8009130
> 
> Once that bug is fixed we should revisit our strategy for generating bridges.

To be specific: it's Bug 391376 comment 3 which fixed generating bridge methods from a public class to a default method in a non-public superinterface.


As of bug 288658 we were already generating a bridge for a public method inherited from a non-public super class.
-> Javac (incl. 8b115) does the same.

As of bug 391376 we do the same if the super method is a default method in a non-public superinterface.
-> Javac does not insert this bridge method and as of http://bugs.sun.com/view_bug.do?bug_id=8009130 this has been fixed by more smarts in the JVM.

Spec 0.7.0 doesn't seem to make a statement about this. So playing by the reference implementation we should stop generating a bridge method to inherited default methods just for visibility issues.
Comment 5 Stephan Herrmann CLA 2013-11-19 08:57:59 EST
Released for BETA_JAVA8 via http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?h=BETA_JAVA8&id=3a2ceaad86457e3ad5d931538b1dbf293c95deb0

With this change we no longer generate a bridge to a default method in a non-public superinterface. With this we seem to be in sync with javac.
Comment 6 Stephan Herrmann CLA 2013-11-19 09:46:54 EST
*** Bug 421796 has been marked as a duplicate of this bug. ***