com.oracle.graal.python.nodes.attributes.WriteAttributeToDynamicObjectNodeGen Maven / Gradle / Ivy
// CheckStyle: start generated
package com.oracle.graal.python.nodes.attributes;
import com.oracle.graal.python.nodes.util.CastToTruffleStringNode;
import com.oracle.graal.python.nodes.util.CastToTruffleStringNodeGen;
import com.oracle.graal.python.runtime.PythonOptions;
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.UnsupportedSpecializationException;
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.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.DynamicObject;
import com.oracle.truffle.api.object.DynamicObjectLibrary;
import com.oracle.truffle.api.object.HiddenKey;
import com.oracle.truffle.api.strings.TruffleString;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.VarHandle;
import java.lang.invoke.MethodHandles.Lookup;
import java.util.Objects;
/**
* Debug Info:
* Specialization {@link WriteAttributeToDynamicObjectNode#writeDirect}
* Activation probability: 0.32000
* With/without class size: 11/4 bytes
* Specialization {@link WriteAttributeToDynamicObjectNode#writeDirectHidden}
* Activation probability: 0.26000
* With/without class size: 10/4 bytes
* Specialization {@link WriteAttributeToDynamicObjectNode#writeDirectHidden}
* Activation probability: 0.20000
* With/without class size: 6/0 bytes
* Specialization {@link WriteAttributeToDynamicObjectNode#write}
* Activation probability: 0.14000
* With/without class size: 9/17 bytes
* Specialization {@link WriteAttributeToDynamicObjectNode#write}
* Activation probability: 0.08000
* With/without class size: 6/13 bytes
*
*/
@GeneratedBy(WriteAttributeToDynamicObjectNode.class)
@SuppressWarnings({"javadoc", "unused"})
public final class WriteAttributeToDynamicObjectNodeGen extends WriteAttributeToDynamicObjectNode {
private static final StateField WRITE0__WRITE_ATTRIBUTE_TO_DYNAMIC_OBJECT_NODE_WRITE0_STATE_0_UPDATER = StateField.create(Write0Data.lookup_(), "write0_state_0_");
private static final StateField WRITE1__WRITE_ATTRIBUTE_TO_DYNAMIC_OBJECT_NODE_WRITE1_STATE_0_UPDATER = StateField.create(Write1Data.lookup_(), "write1_state_0_");
static final ReferenceField WRITE_DIRECT_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "writeDirect_cache", WriteDirectData.class);
static final ReferenceField WRITE_DIRECT_HIDDEN0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "writeDirectHidden0_cache", WriteDirectHidden0Data.class);
static final ReferenceField WRITE0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "write0_cache", Write0Data.class);
/**
* Source Info:
* Specialization: {@link WriteAttributeToDynamicObjectNode#write}
* Parameter: {@link CastToTruffleStringNode} castNode
* Inline method: {@link CastToTruffleStringNodeGen#inline}
*/
private static final CastToTruffleStringNode INLINED_WRITE0_CAST_NODE_ = CastToTruffleStringNodeGen.inline(InlineTarget.create(CastToTruffleStringNode.class, WRITE0__WRITE_ATTRIBUTE_TO_DYNAMIC_OBJECT_NODE_WRITE0_STATE_0_UPDATER.subUpdater(0, 8), ReferenceField.create(Write0Data.lookup_(), "write0_castNode__field1_", Node.class), ReferenceField.create(Write0Data.lookup_(), "write0_castNode__field2_", Node.class), ReferenceField.create(Write0Data.lookup_(), "write0_castNode__field3_", Node.class)));
/**
* Source Info:
* Specialization: {@link WriteAttributeToDynamicObjectNode#write}
* Parameter: {@link CastToTruffleStringNode} castNode
* Inline method: {@link CastToTruffleStringNodeGen#inline}
*/
private static final CastToTruffleStringNode INLINED_WRITE1_CAST_NODE_ = CastToTruffleStringNodeGen.inline(InlineTarget.create(CastToTruffleStringNode.class, WRITE1__WRITE_ATTRIBUTE_TO_DYNAMIC_OBJECT_NODE_WRITE1_STATE_0_UPDATER.subUpdater(0, 8), ReferenceField.create(Write1Data.lookup_(), "write1_castNode__field1_", Node.class), ReferenceField.create(Write1Data.lookup_(), "write1_castNode__field2_", Node.class), ReferenceField.create(Write1Data.lookup_(), "write1_castNode__field3_", Node.class)));
private static final Uncached UNCACHED = new Uncached();
private static final LibraryFactory DYNAMIC_OBJECT_LIBRARY_ = LibraryFactory.resolve(DynamicObjectLibrary.class);
/**
* State Info:
* 0: SpecializationActive {@link WriteAttributeToDynamicObjectNode#writeDirect}
* 1: SpecializationActive {@link WriteAttributeToDynamicObjectNode#write}
* 2: SpecializationActive {@link WriteAttributeToDynamicObjectNode#write}
* 3: SpecializationActive {@link WriteAttributeToDynamicObjectNode#writeDirectHidden}
* 4: SpecializationActive {@link WriteAttributeToDynamicObjectNode#writeDirectHidden}
*
*/
@CompilationFinal private int state_0_;
@UnsafeAccessedField @Child private WriteDirectData writeDirect_cache;
@UnsafeAccessedField @Child private WriteDirectHidden0Data writeDirectHidden0_cache;
@UnsafeAccessedField @Child private Write0Data write0_cache;
@Child private Write1Data write1_cache;
private WriteAttributeToDynamicObjectNodeGen() {
}
@ExplodeLoop
@Override
public boolean execute(Object arg0Value, Object arg1Value, Object arg2Value) {
int state_0 = this.state_0_;
if (state_0 != 0 /* is SpecializationActive[WriteAttributeToDynamicObjectNode.writeDirect(DynamicObject, TruffleString, Object, DynamicObjectLibrary)] || SpecializationActive[WriteAttributeToDynamicObjectNode.writeDirectHidden(DynamicObject, HiddenKey, Object, DynamicObjectLibrary)] || SpecializationActive[WriteAttributeToDynamicObjectNode.writeDirectHidden(DynamicObject, HiddenKey, Object, DynamicObjectLibrary)] || SpecializationActive[WriteAttributeToDynamicObjectNode.write(DynamicObject, Object, Object, Node, CastToTruffleStringNode, DynamicObjectLibrary)] || SpecializationActive[WriteAttributeToDynamicObjectNode.write(DynamicObject, Object, Object, Node, CastToTruffleStringNode, DynamicObjectLibrary)] */ && arg0Value instanceof DynamicObject) {
DynamicObject arg0Value_ = (DynamicObject) arg0Value;
if ((state_0 & 0b1) != 0 /* is SpecializationActive[WriteAttributeToDynamicObjectNode.writeDirect(DynamicObject, TruffleString, Object, DynamicObjectLibrary)] */ && arg1Value instanceof TruffleString) {
TruffleString arg1Value_ = (TruffleString) arg1Value;
WriteDirectData s0_ = this.writeDirect_cache;
while (s0_ != null) {
if ((s0_.dylib_.accepts(arg0Value_))) {
return WriteAttributeToDynamicObjectNode.writeDirect(arg0Value_, arg1Value_, arg2Value, s0_.dylib_);
}
s0_ = s0_.next_;
}
}
if ((state_0 & 0b11000) != 0 /* is SpecializationActive[WriteAttributeToDynamicObjectNode.writeDirectHidden(DynamicObject, HiddenKey, Object, DynamicObjectLibrary)] || SpecializationActive[WriteAttributeToDynamicObjectNode.writeDirectHidden(DynamicObject, HiddenKey, Object, DynamicObjectLibrary)] */ && arg1Value instanceof HiddenKey) {
HiddenKey arg1Value_ = (HiddenKey) arg1Value;
if ((state_0 & 0b1000) != 0 /* is SpecializationActive[WriteAttributeToDynamicObjectNode.writeDirectHidden(DynamicObject, HiddenKey, Object, DynamicObjectLibrary)] */) {
WriteDirectHidden0Data s1_ = this.writeDirectHidden0_cache;
while (s1_ != null) {
if ((s1_.dylib_.accepts(arg0Value_))) {
return WriteAttributeToDynamicObjectNode.writeDirectHidden(arg0Value_, arg1Value_, arg2Value, s1_.dylib_);
}
s1_ = s1_.next_;
}
}
if ((state_0 & 0b10000) != 0 /* is SpecializationActive[WriteAttributeToDynamicObjectNode.writeDirectHidden(DynamicObject, HiddenKey, Object, DynamicObjectLibrary)] */) {
return this.writeDirectHidden1Boundary(state_0, arg0Value_, arg1Value_, arg2Value);
}
}
if ((state_0 & 0b110) != 0 /* is SpecializationActive[WriteAttributeToDynamicObjectNode.write(DynamicObject, Object, Object, Node, CastToTruffleStringNode, DynamicObjectLibrary)] || SpecializationActive[WriteAttributeToDynamicObjectNode.write(DynamicObject, Object, Object, Node, CastToTruffleStringNode, DynamicObjectLibrary)] */) {
if ((state_0 & 0b10) != 0 /* is SpecializationActive[WriteAttributeToDynamicObjectNode.write(DynamicObject, Object, Object, Node, CastToTruffleStringNode, DynamicObjectLibrary)] */) {
Write0Data s3_ = this.write0_cache;
while (s3_ != null) {
if ((s3_.dylib_.accepts(arg0Value_)) && (!(ObjectAttributeNode.isHiddenKey(arg1Value)))) {
Node inliningTarget__ = (s3_);
return WriteAttributeToDynamicObjectNode.write(arg0Value_, arg1Value, arg2Value, inliningTarget__, INLINED_WRITE0_CAST_NODE_, s3_.dylib_);
}
s3_ = s3_.next_;
}
}
if ((state_0 & 0b100) != 0 /* is SpecializationActive[WriteAttributeToDynamicObjectNode.write(DynamicObject, Object, Object, Node, CastToTruffleStringNode, DynamicObjectLibrary)] */) {
Write1Data s4_ = this.write1_cache;
if (s4_ != null) {
if ((!(ObjectAttributeNode.isHiddenKey(arg1Value)))) {
return this.write1Boundary(state_0, s4_, arg0Value_, arg1Value, arg2Value);
}
}
}
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private boolean writeDirectHidden1Boundary(int state_0, DynamicObject arg0Value_, HiddenKey arg1Value_, Object arg2Value) {
{
DynamicObjectLibrary dylib__ = (DYNAMIC_OBJECT_LIBRARY_.getUncached(arg0Value_));
return WriteAttributeToDynamicObjectNode.writeDirectHidden(arg0Value_, arg1Value_, arg2Value, dylib__);
}
}
@SuppressWarnings("static-method")
@TruffleBoundary
private boolean write1Boundary(int state_0, Write1Data s4_, DynamicObject arg0Value_, Object arg1Value, Object arg2Value) {
{
Node inliningTarget__ = (s4_);
DynamicObjectLibrary dylib__1 = (DYNAMIC_OBJECT_LIBRARY_.getUncached(arg0Value_));
return WriteAttributeToDynamicObjectNode.write(arg0Value_, arg1Value, arg2Value, inliningTarget__, INLINED_WRITE1_CAST_NODE_, dylib__1);
}
}
@ExplodeLoop
@Override
public boolean execute(Object arg0Value, HiddenKey arg1Value, Object arg2Value) {
int state_0 = this.state_0_;
if ((state_0 & 0b11110) != 0 /* is SpecializationActive[WriteAttributeToDynamicObjectNode.writeDirectHidden(DynamicObject, HiddenKey, Object, DynamicObjectLibrary)] || SpecializationActive[WriteAttributeToDynamicObjectNode.writeDirectHidden(DynamicObject, HiddenKey, Object, DynamicObjectLibrary)] || SpecializationActive[WriteAttributeToDynamicObjectNode.write(DynamicObject, Object, Object, Node, CastToTruffleStringNode, DynamicObjectLibrary)] || SpecializationActive[WriteAttributeToDynamicObjectNode.write(DynamicObject, Object, Object, Node, CastToTruffleStringNode, DynamicObjectLibrary)] */ && arg0Value instanceof DynamicObject) {
DynamicObject arg0Value_ = (DynamicObject) arg0Value;
if ((state_0 & 0b11000) != 0 /* is SpecializationActive[WriteAttributeToDynamicObjectNode.writeDirectHidden(DynamicObject, HiddenKey, Object, DynamicObjectLibrary)] || SpecializationActive[WriteAttributeToDynamicObjectNode.writeDirectHidden(DynamicObject, HiddenKey, Object, DynamicObjectLibrary)] */) {
if ((state_0 & 0b1000) != 0 /* is SpecializationActive[WriteAttributeToDynamicObjectNode.writeDirectHidden(DynamicObject, HiddenKey, Object, DynamicObjectLibrary)] */) {
WriteDirectHidden0Data s1_ = this.writeDirectHidden0_cache;
while (s1_ != null) {
if ((s1_.dylib_.accepts(arg0Value_))) {
return WriteAttributeToDynamicObjectNode.writeDirectHidden(arg0Value_, arg1Value, arg2Value, s1_.dylib_);
}
s1_ = s1_.next_;
}
}
if ((state_0 & 0b10000) != 0 /* is SpecializationActive[WriteAttributeToDynamicObjectNode.writeDirectHidden(DynamicObject, HiddenKey, Object, DynamicObjectLibrary)] */) {
return this.writeDirectHidden1Boundary0(state_0, arg0Value_, arg1Value, arg2Value);
}
}
if ((state_0 & 0b110) != 0 /* is SpecializationActive[WriteAttributeToDynamicObjectNode.write(DynamicObject, Object, Object, Node, CastToTruffleStringNode, DynamicObjectLibrary)] || SpecializationActive[WriteAttributeToDynamicObjectNode.write(DynamicObject, Object, Object, Node, CastToTruffleStringNode, DynamicObjectLibrary)] */) {
if ((state_0 & 0b10) != 0 /* is SpecializationActive[WriteAttributeToDynamicObjectNode.write(DynamicObject, Object, Object, Node, CastToTruffleStringNode, DynamicObjectLibrary)] */) {
Write0Data s3_ = this.write0_cache;
while (s3_ != null) {
if ((s3_.dylib_.accepts(arg0Value_)) && (!(ObjectAttributeNode.isHiddenKey(arg1Value)))) {
Node inliningTarget__ = (s3_);
return WriteAttributeToDynamicObjectNode.write(arg0Value_, arg1Value, arg2Value, inliningTarget__, INLINED_WRITE0_CAST_NODE_, s3_.dylib_);
}
s3_ = s3_.next_;
}
}
if ((state_0 & 0b100) != 0 /* is SpecializationActive[WriteAttributeToDynamicObjectNode.write(DynamicObject, Object, Object, Node, CastToTruffleStringNode, DynamicObjectLibrary)] */) {
Write1Data s4_ = this.write1_cache;
if (s4_ != null) {
if ((!(ObjectAttributeNode.isHiddenKey(arg1Value)))) {
return this.write1Boundary1(state_0, s4_, arg0Value_, arg1Value, arg2Value);
}
}
}
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private boolean writeDirectHidden1Boundary0(int state_0, DynamicObject arg0Value_, HiddenKey arg1Value, Object arg2Value) {
{
DynamicObjectLibrary dylib__ = (DYNAMIC_OBJECT_LIBRARY_.getUncached(arg0Value_));
return WriteAttributeToDynamicObjectNode.writeDirectHidden(arg0Value_, arg1Value, arg2Value, dylib__);
}
}
@SuppressWarnings("static-method")
@TruffleBoundary
private boolean write1Boundary1(int state_0, Write1Data s4_, DynamicObject arg0Value_, HiddenKey arg1Value, Object arg2Value) {
{
Node inliningTarget__ = (s4_);
DynamicObjectLibrary dylib__1 = (DYNAMIC_OBJECT_LIBRARY_.getUncached(arg0Value_));
return WriteAttributeToDynamicObjectNode.write(arg0Value_, arg1Value, arg2Value, inliningTarget__, INLINED_WRITE1_CAST_NODE_, dylib__1);
}
}
@ExplodeLoop
@Override
public boolean execute(Object arg0Value, TruffleString arg1Value, Object arg2Value) {
int state_0 = this.state_0_;
if ((state_0 & 0b111) != 0 /* is SpecializationActive[WriteAttributeToDynamicObjectNode.writeDirect(DynamicObject, TruffleString, Object, DynamicObjectLibrary)] || SpecializationActive[WriteAttributeToDynamicObjectNode.write(DynamicObject, Object, Object, Node, CastToTruffleStringNode, DynamicObjectLibrary)] || SpecializationActive[WriteAttributeToDynamicObjectNode.write(DynamicObject, Object, Object, Node, CastToTruffleStringNode, DynamicObjectLibrary)] */ && arg0Value instanceof DynamicObject) {
DynamicObject arg0Value_ = (DynamicObject) arg0Value;
if ((state_0 & 0b1) != 0 /* is SpecializationActive[WriteAttributeToDynamicObjectNode.writeDirect(DynamicObject, TruffleString, Object, DynamicObjectLibrary)] */) {
WriteDirectData s0_ = this.writeDirect_cache;
while (s0_ != null) {
if ((s0_.dylib_.accepts(arg0Value_))) {
return WriteAttributeToDynamicObjectNode.writeDirect(arg0Value_, arg1Value, arg2Value, s0_.dylib_);
}
s0_ = s0_.next_;
}
}
if ((state_0 & 0b110) != 0 /* is SpecializationActive[WriteAttributeToDynamicObjectNode.write(DynamicObject, Object, Object, Node, CastToTruffleStringNode, DynamicObjectLibrary)] || SpecializationActive[WriteAttributeToDynamicObjectNode.write(DynamicObject, Object, Object, Node, CastToTruffleStringNode, DynamicObjectLibrary)] */) {
if ((state_0 & 0b10) != 0 /* is SpecializationActive[WriteAttributeToDynamicObjectNode.write(DynamicObject, Object, Object, Node, CastToTruffleStringNode, DynamicObjectLibrary)] */) {
Write0Data s3_ = this.write0_cache;
while (s3_ != null) {
if ((s3_.dylib_.accepts(arg0Value_)) && (!(ObjectAttributeNode.isHiddenKey(arg1Value)))) {
Node inliningTarget__ = (s3_);
return WriteAttributeToDynamicObjectNode.write(arg0Value_, arg1Value, arg2Value, inliningTarget__, INLINED_WRITE0_CAST_NODE_, s3_.dylib_);
}
s3_ = s3_.next_;
}
}
if ((state_0 & 0b100) != 0 /* is SpecializationActive[WriteAttributeToDynamicObjectNode.write(DynamicObject, Object, Object, Node, CastToTruffleStringNode, DynamicObjectLibrary)] */) {
Write1Data s4_ = this.write1_cache;
if (s4_ != null) {
if ((!(ObjectAttributeNode.isHiddenKey(arg1Value)))) {
return this.write1Boundary2(state_0, s4_, arg0Value_, arg1Value, arg2Value);
}
}
}
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private boolean write1Boundary2(int state_0, Write1Data s4_, DynamicObject arg0Value_, TruffleString arg1Value, Object arg2Value) {
{
Node inliningTarget__ = (s4_);
DynamicObjectLibrary dylib__1 = (DYNAMIC_OBJECT_LIBRARY_.getUncached(arg0Value_));
return WriteAttributeToDynamicObjectNode.write(arg0Value_, arg1Value, arg2Value, inliningTarget__, INLINED_WRITE1_CAST_NODE_, dylib__1);
}
}
private boolean executeAndSpecialize(Object arg0Value, Object arg1Value, Object arg2Value) {
int state_0 = this.state_0_;
if (arg0Value instanceof DynamicObject) {
DynamicObject arg0Value_ = (DynamicObject) arg0Value;
if (((state_0 & 0b110)) == 0 /* is-not SpecializationActive[WriteAttributeToDynamicObjectNode.write(DynamicObject, Object, Object, Node, CastToTruffleStringNode, DynamicObjectLibrary)] && SpecializationActive[WriteAttributeToDynamicObjectNode.write(DynamicObject, Object, Object, Node, CastToTruffleStringNode, DynamicObjectLibrary)] */ && arg1Value instanceof TruffleString) {
TruffleString arg1Value_ = (TruffleString) arg1Value;
while (true) {
int count0_ = 0;
WriteDirectData s0_ = WRITE_DIRECT_CACHE_UPDATER.getVolatile(this);
WriteDirectData s0_original = s0_;
while (s0_ != null) {
if ((s0_.dylib_.accepts(arg0Value_))) {
break;
}
count0_++;
s0_ = s0_.next_;
}
if (s0_ == null) {
// assert (s0_.dylib_.accepts(arg0Value_));
if (count0_ < (PythonOptions.getAttributeAccessInlineCacheMaxDepth())) {
s0_ = this.insert(new WriteDirectData(s0_original));
DynamicObjectLibrary dylib__2 = s0_.insert((DYNAMIC_OBJECT_LIBRARY_.create(arg0Value_)));
Objects.requireNonNull(dylib__2, "Specialization 'writeDirect(DynamicObject, TruffleString, Object, DynamicObjectLibrary)' cache 'dylib' 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'.");
s0_.dylib_ = dylib__2;
if (!WRITE_DIRECT_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) {
continue;
}
state_0 = state_0 | 0b1 /* add SpecializationActive[WriteAttributeToDynamicObjectNode.writeDirect(DynamicObject, TruffleString, Object, DynamicObjectLibrary)] */;
this.state_0_ = state_0;
}
}
if (s0_ != null) {
return WriteAttributeToDynamicObjectNode.writeDirect(arg0Value_, arg1Value_, arg2Value, s0_.dylib_);
}
break;
}
}
if (arg1Value instanceof HiddenKey) {
HiddenKey arg1Value_ = (HiddenKey) arg1Value;
if (((state_0 & 0b10000)) == 0 /* is-not SpecializationActive[WriteAttributeToDynamicObjectNode.writeDirectHidden(DynamicObject, HiddenKey, Object, DynamicObjectLibrary)] */) {
while (true) {
int count1_ = 0;
WriteDirectHidden0Data s1_ = WRITE_DIRECT_HIDDEN0_CACHE_UPDATER.getVolatile(this);
WriteDirectHidden0Data s1_original = s1_;
while (s1_ != null) {
if ((s1_.dylib_.accepts(arg0Value_))) {
break;
}
count1_++;
s1_ = s1_.next_;
}
if (s1_ == null) {
// assert (s1_.dylib_.accepts(arg0Value_));
if (count1_ < (PythonOptions.getAttributeAccessInlineCacheMaxDepth())) {
s1_ = this.insert(new WriteDirectHidden0Data(s1_original));
DynamicObjectLibrary dylib__ = s1_.insert((DYNAMIC_OBJECT_LIBRARY_.create(arg0Value_)));
Objects.requireNonNull(dylib__, "Specialization 'writeDirectHidden(DynamicObject, HiddenKey, Object, DynamicObjectLibrary)' cache 'dylib' 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'.");
s1_.dylib_ = dylib__;
if (!WRITE_DIRECT_HIDDEN0_CACHE_UPDATER.compareAndSet(this, s1_original, s1_)) {
continue;
}
state_0 = state_0 | 0b1000 /* add SpecializationActive[WriteAttributeToDynamicObjectNode.writeDirectHidden(DynamicObject, HiddenKey, Object, DynamicObjectLibrary)] */;
this.state_0_ = state_0;
}
}
if (s1_ != null) {
return WriteAttributeToDynamicObjectNode.writeDirectHidden(arg0Value_, arg1Value_, arg2Value, s1_.dylib_);
}
break;
}
}
{
DynamicObjectLibrary dylib__ = null;
dylib__ = (DYNAMIC_OBJECT_LIBRARY_.getUncached(arg0Value_));
this.writeDirectHidden0_cache = null;
state_0 = state_0 & 0xfffffff7 /* remove SpecializationActive[WriteAttributeToDynamicObjectNode.writeDirectHidden(DynamicObject, HiddenKey, Object, DynamicObjectLibrary)] */;
state_0 = state_0 | 0b10000 /* add SpecializationActive[WriteAttributeToDynamicObjectNode.writeDirectHidden(DynamicObject, HiddenKey, Object, DynamicObjectLibrary)] */;
this.state_0_ = state_0;
return WriteAttributeToDynamicObjectNode.writeDirectHidden(arg0Value_, arg1Value_, arg2Value, dylib__);
}
}
{
Node inliningTarget__ = null;
if (((state_0 & 0b100)) == 0 /* is-not SpecializationActive[WriteAttributeToDynamicObjectNode.write(DynamicObject, Object, Object, Node, CastToTruffleStringNode, DynamicObjectLibrary)] */) {
while (true) {
int count3_ = 0;
Write0Data s3_ = WRITE0_CACHE_UPDATER.getVolatile(this);
Write0Data s3_original = s3_;
while (s3_ != null) {
if ((s3_.dylib_.accepts(arg0Value_)) && (!(ObjectAttributeNode.isHiddenKey(arg1Value)))) {
inliningTarget__ = (s3_);
break;
}
count3_++;
s3_ = s3_.next_;
}
if (s3_ == null) {
if ((!(ObjectAttributeNode.isHiddenKey(arg1Value))) && count3_ < (PythonOptions.getAttributeAccessInlineCacheMaxDepth())) {
// assert (s3_.dylib_.accepts(arg0Value_));
s3_ = this.insert(new Write0Data(s3_original));
inliningTarget__ = (s3_);
DynamicObjectLibrary dylib__1 = s3_.insert((DYNAMIC_OBJECT_LIBRARY_.create(arg0Value_)));
Objects.requireNonNull(dylib__1, "Specialization 'write(DynamicObject, Object, Object, Node, CastToTruffleStringNode, DynamicObjectLibrary)' cache 'dylib' 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'.");
s3_.dylib_ = dylib__1;
if (!WRITE0_CACHE_UPDATER.compareAndSet(this, s3_original, s3_)) {
continue;
}
this.writeDirect_cache = null;
state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[WriteAttributeToDynamicObjectNode.writeDirect(DynamicObject, TruffleString, Object, DynamicObjectLibrary)] */;
state_0 = state_0 | 0b10 /* add SpecializationActive[WriteAttributeToDynamicObjectNode.write(DynamicObject, Object, Object, Node, CastToTruffleStringNode, DynamicObjectLibrary)] */;
this.state_0_ = state_0;
}
}
if (s3_ != null) {
return WriteAttributeToDynamicObjectNode.write(arg0Value_, arg1Value, arg2Value, inliningTarget__, INLINED_WRITE0_CAST_NODE_, s3_.dylib_);
}
break;
}
}
}
{
DynamicObjectLibrary dylib__1 = null;
Node inliningTarget__ = null;
if ((!(ObjectAttributeNode.isHiddenKey(arg1Value)))) {
Write1Data s4_ = this.insert(new Write1Data());
inliningTarget__ = (s4_);
dylib__1 = (DYNAMIC_OBJECT_LIBRARY_.getUncached(arg0Value_));
VarHandle.storeStoreFence();
this.write1_cache = s4_;
this.writeDirect_cache = null;
this.write0_cache = null;
state_0 = state_0 & 0xfffffffc /* remove SpecializationActive[WriteAttributeToDynamicObjectNode.writeDirect(DynamicObject, TruffleString, Object, DynamicObjectLibrary)], SpecializationActive[WriteAttributeToDynamicObjectNode.write(DynamicObject, Object, Object, Node, CastToTruffleStringNode, DynamicObjectLibrary)] */;
state_0 = state_0 | 0b100 /* add SpecializationActive[WriteAttributeToDynamicObjectNode.write(DynamicObject, Object, Object, Node, CastToTruffleStringNode, DynamicObjectLibrary)] */;
this.state_0_ = state_0;
return WriteAttributeToDynamicObjectNode.write(arg0Value_, arg1Value, arg2Value, inliningTarget__, INLINED_WRITE1_CAST_NODE_, dylib__1);
}
}
}
throw new UnsupportedSpecializationException(this, new Node[] {null, null, null}, arg0Value, arg1Value, arg2Value);
}
@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 */) {
WriteDirectData s0_ = this.writeDirect_cache;
WriteDirectHidden0Data s1_ = this.writeDirectHidden0_cache;
Write0Data s3_ = this.write0_cache;
if ((s0_ == null || s0_.next_ == null) && (s1_ == null || s1_.next_ == null) && (s3_ == null || s3_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
}
return NodeCost.POLYMORPHIC;
}
@NeverDefault
public static WriteAttributeToDynamicObjectNode create() {
return new WriteAttributeToDynamicObjectNodeGen();
}
@NeverDefault
public static WriteAttributeToDynamicObjectNode getUncached() {
return WriteAttributeToDynamicObjectNodeGen.UNCACHED;
}
@GeneratedBy(WriteAttributeToDynamicObjectNode.class)
@DenyReplace
private static final class WriteDirectData extends Node implements SpecializationDataNode {
@Child WriteDirectData next_;
/**
* Source Info:
* Specialization: {@link WriteAttributeToDynamicObjectNode#writeDirect}
* Parameter: {@link DynamicObjectLibrary} dylib
*/
@Child DynamicObjectLibrary dylib_;
WriteDirectData(WriteDirectData next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
}
@GeneratedBy(WriteAttributeToDynamicObjectNode.class)
@DenyReplace
private static final class WriteDirectHidden0Data extends Node implements SpecializationDataNode {
@Child WriteDirectHidden0Data next_;
/**
* Source Info:
* Specialization: {@link WriteAttributeToDynamicObjectNode#writeDirectHidden}
* Parameter: {@link DynamicObjectLibrary} dylib
*/
@Child DynamicObjectLibrary dylib_;
WriteDirectHidden0Data(WriteDirectHidden0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
}
@GeneratedBy(WriteAttributeToDynamicObjectNode.class)
@DenyReplace
private static final class Write0Data extends Node implements SpecializationDataNode {
@Child Write0Data next_;
/**
* State Info:
* 0-7: InlinedCache
* Specialization: {@link WriteAttributeToDynamicObjectNode#write}
* Parameter: {@link CastToTruffleStringNode} castNode
* Inline method: {@link CastToTruffleStringNodeGen#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int write0_state_0_;
/**
* Source Info:
* Specialization: {@link WriteAttributeToDynamicObjectNode#write}
* Parameter: {@link CastToTruffleStringNode} castNode
* Inline method: {@link CastToTruffleStringNodeGen#inline}
* Inline field: {@link Node} field1
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node write0_castNode__field1_;
/**
* Source Info:
* Specialization: {@link WriteAttributeToDynamicObjectNode#write}
* Parameter: {@link CastToTruffleStringNode} castNode
* Inline method: {@link CastToTruffleStringNodeGen#inline}
* Inline field: {@link Node} field2
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node write0_castNode__field2_;
/**
* Source Info:
* Specialization: {@link WriteAttributeToDynamicObjectNode#write}
* Parameter: {@link CastToTruffleStringNode} castNode
* Inline method: {@link CastToTruffleStringNodeGen#inline}
* Inline field: {@link Node} field3
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node write0_castNode__field3_;
/**
* Source Info:
* Specialization: {@link WriteAttributeToDynamicObjectNode#write}
* Parameter: {@link DynamicObjectLibrary} dylib
*/
@Child DynamicObjectLibrary dylib_;
Write0Data(Write0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
private static Lookup lookup_() {
return MethodHandles.lookup();
}
}
@GeneratedBy(WriteAttributeToDynamicObjectNode.class)
@DenyReplace
private static final class Write1Data extends Node implements SpecializationDataNode {
/**
* State Info:
* 0-7: InlinedCache
* Specialization: {@link WriteAttributeToDynamicObjectNode#write}
* Parameter: {@link CastToTruffleStringNode} castNode
* Inline method: {@link CastToTruffleStringNodeGen#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int write1_state_0_;
/**
* Source Info:
* Specialization: {@link WriteAttributeToDynamicObjectNode#write}
* Parameter: {@link CastToTruffleStringNode} castNode
* Inline method: {@link CastToTruffleStringNodeGen#inline}
* Inline field: {@link Node} field1
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node write1_castNode__field1_;
/**
* Source Info:
* Specialization: {@link WriteAttributeToDynamicObjectNode#write}
* Parameter: {@link CastToTruffleStringNode} castNode
* Inline method: {@link CastToTruffleStringNodeGen#inline}
* Inline field: {@link Node} field2
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node write1_castNode__field2_;
/**
* Source Info:
* Specialization: {@link WriteAttributeToDynamicObjectNode#write}
* Parameter: {@link CastToTruffleStringNode} castNode
* Inline method: {@link CastToTruffleStringNodeGen#inline}
* Inline field: {@link Node} field3
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node write1_castNode__field3_;
Write1Data() {
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
private static Lookup lookup_() {
return MethodHandles.lookup();
}
}
@GeneratedBy(WriteAttributeToDynamicObjectNode.class)
@DenyReplace
private static final class Uncached extends WriteAttributeToDynamicObjectNode {
@TruffleBoundary
@Override
public boolean execute(Object arg0Value, Object arg1Value, Object arg2Value) {
if (arg0Value instanceof DynamicObject) {
DynamicObject arg0Value_ = (DynamicObject) arg0Value;
if (arg1Value instanceof HiddenKey) {
HiddenKey arg1Value_ = (HiddenKey) arg1Value;
return WriteAttributeToDynamicObjectNode.writeDirectHidden(arg0Value_, arg1Value_, arg2Value, (DYNAMIC_OBJECT_LIBRARY_.getUncached(arg0Value_)));
}
if ((!(ObjectAttributeNode.isHiddenKey(arg1Value)))) {
return WriteAttributeToDynamicObjectNode.write(arg0Value_, arg1Value, arg2Value, (this), (CastToTruffleStringNode.getUncached()), (DYNAMIC_OBJECT_LIBRARY_.getUncached(arg0Value_)));
}
}
throw new UnsupportedSpecializationException(this, new Node[] {null, null, null}, arg0Value, arg1Value, arg2Value);
}
@TruffleBoundary
@Override
public boolean execute(Object arg0Value, HiddenKey arg1Value, Object arg2Value) {
if (arg0Value instanceof DynamicObject) {
DynamicObject arg0Value_ = (DynamicObject) arg0Value;
return WriteAttributeToDynamicObjectNode.writeDirectHidden(arg0Value_, arg1Value, arg2Value, (DYNAMIC_OBJECT_LIBRARY_.getUncached(arg0Value_)));
}
throw new UnsupportedSpecializationException(this, new Node[] {null, null, null}, arg0Value, arg1Value, arg2Value);
}
@TruffleBoundary
@Override
public boolean execute(Object arg0Value, TruffleString arg1Value, Object arg2Value) {
if (arg0Value instanceof DynamicObject) {
DynamicObject arg0Value_ = (DynamicObject) arg0Value;
if ((!(ObjectAttributeNode.isHiddenKey(arg1Value)))) {
return WriteAttributeToDynamicObjectNode.write(arg0Value_, arg1Value, arg2Value, (this), (CastToTruffleStringNode.getUncached()), (DYNAMIC_OBJECT_LIBRARY_.getUncached(arg0Value_)));
}
}
throw new UnsupportedSpecializationException(this, new Node[] {null, null, null}, arg0Value, arg1Value, arg2Value);
}
@Override
public NodeCost getCost() {
return NodeCost.MEGAMORPHIC;
}
@Override
public boolean isAdoptable() {
return false;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy