org.truffleruby.language.TruffleBootNodesFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ruby-language Show documentation
Show all versions of ruby-language Show documentation
Core module of Ruby on Truffle
The newest version!
// CheckStyle: start generated
package org.truffleruby.language;
import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.CompilerDirectives.CompilationFinal;
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.dsl.UnsupportedSpecializationException;
import com.oracle.truffle.api.dsl.DSLSupport.SpecializationDataNode;
import com.oracle.truffle.api.dsl.InlineSupport.ReferenceField;
import com.oracle.truffle.api.dsl.InlineSupport.UnsafeAccessedField;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.nodes.DenyReplace;
import com.oracle.truffle.api.nodes.Node;
import com.oracle.truffle.api.strings.TruffleString.FromJavaStringNode;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.VarHandle;
import java.util.List;
import java.util.Objects;
import org.truffleruby.builtins.CoreMethodNode;
import org.truffleruby.core.symbol.RubySymbol;
import org.truffleruby.language.TruffleBootNodes.ExtraLoadPathsNode;
import org.truffleruby.language.TruffleBootNodes.ForceContextNode;
import org.truffleruby.language.TruffleBootNodes.GetOptionNode;
import org.truffleruby.language.TruffleBootNodes.InnerCheckSyntaxNode;
import org.truffleruby.language.TruffleBootNodes.IsPreinitializingNode;
import org.truffleruby.language.TruffleBootNodes.MainNode;
import org.truffleruby.language.TruffleBootNodes.OriginalArgvNode;
import org.truffleruby.language.TruffleBootNodes.PrintTimeMetricNode;
import org.truffleruby.language.TruffleBootNodes.ReadABIVersionNode;
import org.truffleruby.language.TruffleBootNodes.RubyHomeNode;
import org.truffleruby.language.TruffleBootNodes.SingleThreadedNode;
import org.truffleruby.language.TruffleBootNodes.SourceOfCallerNode;
import org.truffleruby.language.TruffleBootNodes.ToolchainExecutableNode;
import org.truffleruby.language.TruffleBootNodes.ToolchainPathsNode;
import org.truffleruby.language.TruffleBootNodes.WasPreinitializedNode;
import org.truffleruby.language.library.RubyStringLibrary;
import org.truffleruby.parser.RubySource;
@GeneratedBy(TruffleBootNodes.class)
@SuppressWarnings({"javadoc", "unused"})
public final class TruffleBootNodesFactory {
public static List> getFactories() {
return List.of(RubyHomeNodeFactory.getInstance(), ForceContextNodeFactory.getInstance(), IsPreinitializingNodeFactory.getInstance(), WasPreinitializedNodeFactory.getInstance(), MainNodeFactory.getInstance(), OriginalArgvNodeFactory.getInstance(), ExtraLoadPathsNodeFactory.getInstance(), SourceOfCallerNodeFactory.getInstance(), InnerCheckSyntaxNodeFactory.getInstance(), GetOptionNodeFactory.getInstance(), PrintTimeMetricNodeFactory.getInstance(), SingleThreadedNodeFactory.getInstance(), ToolchainExecutableNodeFactory.getInstance(), ToolchainPathsNodeFactory.getInstance(), ReadABIVersionNodeFactory.getInstance());
}
@GeneratedBy(RubyHomeNode.class)
public static final class RubyHomeNodeFactory implements NodeFactory {
private static final RubyHomeNodeFactory RUBY_HOME_NODE_FACTORY_INSTANCE = new RubyHomeNodeFactory();
private RubyHomeNodeFactory() {
}
@Override
public Class getNodeClass() {
return RubyHomeNode.class;
}
@Override
public List> getExecutionSignature() {
return List.of();
}
@Override
public List>> getNodeSignatures() {
return List.of(List.of());
}
@Override
public RubyHomeNode createNode(Object... arguments) {
if (arguments.length == 0) {
return create();
} else {
throw new IllegalArgumentException("Invalid create signature.");
}
}
public static NodeFactory getInstance() {
return RUBY_HOME_NODE_FACTORY_INSTANCE;
}
@NeverDefault
public static RubyHomeNode create() {
return new RubyHomeNodeGen();
}
/**
* Debug Info:
* Specialization {@link RubyHomeNode#rubyHome}
* Activation probability: 1.00000
* With/without class size: 16/0 bytes
*
*/
@GeneratedBy(RubyHomeNode.class)
@SuppressWarnings("javadoc")
public static final class RubyHomeNodeGen extends RubyHomeNode {
private RubyHomeNodeGen() {
}
@Override
public Object execute(VirtualFrame frameValue) {
return rubyHome();
}
}
}
@GeneratedBy(ForceContextNode.class)
public static final class ForceContextNodeFactory implements NodeFactory {
private static final ForceContextNodeFactory FORCE_CONTEXT_NODE_FACTORY_INSTANCE = new ForceContextNodeFactory();
private ForceContextNodeFactory() {
}
@Override
public Class getNodeClass() {
return ForceContextNode.class;
}
@Override
public List> getExecutionSignature() {
return List.of();
}
@Override
public List>> getNodeSignatures() {
return List.of(List.of(RubyNode[].class));
}
@Override
public ForceContextNode 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() {
return FORCE_CONTEXT_NODE_FACTORY_INSTANCE;
}
@NeverDefault
public static ForceContextNode create(RubyNode[] argumentNodes) {
return new ForceContextNodeGen(argumentNodes);
}
/**
* Debug Info:
* Specialization {@link ForceContextNode#forceContext}
* Activation probability: 1.00000
* With/without class size: 16/0 bytes
*
*/
@GeneratedBy(ForceContextNode.class)
@SuppressWarnings("javadoc")
public static final class ForceContextNodeGen extends ForceContextNode {
private ForceContextNodeGen(RubyNode[] argumentNodes) {
}
@Override
public Object execute(VirtualFrame frameValue) {
return forceContext();
}
}
}
@GeneratedBy(IsPreinitializingNode.class)
public static final class IsPreinitializingNodeFactory implements NodeFactory {
private static final IsPreinitializingNodeFactory IS_PREINITIALIZING_NODE_FACTORY_INSTANCE = new IsPreinitializingNodeFactory();
private IsPreinitializingNodeFactory() {
}
@Override
public Class getNodeClass() {
return IsPreinitializingNode.class;
}
@Override
public List> getExecutionSignature() {
return List.of();
}
@Override
public List>> getNodeSignatures() {
return List.of(List.of(RubyNode[].class));
}
@Override
public IsPreinitializingNode 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() {
return IS_PREINITIALIZING_NODE_FACTORY_INSTANCE;
}
@NeverDefault
public static IsPreinitializingNode create(RubyNode[] argumentNodes) {
return new IsPreinitializingNodeGen(argumentNodes);
}
/**
* Debug Info:
* Specialization {@link IsPreinitializingNode#isPreinitializingContext}
* Activation probability: 1.00000
* With/without class size: 16/0 bytes
*
*/
@GeneratedBy(IsPreinitializingNode.class)
@SuppressWarnings("javadoc")
public static final class IsPreinitializingNodeGen extends IsPreinitializingNode {
private IsPreinitializingNodeGen(RubyNode[] argumentNodes) {
}
@Override
public Object execute(VirtualFrame frameValue) {
return isPreinitializingContext();
}
}
}
@GeneratedBy(WasPreinitializedNode.class)
public static final class WasPreinitializedNodeFactory implements NodeFactory {
private static final WasPreinitializedNodeFactory WAS_PREINITIALIZED_NODE_FACTORY_INSTANCE = new WasPreinitializedNodeFactory();
private WasPreinitializedNodeFactory() {
}
@Override
public Class getNodeClass() {
return WasPreinitializedNode.class;
}
@Override
public List> getExecutionSignature() {
return List.of();
}
@Override
public List>> getNodeSignatures() {
return List.of(List.of(RubyNode[].class));
}
@Override
public WasPreinitializedNode 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() {
return WAS_PREINITIALIZED_NODE_FACTORY_INSTANCE;
}
@NeverDefault
public static WasPreinitializedNode create(RubyNode[] argumentNodes) {
return new WasPreinitializedNodeGen(argumentNodes);
}
/**
* Debug Info:
* Specialization {@link WasPreinitializedNode#wasPreinitializedContext}
* Activation probability: 1.00000
* With/without class size: 16/0 bytes
*
*/
@GeneratedBy(WasPreinitializedNode.class)
@SuppressWarnings("javadoc")
public static final class WasPreinitializedNodeGen extends WasPreinitializedNode {
private WasPreinitializedNodeGen(RubyNode[] argumentNodes) {
}
@Override
public Object execute(VirtualFrame frameValue) {
return wasPreinitializedContext();
}
}
}
@GeneratedBy(MainNode.class)
public static final class MainNodeFactory implements NodeFactory {
private static final MainNodeFactory MAIN_NODE_FACTORY_INSTANCE = new MainNodeFactory();
private MainNodeFactory() {
}
@Override
public Class getNodeClass() {
return MainNode.class;
}
@Override
public List> getExecutionSignature() {
return List.of(RubyNode.class, RubyNode.class, RubyNode.class, RubyNode.class);
}
@Override
public List>> getNodeSignatures() {
return List.of(List.of(RubyNode[].class));
}
@Override
public MainNode 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() {
return MAIN_NODE_FACTORY_INSTANCE;
}
@NeverDefault
public static MainNode create(RubyNode[] argumentNodes) {
return new MainNodeGen(argumentNodes);
}
/**
* Debug Info:
* Specialization {@link MainNode#main}
* Activation probability: 1.00000
* With/without class size: 16/0 bytes
*
*/
@GeneratedBy(MainNode.class)
@SuppressWarnings("javadoc")
public static final class MainNodeGen extends MainNode {
@Child private RubyNode argumentNodes0_;
@Child private RubyNode argumentNodes1_;
@Child private RubyNode argumentNodes2_;
@Child private RubyNode argumentNodes3_;
/**
* State Info:
* 0: SpecializationActive {@link MainNode#main}
* 1-2: ImplicitCast[type=long, index=1]
*
*/
@CompilationFinal private int state_0_;
private MainNodeGen(RubyNode[] argumentNodes) {
this.argumentNodes0_ = argumentNodes != null && 0 < argumentNodes.length ? argumentNodes[0] : null;
this.argumentNodes1_ = argumentNodes != null && 1 < argumentNodes.length ? argumentNodes[1] : null;
this.argumentNodes2_ = argumentNodes != null && 2 < argumentNodes.length ? argumentNodes[2] : null;
this.argumentNodes3_ = argumentNodes != null && 3 < argumentNodes.length ? argumentNodes[3] : null;
}
@Override
public Object execute(VirtualFrame frameValue) {
int state_0 = this.state_0_;
Object argumentNodes0Value_ = this.argumentNodes0_.execute(frameValue);
Object argumentNodes1Value_ = this.argumentNodes1_.execute(frameValue);
Object argumentNodes2Value_ = this.argumentNodes2_.execute(frameValue);
Object argumentNodes3Value_ = this.argumentNodes3_.execute(frameValue);
if ((state_0 & 0b1) != 0 /* is SpecializationActive[TruffleBootNodes.MainNode.main(int, long, String, String)] */ && argumentNodes0Value_ instanceof Integer) {
int argumentNodes0Value__ = (int) argumentNodes0Value_;
if (RubyTypesGen.isImplicitLong((state_0 & 0b110) >>> 1 /* get-int ImplicitCast[type=long, index=1] */, argumentNodes1Value_)) {
long argumentNodes1Value__ = RubyTypesGen.asImplicitLong((state_0 & 0b110) >>> 1 /* get-int ImplicitCast[type=long, index=1] */, argumentNodes1Value_);
if (argumentNodes2Value_ instanceof String) {
String argumentNodes2Value__ = (String) argumentNodes2Value_;
if (argumentNodes3Value_ instanceof String) {
String argumentNodes3Value__ = (String) argumentNodes3Value_;
return main(argumentNodes0Value__, argumentNodes1Value__, argumentNodes2Value__, argumentNodes3Value__);
}
}
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(argumentNodes0Value_, argumentNodes1Value_, argumentNodes2Value_, argumentNodes3Value_);
}
private int executeAndSpecialize(Object argumentNodes0Value, Object argumentNodes1Value, Object argumentNodes2Value, Object argumentNodes3Value) {
int state_0 = this.state_0_;
if (argumentNodes0Value instanceof Integer) {
int argumentNodes0Value_ = (int) argumentNodes0Value;
int longCast1;
if ((longCast1 = RubyTypesGen.specializeImplicitLong(argumentNodes1Value)) != 0) {
long argumentNodes1Value_ = RubyTypesGen.asImplicitLong(longCast1, argumentNodes1Value);
if (argumentNodes2Value instanceof String) {
String argumentNodes2Value_ = (String) argumentNodes2Value;
if (argumentNodes3Value instanceof String) {
String argumentNodes3Value_ = (String) argumentNodes3Value;
state_0 = (state_0 | (longCast1 << 1) /* set-int ImplicitCast[type=long, index=1] */);
state_0 = state_0 | 0b1 /* add SpecializationActive[TruffleBootNodes.MainNode.main(int, long, String, String)] */;
this.state_0_ = state_0;
return main(argumentNodes0Value_, argumentNodes1Value_, argumentNodes2Value_, argumentNodes3Value_);
}
}
}
}
throw new UnsupportedSpecializationException(this, new Node[] {this.argumentNodes0_, this.argumentNodes1_, this.argumentNodes2_, this.argumentNodes3_}, argumentNodes0Value, argumentNodes1Value, argumentNodes2Value, argumentNodes3Value);
}
}
}
@GeneratedBy(OriginalArgvNode.class)
public static final class OriginalArgvNodeFactory implements NodeFactory {
private static final OriginalArgvNodeFactory ORIGINAL_ARGV_NODE_FACTORY_INSTANCE = new OriginalArgvNodeFactory();
private OriginalArgvNodeFactory() {
}
@Override
public Class getNodeClass() {
return OriginalArgvNode.class;
}
@Override
public List> getExecutionSignature() {
return List.of();
}
@Override
public List>> getNodeSignatures() {
return List.of(List.of());
}
@Override
public OriginalArgvNode createNode(Object... arguments) {
if (arguments.length == 0) {
return create();
} else {
throw new IllegalArgumentException("Invalid create signature.");
}
}
public static NodeFactory getInstance() {
return ORIGINAL_ARGV_NODE_FACTORY_INSTANCE;
}
@NeverDefault
public static OriginalArgvNode create() {
return new OriginalArgvNodeGen();
}
/**
* Debug Info:
* Specialization {@link OriginalArgvNode#originalArgv}
* Activation probability: 1.00000
* With/without class size: 16/0 bytes
*
*/
@GeneratedBy(OriginalArgvNode.class)
@SuppressWarnings("javadoc")
public static final class OriginalArgvNodeGen extends OriginalArgvNode {
private OriginalArgvNodeGen() {
}
@Override
public Object execute(VirtualFrame frameValue) {
return originalArgv();
}
}
}
@GeneratedBy(ExtraLoadPathsNode.class)
public static final class ExtraLoadPathsNodeFactory implements NodeFactory {
private static final ExtraLoadPathsNodeFactory EXTRA_LOAD_PATHS_NODE_FACTORY_INSTANCE = new ExtraLoadPathsNodeFactory();
private ExtraLoadPathsNodeFactory() {
}
@Override
public Class getNodeClass() {
return ExtraLoadPathsNode.class;
}
@Override
public List> getExecutionSignature() {
return List.of();
}
@Override
public List>> getNodeSignatures() {
return List.of(List.of());
}
@Override
public ExtraLoadPathsNode createNode(Object... arguments) {
if (arguments.length == 0) {
return create();
} else {
throw new IllegalArgumentException("Invalid create signature.");
}
}
public static NodeFactory getInstance() {
return EXTRA_LOAD_PATHS_NODE_FACTORY_INSTANCE;
}
@NeverDefault
public static ExtraLoadPathsNode create() {
return new ExtraLoadPathsNodeGen();
}
/**
* Debug Info:
* Specialization {@link ExtraLoadPathsNode#extraLoadPaths}
* Activation probability: 1.00000
* With/without class size: 16/0 bytes
*
*/
@GeneratedBy(ExtraLoadPathsNode.class)
@SuppressWarnings("javadoc")
public static final class ExtraLoadPathsNodeGen extends ExtraLoadPathsNode {
private ExtraLoadPathsNodeGen() {
}
@Override
public Object execute(VirtualFrame frameValue) {
return extraLoadPaths();
}
}
}
@GeneratedBy(SourceOfCallerNode.class)
public static final class SourceOfCallerNodeFactory implements NodeFactory {
private static final SourceOfCallerNodeFactory SOURCE_OF_CALLER_NODE_FACTORY_INSTANCE = new SourceOfCallerNodeFactory();
private SourceOfCallerNodeFactory() {
}
@Override
public Class getNodeClass() {
return SourceOfCallerNode.class;
}
@Override
public List> getExecutionSignature() {
return List.of();
}
@Override
public List>> getNodeSignatures() {
return List.of(List.of(RubyNode[].class));
}
@Override
public SourceOfCallerNode 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() {
return SOURCE_OF_CALLER_NODE_FACTORY_INSTANCE;
}
@NeverDefault
public static SourceOfCallerNode create(RubyNode[] argumentNodes) {
return new SourceOfCallerNodeGen(argumentNodes);
}
/**
* Debug Info:
* Specialization {@link SourceOfCallerNode#sourceOfCaller}
* Activation probability: 1.00000
* With/without class size: 16/0 bytes
*
*/
@GeneratedBy(SourceOfCallerNode.class)
@SuppressWarnings("javadoc")
public static final class SourceOfCallerNodeGen extends SourceOfCallerNode {
private SourceOfCallerNodeGen(RubyNode[] argumentNodes) {
}
@Override
public Object execute(VirtualFrame frameValue) {
return sourceOfCaller();
}
}
}
@GeneratedBy(InnerCheckSyntaxNode.class)
public static final class InnerCheckSyntaxNodeFactory implements NodeFactory {
private static final InnerCheckSyntaxNodeFactory INNER_CHECK_SYNTAX_NODE_FACTORY_INSTANCE = new InnerCheckSyntaxNodeFactory();
private InnerCheckSyntaxNodeFactory() {
}
@Override
public Class getNodeClass() {
return InnerCheckSyntaxNode.class;
}
@Override
public List> getExecutionSignature() {
return List.of(RubyNode.class);
}
@Override
public List>> getNodeSignatures() {
return List.of(List.of(RubyNode[].class));
}
@Override
public InnerCheckSyntaxNode 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() {
return INNER_CHECK_SYNTAX_NODE_FACTORY_INSTANCE;
}
@NeverDefault
public static InnerCheckSyntaxNode create(RubyNode[] argumentNodes) {
return new InnerCheckSyntaxNodeGen(argumentNodes);
}
/**
* Debug Info:
* Specialization {@link InnerCheckSyntaxNode#innerCheckSyntax}
* Activation probability: 1.00000
* With/without class size: 16/0 bytes
*
*/
@GeneratedBy(InnerCheckSyntaxNode.class)
@SuppressWarnings("javadoc")
public static final class InnerCheckSyntaxNodeGen extends InnerCheckSyntaxNode {
@Child private RubyNode argumentNodes0_;
/**
* State Info:
* 0: SpecializationActive {@link InnerCheckSyntaxNode#innerCheckSyntax}
*
*/
@CompilationFinal private int state_0_;
private InnerCheckSyntaxNodeGen(RubyNode[] argumentNodes) {
this.argumentNodes0_ = argumentNodes != null && 0 < argumentNodes.length ? argumentNodes[0] : null;
}
@Override
public Object execute(VirtualFrame frameValue) {
int state_0 = this.state_0_;
Object argumentNodes0Value_ = this.argumentNodes0_.execute(frameValue);
if (state_0 != 0 /* is SpecializationActive[TruffleBootNodes.InnerCheckSyntaxNode.innerCheckSyntax(RubySource)] */ && argumentNodes0Value_ instanceof RubySource) {
RubySource argumentNodes0Value__ = (RubySource) argumentNodes0Value_;
return innerCheckSyntax(argumentNodes0Value__);
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(argumentNodes0Value_);
}
private Object executeAndSpecialize(Object argumentNodes0Value) {
int state_0 = this.state_0_;
if (argumentNodes0Value instanceof RubySource) {
RubySource argumentNodes0Value_ = (RubySource) argumentNodes0Value;
state_0 = state_0 | 0b1 /* add SpecializationActive[TruffleBootNodes.InnerCheckSyntaxNode.innerCheckSyntax(RubySource)] */;
this.state_0_ = state_0;
return innerCheckSyntax(argumentNodes0Value_);
}
throw new UnsupportedSpecializationException(this, new Node[] {this.argumentNodes0_}, argumentNodes0Value);
}
}
}
@GeneratedBy(GetOptionNode.class)
public static final class GetOptionNodeFactory implements NodeFactory {
private static final GetOptionNodeFactory GET_OPTION_NODE_FACTORY_INSTANCE = new GetOptionNodeFactory();
private GetOptionNodeFactory() {
}
@Override
public Class getNodeClass() {
return GetOptionNode.class;
}
@Override
public List> getExecutionSignature() {
return List.of(RubyNode.class);
}
@Override
public List>> getNodeSignatures() {
return List.of(List.of(RubyNode[].class));
}
@Override
public GetOptionNode 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() {
return GET_OPTION_NODE_FACTORY_INSTANCE;
}
@NeverDefault
public static GetOptionNode create(RubyNode[] argumentNodes) {
return new GetOptionNodeGen(argumentNodes);
}
/**
* Debug Info:
* Specialization {@link GetOptionNode#getOption}
* Activation probability: 1.00000
* With/without class size: 20/4 bytes
*
*/
@GeneratedBy(GetOptionNode.class)
@SuppressWarnings("javadoc")
public static final class GetOptionNodeGen extends GetOptionNode {
static final ReferenceField GET_OPTION_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "getOption_cache", GetOptionData.class);
@Child private RubyNode argumentNodes0_;
/**
* State Info:
* 0: SpecializationActive {@link GetOptionNode#getOption}
*
*/
@CompilationFinal private int state_0_;
@UnsafeAccessedField @CompilationFinal private GetOptionData getOption_cache;
private GetOptionNodeGen(RubyNode[] argumentNodes) {
this.argumentNodes0_ = argumentNodes != null && 0 < argumentNodes.length ? argumentNodes[0] : null;
}
@Override
public Object execute(VirtualFrame frameValue) {
int state_0 = this.state_0_;
Object argumentNodes0Value_ = this.argumentNodes0_.execute(frameValue);
if (state_0 != 0 /* is SpecializationActive[TruffleBootNodes.GetOptionNode.getOption(Object, RubyStringLibrary)] */) {
GetOptionData s0_ = this.getOption_cache;
if (s0_ != null) {
if ((s0_.libOptionName_.isRubyString(argumentNodes0Value_))) {
return getOption(argumentNodes0Value_, s0_.libOptionName_);
}
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(argumentNodes0Value_);
}
@SuppressWarnings("unused")
private Object executeAndSpecialize(Object argumentNodes0Value) {
int state_0 = this.state_0_;
while (true) {
int count0_ = 0;
GetOptionData s0_ = GET_OPTION_CACHE_UPDATER.getVolatile(this);
GetOptionData s0_original = s0_;
while (s0_ != null) {
if ((s0_.libOptionName_.isRubyString(argumentNodes0Value))) {
break;
}
count0_++;
s0_ = null;
break;
}
if (s0_ == null && count0_ < 1) {
{
RubyStringLibrary libOptionName__ = (RubyStringLibrary.create());
if ((libOptionName__.isRubyString(argumentNodes0Value))) {
s0_ = new GetOptionData();
Objects.requireNonNull(libOptionName__, "A specialization cache returned a default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns the default value.");
s0_.libOptionName_ = libOptionName__;
if (!GET_OPTION_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) {
continue;
}
state_0 = state_0 | 0b1 /* add SpecializationActive[TruffleBootNodes.GetOptionNode.getOption(Object, RubyStringLibrary)] */;
this.state_0_ = state_0;
}
}
}
if (s0_ != null) {
return getOption(argumentNodes0Value, s0_.libOptionName_);
}
break;
}
throw new UnsupportedSpecializationException(this, new Node[] {this.argumentNodes0_}, argumentNodes0Value);
}
@GeneratedBy(GetOptionNode.class)
@DenyReplace
private static final class GetOptionData implements SpecializationDataNode {
/**
* Source Info:
* Specialization: {@link GetOptionNode#getOption}
* Parameter: {@link RubyStringLibrary} libOptionName
*/
@CompilationFinal RubyStringLibrary libOptionName_;
GetOptionData() {
}
}
}
}
@GeneratedBy(PrintTimeMetricNode.class)
public static final class PrintTimeMetricNodeFactory implements NodeFactory {
private static final PrintTimeMetricNodeFactory PRINT_TIME_METRIC_NODE_FACTORY_INSTANCE = new PrintTimeMetricNodeFactory();
private PrintTimeMetricNodeFactory() {
}
@Override
public Class getNodeClass() {
return PrintTimeMetricNode.class;
}
@Override
public List> getExecutionSignature() {
return List.of(RubyNode.class);
}
@Override
public List>> getNodeSignatures() {
return List.of(List.of(RubyNode[].class));
}
@Override
public PrintTimeMetricNode 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() {
return PRINT_TIME_METRIC_NODE_FACTORY_INSTANCE;
}
@NeverDefault
public static PrintTimeMetricNode create(RubyNode[] argumentNodes) {
return new PrintTimeMetricNodeGen(argumentNodes);
}
/**
* Debug Info:
* Specialization {@link PrintTimeMetricNode#printTimeMetric}
* Activation probability: 1.00000
* With/without class size: 16/0 bytes
*
*/
@GeneratedBy(PrintTimeMetricNode.class)
@SuppressWarnings("javadoc")
public static final class PrintTimeMetricNodeGen extends PrintTimeMetricNode {
@Child private RubyNode argumentNodes0_;
/**
* State Info:
* 0: SpecializationActive {@link PrintTimeMetricNode#printTimeMetric}
*
*/
@CompilationFinal private int state_0_;
private PrintTimeMetricNodeGen(RubyNode[] argumentNodes) {
this.argumentNodes0_ = argumentNodes != null && 0 < argumentNodes.length ? argumentNodes[0] : null;
}
@Override
public Object execute(VirtualFrame frameValue) {
int state_0 = this.state_0_;
Object argumentNodes0Value_ = this.argumentNodes0_.execute(frameValue);
if (state_0 != 0 /* is SpecializationActive[TruffleBootNodes.PrintTimeMetricNode.printTimeMetric(RubySymbol)] */ && argumentNodes0Value_ instanceof RubySymbol) {
RubySymbol argumentNodes0Value__ = (RubySymbol) argumentNodes0Value_;
return printTimeMetric(argumentNodes0Value__);
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(argumentNodes0Value_);
}
private Object executeAndSpecialize(Object argumentNodes0Value) {
int state_0 = this.state_0_;
if (argumentNodes0Value instanceof RubySymbol) {
RubySymbol argumentNodes0Value_ = (RubySymbol) argumentNodes0Value;
state_0 = state_0 | 0b1 /* add SpecializationActive[TruffleBootNodes.PrintTimeMetricNode.printTimeMetric(RubySymbol)] */;
this.state_0_ = state_0;
return printTimeMetric(argumentNodes0Value_);
}
throw new UnsupportedSpecializationException(this, new Node[] {this.argumentNodes0_}, argumentNodes0Value);
}
}
}
@GeneratedBy(SingleThreadedNode.class)
public static final class SingleThreadedNodeFactory implements NodeFactory {
private static final SingleThreadedNodeFactory SINGLE_THREADED_NODE_FACTORY_INSTANCE = new SingleThreadedNodeFactory();
private SingleThreadedNodeFactory() {
}
@Override
public Class getNodeClass() {
return SingleThreadedNode.class;
}
@Override
public List> getExecutionSignature() {
return List.of();
}
@Override
public List>> getNodeSignatures() {
return List.of(List.of(RubyNode[].class));
}
@Override
public SingleThreadedNode 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() {
return SINGLE_THREADED_NODE_FACTORY_INSTANCE;
}
@NeverDefault
public static SingleThreadedNode create(RubyNode[] argumentNodes) {
return new SingleThreadedNodeGen(argumentNodes);
}
/**
* Debug Info:
* Specialization {@link SingleThreadedNode#singleThreaded}
* Activation probability: 1.00000
* With/without class size: 16/0 bytes
*
*/
@GeneratedBy(SingleThreadedNode.class)
@SuppressWarnings("javadoc")
public static final class SingleThreadedNodeGen extends SingleThreadedNode {
private SingleThreadedNodeGen(RubyNode[] argumentNodes) {
}
@Override
public Object execute(VirtualFrame frameValue) {
return singleThreaded();
}
}
}
@GeneratedBy(ToolchainExecutableNode.class)
public static final class ToolchainExecutableNodeFactory implements NodeFactory {
private static final ToolchainExecutableNodeFactory TOOLCHAIN_EXECUTABLE_NODE_FACTORY_INSTANCE = new ToolchainExecutableNodeFactory();
private ToolchainExecutableNodeFactory() {
}
@Override
public Class getNodeClass() {
return ToolchainExecutableNode.class;
}
@Override
public List> getExecutionSignature() {
return List.of(RubyNode.class);
}
@Override
public List>> getNodeSignatures() {
return List.of(List.of(RubyNode[].class));
}
@Override
public ToolchainExecutableNode 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() {
return TOOLCHAIN_EXECUTABLE_NODE_FACTORY_INSTANCE;
}
@NeverDefault
public static ToolchainExecutableNode create(RubyNode[] argumentNodes) {
return new ToolchainExecutableNodeGen(argumentNodes);
}
/**
* Debug Info:
* Specialization {@link ToolchainExecutableNode#toolchainExecutable}
* Activation probability: 1.00000
* With/without class size: 24/4 bytes
*
*/
@GeneratedBy(ToolchainExecutableNode.class)
@SuppressWarnings("javadoc")
public static final class ToolchainExecutableNodeGen extends ToolchainExecutableNode {
@Child private RubyNode argumentNodes0_;
/**
* State Info:
* 0: SpecializationActive {@link ToolchainExecutableNode#toolchainExecutable}
*
*/
@CompilationFinal private int state_0_;
/**
* Source Info:
* Specialization: {@link ToolchainExecutableNode#toolchainExecutable}
* Parameter: {@link FromJavaStringNode} fromJavaStringNode
*/
@Child private FromJavaStringNode fromJavaStringNode_;
private ToolchainExecutableNodeGen(RubyNode[] argumentNodes) {
this.argumentNodes0_ = argumentNodes != null && 0 < argumentNodes.length ? argumentNodes[0] : null;
}
@Override
public Object execute(VirtualFrame frameValue) {
int state_0 = this.state_0_;
Object argumentNodes0Value_ = this.argumentNodes0_.execute(frameValue);
if (state_0 != 0 /* is SpecializationActive[TruffleBootNodes.ToolchainExecutableNode.toolchainExecutable(RubySymbol, FromJavaStringNode)] */ && argumentNodes0Value_ instanceof RubySymbol) {
RubySymbol argumentNodes0Value__ = (RubySymbol) argumentNodes0Value_;
{
FromJavaStringNode fromJavaStringNode__ = this.fromJavaStringNode_;
if (fromJavaStringNode__ != null) {
return toolchainExecutable(argumentNodes0Value__, fromJavaStringNode__);
}
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(argumentNodes0Value_);
}
private Object executeAndSpecialize(Object argumentNodes0Value) {
int state_0 = this.state_0_;
if (argumentNodes0Value instanceof RubySymbol) {
RubySymbol argumentNodes0Value_ = (RubySymbol) argumentNodes0Value;
FromJavaStringNode fromJavaStringNode__ = this.insert((FromJavaStringNode.create()));
Objects.requireNonNull(fromJavaStringNode__, "A specialization cache returned a default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns the default value.");
VarHandle.storeStoreFence();
this.fromJavaStringNode_ = fromJavaStringNode__;
state_0 = state_0 | 0b1 /* add SpecializationActive[TruffleBootNodes.ToolchainExecutableNode.toolchainExecutable(RubySymbol, FromJavaStringNode)] */;
this.state_0_ = state_0;
return toolchainExecutable(argumentNodes0Value_, fromJavaStringNode__);
}
throw new UnsupportedSpecializationException(this, new Node[] {this.argumentNodes0_}, argumentNodes0Value);
}
}
}
@GeneratedBy(ToolchainPathsNode.class)
public static final class ToolchainPathsNodeFactory implements NodeFactory {
private static final ToolchainPathsNodeFactory TOOLCHAIN_PATHS_NODE_FACTORY_INSTANCE = new ToolchainPathsNodeFactory();
private ToolchainPathsNodeFactory() {
}
@Override
public Class getNodeClass() {
return ToolchainPathsNode.class;
}
@Override
public List> getExecutionSignature() {
return List.of(RubyNode.class);
}
@Override
public List>> getNodeSignatures() {
return List.of(List.of(RubyNode[].class));
}
@Override
public ToolchainPathsNode 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() {
return TOOLCHAIN_PATHS_NODE_FACTORY_INSTANCE;
}
@NeverDefault
public static ToolchainPathsNode create(RubyNode[] argumentNodes) {
return new ToolchainPathsNodeGen(argumentNodes);
}
/**
* Debug Info:
* Specialization {@link ToolchainPathsNode#toolchainPaths}
* Activation probability: 1.00000
* With/without class size: 24/4 bytes
*
*/
@GeneratedBy(ToolchainPathsNode.class)
@SuppressWarnings("javadoc")
public static final class ToolchainPathsNodeGen extends ToolchainPathsNode {
@Child private RubyNode argumentNodes0_;
/**
* State Info:
* 0: SpecializationActive {@link ToolchainPathsNode#toolchainPaths}
*
*/
@CompilationFinal private int state_0_;
/**
* Source Info:
* Specialization: {@link ToolchainPathsNode#toolchainPaths}
* Parameter: {@link FromJavaStringNode} fromJavaStringNode
*/
@Child private FromJavaStringNode fromJavaStringNode_;
private ToolchainPathsNodeGen(RubyNode[] argumentNodes) {
this.argumentNodes0_ = argumentNodes != null && 0 < argumentNodes.length ? argumentNodes[0] : null;
}
@Override
public Object execute(VirtualFrame frameValue) {
int state_0 = this.state_0_;
Object argumentNodes0Value_ = this.argumentNodes0_.execute(frameValue);
if (state_0 != 0 /* is SpecializationActive[TruffleBootNodes.ToolchainPathsNode.toolchainPaths(RubySymbol, FromJavaStringNode)] */ && argumentNodes0Value_ instanceof RubySymbol) {
RubySymbol argumentNodes0Value__ = (RubySymbol) argumentNodes0Value_;
{
FromJavaStringNode fromJavaStringNode__ = this.fromJavaStringNode_;
if (fromJavaStringNode__ != null) {
return toolchainPaths(argumentNodes0Value__, fromJavaStringNode__);
}
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(argumentNodes0Value_);
}
private Object executeAndSpecialize(Object argumentNodes0Value) {
int state_0 = this.state_0_;
if (argumentNodes0Value instanceof RubySymbol) {
RubySymbol argumentNodes0Value_ = (RubySymbol) argumentNodes0Value;
FromJavaStringNode fromJavaStringNode__ = this.insert((FromJavaStringNode.create()));
Objects.requireNonNull(fromJavaStringNode__, "A specialization cache returned a default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns the default value.");
VarHandle.storeStoreFence();
this.fromJavaStringNode_ = fromJavaStringNode__;
state_0 = state_0 | 0b1 /* add SpecializationActive[TruffleBootNodes.ToolchainPathsNode.toolchainPaths(RubySymbol, FromJavaStringNode)] */;
this.state_0_ = state_0;
return toolchainPaths(argumentNodes0Value_, fromJavaStringNode__);
}
throw new UnsupportedSpecializationException(this, new Node[] {this.argumentNodes0_}, argumentNodes0Value);
}
}
}
@GeneratedBy(ReadABIVersionNode.class)
public static final class ReadABIVersionNodeFactory implements NodeFactory {
private static final ReadABIVersionNodeFactory READ_A_B_I_VERSION_NODE_FACTORY_INSTANCE = new ReadABIVersionNodeFactory();
private ReadABIVersionNodeFactory() {
}
@Override
public Class getNodeClass() {
return ReadABIVersionNode.class;
}
@Override
public List> getExecutionSignature() {
return List.of();
}
@Override
public List>> getNodeSignatures() {
return List.of(List.of());
}
@Override
public ReadABIVersionNode createNode(Object... arguments) {
if (arguments.length == 0) {
return create();
} else {
throw new IllegalArgumentException("Invalid create signature.");
}
}
public static NodeFactory getInstance() {
return READ_A_B_I_VERSION_NODE_FACTORY_INSTANCE;
}
@NeverDefault
public static ReadABIVersionNode create() {
return new ReadABIVersionNodeGen();
}
/**
* Debug Info:
* Specialization {@link ReadABIVersionNode#basicABIVersion}
* Activation probability: 1.00000
* With/without class size: 16/0 bytes
*
*/
@GeneratedBy(ReadABIVersionNode.class)
@SuppressWarnings("javadoc")
public static final class ReadABIVersionNodeGen extends ReadABIVersionNode {
private ReadABIVersionNodeGen() {
}
@Override
public Object execute(VirtualFrame frameValue) {
return basicABIVersion();
}
}
}
}