use of com.oracle.svm.core.graal.jdk.SubstrateObjectCloneWithExceptionNode in project graal by oracle.
the class SubstrateGraphBuilderPlugins method registerObjectPlugins.
private static void registerObjectPlugins(InvocationPlugins plugins) {
Registration r = new Registration(plugins, Object.class);
r.register(new RequiredInvocationPlugin("clone", Receiver.class) {
@Override
public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver) {
ValueNode object = receiver.get();
b.addPush(JavaKind.Object, new SubstrateObjectCloneWithExceptionNode(MacroParams.of(b, targetMethod, object)));
return true;
}
});
r.register(new RequiredInvocationPlugin("hashCode", Receiver.class) {
@Override
public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver) {
ValueNode object = receiver.get();
b.addPush(JavaKind.Int, new SubstrateIdentityHashCodeNode(object, b.bci()));
return true;
}
});
}
Aggregations