org.truffleruby.language.methods.GetMethodObjectNodeGen 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.methods;
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.InlineSupport.InlineTarget;
import com.oracle.truffle.api.dsl.InlineSupport.ReferenceField;
import com.oracle.truffle.api.dsl.InlineSupport.StateField;
import com.oracle.truffle.api.dsl.InlineSupport.UnsafeAccessedField;
import com.oracle.truffle.api.frame.Frame;
import com.oracle.truffle.api.nodes.DenyReplace;
import com.oracle.truffle.api.nodes.Node;
import com.oracle.truffle.api.nodes.UnadoptableNode;
import com.oracle.truffle.api.profiles.InlinedConditionProfile;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.VarHandle;
import java.util.Objects;
import org.truffleruby.core.cast.BooleanCastNode;
import org.truffleruby.core.cast.BooleanCastNodeGen;
import org.truffleruby.core.cast.NameToJavaStringNode;
import org.truffleruby.core.cast.NameToJavaStringNodeGen;
import org.truffleruby.core.cast.ToSymbolNode;
import org.truffleruby.core.cast.ToSymbolNodeGen;
import org.truffleruby.core.method.RubyMethod;
import org.truffleruby.language.dispatch.DispatchConfiguration;
import org.truffleruby.language.dispatch.DispatchNode;
import org.truffleruby.language.objects.LogicalClassNode;
/**
* Debug Info:
* Specialization {@link GetMethodObjectNode#getMethodObject}
* Activation probability: 1.00000
* With/without class size: 76/54 bytes
*
*/
@GeneratedBy(GetMethodObjectNode.class)
@SuppressWarnings("javadoc")
public final class GetMethodObjectNodeGen extends GetMethodObjectNode {
private static final StateField STATE_0_GetMethodObjectNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_");
private static final StateField STATE_1_GetMethodObjectNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_1_");
/**
* Source Info:
* Specialization: {@link GetMethodObjectNode#getMethodObject}
* Parameter: {@link NameToJavaStringNode} nameToJavaStringNode
* Inline method: {@link NameToJavaStringNodeGen#inline}
*/
private static final NameToJavaStringNode INLINED_NAME_TO_JAVA_STRING_NODE_ = NameToJavaStringNodeGen.inline(InlineTarget.create(NameToJavaStringNode.class, STATE_0_GetMethodObjectNode_UPDATER.subUpdater(1, 16), ReferenceField.create(MethodHandles.lookup(), "nameToJavaStringNode__field1_", Node.class), ReferenceField.create(MethodHandles.lookup(), "nameToJavaStringNode__field2_", Node.class), ReferenceField.create(MethodHandles.lookup(), "nameToJavaStringNode__field3_", Node.class), ReferenceField.create(MethodHandles.lookup(), "nameToJavaStringNode__field4_", Node.class)));
/**
* Source Info:
* Specialization: {@link GetMethodObjectNode#getMethodObject}
* Parameter: {@link ToSymbolNode} toSymbolNode
* Inline method: {@link ToSymbolNodeGen#inline}
*/
private static final ToSymbolNode INLINED_TO_SYMBOL_NODE_ = ToSymbolNodeGen.inline(InlineTarget.create(ToSymbolNode.class, STATE_0_GetMethodObjectNode_UPDATER.subUpdater(17, 6), ReferenceField.create(MethodHandles.lookup(), "toSymbolNode__field1_", Object.class), ReferenceField.create(MethodHandles.lookup(), "toSymbolNode__field2_", Object.class), ReferenceField.create(MethodHandles.lookup(), "toSymbolNode__field3_", Node.class), ReferenceField.create(MethodHandles.lookup(), "toSymbolNode__field4_", Node.class)));
/**
* Source Info:
* Specialization: {@link GetMethodObjectNode#getMethodObject}
* Parameter: {@link BooleanCastNode} booleanCastNode
* Inline method: {@link BooleanCastNodeGen#inline}
*/
private static final BooleanCastNode INLINED_BOOLEAN_CAST_NODE_ = BooleanCastNodeGen.inline(InlineTarget.create(BooleanCastNode.class, STATE_1_GetMethodObjectNode_UPDATER.subUpdater(0, 16), ReferenceField.create(MethodHandles.lookup(), "booleanCastNode__field1_", Node.class)));
/**
* Source Info:
* Specialization: {@link GetMethodObjectNode#getMethodObject}
* Parameter: {@link InlinedConditionProfile} notFoundProfile
* Inline method: {@link InlinedConditionProfile#inline}
*/
private static final InlinedConditionProfile INLINED_NOT_FOUND_PROFILE_ = InlinedConditionProfile.inline(InlineTarget.create(InlinedConditionProfile.class, STATE_0_GetMethodObjectNode_UPDATER.subUpdater(23, 2)));
/**
* Source Info:
* Specialization: {@link GetMethodObjectNode#getMethodObject}
* Parameter: {@link InlinedConditionProfile} respondToMissingProfile
* Inline method: {@link InlinedConditionProfile#inline}
*/
private static final InlinedConditionProfile INLINED_RESPOND_TO_MISSING_PROFILE_ = InlinedConditionProfile.inline(InlineTarget.create(InlinedConditionProfile.class, STATE_0_GetMethodObjectNode_UPDATER.subUpdater(25, 2)));
private static final Uncached UNCACHED = new Uncached();
/**
* State Info:
* 0: SpecializationActive {@link GetMethodObjectNode#getMethodObject}
* 1-16: InlinedCache
* Specialization: {@link GetMethodObjectNode#getMethodObject}
* Parameter: {@link NameToJavaStringNode} nameToJavaStringNode
* Inline method: {@link NameToJavaStringNodeGen#inline}
* 17-22: InlinedCache
* Specialization: {@link GetMethodObjectNode#getMethodObject}
* Parameter: {@link ToSymbolNode} toSymbolNode
* Inline method: {@link ToSymbolNodeGen#inline}
* 23-24: InlinedCache
* Specialization: {@link GetMethodObjectNode#getMethodObject}
* Parameter: {@link InlinedConditionProfile} notFoundProfile
* Inline method: {@link InlinedConditionProfile#inline}
* 25-26: InlinedCache
* Specialization: {@link GetMethodObjectNode#getMethodObject}
* Parameter: {@link InlinedConditionProfile} respondToMissingProfile
* Inline method: {@link InlinedConditionProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int state_0_;
/**
* State Info:
* 0-15: InlinedCache
* Specialization: {@link GetMethodObjectNode#getMethodObject}
* Parameter: {@link BooleanCastNode} booleanCastNode
* Inline method: {@link BooleanCastNodeGen#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int state_1_;
/**
* Source Info:
* Specialization: {@link GetMethodObjectNode#getMethodObject}
* Parameter: {@link NameToJavaStringNode} nameToJavaStringNode
* Inline method: {@link NameToJavaStringNodeGen#inline}
* Inline field: {@link Node} field1
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node nameToJavaStringNode__field1_;
/**
* Source Info:
* Specialization: {@link GetMethodObjectNode#getMethodObject}
* Parameter: {@link NameToJavaStringNode} nameToJavaStringNode
* Inline method: {@link NameToJavaStringNodeGen#inline}
* Inline field: {@link Node} field2
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node nameToJavaStringNode__field2_;
/**
* Source Info:
* Specialization: {@link GetMethodObjectNode#getMethodObject}
* Parameter: {@link NameToJavaStringNode} nameToJavaStringNode
* Inline method: {@link NameToJavaStringNodeGen#inline}
* Inline field: {@link Node} field3
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node nameToJavaStringNode__field3_;
/**
* Source Info:
* Specialization: {@link GetMethodObjectNode#getMethodObject}
* Parameter: {@link NameToJavaStringNode} nameToJavaStringNode
* Inline method: {@link NameToJavaStringNodeGen#inline}
* Inline field: {@link Node} field4
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node nameToJavaStringNode__field4_;
/**
* Source Info:
* Specialization: {@link GetMethodObjectNode#getMethodObject}
* Parameter: {@link LookupMethodOnSelfNode} lookupMethodNode
*/
@Child private LookupMethodOnSelfNode lookupMethodNode_;
/**
* Source Info:
* Specialization: {@link GetMethodObjectNode#getMethodObject}
* Parameter: {@link ToSymbolNode} toSymbolNode
* Inline method: {@link ToSymbolNodeGen#inline}
* Inline field: {@link Object} field1
*/
@CompilationFinal @UnsafeAccessedField @SuppressWarnings("unused") private Object toSymbolNode__field1_;
/**
* Source Info:
* Specialization: {@link GetMethodObjectNode#getMethodObject}
* Parameter: {@link ToSymbolNode} toSymbolNode
* Inline method: {@link ToSymbolNodeGen#inline}
* Inline field: {@link Object} field2
*/
@CompilationFinal @UnsafeAccessedField @SuppressWarnings("unused") private Object toSymbolNode__field2_;
/**
* Source Info:
* Specialization: {@link GetMethodObjectNode#getMethodObject}
* Parameter: {@link ToSymbolNode} toSymbolNode
* Inline method: {@link ToSymbolNodeGen#inline}
* Inline field: {@link Node} field3
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node toSymbolNode__field3_;
/**
* Source Info:
* Specialization: {@link GetMethodObjectNode#getMethodObject}
* Parameter: {@link ToSymbolNode} toSymbolNode
* Inline method: {@link ToSymbolNodeGen#inline}
* Inline field: {@link Node} field4
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node toSymbolNode__field4_;
/**
* Source Info:
* Specialization: {@link GetMethodObjectNode#getMethodObject}
* Parameter: {@link DispatchNode} respondToMissingNode
*/
@Child private DispatchNode respondToMissingNode_;
/**
* Source Info:
* Specialization: {@link GetMethodObjectNode#getMethodObject}
* Parameter: {@link BooleanCastNode} booleanCastNode
* Inline method: {@link BooleanCastNodeGen#inline}
* Inline field: {@link Node} field1
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node booleanCastNode__field1_;
/**
* Source Info:
* Specialization: {@link GetMethodObjectNode#getMethodObject}
* Parameter: {@link LogicalClassNode} logicalClassNode
*/
@Child private LogicalClassNode logicalClassNode_;
private GetMethodObjectNodeGen() {
}
@Override
public RubyMethod execute(Frame frameValue, Object arg0Value, Object arg1Value, DispatchConfiguration arg2Value) {
int state_0 = this.state_0_;
if ((state_0 & 0b1) != 0 /* is SpecializationActive[GetMethodObjectNode.getMethodObject(Frame, Object, Object, DispatchConfiguration, NameToJavaStringNode, LookupMethodOnSelfNode, ToSymbolNode, DispatchNode, BooleanCastNode, InlinedConditionProfile, InlinedConditionProfile, LogicalClassNode)] */) {
{
LookupMethodOnSelfNode lookupMethodNode__ = this.lookupMethodNode_;
if (lookupMethodNode__ != null) {
DispatchNode respondToMissingNode__ = this.respondToMissingNode_;
if (respondToMissingNode__ != null) {
LogicalClassNode logicalClassNode__ = this.logicalClassNode_;
if (logicalClassNode__ != null) {
return getMethodObject(frameValue, arg0Value, arg1Value, arg2Value, INLINED_NAME_TO_JAVA_STRING_NODE_, lookupMethodNode__, INLINED_TO_SYMBOL_NODE_, respondToMissingNode__, INLINED_BOOLEAN_CAST_NODE_, INLINED_NOT_FOUND_PROFILE_, INLINED_RESPOND_TO_MISSING_PROFILE_, logicalClassNode__);
}
}
}
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(frameValue, arg0Value, arg1Value, arg2Value);
}
private RubyMethod executeAndSpecialize(Frame frameValue, Object arg0Value, Object arg1Value, DispatchConfiguration arg2Value) {
int state_0 = this.state_0_;
LookupMethodOnSelfNode lookupMethodNode__ = this.insert((LookupMethodOnSelfNode.create()));
Objects.requireNonNull(lookupMethodNode__, "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.lookupMethodNode_ = lookupMethodNode__;
DispatchNode respondToMissingNode__ = this.insert((DispatchNode.create()));
Objects.requireNonNull(respondToMissingNode__, "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.respondToMissingNode_ = respondToMissingNode__;
LogicalClassNode logicalClassNode__ = this.insert((LogicalClassNode.create()));
Objects.requireNonNull(logicalClassNode__, "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.logicalClassNode_ = logicalClassNode__;
state_0 = state_0 | 0b1 /* add SpecializationActive[GetMethodObjectNode.getMethodObject(Frame, Object, Object, DispatchConfiguration, NameToJavaStringNode, LookupMethodOnSelfNode, ToSymbolNode, DispatchNode, BooleanCastNode, InlinedConditionProfile, InlinedConditionProfile, LogicalClassNode)] */;
this.state_0_ = state_0;
return getMethodObject(frameValue, arg0Value, arg1Value, arg2Value, INLINED_NAME_TO_JAVA_STRING_NODE_, lookupMethodNode__, INLINED_TO_SYMBOL_NODE_, respondToMissingNode__, INLINED_BOOLEAN_CAST_NODE_, INLINED_NOT_FOUND_PROFILE_, INLINED_RESPOND_TO_MISSING_PROFILE_, logicalClassNode__);
}
@NeverDefault
public static GetMethodObjectNode create() {
return new GetMethodObjectNodeGen();
}
@NeverDefault
public static GetMethodObjectNode getUncached() {
return GetMethodObjectNodeGen.UNCACHED;
}
@GeneratedBy(GetMethodObjectNode.class)
@DenyReplace
private static final class Uncached extends GetMethodObjectNode implements UnadoptableNode {
@Override
public RubyMethod execute(Frame frameValue, Object arg0Value, Object arg1Value, DispatchConfiguration arg2Value) {
CompilerDirectives.transferToInterpreterAndInvalidate();
return getMethodObject(frameValue, arg0Value, arg1Value, arg2Value, (NameToJavaStringNodeGen.getUncached()), (LookupMethodOnSelfNodeGen.getUncached()), (ToSymbolNodeGen.getUncached()), (DispatchNode.getUncached()), (BooleanCastNodeGen.getUncached()), (InlinedConditionProfile.getUncached()), (InlinedConditionProfile.getUncached()), (LogicalClassNode.getUncached()));
}
}
}