# HG changeset patch # User Doug Simon # Date 1431439060 -7200 # Node ID ce95a5e36927e2b594d000144a41a8efcec1e99a # Parent 18042c0b9e8824e81d983615c95ab7850af3b208 removed unnecessary Intrinsic interface diff -r 18042c0b9e88 -r ce95a5e36927 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 Tue May 12 14:52:22 2015 +0200 +++ b/graal/com.oracle.graal.graphbuilderconf/src/com/oracle/graal/graphbuilderconf/GraphBuilderContext.java Tue May 12 15:57:40 2015 +0200 @@ -41,35 +41,6 @@ public interface GraphBuilderContext { /** - * An intrinsic is a substitute implementation of a Java method (or a bytecode in the case of - * snippets) that is itself implemented in Java. This interface provides information about the - * intrinsic currently being processed by the graph builder. - * - * When in the scope of an intrinsic, the graph builder does not check the value kinds flowing - * through the JVM state since intrinsics can employ non-Java kinds to represent values such as - * raw machine words and pointers. - */ - public interface Intrinsic { - - /** - * Gets the method being intrinsified. - */ - ResolvedJavaMethod getOriginalMethod(); - - /** - * Gets the method providing the intrinsic implementation. - */ - ResolvedJavaMethod getIntrinsicMethod(); - - /** - * Determines if a call within the compilation scope of this intrinsic represents a call to - * the {@linkplain #getOriginalMethod() original} method. This denotes the path where a - * partial intrinsification falls back to the original method. - */ - boolean isCallToOriginal(ResolvedJavaMethod method); - } - - /** * Raw operation for adding a node to the graph when neither {@link #add}, * {@link #addPush(ValueNode)} nor {@link #addPush(Kind, ValueNode)} can be used. * @@ -255,7 +226,7 @@ * Gets the intrinsic of the current parsing context or {@code null} if not * {@link #parsingIntrinsic() parsing an intrinsic}. */ - Intrinsic getIntrinsic(); + IntrinsicContext getIntrinsic(); BailoutException bailout(String string); @@ -280,5 +251,4 @@ } return value; } - } diff -r 18042c0b9e88 -r ce95a5e36927 graal/com.oracle.graal.graphbuilderconf/src/com/oracle/graal/graphbuilderconf/IntrinsicContext.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/graal/com.oracle.graal.graphbuilderconf/src/com/oracle/graal/graphbuilderconf/IntrinsicContext.java Tue May 12 15:57:40 2015 +0200 @@ -0,0 +1,163 @@ +/* + * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package com.oracle.graal.graphbuilderconf; + +import static com.oracle.graal.api.code.BytecodeFrame.*; +import static com.oracle.graal.graphbuilderconf.IntrinsicContext.CompilationContext.*; + +import com.oracle.graal.api.meta.*; +import com.oracle.graal.nodes.*; + +/** + * An intrinsic is a substitute implementation of a Java method (or a bytecode in the case of + * snippets) that is itself implemented in Java. This interface provides information about the + * intrinsic currently being processed by the graph builder. + * + * When in the scope of an intrinsic, the graph builder does not check the value kinds flowing + * through the JVM state since intrinsics can employ non-Java kinds to represent values such as raw + * machine words and pointers. + */ +public class IntrinsicContext { + + /** + * Gets the method being intrinsified. + */ + final ResolvedJavaMethod method; + + /** + * Gets the method providing the intrinsic implementation. + */ + final ResolvedJavaMethod intrinsic; + + public ResolvedJavaMethod getOriginalMethod() { + return method; + } + + public ResolvedJavaMethod getIntrinsicMethod() { + return intrinsic; + } + + /** + * Determines if a call within the compilation scope of this intrinsic represents a call to the + * {@linkplain #getOriginalMethod() original} method. This denotes the path where a partial + * intrinsification falls back to the original method. + */ + public boolean isCallToOriginal(ResolvedJavaMethod targetMethod) { + return method.equals(targetMethod) || intrinsic.equals(targetMethod); + } + + final CompilationContext compilationContext; + + public IntrinsicContext(ResolvedJavaMethod method, ResolvedJavaMethod intrinsic, CompilationContext compilationContext) { + this.method = method; + this.intrinsic = intrinsic; + this.compilationContext = compilationContext; + assert !isCompilationRoot() || method.hasBytecodes() : "Cannot root compile intrinsic for native or abstract method " + method.format("%H.%n(%p)"); + } + + public boolean isPostParseInlined() { + return compilationContext.equals(INLINE_AFTER_PARSING); + } + + public boolean isCompilationRoot() { + return compilationContext.equals(ROOT_COMPILATION); + } + + /** + * Denotes the compilation context in which an intrinsic is being parsed. + */ + public enum CompilationContext { + /** + * An intrinsic is being processed when parsing an invoke bytecode that calls the + * intrinsified method. + */ + INLINE_DURING_PARSING, + + /** + * An intrinsic is being processed when inlining an {@link Invoke} in an existing graph. + */ + INLINE_AFTER_PARSING, + + /** + * An intrinsic is the root of compilation. + */ + ROOT_COMPILATION + } + + /** + * Models the state of a graph in terms of {@link StateSplit#hasSideEffect() side effects} that + * are control flow predecessors of the current point in a graph. + */ + public interface SideEffectsState { + + /** + * Determines if the current program point is preceded by one or more side effects. + */ + boolean isAfterSideEffect(); + + /** + * Gets the side effects preceding the current program point. + */ + Iterable sideEffects(); + + /** + * Records a side effect for the current program point. + */ + void addSideEffect(StateSplit sideEffect); + } + + public FrameState createFrameState(StructuredGraph graph, SideEffectsState sideEffects, StateSplit forStateSplit) { + assert forStateSplit != graph.start(); + if (forStateSplit.hasSideEffect()) { + if (sideEffects.isAfterSideEffect()) { + // Only the last side effect on any execution path in a replacement + // can inherit the stateAfter of the replaced node + FrameState invalid = graph.add(new FrameState(INVALID_FRAMESTATE_BCI)); + for (StateSplit lastSideEffect : sideEffects.sideEffects()) { + lastSideEffect.setStateAfter(invalid); + } + } + sideEffects.addSideEffect(forStateSplit); + return graph.add(new FrameState(AFTER_BCI)); + } else { + if (forStateSplit instanceof AbstractMergeNode) { + // Merge nodes always need a frame state + if (sideEffects.isAfterSideEffect()) { + // A merge after one or more side effects + return graph.add(new FrameState(AFTER_BCI)); + } else { + // A merge before any side effects + return graph.add(new FrameState(BEFORE_BCI)); + } + } else { + // Other non-side-effects do not need a state + return null; + } + } + } + + @Override + public String toString() { + return "Intrinsic{original: " + method.format("%H.%n(%p)") + ", intrinsic: " + intrinsic.format("%H.%n(%p)") + ", context: " + compilationContext + "}"; + } +} diff -r 18042c0b9e88 -r ce95a5e36927 graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/HotSpotCryptoSubstitutionTest.java --- a/graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/HotSpotCryptoSubstitutionTest.java Tue May 12 14:52:22 2015 +0200 +++ b/graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/HotSpotCryptoSubstitutionTest.java Tue May 12 15:57:40 2015 +0200 @@ -22,7 +22,7 @@ */ package com.oracle.graal.hotspot.test; -import static com.oracle.graal.java.IntrinsicContext.CompilationContext.*; +import static com.oracle.graal.graphbuilderconf.IntrinsicContext.CompilationContext.*; import java.io.*; import java.lang.reflect.*; @@ -41,7 +41,7 @@ import com.oracle.graal.hotspot.meta.*; import com.oracle.graal.java.*; import com.oracle.graal.nodes.*; -import com.oracle.graal.nodes.StructuredGraph.*; +import com.oracle.graal.nodes.StructuredGraph.AllowAssumptions; import com.oracle.graal.phases.*; /** diff -r 18042c0b9e88 -r ce95a5e36927 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/stubs/SnippetStub.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/stubs/SnippetStub.java Tue May 12 14:52:22 2015 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/stubs/SnippetStub.java Tue May 12 15:57:40 2015 +0200 @@ -22,7 +22,7 @@ */ package com.oracle.graal.hotspot.stubs; -import static com.oracle.graal.java.IntrinsicContext.CompilationContext.*; +import static com.oracle.graal.graphbuilderconf.IntrinsicContext.CompilationContext.*; import java.lang.reflect.*; diff -r 18042c0b9e88 -r ce95a5e36927 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 Tue May 12 14:52:22 2015 +0200 +++ b/graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java Tue May 12 15:57:40 2015 +0200 @@ -28,8 +28,8 @@ import static com.oracle.graal.compiler.common.GraalInternalError.*; import static com.oracle.graal.compiler.common.GraalOptions.*; import static com.oracle.graal.compiler.common.type.StampFactory.*; +import static com.oracle.graal.graphbuilderconf.IntrinsicContext.CompilationContext.*; import static com.oracle.graal.java.AbstractBytecodeParser.Options.*; -import static com.oracle.graal.java.IntrinsicContext.CompilationContext.*; import static com.oracle.graal.nodes.StructuredGraph.*; import static com.oracle.graal.nodes.type.StampTool.*; import static java.lang.String.*; @@ -481,14 +481,14 @@ */ private FrameState createStateAfterStartOfReplacementGraph() { assert parent == null; - assert frameState.method.equals(intrinsicContext.intrinsic); + assert frameState.method.equals(intrinsicContext.getIntrinsicMethod()); assert bci() == 0; assert frameState.stackSize == 0; FrameState stateAfterStart; if (intrinsicContext.isPostParseInlined()) { stateAfterStart = graph.add(new FrameState(BytecodeFrame.BEFORE_BCI)); } else { - ResolvedJavaMethod original = intrinsicContext.method; + ResolvedJavaMethod original = intrinsicContext.getOriginalMethod(); ValueNode[] locals; if (original.getMaxLocals() == frameState.localsSize() || original.isNative()) { locals = frameState.locals; @@ -1430,10 +1430,10 @@ // Otherwise inline the original method. Any frame state created // during the inlining will exclude frame(s) in the // intrinsic method (see HIRFrameStateBuilder.create(int bci)). - if (intrinsic.method.isNative()) { + if (intrinsic.getOriginalMethod().isNative()) { return false; } - parseAndInlineCallee(intrinsic.method, args, null); + parseAndInlineCallee(intrinsic.getOriginalMethod(), args, null); return true; } } else { @@ -2556,7 +2556,7 @@ return parent; } - public Intrinsic getIntrinsic() { + public IntrinsicContext getIntrinsic() { return intrinsicContext; } diff -r 18042c0b9e88 -r ce95a5e36927 graal/com.oracle.graal.java/src/com/oracle/graal/java/HIRFrameStateBuilder.java --- a/graal/com.oracle.graal.java/src/com/oracle/graal/java/HIRFrameStateBuilder.java Tue May 12 14:52:22 2015 +0200 +++ b/graal/com.oracle.graal.java/src/com/oracle/graal/java/HIRFrameStateBuilder.java Tue May 12 15:57:40 2015 +0200 @@ -32,6 +32,7 @@ import com.oracle.graal.compiler.common.type.*; import com.oracle.graal.debug.*; import com.oracle.graal.graphbuilderconf.*; +import com.oracle.graal.graphbuilderconf.IntrinsicContext.*; import com.oracle.graal.java.BciBlockMapping.BciBlock; import com.oracle.graal.java.GraphBuilderPhase.Instance.BytecodeParser; import com.oracle.graal.nodeinfo.*; @@ -40,7 +41,7 @@ import com.oracle.graal.nodes.java.*; import com.oracle.graal.nodes.util.*; -public final class HIRFrameStateBuilder { +public final class HIRFrameStateBuilder implements SideEffectsState { static final ValueNode[] EMPTY_ARRAY = new ValueNode[0]; static final MonitorIdNode[] EMPTY_MONITOR_ARRAY = new MonitorIdNode[0]; @@ -65,7 +66,7 @@ * The closest {@link StateSplit#hasSideEffect() side-effect} predecessors. There will be more * than one when the current block contains no side-effects but merging predecessor blocks do. */ - protected StateSplit[] lastSideEffects; + protected List sideEffects; /** * Creates a new frame state builder for the given method and the given target graph. @@ -229,7 +230,7 @@ if (AbstractBytecodeParser.Options.HideSubstitutionStates.getValue()) { if (parser.parsingIntrinsic()) { // Attribute to the method being replaced - return new BytecodePosition(parent.getFrameState().createBytecodePosition(parent.bci()), parser.intrinsicContext.method, -1); + return new BytecodePosition(parent.getFrameState().createBytecodePosition(parent.bci()), parser.intrinsicContext.getOriginalMethod(), -1); } // Skip intrinsic frames parent = (BytecodeParser) parser.getNonReplacementAncestor(); @@ -302,14 +303,11 @@ assert monitorIds[i] == other.monitorIds[i]; } - if (lastSideEffects == null) { - lastSideEffects = other.lastSideEffects; + if (sideEffects == null) { + sideEffects = other.sideEffects; } else { - if (other.lastSideEffects != null) { - int thisLength = lastSideEffects.length; - int otherLength = other.lastSideEffects.length; - lastSideEffects = Arrays.copyOf(lastSideEffects, thisLength + otherLength); - System.arraycopy(other.lastSideEffects, 0, lastSideEffects, thisLength, otherLength); + if (other.sideEffects != null) { + sideEffects.addAll(other.sideEffects); } } } @@ -1000,14 +998,23 @@ } } - public void addLastSideEffect(StateSplit sideEffect) { + @Override + public boolean isAfterSideEffect() { + return sideEffects != null; + } + + @Override + public Iterable sideEffects() { + return sideEffects; + } + + @Override + public void addSideEffect(StateSplit sideEffect) { assert sideEffect != null; assert sideEffect.hasSideEffect(); - if (lastSideEffects == null) { - lastSideEffects = new StateSplit[]{sideEffect}; - } else { - lastSideEffects = Arrays.copyOf(lastSideEffects, lastSideEffects.length + 1); - lastSideEffects[lastSideEffects.length - 1] = sideEffect; + if (sideEffects == null) { + sideEffects = new ArrayList<>(4); } + sideEffects.add(sideEffect); } } diff -r 18042c0b9e88 -r ce95a5e36927 graal/com.oracle.graal.java/src/com/oracle/graal/java/IntrinsicContext.java --- a/graal/com.oracle.graal.java/src/com/oracle/graal/java/IntrinsicContext.java Tue May 12 14:52:22 2015 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,132 +0,0 @@ -/* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ -package com.oracle.graal.java; - -import static com.oracle.graal.api.code.BytecodeFrame.*; -import static com.oracle.graal.java.IntrinsicContext.CompilationContext.*; - -import com.oracle.graal.api.meta.*; -import com.oracle.graal.graphbuilderconf.GraphBuilderContext.Intrinsic; -import com.oracle.graal.nodes.*; - -public class IntrinsicContext implements Intrinsic { - - /** - * The method being replaced. - */ - final ResolvedJavaMethod method; - - /** - * The intrinsic implementation method. - */ - final ResolvedJavaMethod intrinsic; - - public ResolvedJavaMethod getOriginalMethod() { - return method; - } - - public ResolvedJavaMethod getIntrinsicMethod() { - return intrinsic; - } - - /** - * Determines if a call within the compilation scope of a replacement represents a call to the - * original method. - */ - public boolean isCallToOriginal(ResolvedJavaMethod targetMethod) { - return method.equals(targetMethod) || intrinsic.equals(targetMethod); - } - - final CompilationContext compilationContext; - - public IntrinsicContext(ResolvedJavaMethod method, ResolvedJavaMethod intrinsic, CompilationContext compilationContext) { - this.method = method; - this.intrinsic = intrinsic; - this.compilationContext = compilationContext; - assert !isCompilationRoot() || method.hasBytecodes() : "Cannot root compile intrinsic for native or abstract method " + method.format("%H.%n(%p)"); - } - - public boolean isPostParseInlined() { - return compilationContext.equals(INLINE_AFTER_PARSING); - } - - public boolean isCompilationRoot() { - return compilationContext.equals(ROOT_COMPILATION); - } - - /** - * Denotes the compilation context in which an intrinsic is being parsed. - */ - public enum CompilationContext { - /** - * An intrinsic is being processed when parsing an invoke bytecode that calls the - * intrinsified method. - */ - INLINE_DURING_PARSING, - - /** - * An intrinsic is being processed when inlining an {@link Invoke} in an existing graph. - */ - INLINE_AFTER_PARSING, - - /** - * An intrinsic is the root of compilation. - */ - ROOT_COMPILATION - } - - public FrameState createFrameState(StructuredGraph graph, HIRFrameStateBuilder frameState, StateSplit forStateSplit) { - assert forStateSplit != graph.start(); - if (forStateSplit.hasSideEffect()) { - if (frameState.lastSideEffects != null) { - // Only the last side effect on any execution path in a replacement - // can inherit the stateAfter of the replaced node - FrameState invalid = graph.add(new FrameState(INVALID_FRAMESTATE_BCI)); - for (StateSplit lastSideEffect : frameState.lastSideEffects) { - lastSideEffect.setStateAfter(invalid); - } - } - frameState.addLastSideEffect(forStateSplit); - return graph.add(new FrameState(AFTER_BCI)); - } else { - if (forStateSplit instanceof AbstractMergeNode) { - // Merge nodes always need a frame state - if (frameState.lastSideEffects != null) { - // A merge after one or more side effects - return graph.add(new FrameState(AFTER_BCI)); - } else { - // A merge before any side effects - return graph.add(new FrameState(BEFORE_BCI)); - } - } else { - // Other non-side-effects do not need a state - return null; - } - } - } - - @Override - public String toString() { - return "Intrinsic{original: " + method.format("%H.%n(%p)") + ", intrinsic: " + intrinsic.format("%H.%n(%p)") + ", context: " + compilationContext + "}"; - } -} diff -r 18042c0b9e88 -r ce95a5e36927 graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/GraphKit.java --- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/GraphKit.java Tue May 12 14:52:22 2015 +0200 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/GraphKit.java Tue May 12 15:57:40 2015 +0200 @@ -22,7 +22,7 @@ */ package com.oracle.graal.replacements; -import static com.oracle.graal.java.IntrinsicContext.CompilationContext.*; +import static com.oracle.graal.graphbuilderconf.IntrinsicContext.CompilationContext.*; import java.lang.reflect.*; import java.util.*; diff -r 18042c0b9e88 -r ce95a5e36927 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 Tue May 12 14:52:22 2015 +0200 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/IntrinsicGraphBuilder.java Tue May 12 15:57:40 2015 +0200 @@ -186,7 +186,7 @@ return true; } - public Intrinsic getIntrinsic() { + public IntrinsicContext getIntrinsic() { throw GraalInternalError.shouldNotReachHere(); } diff -r 18042c0b9e88 -r ce95a5e36927 graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/PEGraphDecoder.java --- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/PEGraphDecoder.java Tue May 12 14:52:22 2015 +0200 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/PEGraphDecoder.java Tue May 12 15:57:40 2015 +0200 @@ -148,7 +148,7 @@ } @Override - public Intrinsic getIntrinsic() { + public IntrinsicContext getIntrinsic() { return null; } diff -r 18042c0b9e88 -r ce95a5e36927 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 Tue May 12 14:52:22 2015 +0200 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsImpl.java Tue May 12 15:57:40 2015 +0200 @@ -24,8 +24,8 @@ import static com.oracle.graal.api.meta.MetaUtil.*; import static com.oracle.graal.compiler.common.GraalOptions.*; +import static com.oracle.graal.graphbuilderconf.IntrinsicContext.CompilationContext.*; import static com.oracle.graal.java.AbstractBytecodeParser.Options.*; -import static com.oracle.graal.java.IntrinsicContext.CompilationContext.*; import static com.oracle.graal.phases.common.DeadCodeEliminationPhase.Optionality.*; import static java.lang.String.*; @@ -46,7 +46,6 @@ import com.oracle.graal.graph.Node.NodeIntrinsic; import com.oracle.graal.graphbuilderconf.*; import com.oracle.graal.graphbuilderconf.GraphBuilderConfiguration.Plugins; -import com.oracle.graal.graphbuilderconf.GraphBuilderContext.Intrinsic; import com.oracle.graal.java.*; import com.oracle.graal.java.GraphBuilderPhase.Instance; import com.oracle.graal.nodes.*; @@ -121,7 +120,7 @@ public void notifyOfNoninlinedInvoke(GraphBuilderContext b, ResolvedJavaMethod method, Invoke invoke) { if (b.parsingIntrinsic()) { - Intrinsic intrinsic = b.getIntrinsic(); + IntrinsicContext intrinsic = b.getIntrinsic(); assert intrinsic.isCallToOriginal(method) : format("All non-recursive calls in the intrinsic %s must be inlined or intrinsified: found call to %s", intrinsic.getIntrinsicMethod().format("%H.%n(%p)"), method.format("%h.%n(%p)")); }