com.oracle.truffle.sl.builtins.SLInNativeImageBuiltinFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of truffle-sl Show documentation
Show all versions of truffle-sl Show documentation
Truffle SL is an example language implemented using the Truffle API.
The newest version!
// CheckStyle: start generated
package com.oracle.truffle.sl.builtins;
import com.oracle.truffle.api.dsl.GeneratedBy;
import com.oracle.truffle.api.dsl.NeverDefault;
import com.oracle.truffle.api.dsl.NodeFactory;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.nodes.Node;
import com.oracle.truffle.sl.nodes.SLExpressionNode;
import java.util.List;
@GeneratedBy(SLInNativeImageBuiltin.class)
@SuppressWarnings({"javadoc", "unused"})
public final class SLInNativeImageBuiltinFactory implements NodeFactory {
private static final SLInNativeImageBuiltinFactory INSTANCE = new SLInNativeImageBuiltinFactory();
private SLInNativeImageBuiltinFactory() {
}
@Override
public Class getNodeClass() {
return SLInNativeImageBuiltin.class;
}
@Override
public List> getExecutionSignature() {
return List.of();
}
@Override
public List>> getNodeSignatures() {
return List.of(List.of(SLExpressionNode[].class));
}
@Override
public SLInNativeImageBuiltin createNode(Object... arguments) {
if (arguments.length == 1 && (arguments[0] == null || arguments[0] instanceof SLExpressionNode[])) {
return create((SLExpressionNode[]) arguments[0]);
} else {
throw new IllegalArgumentException("Invalid create signature.");
}
}
public static NodeFactory getInstance() {
return INSTANCE;
}
@NeverDefault
public static SLInNativeImageBuiltin create(SLExpressionNode[] arguments) {
return new SLInNativeImageBuiltinNodeGen(arguments);
}
/**
* Debug Info:
* Specialization {@link SLInNativeImageBuiltin#isExecutable}
* Activation probability: 1.00000
* With/without class size: 16/0 bytes
*
*/
@GeneratedBy(SLInNativeImageBuiltin.class)
@SuppressWarnings("javadoc")
public static final class SLInNativeImageBuiltinNodeGen extends SLInNativeImageBuiltin {
private SLInNativeImageBuiltinNodeGen(SLExpressionNode[] arguments) {
}
@Override
protected Object execute(VirtualFrame frameValue) {
return isExecutable();
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy