Mercurial > hg > graal-jvmci-8
changeset 22613:9409f7cec59a
Remove dependency from HotSpotJVMCIRuntime to CompilerFactory.
author | Roland Schatz <roland.schatz@oracle.com> |
---|---|
date | Thu, 24 Sep 2015 14:33:14 +0200 |
parents | 976555bdc7c6 |
children | 0851eafff5c9 |
files | jvmci/jdk.internal.jvmci.compiler/src/jdk/internal/jvmci/compiler/CompilerFactory.java jvmci/jdk.internal.jvmci.hotspot.amd64/src/jdk/internal/jvmci/hotspot/amd64/AMD64HotSpotJVMCIBackendFactory.java jvmci/jdk.internal.jvmci.hotspot.sparc/src/jdk/internal/jvmci/hotspot/sparc/SPARCHotSpotJVMCIBackendFactory.java jvmci/jdk.internal.jvmci.hotspot/src/jdk/internal/jvmci/hotspot/HotSpotJVMCIBackendFactory.java jvmci/jdk.internal.jvmci.hotspot/src/jdk/internal/jvmci/hotspot/HotSpotJVMCICompilerConfig.java jvmci/jdk.internal.jvmci.hotspot/src/jdk/internal/jvmci/hotspot/HotSpotJVMCIRuntime.java |
diffstat | 6 files changed, 10 insertions(+), 28 deletions(-) [+] |
line wrap: on
line diff
--- a/jvmci/jdk.internal.jvmci.compiler/src/jdk/internal/jvmci/compiler/CompilerFactory.java Thu Sep 24 14:21:10 2015 +0200 +++ b/jvmci/jdk.internal.jvmci.compiler/src/jdk/internal/jvmci/compiler/CompilerFactory.java Thu Sep 24 14:33:14 2015 +0200 @@ -22,7 +22,6 @@ */ package jdk.internal.jvmci.compiler; -import jdk.internal.jvmci.code.Architecture; import jdk.internal.jvmci.runtime.JVMCIRuntime; /** @@ -37,12 +36,6 @@ String getCompilerName(); /** - * Initialize an {@link Architecture}. The compiler has the opportunity to extend the - * {@link Architecture} description with a custom subclass. - */ - Architecture initializeArchitecture(Architecture arch); - - /** * Create a new instance of the {@link Compiler}. */ Compiler createCompiler(JVMCIRuntime runtime);
--- a/jvmci/jdk.internal.jvmci.hotspot.amd64/src/jdk/internal/jvmci/hotspot/amd64/AMD64HotSpotJVMCIBackendFactory.java Thu Sep 24 14:21:10 2015 +0200 +++ b/jvmci/jdk.internal.jvmci.hotspot.amd64/src/jdk/internal/jvmci/hotspot/amd64/AMD64HotSpotJVMCIBackendFactory.java Thu Sep 24 14:33:14 2015 +0200 @@ -30,7 +30,6 @@ import jdk.internal.jvmci.code.Architecture; import jdk.internal.jvmci.code.RegisterConfig; import jdk.internal.jvmci.code.TargetDescription; -import jdk.internal.jvmci.compiler.CompilerFactory; import jdk.internal.jvmci.hotspot.HotSpotCodeCacheProvider; import jdk.internal.jvmci.hotspot.HotSpotConstantReflectionProvider; import jdk.internal.jvmci.hotspot.HotSpotJVMCIBackendFactory; @@ -104,12 +103,12 @@ return flags; } - protected TargetDescription createTarget(HotSpotVMConfig config, CompilerFactory compilerFactory) { + protected TargetDescription createTarget(HotSpotVMConfig config) { final int stackFrameAlignment = 16; final int implicitNullCheckLimit = 4096; final boolean inlineObjects = true; Architecture arch = new AMD64(computeFeatures(config), computeFlags(config)); - return new TargetDescription(compilerFactory.initializeArchitecture(arch), true, stackFrameAlignment, implicitNullCheckLimit, inlineObjects); + return new TargetDescription(arch, true, stackFrameAlignment, implicitNullCheckLimit, inlineObjects); } protected HotSpotConstantReflectionProvider createConstantReflection(HotSpotJVMCIRuntimeProvider runtime) { @@ -139,10 +138,10 @@ } @SuppressWarnings("try") - public JVMCIBackend createJVMCIBackend(HotSpotJVMCIRuntimeProvider runtime, CompilerFactory compilerFactory, JVMCIBackend host) { + public JVMCIBackend createJVMCIBackend(HotSpotJVMCIRuntimeProvider runtime, JVMCIBackend host) { assert host == null; - TargetDescription target = createTarget(runtime.getConfig(), compilerFactory); + TargetDescription target = createTarget(runtime.getConfig()); RegisterConfig regConfig; HotSpotCodeCacheProvider codeCache;
--- a/jvmci/jdk.internal.jvmci.hotspot.sparc/src/jdk/internal/jvmci/hotspot/sparc/SPARCHotSpotJVMCIBackendFactory.java Thu Sep 24 14:21:10 2015 +0200 +++ b/jvmci/jdk.internal.jvmci.hotspot.sparc/src/jdk/internal/jvmci/hotspot/sparc/SPARCHotSpotJVMCIBackendFactory.java Thu Sep 24 14:33:14 2015 +0200 @@ -29,7 +29,6 @@ import jdk.internal.jvmci.code.Architecture; import jdk.internal.jvmci.code.RegisterConfig; import jdk.internal.jvmci.code.TargetDescription; -import jdk.internal.jvmci.compiler.CompilerFactory; import jdk.internal.jvmci.hotspot.HotSpotCodeCacheProvider; import jdk.internal.jvmci.hotspot.HotSpotConstantReflectionProvider; import jdk.internal.jvmci.hotspot.HotSpotJVMCIBackendFactory; @@ -45,12 +44,12 @@ @ServiceProvider(HotSpotJVMCIBackendFactory.class) public class SPARCHotSpotJVMCIBackendFactory implements HotSpotJVMCIBackendFactory { - protected TargetDescription createTarget(HotSpotVMConfig config, CompilerFactory compilerFactory) { + protected TargetDescription createTarget(HotSpotVMConfig config) { final int stackFrameAlignment = 16; final int implicitNullCheckLimit = 4096; final boolean inlineObjects = false; Architecture arch = new SPARC(computeFeatures(config)); - return new TargetDescription(compilerFactory.initializeArchitecture(arch), true, stackFrameAlignment, implicitNullCheckLimit, inlineObjects); + return new TargetDescription(arch, true, stackFrameAlignment, implicitNullCheckLimit, inlineObjects); } protected HotSpotCodeCacheProvider createCodeCache(HotSpotJVMCIRuntimeProvider runtime, TargetDescription target, RegisterConfig regConfig) { @@ -88,9 +87,9 @@ } @SuppressWarnings("try") - public JVMCIBackend createJVMCIBackend(HotSpotJVMCIRuntimeProvider runtime, CompilerFactory compilerFactory, JVMCIBackend host) { + public JVMCIBackend createJVMCIBackend(HotSpotJVMCIRuntimeProvider runtime, JVMCIBackend host) { assert host == null; - TargetDescription target = createTarget(runtime.getConfig(), compilerFactory); + TargetDescription target = createTarget(runtime.getConfig()); HotSpotMetaAccessProvider metaAccess = new HotSpotMetaAccessProvider(runtime); RegisterConfig regConfig = new SPARCHotSpotRegisterConfig(target, runtime.getConfig());
--- a/jvmci/jdk.internal.jvmci.hotspot/src/jdk/internal/jvmci/hotspot/HotSpotJVMCIBackendFactory.java Thu Sep 24 14:21:10 2015 +0200 +++ b/jvmci/jdk.internal.jvmci.hotspot/src/jdk/internal/jvmci/hotspot/HotSpotJVMCIBackendFactory.java Thu Sep 24 14:33:14 2015 +0200 @@ -22,12 +22,11 @@ */ package jdk.internal.jvmci.hotspot; -import jdk.internal.jvmci.compiler.CompilerFactory; import jdk.internal.jvmci.runtime.JVMCIBackend; public interface HotSpotJVMCIBackendFactory { - JVMCIBackend createJVMCIBackend(HotSpotJVMCIRuntimeProvider runtime, CompilerFactory compilerFactory, JVMCIBackend host); + JVMCIBackend createJVMCIBackend(HotSpotJVMCIRuntimeProvider runtime, JVMCIBackend host); /** * Gets the CPU architecture of this backend.
--- a/jvmci/jdk.internal.jvmci.hotspot/src/jdk/internal/jvmci/hotspot/HotSpotJVMCICompilerConfig.java Thu Sep 24 14:21:10 2015 +0200 +++ b/jvmci/jdk.internal.jvmci.hotspot/src/jdk/internal/jvmci/hotspot/HotSpotJVMCICompilerConfig.java Thu Sep 24 14:33:14 2015 +0200 @@ -22,7 +22,6 @@ */ package jdk.internal.jvmci.hotspot; -import jdk.internal.jvmci.code.Architecture; import jdk.internal.jvmci.common.JVMCIError; import jdk.internal.jvmci.compiler.Compiler; import jdk.internal.jvmci.compiler.CompilerFactory; @@ -42,10 +41,6 @@ return "<none>"; } - public Architecture initializeArchitecture(Architecture arch) { - return arch; - } - public Compiler createCompiler(JVMCIRuntime runtime) { return this; }
--- a/jvmci/jdk.internal.jvmci.hotspot/src/jdk/internal/jvmci/hotspot/HotSpotJVMCIRuntime.java Thu Sep 24 14:21:10 2015 +0200 +++ b/jvmci/jdk.internal.jvmci.hotspot/src/jdk/internal/jvmci/hotspot/HotSpotJVMCIRuntime.java Thu Sep 24 14:33:14 2015 +0200 @@ -39,7 +39,6 @@ import jdk.internal.jvmci.code.InstalledCode; import jdk.internal.jvmci.common.JVMCIError; import jdk.internal.jvmci.compiler.Compiler; -import jdk.internal.jvmci.compiler.CompilerFactory; import jdk.internal.jvmci.compiler.StartupEventListener; import jdk.internal.jvmci.inittimer.InitTimer; import jdk.internal.jvmci.meta.JVMCIMetaAccessContext; @@ -158,10 +157,8 @@ factory = findFactory(hostArchitecture); } - CompilerFactory compilerFactory = HotSpotJVMCICompilerConfig.getCompilerFactory(); - try (InitTimer t = timer("create JVMCI backend:", hostArchitecture)) { - hostBackend = registerBackend(factory.createJVMCIBackend(this, compilerFactory, null)); + hostBackend = registerBackend(factory.createJVMCIBackend(this, null)); } vmEventListeners = Services.load(HotSpotVMEventListener.class);