use of com.oracle.svm.graal.hosted.GraalFeature.CallTreeNode in project graal by oracle.
the class Target_com_oracle_truffle_api_interop_java_ObjectProxyHandler method handleNeverPartOfCompilation.
private boolean handleNeverPartOfCompilation(GraphBuilderContext b, ResolvedJavaMethod targetMethod, ValueNode messageNode) {
String message = "CompilerAsserts.neverPartOfCompilation()";
if (messageNode != null && messageNode.isConstant()) {
message = messageNode.asConstant().toValueString();
}
NeverPartOfCompilationNode neverPartOfCompilation = b.add(new NeverPartOfCompilationNode(message));
if (Options.TruffleCheckNeverPartOfCompilation.getValue()) {
if (neverPartOfCompilation.stateAfter().getMethod().getDeclaringClass().equals(targetMethod.getDeclaringClass())) {
/* Ignore internal use from another method in CompilerAsserts class. */
} else {
CallTreeNode callerNode = ((RuntimeBytecodeParser) b).getCallTreeNode();
CallTreeNode calleeNode = new CallTreeNode(targetMethod, targetMethod, callerNode, callerNode.getLevel() + 1, GraalFeature.buildSourceReference(neverPartOfCompilation.stateAfter()));
neverPartOfCompilationViolations.add(calleeNode);
}
}
return true;
}
Aggregations