All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.oracle.graal.python.nodes.frame.ReadBuiltinNodeGen Maven / Gradle / Ivy

There is a newer version: 24.1.1
Show newest version
// CheckStyle: start generated
package com.oracle.graal.python.nodes.frame;

import com.oracle.graal.python.builtins.objects.module.PythonModule;
import com.oracle.graal.python.nodes.PNodeWithContext;
import com.oracle.graal.python.nodes.PRaiseNode.Lazy;
import com.oracle.graal.python.nodes.PRaiseNodeGen.LazyNodeGen;
import com.oracle.graal.python.nodes.attributes.ReadAttributeFromObjectNode;
import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.CompilerDirectives.CompilationFinal;
import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
import com.oracle.truffle.api.dsl.DSLSupport;
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.nodes.DenyReplace;
import com.oracle.truffle.api.nodes.Node;
import com.oracle.truffle.api.nodes.NodeCost;
import com.oracle.truffle.api.profiles.InlinedConditionProfile;
import com.oracle.truffle.api.strings.TruffleString;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.VarHandle;
import java.util.Objects;

/**
 * Debug Info: 
 *   Specialization {@link ReadBuiltinNode#returnBuiltinFromConstantModule}
 *     Activation probability: 0.65000
 *     With/without class size: 22/9 bytes
 *   Specialization {@link ReadBuiltinNode#returnBuiltin}
 *     Activation probability: 0.35000
 *     With/without class size: 12/5 bytes
 * 
*/ @GeneratedBy(ReadBuiltinNode.class) @SuppressWarnings("javadoc") final class ReadBuiltinNodeGen extends ReadBuiltinNode { private static final StateField STATE_0_ReadBuiltinNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_"); /** * Source Info:
     *   Specialization: {@link ReadBuiltinNode#returnBuiltinFromConstantModule}
     *   Parameter: {@link Lazy} raiseNode
     *   Inline method: {@link LazyNodeGen#inline}
*/ private static final Lazy INLINED_RETURN_BUILTIN_FROM_CONSTANT_MODULE_RAISE_NODE_ = LazyNodeGen.inline(InlineTarget.create(Lazy.class, STATE_0_ReadBuiltinNode_UPDATER.subUpdater(2, 1), ReferenceField.create(MethodHandles.lookup(), "returnBuiltinFromConstantModule_raiseNode__field1_", Node.class))); /** * Source Info:
     *   Specialization: {@link ReadBuiltinNode#returnBuiltinFromConstantModule}
     *   Parameter: {@link InlinedConditionProfile} isBuiltinProfile
     *   Inline method: {@link InlinedConditionProfile#inline}
*/ private static final InlinedConditionProfile INLINED_RETURN_BUILTIN_FROM_CONSTANT_MODULE_IS_BUILTIN_PROFILE_ = InlinedConditionProfile.inline(InlineTarget.create(InlinedConditionProfile.class, STATE_0_ReadBuiltinNode_UPDATER.subUpdater(3, 2))); /** * Source Info:
     *   Specialization: {@link ReadBuiltinNode#returnBuiltin}
     *   Parameter: {@link Lazy} raiseNode
     *   Inline method: {@link LazyNodeGen#inline}
*/ private static final Lazy INLINED_RETURN_BUILTIN_RAISE_NODE_ = LazyNodeGen.inline(InlineTarget.create(Lazy.class, STATE_0_ReadBuiltinNode_UPDATER.subUpdater(5, 1), ReferenceField.create(MethodHandles.lookup(), "returnBuiltin_raiseNode__field1_", Node.class))); /** * Source Info:
     *   Specialization: {@link ReadBuiltinNode#returnBuiltin}
     *   Parameter: {@link InlinedConditionProfile} isBuiltinProfile
     *   Inline method: {@link InlinedConditionProfile#inline}
*/ private static final InlinedConditionProfile INLINED_RETURN_BUILTIN_IS_BUILTIN_PROFILE_ = InlinedConditionProfile.inline(InlineTarget.create(InlinedConditionProfile.class, STATE_0_ReadBuiltinNode_UPDATER.subUpdater(6, 2))); /** * Source Info:
     *   Specialization: {@link ReadBuiltinNode#returnBuiltin}
     *   Parameter: {@link InlinedConditionProfile} ctxInitializedProfile
     *   Inline method: {@link InlinedConditionProfile#inline}
*/ private static final InlinedConditionProfile INLINED_RETURN_BUILTIN_CTX_INITIALIZED_PROFILE_ = InlinedConditionProfile.inline(InlineTarget.create(InlinedConditionProfile.class, STATE_0_ReadBuiltinNode_UPDATER.subUpdater(8, 2))); private static final Uncached UNCACHED = new Uncached(); /** * State Info:
     *   0: SpecializationActive {@link ReadBuiltinNode#returnBuiltinFromConstantModule}
     *   1: SpecializationActive {@link ReadBuiltinNode#returnBuiltin}
     *   2: InlinedCache
     *        Specialization: {@link ReadBuiltinNode#returnBuiltinFromConstantModule}
     *        Parameter: {@link Lazy} raiseNode
     *        Inline method: {@link LazyNodeGen#inline}
     *   3-4: InlinedCache
     *        Specialization: {@link ReadBuiltinNode#returnBuiltinFromConstantModule}
     *        Parameter: {@link InlinedConditionProfile} isBuiltinProfile
     *        Inline method: {@link InlinedConditionProfile#inline}
     *   5: InlinedCache
     *        Specialization: {@link ReadBuiltinNode#returnBuiltin}
     *        Parameter: {@link Lazy} raiseNode
     *        Inline method: {@link LazyNodeGen#inline}
     *   6-7: InlinedCache
     *        Specialization: {@link ReadBuiltinNode#returnBuiltin}
     *        Parameter: {@link InlinedConditionProfile} isBuiltinProfile
     *        Inline method: {@link InlinedConditionProfile#inline}
     *   8-9: InlinedCache
     *        Specialization: {@link ReadBuiltinNode#returnBuiltin}
     *        Parameter: {@link InlinedConditionProfile} ctxInitializedProfile
     *        Inline method: {@link InlinedConditionProfile#inline}
     * 
*/ @CompilationFinal @UnsafeAccessedField private int state_0_; /** * Source Info:
     *   Specialization: {@link ReadBuiltinNode#returnBuiltinFromConstantModule}
     *   Parameter: {@link ReadAttributeFromObjectNode} readFromBuiltinsNode
*/ @Child private ReadAttributeFromObjectNode readFromBuiltinsNode; /** * Source Info:
     *   Specialization: {@link ReadBuiltinNode#returnBuiltinFromConstantModule}
     *   Parameter: {@link Lazy} raiseNode
     *   Inline method: {@link LazyNodeGen#inline}
     *   Inline field: {@link Node} field1
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node returnBuiltinFromConstantModule_raiseNode__field1_; /** * Source Info:
     *   Specialization: {@link ReadBuiltinNode#returnBuiltinFromConstantModule}
     *   Parameter: {@link PythonModule} builtins
*/ @CompilationFinal private PythonModule returnBuiltinFromConstantModule_builtins_; /** * Source Info:
     *   Specialization: {@link ReadBuiltinNode#returnBuiltin}
     *   Parameter: {@link Lazy} raiseNode
     *   Inline method: {@link LazyNodeGen#inline}
     *   Inline field: {@link Node} field1
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node returnBuiltin_raiseNode__field1_; private ReadBuiltinNodeGen() { } @Override public Object execute(TruffleString arg0Value) { int state_0 = this.state_0_; if ((state_0 & 0b11) != 0 /* is SpecializationActive[ReadBuiltinNode.returnBuiltinFromConstantModule(TruffleString, Node, Lazy, InlinedConditionProfile, ReadAttributeFromObjectNode, PythonModule)] || SpecializationActive[ReadBuiltinNode.returnBuiltin(TruffleString, Node, Lazy, InlinedConditionProfile, ReadAttributeFromObjectNode, InlinedConditionProfile)] */) { if ((state_0 & 0b1) != 0 /* is SpecializationActive[ReadBuiltinNode.returnBuiltinFromConstantModule(TruffleString, Node, Lazy, InlinedConditionProfile, ReadAttributeFromObjectNode, PythonModule)] */) { { ReadAttributeFromObjectNode readFromBuiltinsNode_ = this.readFromBuiltinsNode; if (readFromBuiltinsNode_ != null) { PythonModule builtins__ = this.returnBuiltinFromConstantModule_builtins_; if (builtins__ != null) { Node inliningTarget__ = (this); assert DSLSupport.assertIdempotence((PNodeWithContext.isSingleContext(this))); return returnBuiltinFromConstantModule(arg0Value, inliningTarget__, INLINED_RETURN_BUILTIN_FROM_CONSTANT_MODULE_RAISE_NODE_, INLINED_RETURN_BUILTIN_FROM_CONSTANT_MODULE_IS_BUILTIN_PROFILE_, readFromBuiltinsNode_, builtins__); } } } } if ((state_0 & 0b10) != 0 /* is SpecializationActive[ReadBuiltinNode.returnBuiltin(TruffleString, Node, Lazy, InlinedConditionProfile, ReadAttributeFromObjectNode, InlinedConditionProfile)] */) { { ReadAttributeFromObjectNode readFromBuiltinsNode_1 = this.readFromBuiltinsNode; if (readFromBuiltinsNode_1 != null) { Node inliningTarget__1 = (this); return returnBuiltin(arg0Value, inliningTarget__1, INLINED_RETURN_BUILTIN_RAISE_NODE_, INLINED_RETURN_BUILTIN_IS_BUILTIN_PROFILE_, readFromBuiltinsNode_1, INLINED_RETURN_BUILTIN_CTX_INITIALIZED_PROFILE_); } } } } CompilerDirectives.transferToInterpreterAndInvalidate(); return executeAndSpecialize(arg0Value); } private Object executeAndSpecialize(TruffleString arg0Value) { int state_0 = this.state_0_; { Node inliningTarget__ = null; if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[ReadBuiltinNode.returnBuiltin(TruffleString, Node, Lazy, InlinedConditionProfile, ReadAttributeFromObjectNode, InlinedConditionProfile)] */) { if ((PNodeWithContext.isSingleContext(this))) { inliningTarget__ = (this); ReadAttributeFromObjectNode readFromBuiltinsNode_; ReadAttributeFromObjectNode readFromBuiltinsNode__shared = this.readFromBuiltinsNode; if (readFromBuiltinsNode__shared != null) { readFromBuiltinsNode_ = readFromBuiltinsNode__shared; } else { readFromBuiltinsNode_ = this.insert((ReadAttributeFromObjectNode.create())); if (readFromBuiltinsNode_ == null) { throw new IllegalStateException("Specialization 'returnBuiltinFromConstantModule(TruffleString, Node, Lazy, InlinedConditionProfile, ReadAttributeFromObjectNode, PythonModule)' contains a shared cache with name 'readFromBuiltinsNode' that returned a default value for the cached initializer. Default values are not supported for shared cached initializers because the default value is reserved for the uninitialized state."); } } if (this.readFromBuiltinsNode == null) { VarHandle.storeStoreFence(); this.readFromBuiltinsNode = readFromBuiltinsNode_; } PythonModule builtins__ = (getBuiltins()); Objects.requireNonNull(builtins__, "Specialization 'returnBuiltinFromConstantModule(TruffleString, Node, Lazy, InlinedConditionProfile, ReadAttributeFromObjectNode, PythonModule)' cache 'builtins' returned a 'null' 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 'null'."); VarHandle.storeStoreFence(); this.returnBuiltinFromConstantModule_builtins_ = builtins__; state_0 = state_0 | 0b1 /* add SpecializationActive[ReadBuiltinNode.returnBuiltinFromConstantModule(TruffleString, Node, Lazy, InlinedConditionProfile, ReadAttributeFromObjectNode, PythonModule)] */; this.state_0_ = state_0; return returnBuiltinFromConstantModule(arg0Value, inliningTarget__, INLINED_RETURN_BUILTIN_FROM_CONSTANT_MODULE_RAISE_NODE_, INLINED_RETURN_BUILTIN_FROM_CONSTANT_MODULE_IS_BUILTIN_PROFILE_, readFromBuiltinsNode_, builtins__); } } } { Node inliningTarget__1 = null; inliningTarget__1 = (this); ReadAttributeFromObjectNode readFromBuiltinsNode_1; ReadAttributeFromObjectNode readFromBuiltinsNode_1_shared = this.readFromBuiltinsNode; if (readFromBuiltinsNode_1_shared != null) { readFromBuiltinsNode_1 = readFromBuiltinsNode_1_shared; } else { readFromBuiltinsNode_1 = this.insert((ReadAttributeFromObjectNode.create())); if (readFromBuiltinsNode_1 == null) { throw new IllegalStateException("Specialization 'returnBuiltin(TruffleString, Node, Lazy, InlinedConditionProfile, ReadAttributeFromObjectNode, InlinedConditionProfile)' contains a shared cache with name 'readFromBuiltinsNode' that returned a default value for the cached initializer. Default values are not supported for shared cached initializers because the default value is reserved for the uninitialized state."); } } if (this.readFromBuiltinsNode == null) { VarHandle.storeStoreFence(); this.readFromBuiltinsNode = readFromBuiltinsNode_1; } this.returnBuiltinFromConstantModule_builtins_ = null; state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[ReadBuiltinNode.returnBuiltinFromConstantModule(TruffleString, Node, Lazy, InlinedConditionProfile, ReadAttributeFromObjectNode, PythonModule)] */; state_0 = state_0 | 0b10 /* add SpecializationActive[ReadBuiltinNode.returnBuiltin(TruffleString, Node, Lazy, InlinedConditionProfile, ReadAttributeFromObjectNode, InlinedConditionProfile)] */; this.state_0_ = state_0; return returnBuiltin(arg0Value, inliningTarget__1, INLINED_RETURN_BUILTIN_RAISE_NODE_, INLINED_RETURN_BUILTIN_IS_BUILTIN_PROFILE_, readFromBuiltinsNode_1, INLINED_RETURN_BUILTIN_CTX_INITIALIZED_PROFILE_); } } @Override public NodeCost getCost() { int state_0 = this.state_0_; if ((state_0 & 0b11) == 0) { return NodeCost.UNINITIALIZED; } else { if (((state_0 & 0b11) & ((state_0 & 0b11) - 1)) == 0 /* is-single */) { return NodeCost.MONOMORPHIC; } } return NodeCost.POLYMORPHIC; } @NeverDefault public static ReadBuiltinNode create() { return new ReadBuiltinNodeGen(); } @NeverDefault public static ReadBuiltinNode getUncached() { return ReadBuiltinNodeGen.UNCACHED; } @GeneratedBy(ReadBuiltinNode.class) @DenyReplace private static final class Uncached extends ReadBuiltinNode { @TruffleBoundary @Override public Object execute(TruffleString arg0Value) { return returnBuiltin(arg0Value, (this), (Lazy.getUncached()), (InlinedConditionProfile.getUncached()), (ReadAttributeFromObjectNode.getUncached()), (InlinedConditionProfile.getUncached())); } @Override public NodeCost getCost() { return NodeCost.MEGAMORPHIC; } @Override public boolean isAdoptable() { return false; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy