why a typeguard single implementation interface field

Vitaly Davidovich vitalyd at gmail.com
Mon Jan 30 10:51:56 UTC 2017


Here's a prior discussion on this you may find interesting:
http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2015-April/017649.html

On Mon, Jan 30, 2017 at 5:03 AM Peter Veentjer <alarmnummer at gmail.com>
wrote:

> You are right.
>
> When I make 'Service' an abstract class; the typeguard disappears.
>
> Thanks!
>
> On Mon, Jan 30, 2017 at 12:01 PM, Aleksey Shipilev <shade at redhat.com>
> wrote:
>
> On 01/30/2017 10:50 AM, Peter Veentjer wrote:
> > This code shows there is a typeguard; even though there is only a single
> > implementation of the 'Service' interface. Why is this typeguard
> required? If a
> > second conflicting implementation of Service would be loaded, why not
> rely on
> > CHA to take care of deoptimizing the code?
>
> Short answer: CHA is not handling interfaces well.
>
> See:
>  https://bugs.openjdk.java.net/browse/JDK-6986483
>  https://bugs.openjdk.java.net/browse/JDK-8065760
>
> Thanks,
> -Aleksey
>
>
> --
Sent from my phone
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20170130/990e4f01/attachment.html>


More information about the hotspot-compiler-dev mailing list