com.oracle.truffle.sl.nodes.expression.SLWritePropertyNodeGen Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of truffle-sl Show documentation
Show all versions of truffle-sl Show documentation
Truffle SL is an example language implemented using the Truffle API.
The newest version!
// CheckStyle: start generated
package com.oracle.truffle.sl.nodes.expression;
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.frame.VirtualFrame;
import com.oracle.truffle.api.interop.InteropLibrary;
import com.oracle.truffle.api.library.LibraryFactory;
import com.oracle.truffle.api.nodes.DenyReplace;
import com.oracle.truffle.api.nodes.EncapsulatingNodeReference;
import com.oracle.truffle.api.nodes.ExplodeLoop;
import com.oracle.truffle.api.nodes.Node;
import com.oracle.truffle.api.object.DynamicObjectLibrary;
import com.oracle.truffle.sl.nodes.SLExpressionNode;
import com.oracle.truffle.sl.nodes.util.SLToMemberNode;
import com.oracle.truffle.sl.nodes.util.SLToMemberNodeGen;
import com.oracle.truffle.sl.nodes.util.SLToTruffleStringNode;
import com.oracle.truffle.sl.nodes.util.SLToTruffleStringNodeGen;
import com.oracle.truffle.sl.runtime.SLObject;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.VarHandle;
import java.lang.invoke.MethodHandles.Lookup;
import java.util.Objects;
/**
* Debug Info:
* Specialization {@link SLWritePropertyNode#writeArray}
* Activation probability: 0.27381
* With/without class size: 11/8 bytes
* Specialization {@link SLWritePropertyNode#writeArray}
* Activation probability: 0.23095
* With/without class size: 6/0 bytes
* Specialization {@link SLWritePropertyNode#writeSLObject}
* Activation probability: 0.18810
* With/without class size: 11/18 bytes
* Specialization {@link SLWritePropertyNode#writeSLObject}
* Activation probability: 0.14524
* With/without class size: 8/14 bytes
* Specialization {@link SLWritePropertyNode#writeObject}
* Activation probability: 0.10238
* With/without class size: 7/14 bytes
* Specialization {@link SLWritePropertyNode#writeObject}
* Activation probability: 0.05952
* With/without class size: 5/10 bytes
*
*/
@GeneratedBy(SLWritePropertyNode.class)
@SuppressWarnings({"javadoc", "unused"})
public final class SLWritePropertyNodeGen extends SLWritePropertyNode {
private static final StateField WRITE_S_L_OBJECT0__S_L_WRITE_PROPERTY_NODE_WRITE_S_L_OBJECT0_STATE_0_UPDATER = StateField.create(WriteSLObject0Data.lookup_(), "writeSLObject0_state_0_");
private static final StateField WRITE_S_L_OBJECT1__S_L_WRITE_PROPERTY_NODE_WRITE_S_L_OBJECT1_STATE_0_UPDATER = StateField.create(WriteSLObject1Data.lookup_(), "writeSLObject1_state_0_");
private static final StateField WRITE_OBJECT0__S_L_WRITE_PROPERTY_NODE_WRITE_OBJECT0_STATE_0_UPDATER = StateField.create(WriteObject0Data.lookup_(), "writeObject0_state_0_");
private static final StateField WRITE_OBJECT1__S_L_WRITE_PROPERTY_NODE_WRITE_OBJECT1_STATE_0_UPDATER = StateField.create(WriteObject1Data.lookup_(), "writeObject1_state_0_");
static final ReferenceField WRITE_ARRAY0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "writeArray0_cache", WriteArray0Data.class);
static final ReferenceField WRITE_S_L_OBJECT0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "writeSLObject0_cache", WriteSLObject0Data.class);
static final ReferenceField WRITE_OBJECT0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "writeObject0_cache", WriteObject0Data.class);
/**
* Source Info:
* Specialization: {@link SLWritePropertyNode#writeSLObject}
* Parameter: {@link SLToTruffleStringNode} toTruffleStringNode
* Inline method: {@link SLToTruffleStringNodeGen#inline}
*/
private static final SLToTruffleStringNode INLINED_WRITE_S_L_OBJECT0_TO_TRUFFLE_STRING_NODE_ = SLToTruffleStringNodeGen.inline(InlineTarget.create(SLToTruffleStringNode.class, WRITE_S_L_OBJECT0__S_L_WRITE_PROPERTY_NODE_WRITE_S_L_OBJECT0_STATE_0_UPDATER.subUpdater(0, 11), ReferenceField.create(WriteSLObject0Data.lookup_(), "writeSLObject0_toTruffleStringNode__field1_", Node.class), ReferenceField.create(WriteSLObject0Data.lookup_(), "writeSLObject0_toTruffleStringNode__field2_", Node.class), ReferenceField.create(WriteSLObject0Data.lookup_(), "writeSLObject0_toTruffleStringNode__field3_", Node.class)));
/**
* Source Info:
* Specialization: {@link SLWritePropertyNode#writeSLObject}
* Parameter: {@link SLToTruffleStringNode} toTruffleStringNode
* Inline method: {@link SLToTruffleStringNodeGen#inline}
*/
private static final SLToTruffleStringNode INLINED_WRITE_S_L_OBJECT1_TO_TRUFFLE_STRING_NODE_ = SLToTruffleStringNodeGen.inline(InlineTarget.create(SLToTruffleStringNode.class, WRITE_S_L_OBJECT1__S_L_WRITE_PROPERTY_NODE_WRITE_S_L_OBJECT1_STATE_0_UPDATER.subUpdater(0, 11), ReferenceField.create(WriteSLObject1Data.lookup_(), "writeSLObject1_toTruffleStringNode__field1_", Node.class), ReferenceField.create(WriteSLObject1Data.lookup_(), "writeSLObject1_toTruffleStringNode__field2_", Node.class), ReferenceField.create(WriteSLObject1Data.lookup_(), "writeSLObject1_toTruffleStringNode__field3_", Node.class)));
/**
* Source Info:
* Specialization: {@link SLWritePropertyNode#writeObject}
* Parameter: {@link SLToMemberNode} asMember
* Inline method: {@link SLToMemberNodeGen#inline}
*/
private static final SLToMemberNode INLINED_WRITE_OBJECT0_AS_MEMBER_ = SLToMemberNodeGen.inline(InlineTarget.create(SLToMemberNode.class, WRITE_OBJECT0__S_L_WRITE_PROPERTY_NODE_WRITE_OBJECT0_STATE_0_UPDATER.subUpdater(0, 9), ReferenceField.create(WriteObject0Data.lookup_(), "writeObject0_asMember__field1_", Node.class), ReferenceField.create(WriteObject0Data.lookup_(), "writeObject0_asMember__field2_", Node.class)));
/**
* Source Info:
* Specialization: {@link SLWritePropertyNode#writeObject}
* Parameter: {@link SLToMemberNode} asMember
* Inline method: {@link SLToMemberNodeGen#inline}
*/
private static final SLToMemberNode INLINED_WRITE_OBJECT1_AS_MEMBER_ = SLToMemberNodeGen.inline(InlineTarget.create(SLToMemberNode.class, WRITE_OBJECT1__S_L_WRITE_PROPERTY_NODE_WRITE_OBJECT1_STATE_0_UPDATER.subUpdater(0, 9), ReferenceField.create(WriteObject1Data.lookup_(), "writeObject1_asMember__field1_", Node.class), ReferenceField.create(WriteObject1Data.lookup_(), "writeObject1_asMember__field2_", Node.class)));
private static final LibraryFactory INTEROP_LIBRARY_ = LibraryFactory.resolve(InteropLibrary.class);
private static final LibraryFactory DYNAMIC_OBJECT_LIBRARY_ = LibraryFactory.resolve(DynamicObjectLibrary.class);
@Child private SLExpressionNode receiverNode_;
@Child private SLExpressionNode nameNode_;
@Child private SLExpressionNode valueNode_;
/**
* State Info:
* 0: SpecializationActive {@link SLWritePropertyNode#writeArray}
* 1: SpecializationActive {@link SLWritePropertyNode#writeArray}
* 2: SpecializationActive {@link SLWritePropertyNode#writeSLObject}
* 3: SpecializationActive {@link SLWritePropertyNode#writeSLObject}
* 4: SpecializationActive {@link SLWritePropertyNode#writeObject}
* 5: SpecializationActive {@link SLWritePropertyNode#writeObject}
*
*/
@CompilationFinal private int state_0_;
@UnsafeAccessedField @Child private WriteArray0Data writeArray0_cache;
@UnsafeAccessedField @Child private WriteSLObject0Data writeSLObject0_cache;
@Child private WriteSLObject1Data writeSLObject1_cache;
@UnsafeAccessedField @Child private WriteObject0Data writeObject0_cache;
@Child private WriteObject1Data writeObject1_cache;
private SLWritePropertyNodeGen(SLExpressionNode receiverNode, SLExpressionNode nameNode, SLExpressionNode valueNode) {
this.receiverNode_ = receiverNode;
this.nameNode_ = nameNode;
this.valueNode_ = valueNode;
}
@ExplodeLoop
@Override
public Object executeGeneric(VirtualFrame frameValue) {
int state_0 = this.state_0_;
Object receiverNodeValue_ = this.receiverNode_.executeGeneric(frameValue);
Object nameNodeValue_ = this.nameNode_.executeGeneric(frameValue);
Object valueNodeValue_ = this.valueNode_.executeGeneric(frameValue);
if (state_0 != 0 /* is SpecializationActive[SLWritePropertyNode.writeArray(Object, Object, Object, InteropLibrary, InteropLibrary)] || SpecializationActive[SLWritePropertyNode.writeArray(Object, Object, Object, InteropLibrary, InteropLibrary)] || SpecializationActive[SLWritePropertyNode.writeSLObject(SLObject, Object, Object, Node, DynamicObjectLibrary, SLToTruffleStringNode)] || SpecializationActive[SLWritePropertyNode.writeSLObject(SLObject, Object, Object, Node, DynamicObjectLibrary, SLToTruffleStringNode)] || SpecializationActive[SLWritePropertyNode.writeObject(Object, Object, Object, Node, InteropLibrary, SLToMemberNode)] || SpecializationActive[SLWritePropertyNode.writeObject(Object, Object, Object, Node, InteropLibrary, SLToMemberNode)] */) {
if ((state_0 & 0b11) != 0 /* is SpecializationActive[SLWritePropertyNode.writeArray(Object, Object, Object, InteropLibrary, InteropLibrary)] || SpecializationActive[SLWritePropertyNode.writeArray(Object, Object, Object, InteropLibrary, InteropLibrary)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[SLWritePropertyNode.writeArray(Object, Object, Object, InteropLibrary, InteropLibrary)] */) {
WriteArray0Data s0_ = this.writeArray0_cache;
while (s0_ != null) {
if ((s0_.arrays_.accepts(receiverNodeValue_)) && (s0_.numbers_.accepts(nameNodeValue_)) && (s0_.arrays_.hasArrayElements(receiverNodeValue_))) {
return writeArray(receiverNodeValue_, nameNodeValue_, valueNodeValue_, s0_.arrays_, s0_.numbers_);
}
s0_ = s0_.next_;
}
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[SLWritePropertyNode.writeArray(Object, Object, Object, InteropLibrary, InteropLibrary)] */) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
InteropLibrary arrays__ = (INTEROP_LIBRARY_.getUncached());
if ((arrays__.hasArrayElements(receiverNodeValue_))) {
return this.writeArray1Boundary(state_0, receiverNodeValue_, nameNodeValue_, valueNodeValue_);
}
}
} finally {
encapsulating_.set(prev_);
}
}
}
if ((state_0 & 0b1100) != 0 /* is SpecializationActive[SLWritePropertyNode.writeSLObject(SLObject, Object, Object, Node, DynamicObjectLibrary, SLToTruffleStringNode)] || SpecializationActive[SLWritePropertyNode.writeSLObject(SLObject, Object, Object, Node, DynamicObjectLibrary, SLToTruffleStringNode)] */ && receiverNodeValue_ instanceof SLObject) {
SLObject receiverNodeValue__ = (SLObject) receiverNodeValue_;
if ((state_0 & 0b100) != 0 /* is SpecializationActive[SLWritePropertyNode.writeSLObject(SLObject, Object, Object, Node, DynamicObjectLibrary, SLToTruffleStringNode)] */) {
WriteSLObject0Data s2_ = this.writeSLObject0_cache;
while (s2_ != null) {
if ((s2_.objectLibrary_.accepts(receiverNodeValue__))) {
Node node__ = (s2_);
return SLWritePropertyNode.writeSLObject(receiverNodeValue__, nameNodeValue_, valueNodeValue_, node__, s2_.objectLibrary_, INLINED_WRITE_S_L_OBJECT0_TO_TRUFFLE_STRING_NODE_);
}
s2_ = s2_.next_;
}
}
if ((state_0 & 0b1000) != 0 /* is SpecializationActive[SLWritePropertyNode.writeSLObject(SLObject, Object, Object, Node, DynamicObjectLibrary, SLToTruffleStringNode)] */) {
WriteSLObject1Data s3_ = this.writeSLObject1_cache;
if (s3_ != null) {
return this.writeSLObject1Boundary(state_0, s3_, receiverNodeValue__, nameNodeValue_, valueNodeValue_);
}
}
}
if ((state_0 & 0b110000) != 0 /* is SpecializationActive[SLWritePropertyNode.writeObject(Object, Object, Object, Node, InteropLibrary, SLToMemberNode)] || SpecializationActive[SLWritePropertyNode.writeObject(Object, Object, Object, Node, InteropLibrary, SLToMemberNode)] */) {
if ((state_0 & 0b10000) != 0 /* is SpecializationActive[SLWritePropertyNode.writeObject(Object, Object, Object, Node, InteropLibrary, SLToMemberNode)] */) {
WriteObject0Data s4_ = this.writeObject0_cache;
while (s4_ != null) {
if ((s4_.objectLibrary_.accepts(receiverNodeValue_)) && (!(SLWritePropertyNode.isSLObject(receiverNodeValue_)))) {
Node node__1 = (s4_);
return SLWritePropertyNode.writeObject(receiverNodeValue_, nameNodeValue_, valueNodeValue_, node__1, s4_.objectLibrary_, INLINED_WRITE_OBJECT0_AS_MEMBER_);
}
s4_ = s4_.next_;
}
}
if ((state_0 & 0b100000) != 0 /* is SpecializationActive[SLWritePropertyNode.writeObject(Object, Object, Object, Node, InteropLibrary, SLToMemberNode)] */) {
WriteObject1Data s5_ = this.writeObject1_cache;
if (s5_ != null) {
if ((!(SLWritePropertyNode.isSLObject(receiverNodeValue_)))) {
return this.writeObject1Boundary(state_0, s5_, receiverNodeValue_, nameNodeValue_, valueNodeValue_);
}
}
}
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(receiverNodeValue_, nameNodeValue_, valueNodeValue_);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object writeArray1Boundary(int state_0, Object receiverNodeValue_, Object nameNodeValue_, Object valueNodeValue_) {
{
InteropLibrary arrays__ = (INTEROP_LIBRARY_.getUncached());
InteropLibrary numbers__ = (INTEROP_LIBRARY_.getUncached());
return writeArray(receiverNodeValue_, nameNodeValue_, valueNodeValue_, arrays__, numbers__);
}
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object writeSLObject1Boundary(int state_0, WriteSLObject1Data s3_, SLObject receiverNodeValue__, Object nameNodeValue_, Object valueNodeValue_) {
{
Node node__ = (s3_);
DynamicObjectLibrary objectLibrary__ = (DYNAMIC_OBJECT_LIBRARY_.getUncached(receiverNodeValue__));
return SLWritePropertyNode.writeSLObject(receiverNodeValue__, nameNodeValue_, valueNodeValue_, node__, objectLibrary__, INLINED_WRITE_S_L_OBJECT1_TO_TRUFFLE_STRING_NODE_);
}
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object writeObject1Boundary(int state_0, WriteObject1Data s5_, Object receiverNodeValue_, Object nameNodeValue_, Object valueNodeValue_) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
Node node__1 = (s5_);
InteropLibrary objectLibrary__1 = (INTEROP_LIBRARY_.getUncached(receiverNodeValue_));
return SLWritePropertyNode.writeObject(receiverNodeValue_, nameNodeValue_, valueNodeValue_, node__1, objectLibrary__1, INLINED_WRITE_OBJECT1_AS_MEMBER_);
}
} finally {
encapsulating_.set(prev_);
}
}
@Override
public void executeVoid(VirtualFrame frameValue) {
executeGeneric(frameValue);
return;
}
@SuppressWarnings("unused")
private Object executeAndSpecialize(Object receiverNodeValue, Object nameNodeValue, Object valueNodeValue) {
int state_0 = this.state_0_;
if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[SLWritePropertyNode.writeArray(Object, Object, Object, InteropLibrary, InteropLibrary)] */) {
while (true) {
int count0_ = 0;
WriteArray0Data s0_ = WRITE_ARRAY0_CACHE_UPDATER.getVolatile(this);
WriteArray0Data s0_original = s0_;
while (s0_ != null) {
if ((s0_.arrays_.accepts(receiverNodeValue)) && (s0_.numbers_.accepts(nameNodeValue)) && (s0_.arrays_.hasArrayElements(receiverNodeValue))) {
break;
}
count0_++;
s0_ = s0_.next_;
}
if (s0_ == null) {
{
InteropLibrary arrays__ = this.insert((INTEROP_LIBRARY_.create(receiverNodeValue)));
// assert (s0_.arrays_.accepts(receiverNodeValue));
// assert (s0_.numbers_.accepts(nameNodeValue));
if ((arrays__.hasArrayElements(receiverNodeValue)) && count0_ < (SLWritePropertyNode.LIBRARY_LIMIT)) {
s0_ = this.insert(new WriteArray0Data(s0_original));
Objects.requireNonNull(s0_.insert(arrays__), "A specialization cache returned a default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns the default value.");
s0_.arrays_ = arrays__;
InteropLibrary numbers__ = s0_.insert((INTEROP_LIBRARY_.create(nameNodeValue)));
Objects.requireNonNull(numbers__, "A specialization cache returned a default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns the default value.");
s0_.numbers_ = numbers__;
if (!WRITE_ARRAY0_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) {
continue;
}
state_0 = state_0 | 0b1 /* add SpecializationActive[SLWritePropertyNode.writeArray(Object, Object, Object, InteropLibrary, InteropLibrary)] */;
this.state_0_ = state_0;
}
}
}
if (s0_ != null) {
return writeArray(receiverNodeValue, nameNodeValue, valueNodeValue, s0_.arrays_, s0_.numbers_);
}
break;
}
}
{
InteropLibrary numbers__ = null;
InteropLibrary arrays__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
arrays__ = (INTEROP_LIBRARY_.getUncached());
if ((arrays__.hasArrayElements(receiverNodeValue))) {
numbers__ = (INTEROP_LIBRARY_.getUncached());
this.writeArray0_cache = null;
state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[SLWritePropertyNode.writeArray(Object, Object, Object, InteropLibrary, InteropLibrary)] */;
state_0 = state_0 | 0b10 /* add SpecializationActive[SLWritePropertyNode.writeArray(Object, Object, Object, InteropLibrary, InteropLibrary)] */;
this.state_0_ = state_0;
return writeArray(receiverNodeValue, nameNodeValue, valueNodeValue, arrays__, numbers__);
}
}
} finally {
encapsulating_.set(prev_);
}
}
}
if (receiverNodeValue instanceof SLObject) {
SLObject receiverNodeValue_ = (SLObject) receiverNodeValue;
{
Node node__ = null;
if (((state_0 & 0b1000)) == 0 /* is-not SpecializationActive[SLWritePropertyNode.writeSLObject(SLObject, Object, Object, Node, DynamicObjectLibrary, SLToTruffleStringNode)] */) {
while (true) {
int count2_ = 0;
WriteSLObject0Data s2_ = WRITE_S_L_OBJECT0_CACHE_UPDATER.getVolatile(this);
WriteSLObject0Data s2_original = s2_;
while (s2_ != null) {
if ((s2_.objectLibrary_.accepts(receiverNodeValue_))) {
node__ = (s2_);
break;
}
count2_++;
s2_ = s2_.next_;
}
if (s2_ == null) {
// assert (s2_.objectLibrary_.accepts(receiverNodeValue_));
if (count2_ < (SLWritePropertyNode.LIBRARY_LIMIT)) {
s2_ = this.insert(new WriteSLObject0Data(s2_original));
node__ = (s2_);
DynamicObjectLibrary objectLibrary__ = s2_.insert((DYNAMIC_OBJECT_LIBRARY_.create(receiverNodeValue_)));
Objects.requireNonNull(objectLibrary__, "A specialization cache returned a default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns the default value.");
s2_.objectLibrary_ = objectLibrary__;
if (!WRITE_S_L_OBJECT0_CACHE_UPDATER.compareAndSet(this, s2_original, s2_)) {
continue;
}
state_0 = state_0 | 0b100 /* add SpecializationActive[SLWritePropertyNode.writeSLObject(SLObject, Object, Object, Node, DynamicObjectLibrary, SLToTruffleStringNode)] */;
this.state_0_ = state_0;
}
}
if (s2_ != null) {
return SLWritePropertyNode.writeSLObject(receiverNodeValue_, nameNodeValue, valueNodeValue, node__, s2_.objectLibrary_, INLINED_WRITE_S_L_OBJECT0_TO_TRUFFLE_STRING_NODE_);
}
break;
}
}
}
{
DynamicObjectLibrary objectLibrary__ = null;
Node node__ = null;
WriteSLObject1Data s3_ = this.insert(new WriteSLObject1Data());
node__ = (s3_);
objectLibrary__ = (DYNAMIC_OBJECT_LIBRARY_.getUncached(receiverNodeValue_));
VarHandle.storeStoreFence();
this.writeSLObject1_cache = s3_;
this.writeSLObject0_cache = null;
state_0 = state_0 & 0xfffffffb /* remove SpecializationActive[SLWritePropertyNode.writeSLObject(SLObject, Object, Object, Node, DynamicObjectLibrary, SLToTruffleStringNode)] */;
state_0 = state_0 | 0b1000 /* add SpecializationActive[SLWritePropertyNode.writeSLObject(SLObject, Object, Object, Node, DynamicObjectLibrary, SLToTruffleStringNode)] */;
this.state_0_ = state_0;
return SLWritePropertyNode.writeSLObject(receiverNodeValue_, nameNodeValue, valueNodeValue, node__, objectLibrary__, INLINED_WRITE_S_L_OBJECT1_TO_TRUFFLE_STRING_NODE_);
}
}
{
Node node__1 = null;
if (((state_0 & 0b100000)) == 0 /* is-not SpecializationActive[SLWritePropertyNode.writeObject(Object, Object, Object, Node, InteropLibrary, SLToMemberNode)] */) {
while (true) {
int count4_ = 0;
WriteObject0Data s4_ = WRITE_OBJECT0_CACHE_UPDATER.getVolatile(this);
WriteObject0Data s4_original = s4_;
while (s4_ != null) {
if ((s4_.objectLibrary_.accepts(receiverNodeValue)) && (!(SLWritePropertyNode.isSLObject(receiverNodeValue)))) {
node__1 = (s4_);
break;
}
count4_++;
s4_ = s4_.next_;
}
if (s4_ == null) {
if ((!(SLWritePropertyNode.isSLObject(receiverNodeValue))) && count4_ < (SLWritePropertyNode.LIBRARY_LIMIT)) {
// assert (s4_.objectLibrary_.accepts(receiverNodeValue));
s4_ = this.insert(new WriteObject0Data(s4_original));
node__1 = (s4_);
InteropLibrary objectLibrary__1 = s4_.insert((INTEROP_LIBRARY_.create(receiverNodeValue)));
Objects.requireNonNull(objectLibrary__1, "A specialization cache returned a default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns the default value.");
s4_.objectLibrary_ = objectLibrary__1;
if (!WRITE_OBJECT0_CACHE_UPDATER.compareAndSet(this, s4_original, s4_)) {
continue;
}
state_0 = state_0 | 0b10000 /* add SpecializationActive[SLWritePropertyNode.writeObject(Object, Object, Object, Node, InteropLibrary, SLToMemberNode)] */;
this.state_0_ = state_0;
}
}
if (s4_ != null) {
return SLWritePropertyNode.writeObject(receiverNodeValue, nameNodeValue, valueNodeValue, node__1, s4_.objectLibrary_, INLINED_WRITE_OBJECT0_AS_MEMBER_);
}
break;
}
}
}
{
InteropLibrary objectLibrary__1 = null;
Node node__1 = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
if ((!(SLWritePropertyNode.isSLObject(receiverNodeValue)))) {
WriteObject1Data s5_ = this.insert(new WriteObject1Data());
node__1 = (s5_);
objectLibrary__1 = (INTEROP_LIBRARY_.getUncached(receiverNodeValue));
VarHandle.storeStoreFence();
this.writeObject1_cache = s5_;
this.writeObject0_cache = null;
state_0 = state_0 & 0xffffffef /* remove SpecializationActive[SLWritePropertyNode.writeObject(Object, Object, Object, Node, InteropLibrary, SLToMemberNode)] */;
state_0 = state_0 | 0b100000 /* add SpecializationActive[SLWritePropertyNode.writeObject(Object, Object, Object, Node, InteropLibrary, SLToMemberNode)] */;
this.state_0_ = state_0;
return SLWritePropertyNode.writeObject(receiverNodeValue, nameNodeValue, valueNodeValue, node__1, objectLibrary__1, INLINED_WRITE_OBJECT1_AS_MEMBER_);
}
} finally {
encapsulating_.set(prev_);
}
}
}
throw new UnsupportedSpecializationException(this, new Node[] {this.receiverNode_, this.nameNode_, this.valueNode_}, receiverNodeValue, nameNodeValue, valueNodeValue);
}
@NeverDefault
public static SLWritePropertyNode create(SLExpressionNode receiverNode, SLExpressionNode nameNode, SLExpressionNode valueNode) {
return new SLWritePropertyNodeGen(receiverNode, nameNode, valueNode);
}
@GeneratedBy(SLWritePropertyNode.class)
@DenyReplace
private static final class WriteArray0Data extends Node implements SpecializationDataNode {
@Child WriteArray0Data next_;
/**
* Source Info:
* Specialization: {@link SLWritePropertyNode#writeArray}
* Parameter: {@link InteropLibrary} arrays
*/
@Child InteropLibrary arrays_;
/**
* Source Info:
* Specialization: {@link SLWritePropertyNode#writeArray}
* Parameter: {@link InteropLibrary} numbers
*/
@Child InteropLibrary numbers_;
WriteArray0Data(WriteArray0Data next_) {
this.next_ = next_;
}
}
@GeneratedBy(SLWritePropertyNode.class)
@DenyReplace
private static final class WriteSLObject0Data extends Node implements SpecializationDataNode {
@Child WriteSLObject0Data next_;
/**
* State Info:
* 0-10: InlinedCache
* Specialization: {@link SLWritePropertyNode#writeSLObject}
* Parameter: {@link SLToTruffleStringNode} toTruffleStringNode
* Inline method: {@link SLToTruffleStringNodeGen#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int writeSLObject0_state_0_;
/**
* Source Info:
* Specialization: {@link SLWritePropertyNode#writeSLObject}
* Parameter: {@link DynamicObjectLibrary} objectLibrary
*/
@Child DynamicObjectLibrary objectLibrary_;
/**
* Source Info:
* Specialization: {@link SLWritePropertyNode#writeSLObject}
* Parameter: {@link SLToTruffleStringNode} toTruffleStringNode
* Inline method: {@link SLToTruffleStringNodeGen#inline}
* Inline field: {@link Node} field1
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node writeSLObject0_toTruffleStringNode__field1_;
/**
* Source Info:
* Specialization: {@link SLWritePropertyNode#writeSLObject}
* Parameter: {@link SLToTruffleStringNode} toTruffleStringNode
* Inline method: {@link SLToTruffleStringNodeGen#inline}
* Inline field: {@link Node} field2
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node writeSLObject0_toTruffleStringNode__field2_;
/**
* Source Info:
* Specialization: {@link SLWritePropertyNode#writeSLObject}
* Parameter: {@link SLToTruffleStringNode} toTruffleStringNode
* Inline method: {@link SLToTruffleStringNodeGen#inline}
* Inline field: {@link Node} field3
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node writeSLObject0_toTruffleStringNode__field3_;
WriteSLObject0Data(WriteSLObject0Data next_) {
this.next_ = next_;
}
private static Lookup lookup_() {
return MethodHandles.lookup();
}
}
@GeneratedBy(SLWritePropertyNode.class)
@DenyReplace
private static final class WriteSLObject1Data extends Node implements SpecializationDataNode {
/**
* State Info:
* 0-10: InlinedCache
* Specialization: {@link SLWritePropertyNode#writeSLObject}
* Parameter: {@link SLToTruffleStringNode} toTruffleStringNode
* Inline method: {@link SLToTruffleStringNodeGen#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int writeSLObject1_state_0_;
/**
* Source Info:
* Specialization: {@link SLWritePropertyNode#writeSLObject}
* Parameter: {@link SLToTruffleStringNode} toTruffleStringNode
* Inline method: {@link SLToTruffleStringNodeGen#inline}
* Inline field: {@link Node} field1
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node writeSLObject1_toTruffleStringNode__field1_;
/**
* Source Info:
* Specialization: {@link SLWritePropertyNode#writeSLObject}
* Parameter: {@link SLToTruffleStringNode} toTruffleStringNode
* Inline method: {@link SLToTruffleStringNodeGen#inline}
* Inline field: {@link Node} field2
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node writeSLObject1_toTruffleStringNode__field2_;
/**
* Source Info:
* Specialization: {@link SLWritePropertyNode#writeSLObject}
* Parameter: {@link SLToTruffleStringNode} toTruffleStringNode
* Inline method: {@link SLToTruffleStringNodeGen#inline}
* Inline field: {@link Node} field3
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node writeSLObject1_toTruffleStringNode__field3_;
WriteSLObject1Data() {
}
private static Lookup lookup_() {
return MethodHandles.lookup();
}
}
@GeneratedBy(SLWritePropertyNode.class)
@DenyReplace
private static final class WriteObject0Data extends Node implements SpecializationDataNode {
@Child WriteObject0Data next_;
/**
* State Info:
* 0-8: InlinedCache
* Specialization: {@link SLWritePropertyNode#writeObject}
* Parameter: {@link SLToMemberNode} asMember
* Inline method: {@link SLToMemberNodeGen#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int writeObject0_state_0_;
/**
* Source Info:
* Specialization: {@link SLWritePropertyNode#writeObject}
* Parameter: {@link InteropLibrary} objectLibrary
*/
@Child InteropLibrary objectLibrary_;
/**
* Source Info:
* Specialization: {@link SLWritePropertyNode#writeObject}
* Parameter: {@link SLToMemberNode} asMember
* Inline method: {@link SLToMemberNodeGen#inline}
* Inline field: {@link Node} field1
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node writeObject0_asMember__field1_;
/**
* Source Info:
* Specialization: {@link SLWritePropertyNode#writeObject}
* Parameter: {@link SLToMemberNode} asMember
* Inline method: {@link SLToMemberNodeGen#inline}
* Inline field: {@link Node} field2
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node writeObject0_asMember__field2_;
WriteObject0Data(WriteObject0Data next_) {
this.next_ = next_;
}
private static Lookup lookup_() {
return MethodHandles.lookup();
}
}
@GeneratedBy(SLWritePropertyNode.class)
@DenyReplace
private static final class WriteObject1Data extends Node implements SpecializationDataNode {
/**
* State Info:
* 0-8: InlinedCache
* Specialization: {@link SLWritePropertyNode#writeObject}
* Parameter: {@link SLToMemberNode} asMember
* Inline method: {@link SLToMemberNodeGen#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int writeObject1_state_0_;
/**
* Source Info:
* Specialization: {@link SLWritePropertyNode#writeObject}
* Parameter: {@link SLToMemberNode} asMember
* Inline method: {@link SLToMemberNodeGen#inline}
* Inline field: {@link Node} field1
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node writeObject1_asMember__field1_;
/**
* Source Info:
* Specialization: {@link SLWritePropertyNode#writeObject}
* Parameter: {@link SLToMemberNode} asMember
* Inline method: {@link SLToMemberNodeGen#inline}
* Inline field: {@link Node} field2
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node writeObject1_asMember__field2_;
WriteObject1Data() {
}
private static Lookup lookup_() {
return MethodHandles.lookup();
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy