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

com.oracle.graal.python.lib.PyCallableCheckNodeGen Maven / Gradle / Ivy

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

import com.oracle.graal.python.builtins.PythonBuiltinClassType;
import com.oracle.graal.python.builtins.objects.function.PBuiltinFunction;
import com.oracle.graal.python.builtins.objects.function.PFunction;
import com.oracle.graal.python.builtins.objects.method.PBuiltinMethod;
import com.oracle.graal.python.builtins.objects.method.PMethod;
import com.oracle.graal.python.builtins.objects.type.PythonBuiltinClass;
import com.oracle.graal.python.builtins.objects.type.PythonClass;
import com.oracle.graal.python.builtins.objects.type.SpecialMethodSlot;
import com.oracle.graal.python.nodes.attributes.LookupCallableSlotInMRONode;
import com.oracle.graal.python.nodes.object.GetClassNode;
import com.oracle.graal.python.nodes.object.GetClassNodeGen;
import com.oracle.graal.python.nodes.util.LazyInteropLibrary;
import com.oracle.graal.python.nodes.util.LazyInteropLibraryNodeGen;
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.GeneratedBy;
import com.oracle.truffle.api.dsl.NeverDefault;
import com.oracle.truffle.api.dsl.DSLSupport.SpecializationDataNode;
import com.oracle.truffle.api.dsl.InlineSupport.InlineTarget;
import com.oracle.truffle.api.dsl.InlineSupport.ReferenceField;
import com.oracle.truffle.api.dsl.InlineSupport.RequiredField;
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 java.lang.invoke.MethodHandles;
import java.lang.invoke.VarHandle;
import java.lang.invoke.MethodHandles.Lookup;
import java.util.Objects;

/**
 * Debug Info: 
 *   Specialization {@link PyCallableCheckNode#doFunction}
 *     Activation probability: 0.21250
 *     With/without class size: 6/0 bytes
 *   Specialization {@link PyCallableCheckNode#doMethod}
 *     Activation probability: 0.18750
 *     With/without class size: 6/0 bytes
 *   Specialization {@link PyCallableCheckNode#doBuiltinFunction}
 *     Activation probability: 0.16250
 *     With/without class size: 5/0 bytes
 *   Specialization {@link PyCallableCheckNode#doBuiltinMethod}
 *     Activation probability: 0.13750
 *     With/without class size: 5/0 bytes
 *   Specialization {@link PyCallableCheckNode#doClass}
 *     Activation probability: 0.11250
 *     With/without class size: 5/0 bytes
 *   Specialization {@link PyCallableCheckNode#doBuiltinClass}
 *     Activation probability: 0.08750
 *     With/without class size: 5/0 bytes
 *   Specialization {@link PyCallableCheckNode#doType}
 *     Activation probability: 0.06250
 *     With/without class size: 4/0 bytes
 *   Specialization {@link PyCallableCheckNode#doObject}
 *     Activation probability: 0.03750
 *     With/without class size: 5/15 bytes
 * 
*/ @GeneratedBy(PyCallableCheckNode.class) @SuppressWarnings({"javadoc", "unused"}) public final class PyCallableCheckNodeGen extends PyCallableCheckNode { private static final StateField FALLBACK__PY_CALLABLE_CHECK_NODE_FALLBACK_STATE_0_UPDATER = StateField.create(FallbackData.lookup_(), "fallback_state_0_"); /** * Source Info:
     *   Specialization: {@link PyCallableCheckNode#doObject}
     *   Parameter: {@link GetClassNode} getClassNode
     *   Inline method: {@link GetClassNodeGen#inline}
*/ private static final GetClassNode INLINED_FALLBACK_GET_CLASS_NODE_ = GetClassNodeGen.inline(InlineTarget.create(GetClassNode.class, FALLBACK__PY_CALLABLE_CHECK_NODE_FALLBACK_STATE_0_UPDATER.subUpdater(0, 17), ReferenceField.create(FallbackData.lookup_(), "fallback_getClassNode__field1_", Node.class))); /** * Source Info:
     *   Specialization: {@link PyCallableCheckNode#doObject}
     *   Parameter: {@link LazyInteropLibrary} lazyInteropLib
     *   Inline method: {@link LazyInteropLibraryNodeGen#inline}
*/ private static final LazyInteropLibrary INLINED_FALLBACK_LAZY_INTEROP_LIB_ = LazyInteropLibraryNodeGen.inline(InlineTarget.create(LazyInteropLibrary.class, FALLBACK__PY_CALLABLE_CHECK_NODE_FALLBACK_STATE_0_UPDATER.subUpdater(17, 1), ReferenceField.create(FallbackData.lookup_(), "fallback_lazyInteropLib__field1_", Node.class))); private static final Uncached UNCACHED = new Uncached(); /** * State Info:
     *   0: SpecializationActive {@link PyCallableCheckNode#doFunction}
     *   1: SpecializationActive {@link PyCallableCheckNode#doMethod}
     *   2: SpecializationActive {@link PyCallableCheckNode#doBuiltinFunction}
     *   3: SpecializationActive {@link PyCallableCheckNode#doBuiltinMethod}
     *   4: SpecializationActive {@link PyCallableCheckNode#doClass}
     *   5: SpecializationActive {@link PyCallableCheckNode#doBuiltinClass}
     *   6: SpecializationActive {@link PyCallableCheckNode#doType}
     *   7: SpecializationActive {@link PyCallableCheckNode#doObject}
     * 
*/ @CompilationFinal private int state_0_; @Child private FallbackData fallback_cache; private PyCallableCheckNodeGen() { } @SuppressWarnings("static-method") private boolean fallbackGuard_(int state_0, Node arg0Value, Object arg1Value) { if (!((state_0 & 0b1) != 0 /* is SpecializationActive[PyCallableCheckNode.doFunction(PFunction)] */) && arg1Value instanceof PFunction) { return false; } if (!((state_0 & 0b10) != 0 /* is SpecializationActive[PyCallableCheckNode.doMethod(PMethod)] */) && arg1Value instanceof PMethod) { return false; } if (!((state_0 & 0b100) != 0 /* is SpecializationActive[PyCallableCheckNode.doBuiltinFunction(PBuiltinFunction)] */) && arg1Value instanceof PBuiltinFunction) { return false; } if (!((state_0 & 0b1000) != 0 /* is SpecializationActive[PyCallableCheckNode.doBuiltinMethod(PBuiltinMethod)] */) && arg1Value instanceof PBuiltinMethod) { return false; } if (!((state_0 & 0b10000) != 0 /* is SpecializationActive[PyCallableCheckNode.doClass(PythonClass)] */) && arg1Value instanceof PythonClass) { return false; } if (!((state_0 & 0b100000) != 0 /* is SpecializationActive[PyCallableCheckNode.doBuiltinClass(PythonBuiltinClass)] */) && arg1Value instanceof PythonBuiltinClass) { return false; } if (!((state_0 & 0b1000000) != 0 /* is SpecializationActive[PyCallableCheckNode.doType(PythonBuiltinClassType)] */) && arg1Value instanceof PythonBuiltinClassType) { return false; } return true; } @Override public boolean execute(Node arg0Value, Object arg1Value) { int state_0 = this.state_0_; if (state_0 != 0 /* is SpecializationActive[PyCallableCheckNode.doFunction(PFunction)] || SpecializationActive[PyCallableCheckNode.doMethod(PMethod)] || SpecializationActive[PyCallableCheckNode.doBuiltinFunction(PBuiltinFunction)] || SpecializationActive[PyCallableCheckNode.doBuiltinMethod(PBuiltinMethod)] || SpecializationActive[PyCallableCheckNode.doClass(PythonClass)] || SpecializationActive[PyCallableCheckNode.doBuiltinClass(PythonBuiltinClass)] || SpecializationActive[PyCallableCheckNode.doType(PythonBuiltinClassType)] || SpecializationActive[PyCallableCheckNode.doObject(Node, Object, GetClassNode, LazyInteropLibrary, LookupCallableSlotInMRONode)] */) { if ((state_0 & 0b1) != 0 /* is SpecializationActive[PyCallableCheckNode.doFunction(PFunction)] */ && arg1Value instanceof PFunction) { PFunction arg1Value_ = (PFunction) arg1Value; return PyCallableCheckNode.doFunction(arg1Value_); } if ((state_0 & 0b10) != 0 /* is SpecializationActive[PyCallableCheckNode.doMethod(PMethod)] */ && arg1Value instanceof PMethod) { PMethod arg1Value_ = (PMethod) arg1Value; return PyCallableCheckNode.doMethod(arg1Value_); } if ((state_0 & 0b100) != 0 /* is SpecializationActive[PyCallableCheckNode.doBuiltinFunction(PBuiltinFunction)] */ && arg1Value instanceof PBuiltinFunction) { PBuiltinFunction arg1Value_ = (PBuiltinFunction) arg1Value; return PyCallableCheckNode.doBuiltinFunction(arg1Value_); } if ((state_0 & 0b1000) != 0 /* is SpecializationActive[PyCallableCheckNode.doBuiltinMethod(PBuiltinMethod)] */ && arg1Value instanceof PBuiltinMethod) { PBuiltinMethod arg1Value_ = (PBuiltinMethod) arg1Value; return PyCallableCheckNode.doBuiltinMethod(arg1Value_); } if ((state_0 & 0b10000) != 0 /* is SpecializationActive[PyCallableCheckNode.doClass(PythonClass)] */ && arg1Value instanceof PythonClass) { PythonClass arg1Value_ = (PythonClass) arg1Value; return PyCallableCheckNode.doClass(arg1Value_); } if ((state_0 & 0b100000) != 0 /* is SpecializationActive[PyCallableCheckNode.doBuiltinClass(PythonBuiltinClass)] */ && arg1Value instanceof PythonBuiltinClass) { PythonBuiltinClass arg1Value_ = (PythonBuiltinClass) arg1Value; return PyCallableCheckNode.doBuiltinClass(arg1Value_); } if ((state_0 & 0b1000000) != 0 /* is SpecializationActive[PyCallableCheckNode.doType(PythonBuiltinClassType)] */ && arg1Value instanceof PythonBuiltinClassType) { PythonBuiltinClassType arg1Value_ = (PythonBuiltinClassType) arg1Value; return PyCallableCheckNode.doType(arg1Value_); } if ((state_0 & 0b10000000) != 0 /* is SpecializationActive[PyCallableCheckNode.doObject(Node, Object, GetClassNode, LazyInteropLibrary, LookupCallableSlotInMRONode)] */) { FallbackData s7_ = this.fallback_cache; if (s7_ != null) { if (fallbackGuard_(state_0, arg0Value, arg1Value)) { return PyCallableCheckNode.doObject(s7_, arg1Value, INLINED_FALLBACK_GET_CLASS_NODE_, INLINED_FALLBACK_LAZY_INTEROP_LIB_, s7_.lookupCall_); } } } } CompilerDirectives.transferToInterpreterAndInvalidate(); return executeAndSpecialize(arg0Value, arg1Value); } private boolean executeAndSpecialize(Node arg0Value, Object arg1Value) { int state_0 = this.state_0_; if (arg1Value instanceof PFunction) { PFunction arg1Value_ = (PFunction) arg1Value; state_0 = state_0 | 0b1 /* add SpecializationActive[PyCallableCheckNode.doFunction(PFunction)] */; this.state_0_ = state_0; return PyCallableCheckNode.doFunction(arg1Value_); } if (arg1Value instanceof PMethod) { PMethod arg1Value_ = (PMethod) arg1Value; state_0 = state_0 | 0b10 /* add SpecializationActive[PyCallableCheckNode.doMethod(PMethod)] */; this.state_0_ = state_0; return PyCallableCheckNode.doMethod(arg1Value_); } if (arg1Value instanceof PBuiltinFunction) { PBuiltinFunction arg1Value_ = (PBuiltinFunction) arg1Value; state_0 = state_0 | 0b100 /* add SpecializationActive[PyCallableCheckNode.doBuiltinFunction(PBuiltinFunction)] */; this.state_0_ = state_0; return PyCallableCheckNode.doBuiltinFunction(arg1Value_); } if (arg1Value instanceof PBuiltinMethod) { PBuiltinMethod arg1Value_ = (PBuiltinMethod) arg1Value; state_0 = state_0 | 0b1000 /* add SpecializationActive[PyCallableCheckNode.doBuiltinMethod(PBuiltinMethod)] */; this.state_0_ = state_0; return PyCallableCheckNode.doBuiltinMethod(arg1Value_); } if (arg1Value instanceof PythonClass) { PythonClass arg1Value_ = (PythonClass) arg1Value; state_0 = state_0 | 0b10000 /* add SpecializationActive[PyCallableCheckNode.doClass(PythonClass)] */; this.state_0_ = state_0; return PyCallableCheckNode.doClass(arg1Value_); } if (arg1Value instanceof PythonBuiltinClass) { PythonBuiltinClass arg1Value_ = (PythonBuiltinClass) arg1Value; state_0 = state_0 | 0b100000 /* add SpecializationActive[PyCallableCheckNode.doBuiltinClass(PythonBuiltinClass)] */; this.state_0_ = state_0; return PyCallableCheckNode.doBuiltinClass(arg1Value_); } if (arg1Value instanceof PythonBuiltinClassType) { PythonBuiltinClassType arg1Value_ = (PythonBuiltinClassType) arg1Value; state_0 = state_0 | 0b1000000 /* add SpecializationActive[PyCallableCheckNode.doType(PythonBuiltinClassType)] */; this.state_0_ = state_0; return PyCallableCheckNode.doType(arg1Value_); } FallbackData s7_ = this.insert(new FallbackData()); LookupCallableSlotInMRONode lookupCall__ = s7_.insert((LookupCallableSlotInMRONode.create(SpecialMethodSlot.Call))); Objects.requireNonNull(lookupCall__, "Specialization 'doObject(Node, Object, GetClassNode, LazyInteropLibrary, LookupCallableSlotInMRONode)' cache 'lookupCall' 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'."); s7_.lookupCall_ = lookupCall__; VarHandle.storeStoreFence(); this.fallback_cache = s7_; state_0 = state_0 | 0b10000000 /* add SpecializationActive[PyCallableCheckNode.doObject(Node, Object, GetClassNode, LazyInteropLibrary, LookupCallableSlotInMRONode)] */; this.state_0_ = state_0; return PyCallableCheckNode.doObject(s7_, arg1Value, INLINED_FALLBACK_GET_CLASS_NODE_, INLINED_FALLBACK_LAZY_INTEROP_LIB_, lookupCall__); } @Override public NodeCost getCost() { int state_0 = this.state_0_; if (state_0 == 0) { return NodeCost.UNINITIALIZED; } else { if ((state_0 & (state_0 - 1)) == 0 /* is-single */) { return NodeCost.MONOMORPHIC; } } return NodeCost.POLYMORPHIC; } @NeverDefault public static PyCallableCheckNode create() { return new PyCallableCheckNodeGen(); } @NeverDefault public static PyCallableCheckNode getUncached() { return PyCallableCheckNodeGen.UNCACHED; } /** * Required Fields:
    *
  • {@link Inlined#state_0_} *
  • {@link Inlined#fallback_cache} *
*/ @NeverDefault public static PyCallableCheckNode inline(@RequiredField(bits = 8, value = StateField.class)@RequiredField(type = Node.class, value = ReferenceField.class) InlineTarget target) { return new PyCallableCheckNodeGen.Inlined(target); } @GeneratedBy(PyCallableCheckNode.class) @DenyReplace private static final class Inlined extends PyCallableCheckNode { /** * State Info:
         *   0: SpecializationActive {@link PyCallableCheckNode#doFunction}
         *   1: SpecializationActive {@link PyCallableCheckNode#doMethod}
         *   2: SpecializationActive {@link PyCallableCheckNode#doBuiltinFunction}
         *   3: SpecializationActive {@link PyCallableCheckNode#doBuiltinMethod}
         *   4: SpecializationActive {@link PyCallableCheckNode#doClass}
         *   5: SpecializationActive {@link PyCallableCheckNode#doBuiltinClass}
         *   6: SpecializationActive {@link PyCallableCheckNode#doType}
         *   7: SpecializationActive {@link PyCallableCheckNode#doObject}
         * 
*/ private final StateField state_0_; private final ReferenceField fallback_cache; /** * Source Info:
         *   Specialization: {@link PyCallableCheckNode#doObject}
         *   Parameter: {@link GetClassNode} getClassNode
         *   Inline method: {@link GetClassNodeGen#inline}
*/ private final GetClassNode fallback_getClassNode_; /** * Source Info:
         *   Specialization: {@link PyCallableCheckNode#doObject}
         *   Parameter: {@link LazyInteropLibrary} lazyInteropLib
         *   Inline method: {@link LazyInteropLibraryNodeGen#inline}
*/ private final LazyInteropLibrary fallback_lazyInteropLib_; @SuppressWarnings("unchecked") private Inlined(InlineTarget target) { assert target.getTargetClass().isAssignableFrom(PyCallableCheckNode.class); this.state_0_ = target.getState(0, 8); this.fallback_cache = target.getReference(1, FallbackData.class); this.fallback_getClassNode_ = GetClassNodeGen.inline(InlineTarget.create(GetClassNode.class, FALLBACK__PY_CALLABLE_CHECK_NODE_FALLBACK_STATE_0_UPDATER.subUpdater(0, 17), ReferenceField.create(FallbackData.lookup_(), "fallback_getClassNode__field1_", Node.class))); this.fallback_lazyInteropLib_ = LazyInteropLibraryNodeGen.inline(InlineTarget.create(LazyInteropLibrary.class, FALLBACK__PY_CALLABLE_CHECK_NODE_FALLBACK_STATE_0_UPDATER.subUpdater(17, 1), ReferenceField.create(FallbackData.lookup_(), "fallback_lazyInteropLib__field1_", Node.class))); } @SuppressWarnings("static-method") private boolean fallbackGuard_(int state_0, Node arg0Value, Object arg1Value) { if (!((state_0 & 0b1) != 0 /* is SpecializationActive[PyCallableCheckNode.doFunction(PFunction)] */) && arg1Value instanceof PFunction) { return false; } if (!((state_0 & 0b10) != 0 /* is SpecializationActive[PyCallableCheckNode.doMethod(PMethod)] */) && arg1Value instanceof PMethod) { return false; } if (!((state_0 & 0b100) != 0 /* is SpecializationActive[PyCallableCheckNode.doBuiltinFunction(PBuiltinFunction)] */) && arg1Value instanceof PBuiltinFunction) { return false; } if (!((state_0 & 0b1000) != 0 /* is SpecializationActive[PyCallableCheckNode.doBuiltinMethod(PBuiltinMethod)] */) && arg1Value instanceof PBuiltinMethod) { return false; } if (!((state_0 & 0b10000) != 0 /* is SpecializationActive[PyCallableCheckNode.doClass(PythonClass)] */) && arg1Value instanceof PythonClass) { return false; } if (!((state_0 & 0b100000) != 0 /* is SpecializationActive[PyCallableCheckNode.doBuiltinClass(PythonBuiltinClass)] */) && arg1Value instanceof PythonBuiltinClass) { return false; } if (!((state_0 & 0b1000000) != 0 /* is SpecializationActive[PyCallableCheckNode.doType(PythonBuiltinClassType)] */) && arg1Value instanceof PythonBuiltinClassType) { return false; } return true; } @Override public boolean execute(Node arg0Value, Object arg1Value) { int state_0 = this.state_0_.get(arg0Value); if (state_0 != 0 /* is SpecializationActive[PyCallableCheckNode.doFunction(PFunction)] || SpecializationActive[PyCallableCheckNode.doMethod(PMethod)] || SpecializationActive[PyCallableCheckNode.doBuiltinFunction(PBuiltinFunction)] || SpecializationActive[PyCallableCheckNode.doBuiltinMethod(PBuiltinMethod)] || SpecializationActive[PyCallableCheckNode.doClass(PythonClass)] || SpecializationActive[PyCallableCheckNode.doBuiltinClass(PythonBuiltinClass)] || SpecializationActive[PyCallableCheckNode.doType(PythonBuiltinClassType)] || SpecializationActive[PyCallableCheckNode.doObject(Node, Object, GetClassNode, LazyInteropLibrary, LookupCallableSlotInMRONode)] */) { if ((state_0 & 0b1) != 0 /* is SpecializationActive[PyCallableCheckNode.doFunction(PFunction)] */ && arg1Value instanceof PFunction) { PFunction arg1Value_ = (PFunction) arg1Value; return PyCallableCheckNode.doFunction(arg1Value_); } if ((state_0 & 0b10) != 0 /* is SpecializationActive[PyCallableCheckNode.doMethod(PMethod)] */ && arg1Value instanceof PMethod) { PMethod arg1Value_ = (PMethod) arg1Value; return PyCallableCheckNode.doMethod(arg1Value_); } if ((state_0 & 0b100) != 0 /* is SpecializationActive[PyCallableCheckNode.doBuiltinFunction(PBuiltinFunction)] */ && arg1Value instanceof PBuiltinFunction) { PBuiltinFunction arg1Value_ = (PBuiltinFunction) arg1Value; return PyCallableCheckNode.doBuiltinFunction(arg1Value_); } if ((state_0 & 0b1000) != 0 /* is SpecializationActive[PyCallableCheckNode.doBuiltinMethod(PBuiltinMethod)] */ && arg1Value instanceof PBuiltinMethod) { PBuiltinMethod arg1Value_ = (PBuiltinMethod) arg1Value; return PyCallableCheckNode.doBuiltinMethod(arg1Value_); } if ((state_0 & 0b10000) != 0 /* is SpecializationActive[PyCallableCheckNode.doClass(PythonClass)] */ && arg1Value instanceof PythonClass) { PythonClass arg1Value_ = (PythonClass) arg1Value; return PyCallableCheckNode.doClass(arg1Value_); } if ((state_0 & 0b100000) != 0 /* is SpecializationActive[PyCallableCheckNode.doBuiltinClass(PythonBuiltinClass)] */ && arg1Value instanceof PythonBuiltinClass) { PythonBuiltinClass arg1Value_ = (PythonBuiltinClass) arg1Value; return PyCallableCheckNode.doBuiltinClass(arg1Value_); } if ((state_0 & 0b1000000) != 0 /* is SpecializationActive[PyCallableCheckNode.doType(PythonBuiltinClassType)] */ && arg1Value instanceof PythonBuiltinClassType) { PythonBuiltinClassType arg1Value_ = (PythonBuiltinClassType) arg1Value; return PyCallableCheckNode.doType(arg1Value_); } if ((state_0 & 0b10000000) != 0 /* is SpecializationActive[PyCallableCheckNode.doObject(Node, Object, GetClassNode, LazyInteropLibrary, LookupCallableSlotInMRONode)] */) { FallbackData s7_ = this.fallback_cache.get(arg0Value); if (s7_ != null) { if (fallbackGuard_(state_0, arg0Value, arg1Value)) { return PyCallableCheckNode.doObject(s7_, arg1Value, this.fallback_getClassNode_, this.fallback_lazyInteropLib_, s7_.lookupCall_); } } } } CompilerDirectives.transferToInterpreterAndInvalidate(); return executeAndSpecialize(arg0Value, arg1Value); } private boolean executeAndSpecialize(Node arg0Value, Object arg1Value) { int state_0 = this.state_0_.get(arg0Value); if (arg1Value instanceof PFunction) { PFunction arg1Value_ = (PFunction) arg1Value; state_0 = state_0 | 0b1 /* add SpecializationActive[PyCallableCheckNode.doFunction(PFunction)] */; this.state_0_.set(arg0Value, state_0); return PyCallableCheckNode.doFunction(arg1Value_); } if (arg1Value instanceof PMethod) { PMethod arg1Value_ = (PMethod) arg1Value; state_0 = state_0 | 0b10 /* add SpecializationActive[PyCallableCheckNode.doMethod(PMethod)] */; this.state_0_.set(arg0Value, state_0); return PyCallableCheckNode.doMethod(arg1Value_); } if (arg1Value instanceof PBuiltinFunction) { PBuiltinFunction arg1Value_ = (PBuiltinFunction) arg1Value; state_0 = state_0 | 0b100 /* add SpecializationActive[PyCallableCheckNode.doBuiltinFunction(PBuiltinFunction)] */; this.state_0_.set(arg0Value, state_0); return PyCallableCheckNode.doBuiltinFunction(arg1Value_); } if (arg1Value instanceof PBuiltinMethod) { PBuiltinMethod arg1Value_ = (PBuiltinMethod) arg1Value; state_0 = state_0 | 0b1000 /* add SpecializationActive[PyCallableCheckNode.doBuiltinMethod(PBuiltinMethod)] */; this.state_0_.set(arg0Value, state_0); return PyCallableCheckNode.doBuiltinMethod(arg1Value_); } if (arg1Value instanceof PythonClass) { PythonClass arg1Value_ = (PythonClass) arg1Value; state_0 = state_0 | 0b10000 /* add SpecializationActive[PyCallableCheckNode.doClass(PythonClass)] */; this.state_0_.set(arg0Value, state_0); return PyCallableCheckNode.doClass(arg1Value_); } if (arg1Value instanceof PythonBuiltinClass) { PythonBuiltinClass arg1Value_ = (PythonBuiltinClass) arg1Value; state_0 = state_0 | 0b100000 /* add SpecializationActive[PyCallableCheckNode.doBuiltinClass(PythonBuiltinClass)] */; this.state_0_.set(arg0Value, state_0); return PyCallableCheckNode.doBuiltinClass(arg1Value_); } if (arg1Value instanceof PythonBuiltinClassType) { PythonBuiltinClassType arg1Value_ = (PythonBuiltinClassType) arg1Value; state_0 = state_0 | 0b1000000 /* add SpecializationActive[PyCallableCheckNode.doType(PythonBuiltinClassType)] */; this.state_0_.set(arg0Value, state_0); return PyCallableCheckNode.doType(arg1Value_); } FallbackData s7_ = arg0Value.insert(new FallbackData()); LookupCallableSlotInMRONode lookupCall__ = s7_.insert((LookupCallableSlotInMRONode.create(SpecialMethodSlot.Call))); Objects.requireNonNull(lookupCall__, "Specialization 'doObject(Node, Object, GetClassNode, LazyInteropLibrary, LookupCallableSlotInMRONode)' cache 'lookupCall' 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'."); s7_.lookupCall_ = lookupCall__; VarHandle.storeStoreFence(); this.fallback_cache.set(arg0Value, s7_); state_0 = state_0 | 0b10000000 /* add SpecializationActive[PyCallableCheckNode.doObject(Node, Object, GetClassNode, LazyInteropLibrary, LookupCallableSlotInMRONode)] */; this.state_0_.set(arg0Value, state_0); return PyCallableCheckNode.doObject(s7_, arg1Value, this.fallback_getClassNode_, this.fallback_lazyInteropLib_, lookupCall__); } @Override public boolean isAdoptable() { return false; } } @GeneratedBy(PyCallableCheckNode.class) @DenyReplace private static final class FallbackData extends Node implements SpecializationDataNode { /** * State Info:
         *   0-16: InlinedCache
         *        Specialization: {@link PyCallableCheckNode#doObject}
         *        Parameter: {@link GetClassNode} getClassNode
         *        Inline method: {@link GetClassNodeGen#inline}
         *   17: InlinedCache
         *        Specialization: {@link PyCallableCheckNode#doObject}
         *        Parameter: {@link LazyInteropLibrary} lazyInteropLib
         *        Inline method: {@link LazyInteropLibraryNodeGen#inline}
         * 
*/ @CompilationFinal @UnsafeAccessedField private int fallback_state_0_; /** * Source Info:
         *   Specialization: {@link PyCallableCheckNode#doObject}
         *   Parameter: {@link GetClassNode} getClassNode
         *   Inline method: {@link GetClassNodeGen#inline}
         *   Inline field: {@link Node} field1
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node fallback_getClassNode__field1_; /** * Source Info:
         *   Specialization: {@link PyCallableCheckNode#doObject}
         *   Parameter: {@link LazyInteropLibrary} lazyInteropLib
         *   Inline method: {@link LazyInteropLibraryNodeGen#inline}
         *   Inline field: {@link Node} field1
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node fallback_lazyInteropLib__field1_; /** * Source Info:
         *   Specialization: {@link PyCallableCheckNode#doObject}
         *   Parameter: {@link LookupCallableSlotInMRONode} lookupCall
*/ @Child LookupCallableSlotInMRONode lookupCall_; FallbackData() { } @Override public NodeCost getCost() { return NodeCost.NONE; } private static Lookup lookup_() { return MethodHandles.lookup(); } } @GeneratedBy(PyCallableCheckNode.class) @DenyReplace private static final class Uncached extends PyCallableCheckNode { @TruffleBoundary @Override public boolean execute(Node arg0Value, Object arg1Value) { if (arg1Value instanceof PFunction) { PFunction arg1Value_ = (PFunction) arg1Value; return PyCallableCheckNode.doFunction(arg1Value_); } if (arg1Value instanceof PMethod) { PMethod arg1Value_ = (PMethod) arg1Value; return PyCallableCheckNode.doMethod(arg1Value_); } if (arg1Value instanceof PBuiltinFunction) { PBuiltinFunction arg1Value_ = (PBuiltinFunction) arg1Value; return PyCallableCheckNode.doBuiltinFunction(arg1Value_); } if (arg1Value instanceof PBuiltinMethod) { PBuiltinMethod arg1Value_ = (PBuiltinMethod) arg1Value; return PyCallableCheckNode.doBuiltinMethod(arg1Value_); } if (arg1Value instanceof PythonClass) { PythonClass arg1Value_ = (PythonClass) arg1Value; return PyCallableCheckNode.doClass(arg1Value_); } if (arg1Value instanceof PythonBuiltinClass) { PythonBuiltinClass arg1Value_ = (PythonBuiltinClass) arg1Value; return PyCallableCheckNode.doBuiltinClass(arg1Value_); } if (arg1Value instanceof PythonBuiltinClassType) { PythonBuiltinClassType arg1Value_ = (PythonBuiltinClassType) arg1Value; return PyCallableCheckNode.doType(arg1Value_); } return PyCallableCheckNode.doObject(arg0Value, arg1Value, (GetClassNode.getUncached()), (LazyInteropLibraryNodeGen.getUncached()), (LookupCallableSlotInMRONode.getUncached(SpecialMethodSlot.Call))); } @Override public NodeCost getCost() { return NodeCost.MEGAMORPHIC; } @Override public boolean isAdoptable() { return false; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy