# HG changeset patch # User Doug Simon # Date 1428565953 -7200 # Node ID 43659a795e37c67ca287285f88666ea5471da740 # Parent 7c94786aad9a79914f4f8b559768e3aec25eebac remove GraphBuilderContext.getSnippetReflection() diff -r 7c94786aad9a -r 43659a795e37 graal/com.oracle.graal.graphbuilderconf/src/com/oracle/graal/graphbuilderconf/GraphBuilderContext.java --- a/graal/com.oracle.graal.graphbuilderconf/src/com/oracle/graal/graphbuilderconf/GraphBuilderContext.java Thu Apr 09 09:47:50 2015 +0200 +++ b/graal/com.oracle.graal.graphbuilderconf/src/com/oracle/graal/graphbuilderconf/GraphBuilderContext.java Thu Apr 09 09:52:33 2015 +0200 @@ -188,8 +188,6 @@ ConstantReflectionProvider getConstantReflection(); - SnippetReflectionProvider getSnippetReflection(); - /** * Gets the graph being constructed. */ diff -r 7c94786aad9a -r 43659a795e37 graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java --- a/graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java Thu Apr 09 09:47:50 2015 +0200 +++ b/graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java Thu Apr 09 09:52:33 2015 +0200 @@ -37,7 +37,6 @@ import com.oracle.graal.api.code.*; import com.oracle.graal.api.meta.*; -import com.oracle.graal.api.replacements.*; import com.oracle.graal.bytecode.*; import com.oracle.graal.compiler.common.*; import com.oracle.graal.compiler.common.calc.*; @@ -79,7 +78,7 @@ @Override protected void run(StructuredGraph graph, HighTierContext context) { - new Instance(context.getMetaAccess(), context.getStampProvider(), null, context.getConstantReflection(), graphBuilderConfig, context.getOptimisticOptimizations(), null).run(graph); + new Instance(context.getMetaAccess(), context.getStampProvider(), context.getConstantReflection(), graphBuilderConfig, context.getOptimisticOptimizations(), null).run(graph); } public GraphBuilderConfiguration getGraphBuilderConfig() { @@ -99,26 +98,19 @@ private final OptimisticOptimizations optimisticOpts; private final StampProvider stampProvider; private final ConstantReflectionProvider constantReflection; - private final SnippetReflectionProvider snippetReflectionProvider; - public Instance(MetaAccessProvider metaAccess, StampProvider stampProvider, SnippetReflectionProvider snippetReflectionProvider, ConstantReflectionProvider constantReflection, - GraphBuilderConfiguration graphBuilderConfig, OptimisticOptimizations optimisticOpts, ReplacementContext initialReplacementContext) { + public Instance(MetaAccessProvider metaAccess, StampProvider stampProvider, ConstantReflectionProvider constantReflection, GraphBuilderConfiguration graphBuilderConfig, + OptimisticOptimizations optimisticOpts, ReplacementContext initialReplacementContext) { this.graphBuilderConfig = graphBuilderConfig; this.optimisticOpts = optimisticOpts; this.metaAccess = metaAccess; this.stampProvider = stampProvider; this.constantReflection = constantReflection; - this.snippetReflectionProvider = snippetReflectionProvider; this.initialReplacementContext = initialReplacementContext; assert metaAccess != null; } - public Instance(MetaAccessProvider metaAccess, StampProvider stampProvider, ConstantReflectionProvider constantReflection, GraphBuilderConfiguration graphBuilderConfig, - OptimisticOptimizations optimisticOpts, ReplacementContext initialReplacementContext) { - this(metaAccess, stampProvider, null, constantReflection, graphBuilderConfig, optimisticOpts, initialReplacementContext); - } - @Override protected void run(@SuppressWarnings("hiding") StructuredGraph graph) { ResolvedJavaMethod method = graph.method(); @@ -2369,10 +2361,6 @@ return constantReflection; } - public SnippetReflectionProvider getSnippetReflection() { - return snippetReflectionProvider; - } - /** * Gets the graph being processed by this builder. */ diff -r 7c94786aad9a -r 43659a795e37 graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/IntrinsicGraphBuilder.java --- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/IntrinsicGraphBuilder.java Thu Apr 09 09:47:50 2015 +0200 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/IntrinsicGraphBuilder.java Thu Apr 09 09:52:33 2015 +0200 @@ -24,7 +24,6 @@ import com.oracle.graal.api.code.*; import com.oracle.graal.api.meta.*; -import com.oracle.graal.api.replacements.*; import com.oracle.graal.compiler.common.*; import com.oracle.graal.compiler.common.type.*; import com.oracle.graal.graphbuilderconf.*; @@ -44,19 +43,16 @@ private final MetaAccessProvider metaAccess; private final ConstantReflectionProvider constantReflection; private final StampProvider stampProvider; - private final SnippetReflectionProvider snippetReflection; private final StructuredGraph graph; private final ResolvedJavaMethod method; private FixedWithNextNode lastInstr; private ValueNode[] arguments; private ValueNode returnValue; - public IntrinsicGraphBuilder(MetaAccessProvider metaAccess, ConstantReflectionProvider constantReflection, StampProvider stampProvider, SnippetReflectionProvider snippetReflection, - ResolvedJavaMethod method) { + public IntrinsicGraphBuilder(MetaAccessProvider metaAccess, ConstantReflectionProvider constantReflection, StampProvider stampProvider, ResolvedJavaMethod method) { this.metaAccess = metaAccess; this.constantReflection = constantReflection; this.stampProvider = stampProvider; - this.snippetReflection = snippetReflection; this.graph = new StructuredGraph(method, AllowAssumptions.YES); this.method = method; this.lastInstr = graph.start(); @@ -150,10 +146,6 @@ return constantReflection; } - public SnippetReflectionProvider getSnippetReflection() { - return snippetReflection; - } - public StructuredGraph getGraph() { return graph; } diff -r 7c94786aad9a -r 43659a795e37 graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsImpl.java --- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsImpl.java Thu Apr 09 09:47:50 2015 +0200 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsImpl.java Thu Apr 09 09:52:33 2015 +0200 @@ -344,7 +344,7 @@ MethodSubstitutionPlugin msplugin = (MethodSubstitutionPlugin) plugin; substitute = msplugin.getSubstitute(providers.getMetaAccess()); } else if (plugin != null) { - StructuredGraph graph = new IntrinsicGraphBuilder(providers.getMetaAccess(), providers.getConstantReflection(), providers.getStampProvider(), snippetReflection, original).buildGraph(plugin); + StructuredGraph graph = new IntrinsicGraphBuilder(providers.getMetaAccess(), providers.getConstantReflection(), providers.getStampProvider(), original).buildGraph(plugin); if (graph != null) { return graph; } diff -r 7c94786aad9a -r 43659a795e37 graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/PartialEvaluator.java --- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/PartialEvaluator.java Thu Apr 09 09:47:50 2015 +0200 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/PartialEvaluator.java Thu Apr 09 09:52:33 2015 +0200 @@ -285,7 +285,7 @@ } plugins.setInlineInvokePlugin(inlinePlugin); plugins.setLoopExplosionPlugin(new PELoopExplosionPlugin()); - new GraphBuilderPhase.Instance(providers.getMetaAccess(), providers.getStampProvider(), this.snippetReflection, providers.getConstantReflection(), newConfig, + new GraphBuilderPhase.Instance(providers.getMetaAccess(), providers.getStampProvider(), providers.getConstantReflection(), newConfig, TruffleCompilerImpl.Optimizations, null).apply(graph); if (PrintTruffleExpansionHistogram.getValue()) { ((HistogramInlineInvokePlugin) inlinePlugin).print(callTarget, System.out);