org.jruby.truffle.stdlib.CoverageNodesFactory Maven / Gradle / Ivy
// CheckStyle: start generated
package org.jruby.truffle.stdlib;
import com.oracle.truffle.api.dsl.GeneratedBy;
import com.oracle.truffle.api.dsl.NodeFactory;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.nodes.NodeCost;
import java.util.Arrays;
import java.util.List;
import org.jruby.truffle.builtins.CoreMethodArrayArgumentsNode;
import org.jruby.truffle.language.RubyNode;
import org.jruby.truffle.stdlib.CoverageNodes.CoverageDisableNode;
import org.jruby.truffle.stdlib.CoverageNodes.CoverageEnableNode;
import org.jruby.truffle.stdlib.CoverageNodes.CoverageResultNode;
@GeneratedBy(CoverageNodes.class)
public final class CoverageNodesFactory {
public static List> getFactories() {
return Arrays.asList(CoverageEnableNodeFactory.getInstance(), CoverageDisableNodeFactory.getInstance(), CoverageResultNodeFactory.getInstance());
}
@GeneratedBy(CoverageEnableNode.class)
@SuppressWarnings({"unchecked", "rawtypes"})
public static final class CoverageEnableNodeFactory implements NodeFactory {
private static CoverageEnableNodeFactory coverageEnableNodeFactoryInstance;
private CoverageEnableNodeFactory() {
}
@Override
public Class getNodeClass() {
return CoverageEnableNode.class;
}
@Override
public List getExecutionSignature() {
return Arrays.asList();
}
@Override
public List getNodeSignatures() {
return Arrays.asList(Arrays.asList(RubyNode[].class));
}
@Override
public CoverageEnableNode createNode(Object... arguments) {
if (arguments.length == 1 && (arguments[0] == null || arguments[0] instanceof RubyNode[])) {
return create((RubyNode[]) arguments[0]);
} else {
throw new IllegalArgumentException("Invalid create signature.");
}
}
public static NodeFactory getInstance() {
if (coverageEnableNodeFactoryInstance == null) {
coverageEnableNodeFactoryInstance = new CoverageEnableNodeFactory();
}
return coverageEnableNodeFactoryInstance;
}
public static CoverageEnableNode create(RubyNode[] arguments) {
return new CoverageEnableNodeGen(arguments);
}
@GeneratedBy(CoverageEnableNode.class)
public static final class CoverageEnableNodeGen extends CoverageEnableNode {
@SuppressWarnings("unused")
private CoverageEnableNodeGen(RubyNode[] arguments) {
}
@Override
public NodeCost getCost() {
return NodeCost.MONOMORPHIC;
}
@Override
public Object execute(VirtualFrame frameValue) {
return this.enable();
}
@Override
public void executeVoid(VirtualFrame frameValue) {
execute(frameValue);
return;
}
}
}
@GeneratedBy(CoverageDisableNode.class)
@SuppressWarnings({"unchecked", "rawtypes"})
public static final class CoverageDisableNodeFactory implements NodeFactory {
private static CoverageDisableNodeFactory coverageDisableNodeFactoryInstance;
private CoverageDisableNodeFactory() {
}
@Override
public Class getNodeClass() {
return CoverageDisableNode.class;
}
@Override
public List getExecutionSignature() {
return Arrays.asList();
}
@Override
public List getNodeSignatures() {
return Arrays.asList(Arrays.asList(RubyNode[].class));
}
@Override
public CoverageDisableNode createNode(Object... arguments) {
if (arguments.length == 1 && (arguments[0] == null || arguments[0] instanceof RubyNode[])) {
return create((RubyNode[]) arguments[0]);
} else {
throw new IllegalArgumentException("Invalid create signature.");
}
}
public static NodeFactory getInstance() {
if (coverageDisableNodeFactoryInstance == null) {
coverageDisableNodeFactoryInstance = new CoverageDisableNodeFactory();
}
return coverageDisableNodeFactoryInstance;
}
public static CoverageDisableNode create(RubyNode[] arguments) {
return new CoverageDisableNodeGen(arguments);
}
@GeneratedBy(CoverageDisableNode.class)
public static final class CoverageDisableNodeGen extends CoverageDisableNode {
@SuppressWarnings("unused")
private CoverageDisableNodeGen(RubyNode[] arguments) {
}
@Override
public NodeCost getCost() {
return NodeCost.MONOMORPHIC;
}
@Override
public Object execute(VirtualFrame frameValue) {
return this.disable();
}
@Override
public void executeVoid(VirtualFrame frameValue) {
execute(frameValue);
return;
}
}
}
@GeneratedBy(CoverageResultNode.class)
@SuppressWarnings({"unchecked", "rawtypes"})
public static final class CoverageResultNodeFactory implements NodeFactory {
private static CoverageResultNodeFactory coverageResultNodeFactoryInstance;
private CoverageResultNodeFactory() {
}
@Override
public Class getNodeClass() {
return CoverageResultNode.class;
}
@Override
public List getExecutionSignature() {
return Arrays.asList();
}
@Override
public List getNodeSignatures() {
return Arrays.asList(Arrays.asList(RubyNode[].class));
}
@Override
public CoverageResultNode createNode(Object... arguments) {
if (arguments.length == 1 && (arguments[0] == null || arguments[0] instanceof RubyNode[])) {
return create((RubyNode[]) arguments[0]);
} else {
throw new IllegalArgumentException("Invalid create signature.");
}
}
public static NodeFactory getInstance() {
if (coverageResultNodeFactoryInstance == null) {
coverageResultNodeFactoryInstance = new CoverageResultNodeFactory();
}
return coverageResultNodeFactoryInstance;
}
public static CoverageResultNode create(RubyNode[] arguments) {
return new CoverageResultNodeGen(arguments);
}
@GeneratedBy(CoverageResultNode.class)
public static final class CoverageResultNodeGen extends CoverageResultNode {
@SuppressWarnings("unused")
private CoverageResultNodeGen(RubyNode[] arguments) {
}
@Override
public NodeCost getCost() {
return NodeCost.MONOMORPHIC;
}
@Override
public Object execute(VirtualFrame frameValue) {
return this.resultArray();
}
@Override
public void executeVoid(VirtualFrame frameValue) {
execute(frameValue);
return;
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy