com.oracle.graal.python.lib.GetMethodsFlagsNodeGen Maven / Gradle / Ivy
// CheckStyle: start generated
package com.oracle.graal.python.lib;
import com.oracle.graal.python.builtins.PythonBuiltinClassType;
import com.oracle.graal.python.builtins.objects.cext.PythonAbstractNativeObject;
import com.oracle.graal.python.builtins.objects.type.PythonManagedClass;
import com.oracle.truffle.api.Assumption;
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.library.LibraryFactory;
import com.oracle.truffle.api.nodes.DenyReplace;
import com.oracle.truffle.api.nodes.ExplodeLoop;
import com.oracle.truffle.api.nodes.Node;
import com.oracle.truffle.api.nodes.NodeCost;
import com.oracle.truffle.api.object.DynamicObjectLibrary;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.VarHandle;
import java.util.Objects;
/**
* Debug Info:
* Specialization {@link GetMethodsFlagsNode#pythonbuiltinclasstype}
* Activation probability: 0.32000
* With/without class size: 7/0 bytes
* Specialization {@link GetMethodsFlagsNode#pythonclasstype}
* Activation probability: 0.26000
* With/without class size: 7/0 bytes
* Specialization {@link GetMethodsFlagsNode#doNativeCached}
* Activation probability: 0.20000
* With/without class size: 9/12 bytes
* Specialization {@link GetMethodsFlagsNode#doNative}
* Activation probability: 0.14000
* With/without class size: 6/4 bytes
* Specialization {@link GetMethodsFlagsNode#zero}
* Activation probability: 0.08000
* With/without class size: 4/0 bytes
*
*/
@GeneratedBy(GetMethodsFlagsNode.class)
@SuppressWarnings({"javadoc", "unused"})
public final class GetMethodsFlagsNodeGen extends GetMethodsFlagsNode {
static final ReferenceField NATIVE_CACHED_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "nativeCached_cache", NativeCachedData.class);
private static final Uncached UNCACHED = new Uncached();
private static final LibraryFactory DYNAMIC_OBJECT_LIBRARY_ = LibraryFactory.resolve(DynamicObjectLibrary.class);
/**
* State Info:
* 0: SpecializationActive {@link GetMethodsFlagsNode#pythonbuiltinclasstype}
* 1: SpecializationActive {@link GetMethodsFlagsNode#pythonclasstype}
* 2: SpecializationActive {@link GetMethodsFlagsNode#doNativeCached}
* 3: SpecializationActive {@link GetMethodsFlagsNode#doNative}
* 4: SpecializationActive {@link GetMethodsFlagsNode#zero}
*
*/
@CompilationFinal private int state_0_;
@UnsafeAccessedField @CompilationFinal private NativeCachedData nativeCached_cache;
/**
* Source Info:
* Specialization: {@link GetMethodsFlagsNode#doNative}
* Parameter: {@link DynamicObjectLibrary} dynlib
*/
@Child private DynamicObjectLibrary native_dynlib_;
private GetMethodsFlagsNodeGen() {
}
@SuppressWarnings("static-method")
private boolean fallbackGuard_(int state_0, Node arg0Value, Object arg1Value) {
if (!((state_0 & 0b1) != 0 /* is SpecializationActive[GetMethodsFlagsNode.pythonbuiltinclasstype(PythonManagedClass)] */) && arg1Value instanceof PythonManagedClass) {
return false;
}
if (!((state_0 & 0b10) != 0 /* is SpecializationActive[GetMethodsFlagsNode.pythonclasstype(PythonBuiltinClassType)] */) && arg1Value instanceof PythonBuiltinClassType) {
return false;
}
if (!((state_0 & 0b1000) != 0 /* is SpecializationActive[GetMethodsFlagsNode.doNative(PythonAbstractNativeObject, DynamicObjectLibrary)] */) && arg1Value instanceof PythonAbstractNativeObject) {
return false;
}
return true;
}
@ExplodeLoop
@Override
public long execute(Node arg0Value, Object arg1Value) {
int state_0 = this.state_0_;
if (state_0 != 0 /* is SpecializationActive[GetMethodsFlagsNode.pythonbuiltinclasstype(PythonManagedClass)] || SpecializationActive[GetMethodsFlagsNode.pythonclasstype(PythonBuiltinClassType)] || SpecializationActive[GetMethodsFlagsNode.doNativeCached(PythonAbstractNativeObject, PythonAbstractNativeObject, long)] || SpecializationActive[GetMethodsFlagsNode.doNative(PythonAbstractNativeObject, DynamicObjectLibrary)] || SpecializationActive[GetMethodsFlagsNode.zero(Object)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[GetMethodsFlagsNode.pythonbuiltinclasstype(PythonManagedClass)] */ && arg1Value instanceof PythonManagedClass) {
PythonManagedClass arg1Value_ = (PythonManagedClass) arg1Value;
return GetMethodsFlagsNode.pythonbuiltinclasstype(arg1Value_);
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[GetMethodsFlagsNode.pythonclasstype(PythonBuiltinClassType)] */ && arg1Value instanceof PythonBuiltinClassType) {
PythonBuiltinClassType arg1Value_ = (PythonBuiltinClassType) arg1Value;
return GetMethodsFlagsNode.pythonclasstype(arg1Value_);
}
if ((state_0 & 0b1100) != 0 /* is SpecializationActive[GetMethodsFlagsNode.doNativeCached(PythonAbstractNativeObject, PythonAbstractNativeObject, long)] || SpecializationActive[GetMethodsFlagsNode.doNative(PythonAbstractNativeObject, DynamicObjectLibrary)] */ && arg1Value instanceof PythonAbstractNativeObject) {
PythonAbstractNativeObject arg1Value_ = (PythonAbstractNativeObject) arg1Value;
if ((state_0 & 0b100) != 0 /* is SpecializationActive[GetMethodsFlagsNode.doNativeCached(PythonAbstractNativeObject, PythonAbstractNativeObject, long)] */) {
NativeCachedData s2_ = this.nativeCached_cache;
while (s2_ != null) {
if (!Assumption.isValidAssumption(s2_.assumption0_)) {
CompilerDirectives.transferToInterpreterAndInvalidate();
removeNativeCached_(s2_);
return executeAndSpecialize(arg0Value, arg1Value_);
}
if ((s2_.cachedCls_ == arg1Value_)) {
return GetMethodsFlagsNode.doNativeCached(arg1Value_, s2_.cachedCls_, s2_.flags_);
}
s2_ = s2_.next_;
}
}
if ((state_0 & 0b1000) != 0 /* is SpecializationActive[GetMethodsFlagsNode.doNative(PythonAbstractNativeObject, DynamicObjectLibrary)] */) {
{
DynamicObjectLibrary dynlib__ = this.native_dynlib_;
if (dynlib__ != null) {
return GetMethodsFlagsNode.doNative(arg1Value_, dynlib__);
}
}
}
}
if ((state_0 & 0b10000) != 0 /* is SpecializationActive[GetMethodsFlagsNode.zero(Object)] */) {
if (fallbackGuard_(state_0, arg0Value, arg1Value)) {
return GetMethodsFlagsNode.zero(arg1Value);
}
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value);
}
private long executeAndSpecialize(Node arg0Value, Object arg1Value) {
int state_0 = this.state_0_;
if (arg1Value instanceof PythonManagedClass) {
PythonManagedClass arg1Value_ = (PythonManagedClass) arg1Value;
state_0 = state_0 | 0b1 /* add SpecializationActive[GetMethodsFlagsNode.pythonbuiltinclasstype(PythonManagedClass)] */;
this.state_0_ = state_0;
return GetMethodsFlagsNode.pythonbuiltinclasstype(arg1Value_);
}
if (arg1Value instanceof PythonBuiltinClassType) {
PythonBuiltinClassType arg1Value_ = (PythonBuiltinClassType) arg1Value;
state_0 = state_0 | 0b10 /* add SpecializationActive[GetMethodsFlagsNode.pythonclasstype(PythonBuiltinClassType)] */;
this.state_0_ = state_0;
return GetMethodsFlagsNode.pythonclasstype(arg1Value_);
}
if (arg1Value instanceof PythonAbstractNativeObject) {
PythonAbstractNativeObject arg1Value_ = (PythonAbstractNativeObject) arg1Value;
if (((state_0 & 0b1000)) == 0 /* is-not SpecializationActive[GetMethodsFlagsNode.doNative(PythonAbstractNativeObject, DynamicObjectLibrary)] */) {
while (true) {
int count2_ = 0;
NativeCachedData s2_ = NATIVE_CACHED_CACHE_UPDATER.getVolatile(this);
NativeCachedData s2_original = s2_;
while (s2_ != null) {
if ((s2_.cachedCls_ == arg1Value_) && Assumption.isValidAssumption(s2_.assumption0_)) {
break;
}
count2_++;
s2_ = s2_.next_;
}
if (s2_ == null) {
{
PythonAbstractNativeObject cachedCls__ = (arg1Value_);
// assert (s2_.cachedCls_ == arg1Value_);
Assumption assumption0 = (GetMethodsFlagsNode.nativeAssumption(cachedCls__));
if (Assumption.isValidAssumption(assumption0)) {
if (count2_ < (5)) {
s2_ = new NativeCachedData(s2_original);
s2_.cachedCls_ = cachedCls__;
s2_.flags_ = (GetMethodsFlagsNode.getMethodsFlags(arg1Value_));
s2_.assumption0_ = assumption0;
if (!NATIVE_CACHED_CACHE_UPDATER.compareAndSet(this, s2_original, s2_)) {
continue;
}
state_0 = state_0 | 0b100 /* add SpecializationActive[GetMethodsFlagsNode.doNativeCached(PythonAbstractNativeObject, PythonAbstractNativeObject, long)] */;
this.state_0_ = state_0;
}
}
}
}
if (s2_ != null) {
return GetMethodsFlagsNode.doNativeCached(arg1Value_, s2_.cachedCls_, s2_.flags_);
}
break;
}
}
DynamicObjectLibrary dynlib__ = this.insert((DYNAMIC_OBJECT_LIBRARY_.createDispatched(1)));
Objects.requireNonNull(dynlib__, "Specialization 'doNative(PythonAbstractNativeObject, DynamicObjectLibrary)' cache 'dynlib' 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.native_dynlib_ = dynlib__;
this.nativeCached_cache = null;
state_0 = state_0 & 0xfffffffb /* remove SpecializationActive[GetMethodsFlagsNode.doNativeCached(PythonAbstractNativeObject, PythonAbstractNativeObject, long)] */;
state_0 = state_0 | 0b1000 /* add SpecializationActive[GetMethodsFlagsNode.doNative(PythonAbstractNativeObject, DynamicObjectLibrary)] */;
this.state_0_ = state_0;
return GetMethodsFlagsNode.doNative(arg1Value_, dynlib__);
}
state_0 = state_0 | 0b10000 /* add SpecializationActive[GetMethodsFlagsNode.zero(Object)] */;
this.state_0_ = state_0;
return GetMethodsFlagsNode.zero(arg1Value);
}
@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 */) {
NativeCachedData s2_ = this.nativeCached_cache;
if ((s2_ == null || s2_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
}
return NodeCost.POLYMORPHIC;
}
void removeNativeCached_(NativeCachedData s2_) {
while (true) {
NativeCachedData cur = this.nativeCached_cache;
NativeCachedData original = cur;
NativeCachedData update = null;
while (cur != null) {
if (cur == s2_) {
if (cur == original) {
update = cur.next_;
} else {
update = original.remove(s2_);
}
break;
}
cur = cur.next_;
}
if (cur != null && !NATIVE_CACHED_CACHE_UPDATER.compareAndSet(this, original, update)) {
continue;
}
break;
}
}
@NeverDefault
public static GetMethodsFlagsNode create() {
return new GetMethodsFlagsNodeGen();
}
@NeverDefault
public static GetMethodsFlagsNode getUncached() {
return GetMethodsFlagsNodeGen.UNCACHED;
}
/**
* Required Fields:
* - {@link Inlined#state_0_}
*
- {@link Inlined#nativeCached_cache}
*
- {@link Inlined#native_dynlib_}
*
*/
@NeverDefault
public static GetMethodsFlagsNode inline(@RequiredField(bits = 5, value = StateField.class)@RequiredField(type = Object.class, value = ReferenceField.class)@RequiredField(type = Node.class, value = ReferenceField.class) InlineTarget target) {
return new GetMethodsFlagsNodeGen.Inlined(target);
}
@GeneratedBy(GetMethodsFlagsNode.class)
@DenyReplace
private static final class Inlined extends GetMethodsFlagsNode {
/**
* State Info:
* 0: SpecializationActive {@link GetMethodsFlagsNode#pythonbuiltinclasstype}
* 1: SpecializationActive {@link GetMethodsFlagsNode#pythonclasstype}
* 2: SpecializationActive {@link GetMethodsFlagsNode#doNativeCached}
* 3: SpecializationActive {@link GetMethodsFlagsNode#doNative}
* 4: SpecializationActive {@link GetMethodsFlagsNode#zero}
*
*/
private final StateField state_0_;
private final ReferenceField nativeCached_cache;
private final ReferenceField native_dynlib_;
@SuppressWarnings("unchecked")
private Inlined(InlineTarget target) {
assert target.getTargetClass().isAssignableFrom(GetMethodsFlagsNode.class);
this.state_0_ = target.getState(0, 5);
this.nativeCached_cache = target.getReference(1, NativeCachedData.class);
this.native_dynlib_ = target.getReference(2, DynamicObjectLibrary.class);
}
@SuppressWarnings("static-method")
private boolean fallbackGuard_(int state_0, Node arg0Value, Object arg1Value) {
if (!((state_0 & 0b1) != 0 /* is SpecializationActive[GetMethodsFlagsNode.pythonbuiltinclasstype(PythonManagedClass)] */) && arg1Value instanceof PythonManagedClass) {
return false;
}
if (!((state_0 & 0b10) != 0 /* is SpecializationActive[GetMethodsFlagsNode.pythonclasstype(PythonBuiltinClassType)] */) && arg1Value instanceof PythonBuiltinClassType) {
return false;
}
if (!((state_0 & 0b1000) != 0 /* is SpecializationActive[GetMethodsFlagsNode.doNative(PythonAbstractNativeObject, DynamicObjectLibrary)] */) && arg1Value instanceof PythonAbstractNativeObject) {
return false;
}
return true;
}
@ExplodeLoop
@Override
public long execute(Node arg0Value, Object arg1Value) {
int state_0 = this.state_0_.get(arg0Value);
if (state_0 != 0 /* is SpecializationActive[GetMethodsFlagsNode.pythonbuiltinclasstype(PythonManagedClass)] || SpecializationActive[GetMethodsFlagsNode.pythonclasstype(PythonBuiltinClassType)] || SpecializationActive[GetMethodsFlagsNode.doNativeCached(PythonAbstractNativeObject, PythonAbstractNativeObject, long)] || SpecializationActive[GetMethodsFlagsNode.doNative(PythonAbstractNativeObject, DynamicObjectLibrary)] || SpecializationActive[GetMethodsFlagsNode.zero(Object)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[GetMethodsFlagsNode.pythonbuiltinclasstype(PythonManagedClass)] */ && arg1Value instanceof PythonManagedClass) {
PythonManagedClass arg1Value_ = (PythonManagedClass) arg1Value;
return GetMethodsFlagsNode.pythonbuiltinclasstype(arg1Value_);
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[GetMethodsFlagsNode.pythonclasstype(PythonBuiltinClassType)] */ && arg1Value instanceof PythonBuiltinClassType) {
PythonBuiltinClassType arg1Value_ = (PythonBuiltinClassType) arg1Value;
return GetMethodsFlagsNode.pythonclasstype(arg1Value_);
}
if ((state_0 & 0b1100) != 0 /* is SpecializationActive[GetMethodsFlagsNode.doNativeCached(PythonAbstractNativeObject, PythonAbstractNativeObject, long)] || SpecializationActive[GetMethodsFlagsNode.doNative(PythonAbstractNativeObject, DynamicObjectLibrary)] */ && arg1Value instanceof PythonAbstractNativeObject) {
PythonAbstractNativeObject arg1Value_ = (PythonAbstractNativeObject) arg1Value;
if ((state_0 & 0b100) != 0 /* is SpecializationActive[GetMethodsFlagsNode.doNativeCached(PythonAbstractNativeObject, PythonAbstractNativeObject, long)] */) {
NativeCachedData s2_ = this.nativeCached_cache.get(arg0Value);
while (s2_ != null) {
if (!Assumption.isValidAssumption(s2_.assumption0_)) {
CompilerDirectives.transferToInterpreterAndInvalidate();
removeNativeCached_(arg0Value, s2_);
return executeAndSpecialize(arg0Value, arg1Value_);
}
if ((s2_.cachedCls_ == arg1Value_)) {
return GetMethodsFlagsNode.doNativeCached(arg1Value_, s2_.cachedCls_, s2_.flags_);
}
s2_ = s2_.next_;
}
}
if ((state_0 & 0b1000) != 0 /* is SpecializationActive[GetMethodsFlagsNode.doNative(PythonAbstractNativeObject, DynamicObjectLibrary)] */) {
{
DynamicObjectLibrary dynlib__ = this.native_dynlib_.get(arg0Value);
if (dynlib__ != null) {
return GetMethodsFlagsNode.doNative(arg1Value_, dynlib__);
}
}
}
}
if ((state_0 & 0b10000) != 0 /* is SpecializationActive[GetMethodsFlagsNode.zero(Object)] */) {
if (fallbackGuard_(state_0, arg0Value, arg1Value)) {
return GetMethodsFlagsNode.zero(arg1Value);
}
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value);
}
private long executeAndSpecialize(Node arg0Value, Object arg1Value) {
int state_0 = this.state_0_.get(arg0Value);
if (arg1Value instanceof PythonManagedClass) {
PythonManagedClass arg1Value_ = (PythonManagedClass) arg1Value;
state_0 = state_0 | 0b1 /* add SpecializationActive[GetMethodsFlagsNode.pythonbuiltinclasstype(PythonManagedClass)] */;
this.state_0_.set(arg0Value, state_0);
return GetMethodsFlagsNode.pythonbuiltinclasstype(arg1Value_);
}
if (arg1Value instanceof PythonBuiltinClassType) {
PythonBuiltinClassType arg1Value_ = (PythonBuiltinClassType) arg1Value;
state_0 = state_0 | 0b10 /* add SpecializationActive[GetMethodsFlagsNode.pythonclasstype(PythonBuiltinClassType)] */;
this.state_0_.set(arg0Value, state_0);
return GetMethodsFlagsNode.pythonclasstype(arg1Value_);
}
if (arg1Value instanceof PythonAbstractNativeObject) {
PythonAbstractNativeObject arg1Value_ = (PythonAbstractNativeObject) arg1Value;
if (((state_0 & 0b1000)) == 0 /* is-not SpecializationActive[GetMethodsFlagsNode.doNative(PythonAbstractNativeObject, DynamicObjectLibrary)] */) {
while (true) {
int count2_ = 0;
NativeCachedData s2_ = this.nativeCached_cache.getVolatile(arg0Value);
NativeCachedData s2_original = s2_;
while (s2_ != null) {
if ((s2_.cachedCls_ == arg1Value_) && Assumption.isValidAssumption(s2_.assumption0_)) {
break;
}
count2_++;
s2_ = s2_.next_;
}
if (s2_ == null) {
{
PythonAbstractNativeObject cachedCls__ = (arg1Value_);
// assert (s2_.cachedCls_ == arg1Value_);
Assumption assumption0 = (GetMethodsFlagsNode.nativeAssumption(cachedCls__));
if (Assumption.isValidAssumption(assumption0)) {
if (count2_ < (5)) {
s2_ = new NativeCachedData(s2_original);
s2_.cachedCls_ = cachedCls__;
s2_.flags_ = (GetMethodsFlagsNode.getMethodsFlags(arg1Value_));
s2_.assumption0_ = assumption0;
if (!this.nativeCached_cache.compareAndSet(arg0Value, s2_original, s2_)) {
continue;
}
state_0 = state_0 | 0b100 /* add SpecializationActive[GetMethodsFlagsNode.doNativeCached(PythonAbstractNativeObject, PythonAbstractNativeObject, long)] */;
this.state_0_.set(arg0Value, state_0);
}
}
}
}
if (s2_ != null) {
return GetMethodsFlagsNode.doNativeCached(arg1Value_, s2_.cachedCls_, s2_.flags_);
}
break;
}
}
DynamicObjectLibrary dynlib__ = arg0Value.insert((DYNAMIC_OBJECT_LIBRARY_.createDispatched(1)));
Objects.requireNonNull(dynlib__, "Specialization 'doNative(PythonAbstractNativeObject, DynamicObjectLibrary)' cache 'dynlib' 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.native_dynlib_.set(arg0Value, dynlib__);
this.nativeCached_cache.set(arg0Value, null);
state_0 = state_0 & 0xfffffffb /* remove SpecializationActive[GetMethodsFlagsNode.doNativeCached(PythonAbstractNativeObject, PythonAbstractNativeObject, long)] */;
state_0 = state_0 | 0b1000 /* add SpecializationActive[GetMethodsFlagsNode.doNative(PythonAbstractNativeObject, DynamicObjectLibrary)] */;
this.state_0_.set(arg0Value, state_0);
return GetMethodsFlagsNode.doNative(arg1Value_, dynlib__);
}
state_0 = state_0 | 0b10000 /* add SpecializationActive[GetMethodsFlagsNode.zero(Object)] */;
this.state_0_.set(arg0Value, state_0);
return GetMethodsFlagsNode.zero(arg1Value);
}
void removeNativeCached_(Node arg0Value, NativeCachedData s2_) {
while (true) {
NativeCachedData cur = this.nativeCached_cache.get(arg0Value);
NativeCachedData original = cur;
NativeCachedData update = null;
while (cur != null) {
if (cur == s2_) {
if (cur == original) {
update = cur.next_;
} else {
update = original.remove(s2_);
}
break;
}
cur = cur.next_;
}
if (cur != null && !this.nativeCached_cache.compareAndSet(arg0Value, original, update)) {
continue;
}
break;
}
}
@Override
public boolean isAdoptable() {
return false;
}
}
@GeneratedBy(GetMethodsFlagsNode.class)
@DenyReplace
private static final class NativeCachedData implements SpecializationDataNode {
@CompilationFinal final NativeCachedData next_;
/**
* Source Info:
* Specialization: {@link GetMethodsFlagsNode#doNativeCached}
* Parameter: {@link PythonAbstractNativeObject} cachedCls
*/
@CompilationFinal PythonAbstractNativeObject cachedCls_;
/**
* Source Info:
* Specialization: {@link GetMethodsFlagsNode#doNativeCached}
* Parameter: long flags
*/
@CompilationFinal long flags_;
@CompilationFinal Assumption assumption0_;
NativeCachedData(NativeCachedData next_) {
this.next_ = next_;
}
NativeCachedData remove(NativeCachedData search) {
NativeCachedData newNext = this.next_;
if (newNext != null) {
if (search == newNext) {
newNext = newNext.next_;
} else {
newNext = newNext.remove(search);
}
}
NativeCachedData copy = new NativeCachedData(newNext);
copy.cachedCls_ = this.cachedCls_;
copy.flags_ = this.flags_;
copy.assumption0_ = this.assumption0_;
return copy;
}
}
@GeneratedBy(GetMethodsFlagsNode.class)
@DenyReplace
private static final class Uncached extends GetMethodsFlagsNode {
@TruffleBoundary
@Override
public long execute(Node arg0Value, Object arg1Value) {
if (arg1Value instanceof PythonManagedClass) {
PythonManagedClass arg1Value_ = (PythonManagedClass) arg1Value;
return GetMethodsFlagsNode.pythonbuiltinclasstype(arg1Value_);
}
if (arg1Value instanceof PythonBuiltinClassType) {
PythonBuiltinClassType arg1Value_ = (PythonBuiltinClassType) arg1Value;
return GetMethodsFlagsNode.pythonclasstype(arg1Value_);
}
if (arg1Value instanceof PythonAbstractNativeObject) {
PythonAbstractNativeObject arg1Value_ = (PythonAbstractNativeObject) arg1Value;
return GetMethodsFlagsNode.doNative(arg1Value_, (DYNAMIC_OBJECT_LIBRARY_.getUncached()));
}
return GetMethodsFlagsNode.zero(arg1Value);
}
@Override
public NodeCost getCost() {
return NodeCost.MEGAMORPHIC;
}
@Override
public boolean isAdoptable() {
return false;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy