RFR: 8167180: [JVMCI] Exported elements referring to inaccessible types in jdk.vm.ci

Doug Simon doug.simon at oracle.com
Wed Oct 12 14:26:51 UTC 2016


> On 12 Oct 2016, at 16:16, Alan Bateman <Alan.Bateman at oracle.com> wrote:
> 
> On 11/10/2016 21:44, Doug Simon wrote:
> 
>>> On 11 Oct 2016, at 22:40, Mandy Chung <mandy.chung at oracle.com> wrote:
>>> 
>>> 
>>>> On Oct 11, 2016, at 1:36 PM, Doug Simon <doug.simon at oracle.com> wrote:
>>>> 
>>>> Another alternative name is JVMCIServiceLocator:
>>>> 
>>>> /**
>>>> * Service-provider class for the runtime to locate providers of JVMCI services where the latter are
>>>> * not in packages exported by the JVMCI module. As part of instantiating
>>>> * {@link JVMCIServiceLocator}, all JVMCI packages will be {@linkplain Services#exportJVMCITo(Class)
>>>> * exported} to the module defining the class of the instantiated object.
>>>> *
>>>> * While the {@link #getProvider(Class)} method can be used directly, it's usually easier to use
>>>> * {@link #getProviders(Class)}.
>>>> */
>>>> public abstract class JVMCIServiceLocator
>>> This class will find the provider of a given service.  I think JVMCIServiceLocator is fine.
>> Ok, I’ll make that change in the final patch.
>> 
> This name looks okay to me. I assume the first sentence in the javadoc will be updated too as it's a service locator now rather than a "service-provider”.

Well, it is still a service provider in the sense that it’s looked up via a ServiceLoader. The service it provides is to locate other (non-ServiceLoader) services. That is, JVMCIServiceLocator is an alternative to ServiceProvider for services that need access to the JVMCI module before they can be created.

-Doug


More information about the hotspot-compiler-dev mailing list