Mercurial > hg > graal-compiler
changeset 12425:f9d27a88bbda
narrowed TargetDescription dependency of ReplacementsImpl to word kind
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 14 Oct 2013 11:06:32 +0200 |
parents | edb2e6bd6a01 |
children | 492c428f6035 |
files | graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotReplacementsImpl.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/stubs/ForeignCallStub.java graal/com.oracle.graal.replacements.test/src/com/oracle/graal/replacements/test/ObjectAccessTest.java graal/com.oracle.graal.replacements.test/src/com/oracle/graal/replacements/test/PointerTest.java graal/com.oracle.graal.replacements.test/src/com/oracle/graal/replacements/test/WordTest.java graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsImpl.java graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleReplacements.java |
diffstat | 7 files changed, 13 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotReplacementsImpl.java Sat Oct 12 20:08:36 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotReplacementsImpl.java Mon Oct 14 11:06:32 2013 +0200 @@ -40,7 +40,7 @@ private final HotSpotVMConfig config; public HotSpotReplacementsImpl(HotSpotRuntime runtime, Assumptions assumptions, TargetDescription target) { - super(runtime, runtime, runtime, runtime, runtime, assumptions, target); + super(runtime, runtime, runtime, runtime, runtime, assumptions, target.wordKind); this.config = runtime.config; }
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/stubs/ForeignCallStub.java Sat Oct 12 20:08:36 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/stubs/ForeignCallStub.java Mon Oct 14 11:06:32 2013 +0200 @@ -303,7 +303,7 @@ private void inline(InvokeNode invoke) { ResolvedJavaMethod method = ((MethodCallTargetNode) invoke.callTarget()).targetMethod(); - ReplacementsImpl repl = new ReplacementsImpl(runtime, runtime, runtime, runtime, runtime, new Assumptions(false), runtime.getTarget()); + ReplacementsImpl repl = new ReplacementsImpl(runtime, runtime, runtime, runtime, runtime, new Assumptions(false), runtime.getTarget().wordKind); StructuredGraph calleeGraph = repl.makeGraph(method, null, null, false); InliningUtil.inline(invoke, calleeGraph, false); }
--- a/graal/com.oracle.graal.replacements.test/src/com/oracle/graal/replacements/test/ObjectAccessTest.java Sat Oct 12 20:08:36 2013 +0200 +++ b/graal/com.oracle.graal.replacements.test/src/com/oracle/graal/replacements/test/ObjectAccessTest.java Mon Oct 14 11:06:32 2013 +0200 @@ -49,7 +49,7 @@ public ObjectAccessTest() { target = Graal.getRequiredCapability(CodeCacheProvider.class).getTarget(); - installer = new ReplacementsImpl(getMetaAccess(), getConstantReflection(), getCodeCache(), getForeignCalls(), getLowerer(), new Assumptions(false), target); + installer = new ReplacementsImpl(getMetaAccess(), getConstantReflection(), getCodeCache(), getForeignCalls(), getLowerer(), new Assumptions(false), target.wordKind); } private static final ThreadLocal<SnippetInliningPolicy> inliningPolicy = new ThreadLocal<>();
--- a/graal/com.oracle.graal.replacements.test/src/com/oracle/graal/replacements/test/PointerTest.java Sat Oct 12 20:08:36 2013 +0200 +++ b/graal/com.oracle.graal.replacements.test/src/com/oracle/graal/replacements/test/PointerTest.java Mon Oct 14 11:06:32 2013 +0200 @@ -53,7 +53,7 @@ public PointerTest() { target = Graal.getRequiredCapability(CodeCacheProvider.class).getTarget(); - installer = new ReplacementsImpl(getMetaAccess(), getConstantReflection(), getCodeCache(), getForeignCalls(), getLowerer(), new Assumptions(false), target); + installer = new ReplacementsImpl(getMetaAccess(), getConstantReflection(), getCodeCache(), getForeignCalls(), getLowerer(), new Assumptions(false), target.wordKind); } private static final ThreadLocal<SnippetInliningPolicy> inliningPolicy = new ThreadLocal<>();
--- a/graal/com.oracle.graal.replacements.test/src/com/oracle/graal/replacements/test/WordTest.java Sat Oct 12 20:08:36 2013 +0200 +++ b/graal/com.oracle.graal.replacements.test/src/com/oracle/graal/replacements/test/WordTest.java Mon Oct 14 11:06:32 2013 +0200 @@ -43,7 +43,7 @@ public WordTest() { TargetDescription target = Graal.getRequiredCapability(CodeCacheProvider.class).getTarget(); - installer = new ReplacementsImpl(getMetaAccess(), getConstantReflection(), getCodeCache(), getForeignCalls(), getLowerer(), new Assumptions(false), target); + installer = new ReplacementsImpl(getMetaAccess(), getConstantReflection(), getCodeCache(), getForeignCalls(), getLowerer(), new Assumptions(false), target.wordKind); } private static final ThreadLocal<SnippetInliningPolicy> inliningPolicy = new ThreadLocal<>();
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsImpl.java Sat Oct 12 20:08:36 2013 +0200 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsImpl.java Mon Oct 14 11:06:32 2013 +0200 @@ -53,7 +53,7 @@ public class ReplacementsImpl implements Replacements { protected final Providers providers; - protected final TargetDescription target; + protected final Kind wordKind; protected final Assumptions assumptions; /** @@ -69,9 +69,9 @@ private final Map<Class<? extends SnippetTemplateCache>, SnippetTemplateCache> snippetTemplateCache; public ReplacementsImpl(MetaAccessProvider metaAccess, ConstantReflectionProvider constantReflection, CodeCacheProvider codeCache, ForeignCallsProvider foreignCalls, LoweringProvider lowerer, - Assumptions assumptions, TargetDescription target) { + Assumptions assumptions, Kind wordKind) { this.providers = new Providers(metaAccess, codeCache, constantReflection, foreignCalls, lowerer, this); - this.target = target; + this.wordKind = wordKind; this.assumptions = assumptions; this.graphs = new ConcurrentHashMap<>(); this.registeredMethodSubstitutions = new HashMap<>(); @@ -338,8 +338,8 @@ MetaAccessProvider metaAccess = providers.getMetaAccess(); ForeignCallsProvider foreignCalls = providers.getForeignCalls(); new GraphBuilderPhase(metaAccess, foreignCalls, GraphBuilderConfiguration.getSnippetDefault(), OptimisticOptimizations.NONE).apply(graph); - new WordTypeVerificationPhase(metaAccess, target.wordKind).apply(graph); - new WordTypeRewriterPhase(metaAccess, target.wordKind).apply(graph); + new WordTypeVerificationPhase(metaAccess, wordKind).apply(graph); + new WordTypeRewriterPhase(metaAccess, wordKind).apply(graph); if (OptCanonicalizer.getValue()) { new CanonicalizerPhase(true).apply(graph, new PhaseContext(providers, assumptions)); @@ -391,8 +391,8 @@ MetaAccessProvider metaAccess = providers.getMetaAccess(); ForeignCallsProvider foreignCalls = providers.getForeignCalls(); new GraphBuilderPhase(metaAccess, foreignCalls, GraphBuilderConfiguration.getSnippetDefault(), OptimisticOptimizations.NONE).apply(originalGraph); - new WordTypeVerificationPhase(metaAccess, target.wordKind).apply(graph); - new WordTypeRewriterPhase(metaAccess, target.wordKind).apply(graph); + new WordTypeVerificationPhase(metaAccess, wordKind).apply(graph); + new WordTypeRewriterPhase(metaAccess, wordKind).apply(graph); InliningUtil.inline(callTarget.invoke(), originalGraph, true);
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleReplacements.java Sat Oct 12 20:08:36 2013 +0200 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleReplacements.java Mon Oct 14 11:06:32 2013 +0200 @@ -43,7 +43,7 @@ private TruffleReplacements(MetaAccessProvider metaAccess, ConstantReflectionProvider constantReflection, CodeCacheProvider codeCache, ForeignCallsProvider foreignCalls, LoweringProvider lowerer, Assumptions assumptions, TargetDescription target, Replacements graalReplacements) { - super(metaAccess, constantReflection, codeCache, foreignCalls, lowerer, assumptions, target); + super(metaAccess, constantReflection, codeCache, foreignCalls, lowerer, assumptions, target.wordKind); this.graalReplacements = graalReplacements; }