Mercurial > hg > truffle
diff graal/com.oracle.graal.graphbuilderconf/src/com/oracle/graal/graphbuilderconf/GraphBuilderContext.java @ 20165:a100c22edc32
removed some redundant GraphBuilderContext methods or gave them default implementations
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Sat, 04 Apr 2015 21:43:21 +0200 |
parents | c36ab3cd360c |
children | 5bf195ce816a |
line wrap: on
line diff
--- a/graal/com.oracle.graal.graphbuilderconf/src/com/oracle/graal/graphbuilderconf/GraphBuilderContext.java Sat Apr 04 19:52:26 2015 +0200 +++ b/graal/com.oracle.graal.graphbuilderconf/src/com/oracle/graal/graphbuilderconf/GraphBuilderContext.java Sat Apr 04 21:43:21 2015 +0200 @@ -153,7 +153,7 @@ /** * Handles an invocation that a plugin determines can replace the original invocation (i.e., the * one for which the plugin was applied). This applies all standard graph builder processing to - * the replaced invocation including applying any relevant plugins to it. + * the replaced invocation including applying any relevant plugins. * * @param invokeKind the kind of the replacement invocation * @param targetMethod the target of the replacement invocation @@ -165,12 +165,17 @@ MetaAccessProvider getMetaAccess(); - Assumptions getAssumptions(); + default Assumptions getAssumptions() { + return getGraph().getAssumptions(); + } ConstantReflectionProvider getConstantReflection(); SnippetReflectionProvider getSnippetReflection(); + /** + * Gets the graph being constructed. + */ StructuredGraph getGraph(); /** @@ -208,7 +213,10 @@ * Gets the inline depth of this context. 0 implies this is the context for the compilation root * method. */ - int getDepth(); + default int getDepth() { + GraphBuilderContext parent = getParent(); + return parent == null ? 0 : 1 + parent.getDepth(); + } /** * Determines if the current parsing context is a snippet or method substitution. @@ -223,7 +231,5 @@ */ Replacement getReplacement(); - boolean eagerResolving(); - BailoutException bailout(String string); }