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

com.oracle.truffle.sl.nodes.local.VariablesObjectGen Maven / Gradle / Ivy

The newest version!
// CheckStyle: start generated
package com.oracle.truffle.sl.nodes.local;

import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.TruffleLanguage;
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.DSLSupport.SpecializationDataNode;
import com.oracle.truffle.api.dsl.InlineSupport.ReferenceField;
import com.oracle.truffle.api.dsl.InlineSupport.UnsafeAccessedField;
import com.oracle.truffle.api.interop.InteropLibrary;
import com.oracle.truffle.api.interop.UnknownIdentifierException;
import com.oracle.truffle.api.interop.UnsupportedMessageException;
import com.oracle.truffle.api.interop.UnsupportedTypeException;
import com.oracle.truffle.api.library.DynamicDispatchLibrary;
import com.oracle.truffle.api.library.LibraryExport;
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.UnadoptableNode;
import com.oracle.truffle.api.source.SourceSection;
import com.oracle.truffle.sl.nodes.controlflow.SLBlockNode;
import com.oracle.truffle.sl.nodes.local.SLScopedNode.VariablesObject;
import com.oracle.truffle.sl.nodes.local.SLScopedNode.VariablesObject.ExistsMember;
import com.oracle.truffle.sl.nodes.local.SLScopedNode.VariablesObject.ModifiableMember;
import com.oracle.truffle.sl.nodes.local.SLScopedNode.VariablesObject.ReadMember;
import com.oracle.truffle.sl.nodes.local.SLScopedNode.VariablesObject.WriteMember;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.VarHandle;

@GeneratedBy(VariablesObject.class)
@SuppressWarnings("javadoc")
final class VariablesObjectGen {

    private static final LibraryFactory DYNAMIC_DISPATCH_LIBRARY_ = LibraryFactory.resolve(DynamicDispatchLibrary.class);

    static  {
        LibraryExport.register(VariablesObject.class, new InteropLibraryExports());
    }

    private VariablesObjectGen() {
    }

    @GeneratedBy(VariablesObject.class)
    private static final class InteropLibraryExports extends LibraryExport {

        private InteropLibraryExports() {
            super(InteropLibrary.class, VariablesObject.class, false, false, 0);
        }

        @Override
        protected InteropLibrary createUncached(Object receiver) {
            assert receiver instanceof VariablesObject;
            InteropLibrary uncached = new Uncached();
            return uncached;
        }

        @Override
        protected InteropLibrary createCached(Object receiver) {
            assert receiver instanceof VariablesObject;
            return new Cached(receiver);
        }

        @GeneratedBy(VariablesObject.class)
        private static final class Cached extends InteropLibrary {

            static final ReferenceField EXISTS_MEMBER_CACHED_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "existsMember_cached_cache", ExistsMemberCachedData.class);
            static final ReferenceField MODIFIABLE_MEMBER_CACHED_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "modifiableMember_cached_cache", ModifiableMemberCachedData.class);
            static final ReferenceField READ_MEMBER_CACHED_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "readMember_cached_cache", ReadMemberCachedData.class);
            static final ReferenceField WRITE_MEMBER_CACHED_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "writeMember_cached_cache", WriteMemberCachedData.class);

            /**
             * State Info: 
             *   0: SpecializationActive {@link ExistsMember#doCached}
             *   1: SpecializationActive {@link ExistsMember#doGeneric}
             *   2: SpecializationActive {@link ModifiableMember#doCached}
             *   3: SpecializationActive {@link ModifiableMember#doGeneric}
             *   4: SpecializationActive {@link ReadMember#doCached}
             *   5: SpecializationActive {@link ReadMember#doGeneric}
             *   6: SpecializationActive {@link WriteMember#doCached}
             *   7: SpecializationActive {@link WriteMember#doGeneric}
             *   8: SpecializationActive {@link VariablesObject#toDisplayString(VariablesObject, boolean, SLBlockNode, Node)}
             *   9: SpecializationActive {@link VariablesObject#hasScopeParent(VariablesObject, SLBlockNode, Node)}
             *   10: SpecializationActive {@link VariablesObject#getScopeParent(VariablesObject, SLBlockNode, Node)}
             *   11: SpecializationActive {@link VariablesObject#getMembers(VariablesObject, boolean, SLWriteLocalVariableNode[], int, int)}
             * 
*/ @CompilationFinal private int state_0_; /** * Source Info:
             *   Specialization: {@link VariablesObject#toDisplayString}
             *   Parameter: {@link SLBlockNode} cachedBlock
*/ @CompilationFinal private SLBlockNode block; /** * Source Info:
             *   Specialization: {@link VariablesObject#toDisplayString}
             *   Parameter: {@link Node} parentBlock
*/ @CompilationFinal private Node parentBlock; @UnsafeAccessedField @CompilationFinal private ExistsMemberCachedData existsMember_cached_cache; @UnsafeAccessedField @CompilationFinal private ModifiableMemberCachedData modifiableMember_cached_cache; @UnsafeAccessedField @CompilationFinal private ReadMemberCachedData readMember_cached_cache; @UnsafeAccessedField @Child private WriteMemberCachedData writeMember_cached_cache; /** * Source Info:
             *   Specialization: {@link VariablesObject#accepts(VariablesObject, SLScopedNode, boolean)}
             *   Parameter: {@link SLScopedNode} cachedNode
*/ @CompilationFinal private SLScopedNode acceptsNode__accepts_cachedNode_; /** * Source Info:
             *   Specialization: {@link VariablesObject#accepts(VariablesObject, SLScopedNode, boolean)}
             *   Parameter: boolean cachedNodeEnter
*/ @CompilationFinal private boolean acceptsNode__accepts_cachedNodeEnter_; @Child private GetMembersNode_GetMembersData getMembersNode__getMembers_cache; protected Cached(Object receiver) { VariablesObject castReceiver = ((VariablesObject) receiver) ; VarHandle.storeStoreFence(); this.acceptsNode__accepts_cachedNode_ = (castReceiver.node); this.acceptsNode__accepts_cachedNodeEnter_ = (castReceiver.nodeEnter); } @Override public boolean accepts(Object receiver) { assert !(receiver instanceof VariablesObject) || DYNAMIC_DISPATCH_LIBRARY_.getUncached().dispatch(receiver) == null : "Invalid library export. Exported receiver with dynamic dispatch found but not expected."; return receiver instanceof VariablesObject && accepts_(receiver); } /** * Debug Info:
             *   Specialization {@link ExistsMember#doCached}
             *     Activation probability: 0.07222
             *     With/without class size: 5/5 bytes
             *   Specialization {@link ExistsMember#doGeneric}
             *     Activation probability: 0.03889
             *     With/without class size: 4/0 bytes
             * 
*/ @ExplodeLoop @Override public boolean isMemberReadable(Object arg0Value_, String arg1Value) { assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver."; assert assertAdopted(); VariablesObject arg0Value = ((VariablesObject) arg0Value_); int state_0 = this.state_0_; if ((state_0 & 0b11) != 0 /* is SpecializationActive[VariablesObject.ExistsMember.doCached(VariablesObject, String, String, boolean)] || SpecializationActive[VariablesObject.ExistsMember.doGeneric(VariablesObject, String)] */) { if ((state_0 & 0b1) != 0 /* is SpecializationActive[VariablesObject.ExistsMember.doCached(VariablesObject, String, String, boolean)] */) { ExistsMemberCachedData s0_ = this.existsMember_cached_cache; while (s0_ != null) { if ((s0_.cachedMember_.equals(arg1Value))) { return ExistsMember.doCached(arg0Value, arg1Value, s0_.cachedMember_, s0_.cachedResult_); } s0_ = s0_.next_; } } if ((state_0 & 0b10) != 0 /* is SpecializationActive[VariablesObject.ExistsMember.doGeneric(VariablesObject, String)] */) { return ExistsMember.doGeneric(arg0Value, arg1Value); } } CompilerDirectives.transferToInterpreterAndInvalidate(); return existsMemberAndSpecialize(arg0Value, arg1Value); } private boolean existsMemberAndSpecialize(VariablesObject arg0Value, String arg1Value) { int state_0 = this.state_0_; if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[VariablesObject.ExistsMember.doGeneric(VariablesObject, String)] */) { while (true) { int count0_ = 0; ExistsMemberCachedData s0_ = EXISTS_MEMBER_CACHED_CACHE_UPDATER.getVolatile(this); ExistsMemberCachedData s0_original = s0_; while (s0_ != null) { if ((s0_.cachedMember_.equals(arg1Value))) { break; } count0_++; s0_ = s0_.next_; } if (s0_ == null) { // assert (s0_.cachedMember_.equals(arg1Value)); if (count0_ < (VariablesObject.LIMIT)) { s0_ = new ExistsMemberCachedData(s0_original); s0_.cachedMember_ = (arg1Value); s0_.cachedResult_ = (ExistsMember.doGeneric(arg0Value, arg1Value)); if (!EXISTS_MEMBER_CACHED_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) { continue; } state_0 = state_0 | 0b1 /* add SpecializationActive[VariablesObject.ExistsMember.doCached(VariablesObject, String, String, boolean)] */; this.state_0_ = state_0; } } if (s0_ != null) { return ExistsMember.doCached(arg0Value, arg1Value, s0_.cachedMember_, s0_.cachedResult_); } break; } } this.existsMember_cached_cache = null; state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[VariablesObject.ExistsMember.doCached(VariablesObject, String, String, boolean)] */; state_0 = state_0 | 0b10 /* add SpecializationActive[VariablesObject.ExistsMember.doGeneric(VariablesObject, String)] */; this.state_0_ = state_0; return ExistsMember.doGeneric(arg0Value, arg1Value); } /** * Debug Info:
             *   Specialization {@link ModifiableMember#doCached}
             *     Activation probability: 0.07222
             *     With/without class size: 5/5 bytes
             *   Specialization {@link ModifiableMember#doGeneric}
             *     Activation probability: 0.03889
             *     With/without class size: 4/0 bytes
             * 
*/ @ExplodeLoop @Override public boolean isMemberModifiable(Object arg0Value_, String arg1Value) { assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver."; assert assertAdopted(); VariablesObject arg0Value = ((VariablesObject) arg0Value_); int state_0 = this.state_0_; if ((state_0 & 0b1100) != 0 /* is SpecializationActive[VariablesObject.ModifiableMember.doCached(VariablesObject, String, String, boolean)] || SpecializationActive[VariablesObject.ModifiableMember.doGeneric(VariablesObject, String)] */) { if ((state_0 & 0b100) != 0 /* is SpecializationActive[VariablesObject.ModifiableMember.doCached(VariablesObject, String, String, boolean)] */) { ModifiableMemberCachedData s0_ = this.modifiableMember_cached_cache; while (s0_ != null) { if ((s0_.cachedMember_.equals(arg1Value))) { return ModifiableMember.doCached(arg0Value, arg1Value, s0_.cachedMember_, s0_.cachedResult_); } s0_ = s0_.next_; } } if ((state_0 & 0b1000) != 0 /* is SpecializationActive[VariablesObject.ModifiableMember.doGeneric(VariablesObject, String)] */) { return ModifiableMember.doGeneric(arg0Value, arg1Value); } } CompilerDirectives.transferToInterpreterAndInvalidate(); return modifiableMemberAndSpecialize(arg0Value, arg1Value); } private boolean modifiableMemberAndSpecialize(VariablesObject arg0Value, String arg1Value) { int state_0 = this.state_0_; if (((state_0 & 0b1000)) == 0 /* is-not SpecializationActive[VariablesObject.ModifiableMember.doGeneric(VariablesObject, String)] */) { while (true) { int count0_ = 0; ModifiableMemberCachedData s0_ = MODIFIABLE_MEMBER_CACHED_CACHE_UPDATER.getVolatile(this); ModifiableMemberCachedData s0_original = s0_; while (s0_ != null) { if ((s0_.cachedMember_.equals(arg1Value))) { break; } count0_++; s0_ = s0_.next_; } if (s0_ == null) { // assert (s0_.cachedMember_.equals(arg1Value)); if (count0_ < (VariablesObject.LIMIT)) { s0_ = new ModifiableMemberCachedData(s0_original); s0_.cachedMember_ = (arg1Value); s0_.cachedResult_ = (arg0Value.hasWriteNode(arg1Value)); if (!MODIFIABLE_MEMBER_CACHED_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) { continue; } state_0 = state_0 | 0b100 /* add SpecializationActive[VariablesObject.ModifiableMember.doCached(VariablesObject, String, String, boolean)] */; this.state_0_ = state_0; } } if (s0_ != null) { return ModifiableMember.doCached(arg0Value, arg1Value, s0_.cachedMember_, s0_.cachedResult_); } break; } } this.modifiableMember_cached_cache = null; state_0 = state_0 & 0xfffffffb /* remove SpecializationActive[VariablesObject.ModifiableMember.doCached(VariablesObject, String, String, boolean)] */; state_0 = state_0 | 0b1000 /* add SpecializationActive[VariablesObject.ModifiableMember.doGeneric(VariablesObject, String)] */; this.state_0_ = state_0; return ModifiableMember.doGeneric(arg0Value, arg1Value); } /** * Debug Info:
             *   Specialization {@link ReadMember#doCached}
             *     Activation probability: 0.07222
             *     With/without class size: 5/8 bytes
             *   Specialization {@link ReadMember#doGeneric}
             *     Activation probability: 0.03889
             *     With/without class size: 4/0 bytes
             * 
*/ @ExplodeLoop @Override public Object readMember(Object arg0Value_, String arg1Value) throws UnsupportedMessageException, UnknownIdentifierException { assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver."; assert assertAdopted(); VariablesObject arg0Value = ((VariablesObject) arg0Value_); int state_0 = this.state_0_; if ((state_0 & 0b110000) != 0 /* is SpecializationActive[VariablesObject.ReadMember.doCached(VariablesObject, String, String, int)] || SpecializationActive[VariablesObject.ReadMember.doGeneric(VariablesObject, String)] */) { if ((state_0 & 0b10000) != 0 /* is SpecializationActive[VariablesObject.ReadMember.doCached(VariablesObject, String, String, int)] */) { ReadMemberCachedData s0_ = this.readMember_cached_cache; while (s0_ != null) { if ((s0_.cachedMember_.equals(arg1Value))) { return ReadMember.doCached(arg0Value, arg1Value, s0_.cachedMember_, s0_.slot_); } s0_ = s0_.next_; } } if ((state_0 & 0b100000) != 0 /* is SpecializationActive[VariablesObject.ReadMember.doGeneric(VariablesObject, String)] */) { return ReadMember.doGeneric(arg0Value, arg1Value); } } CompilerDirectives.transferToInterpreterAndInvalidate(); return readMemberAndSpecialize(arg0Value, arg1Value); } private Object readMemberAndSpecialize(VariablesObject arg0Value, String arg1Value) throws UnknownIdentifierException { int state_0 = this.state_0_; if (((state_0 & 0b100000)) == 0 /* is-not SpecializationActive[VariablesObject.ReadMember.doGeneric(VariablesObject, String)] */) { while (true) { int count0_ = 0; ReadMemberCachedData s0_ = READ_MEMBER_CACHED_CACHE_UPDATER.getVolatile(this); ReadMemberCachedData s0_original = s0_; while (s0_ != null) { if ((s0_.cachedMember_.equals(arg1Value))) { break; } count0_++; s0_ = s0_.next_; } if (s0_ == null) { // assert (s0_.cachedMember_.equals(arg1Value)); if (count0_ < (VariablesObject.LIMIT)) { s0_ = new ReadMemberCachedData(s0_original); s0_.cachedMember_ = (arg1Value); s0_.slot_ = (arg0Value.findSlot(arg1Value)); if (!READ_MEMBER_CACHED_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) { continue; } state_0 = state_0 | 0b10000 /* add SpecializationActive[VariablesObject.ReadMember.doCached(VariablesObject, String, String, int)] */; this.state_0_ = state_0; } } if (s0_ != null) { return ReadMember.doCached(arg0Value, arg1Value, s0_.cachedMember_, s0_.slot_); } break; } } this.readMember_cached_cache = null; state_0 = state_0 & 0xffffffef /* remove SpecializationActive[VariablesObject.ReadMember.doCached(VariablesObject, String, String, int)] */; state_0 = state_0 | 0b100000 /* add SpecializationActive[VariablesObject.ReadMember.doGeneric(VariablesObject, String)] */; this.state_0_ = state_0; return ReadMember.doGeneric(arg0Value, arg1Value); } /** * Debug Info:
             *   Specialization {@link WriteMember#doCached}
             *     Activation probability: 0.07222
             *     With/without class size: 6/8 bytes
             *   Specialization {@link WriteMember#doGeneric}
             *     Activation probability: 0.03889
             *     With/without class size: 4/0 bytes
             * 
*/ @ExplodeLoop @Override public void writeMember(Object arg0Value_, String arg1Value, Object arg2Value) throws UnsupportedMessageException, UnknownIdentifierException, UnsupportedTypeException { assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver."; assert assertAdopted(); VariablesObject arg0Value = ((VariablesObject) arg0Value_); int state_0 = this.state_0_; if ((state_0 & 0b11000000) != 0 /* is SpecializationActive[VariablesObject.WriteMember.doCached(VariablesObject, String, Object, String, SLWriteLocalVariableNode)] || SpecializationActive[VariablesObject.WriteMember.doGeneric(VariablesObject, String, Object)] */) { if ((state_0 & 0b1000000) != 0 /* is SpecializationActive[VariablesObject.WriteMember.doCached(VariablesObject, String, Object, String, SLWriteLocalVariableNode)] */) { WriteMemberCachedData s0_ = this.writeMember_cached_cache; while (s0_ != null) { if ((s0_.cachedMember_.equals(arg1Value))) { WriteMember.doCached(arg0Value, arg1Value, arg2Value, s0_.cachedMember_, s0_.writeNode_); return; } s0_ = s0_.next_; } } if ((state_0 & 0b10000000) != 0 /* is SpecializationActive[VariablesObject.WriteMember.doGeneric(VariablesObject, String, Object)] */) { WriteMember.doGeneric(arg0Value, arg1Value, arg2Value); return; } } CompilerDirectives.transferToInterpreterAndInvalidate(); writeMemberAndSpecialize(arg0Value, arg1Value, arg2Value); return; } private void writeMemberAndSpecialize(VariablesObject arg0Value, String arg1Value, Object arg2Value) throws UnknownIdentifierException, UnsupportedMessageException { int state_0 = this.state_0_; if (((state_0 & 0b10000000)) == 0 /* is-not SpecializationActive[VariablesObject.WriteMember.doGeneric(VariablesObject, String, Object)] */) { while (true) { int count0_ = 0; WriteMemberCachedData s0_ = WRITE_MEMBER_CACHED_CACHE_UPDATER.getVolatile(this); WriteMemberCachedData s0_original = s0_; while (s0_ != null) { if ((s0_.cachedMember_.equals(arg1Value))) { break; } count0_++; s0_ = s0_.next_; } if (s0_ == null) { // assert (s0_.cachedMember_.equals(arg1Value)); if (count0_ < (VariablesObject.LIMIT)) { s0_ = this.insert(new WriteMemberCachedData(s0_original)); s0_.cachedMember_ = (arg1Value); s0_.writeNode_ = (arg0Value.findWriteNode(arg1Value)); if (!WRITE_MEMBER_CACHED_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) { continue; } state_0 = state_0 | 0b1000000 /* add SpecializationActive[VariablesObject.WriteMember.doCached(VariablesObject, String, Object, String, SLWriteLocalVariableNode)] */; this.state_0_ = state_0; } } if (s0_ != null) { WriteMember.doCached(arg0Value, arg1Value, arg2Value, s0_.cachedMember_, s0_.writeNode_); return; } break; } } this.writeMember_cached_cache = null; state_0 = state_0 & 0xffffffbf /* remove SpecializationActive[VariablesObject.WriteMember.doCached(VariablesObject, String, Object, String, SLWriteLocalVariableNode)] */; state_0 = state_0 | 0b10000000 /* add SpecializationActive[VariablesObject.WriteMember.doGeneric(VariablesObject, String, Object)] */; this.state_0_ = state_0; WriteMember.doGeneric(arg0Value, arg1Value, arg2Value); return; } /** * Debug Info:
             *   Specialization {@link VariablesObject#accepts(VariablesObject, SLScopedNode, boolean)}
             *     Activation probability: 0.11111
             *     With/without class size: 5/0 bytes
             * 
*/ private boolean accepts_(Object arg0Value_) { VariablesObject arg0Value = ((VariablesObject) arg0Value_); return arg0Value.accepts(this.acceptsNode__accepts_cachedNode_, this.acceptsNode__accepts_cachedNodeEnter_); } @Override public boolean isScope(Object receiver) { assert this.accepts(receiver) : "Invalid library usage. Library does not accept given receiver."; assert assertAdopted(); return (((VariablesObject) receiver)).isScope(); } @Override public boolean hasLanguage(Object receiver) { assert this.accepts(receiver) : "Invalid library usage. Library does not accept given receiver."; assert assertAdopted(); return (((VariablesObject) receiver)).hasLanguage(); } @Override public Class> getLanguage(Object receiver) throws UnsupportedMessageException { assert this.accepts(receiver) : "Invalid library usage. Library does not accept given receiver."; assert assertAdopted(); return (((VariablesObject) receiver)).getLanguage(); } /** * Debug Info:
             *   Specialization {@link VariablesObject#toDisplayString(VariablesObject, boolean, SLBlockNode, Node)}
             *     Activation probability: 0.11111
             *     With/without class size: 5/0 bytes
             * 
*/ @Override public Object toDisplayString(Object arg0Value_, boolean arg1Value) { assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver."; assert assertAdopted(); VariablesObject arg0Value = ((VariablesObject) arg0Value_); int state_0 = this.state_0_; if ((state_0 & 0b100000000) != 0 /* is SpecializationActive[VariablesObject.toDisplayString(VariablesObject, boolean, SLBlockNode, Node)] */) { { SLBlockNode block_ = this.block; if (block_ != null) { Node parentBlock_ = this.parentBlock; if (parentBlock_ != null) { return arg0Value.toDisplayString(arg1Value, block_, parentBlock_); } } } } CompilerDirectives.transferToInterpreterAndInvalidate(); return toDisplayStringNode_AndSpecialize(arg0Value, arg1Value); } private Object toDisplayStringNode_AndSpecialize(VariablesObject arg0Value, boolean arg1Value) { int state_0 = this.state_0_; SLBlockNode block_; SLBlockNode block__shared = this.block; if (block__shared != null) { block_ = block__shared; } else { block_ = (arg0Value.block); if (block_ == null) { throw new IllegalStateException("A specialization returned a default value for a cached initializer. Default values are not supported for shared cached initializers because the default value is reserved for the uninitialized state."); } } if (this.block == null) { VarHandle.storeStoreFence(); this.block = block_; } Node parentBlock_; Node parentBlock__shared = this.parentBlock; if (parentBlock__shared != null) { parentBlock_ = parentBlock__shared; } else { parentBlock_ = (arg0Value.block.findBlock()); if (parentBlock_ == null) { throw new IllegalStateException("A specialization returned a default value for a cached initializer. Default values are not supported for shared cached initializers because the default value is reserved for the uninitialized state."); } } if (this.parentBlock == null) { VarHandle.storeStoreFence(); this.parentBlock = parentBlock_; } state_0 = state_0 | 0b100000000 /* add SpecializationActive[VariablesObject.toDisplayString(VariablesObject, boolean, SLBlockNode, Node)] */; this.state_0_ = state_0; return arg0Value.toDisplayString(arg1Value, block_, parentBlock_); } /** * Debug Info:
             *   Specialization {@link VariablesObject#hasScopeParent(VariablesObject, SLBlockNode, Node)}
             *     Activation probability: 0.11111
             *     With/without class size: 5/0 bytes
             * 
*/ @Override public boolean hasScopeParent(Object arg0Value_) { assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver."; assert assertAdopted(); VariablesObject arg0Value = ((VariablesObject) arg0Value_); int state_0 = this.state_0_; if ((state_0 & 0b1000000000) != 0 /* is SpecializationActive[VariablesObject.hasScopeParent(VariablesObject, SLBlockNode, Node)] */) { { SLBlockNode block_ = this.block; if (block_ != null) { Node parentBlock_ = this.parentBlock; if (parentBlock_ != null) { return arg0Value.hasScopeParent(block_, parentBlock_); } } } } CompilerDirectives.transferToInterpreterAndInvalidate(); return hasScopeParentNode_AndSpecialize(arg0Value); } private boolean hasScopeParentNode_AndSpecialize(VariablesObject arg0Value) { int state_0 = this.state_0_; SLBlockNode block_; SLBlockNode block__shared = this.block; if (block__shared != null) { block_ = block__shared; } else { block_ = (arg0Value.block); if (block_ == null) { throw new IllegalStateException("A specialization returned a default value for a cached initializer. Default values are not supported for shared cached initializers because the default value is reserved for the uninitialized state."); } } if (this.block == null) { VarHandle.storeStoreFence(); this.block = block_; } Node parentBlock_; Node parentBlock__shared = this.parentBlock; if (parentBlock__shared != null) { parentBlock_ = parentBlock__shared; } else { parentBlock_ = (arg0Value.block.findBlock()); if (parentBlock_ == null) { throw new IllegalStateException("A specialization returned a default value for a cached initializer. Default values are not supported for shared cached initializers because the default value is reserved for the uninitialized state."); } } if (this.parentBlock == null) { VarHandle.storeStoreFence(); this.parentBlock = parentBlock_; } state_0 = state_0 | 0b1000000000 /* add SpecializationActive[VariablesObject.hasScopeParent(VariablesObject, SLBlockNode, Node)] */; this.state_0_ = state_0; return arg0Value.hasScopeParent(block_, parentBlock_); } /** * Debug Info:
             *   Specialization {@link VariablesObject#getScopeParent(VariablesObject, SLBlockNode, Node)}
             *     Activation probability: 0.11111
             *     With/without class size: 5/0 bytes
             * 
*/ @Override public Object getScopeParent(Object arg0Value_) throws UnsupportedMessageException { assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver."; assert assertAdopted(); VariablesObject arg0Value = ((VariablesObject) arg0Value_); int state_0 = this.state_0_; if ((state_0 & 0b10000000000) != 0 /* is SpecializationActive[VariablesObject.getScopeParent(VariablesObject, SLBlockNode, Node)] */) { { SLBlockNode block_ = this.block; if (block_ != null) { Node parentBlock_ = this.parentBlock; if (parentBlock_ != null) { return arg0Value.getScopeParent(block_, parentBlock_); } } } } CompilerDirectives.transferToInterpreterAndInvalidate(); return getScopeParentNode_AndSpecialize(arg0Value); } private Object getScopeParentNode_AndSpecialize(VariablesObject arg0Value) throws UnsupportedMessageException { int state_0 = this.state_0_; SLBlockNode block_; SLBlockNode block__shared = this.block; if (block__shared != null) { block_ = block__shared; } else { block_ = (arg0Value.block); if (block_ == null) { throw new IllegalStateException("A specialization returned a default value for a cached initializer. Default values are not supported for shared cached initializers because the default value is reserved for the uninitialized state."); } } if (this.block == null) { VarHandle.storeStoreFence(); this.block = block_; } Node parentBlock_; Node parentBlock__shared = this.parentBlock; if (parentBlock__shared != null) { parentBlock_ = parentBlock__shared; } else { parentBlock_ = (arg0Value.block.findBlock()); if (parentBlock_ == null) { throw new IllegalStateException("A specialization returned a default value for a cached initializer. Default values are not supported for shared cached initializers because the default value is reserved for the uninitialized state."); } } if (this.parentBlock == null) { VarHandle.storeStoreFence(); this.parentBlock = parentBlock_; } state_0 = state_0 | 0b10000000000 /* add SpecializationActive[VariablesObject.getScopeParent(VariablesObject, SLBlockNode, Node)] */; this.state_0_ = state_0; return arg0Value.getScopeParent(block_, parentBlock_); } @Override public boolean hasSourceLocation(Object receiver) { assert this.accepts(receiver) : "Invalid library usage. Library does not accept given receiver."; assert assertAdopted(); return (((VariablesObject) receiver)).hasSourceLocation(); } @TruffleBoundary @Override public SourceSection getSourceLocation(Object receiver) throws UnsupportedMessageException { assert this.accepts(receiver) : "Invalid library usage. Library does not accept given receiver."; assert assertAdopted(); return (((VariablesObject) receiver)).getSourceLocation(); } @Override public boolean hasMembers(Object receiver) { assert this.accepts(receiver) : "Invalid library usage. Library does not accept given receiver."; assert assertAdopted(); return (((VariablesObject) receiver)).hasMembers(); } @Override public boolean isMemberInsertable(Object receiver, String member) { assert this.accepts(receiver) : "Invalid library usage. Library does not accept given receiver."; assert assertAdopted(); return (((VariablesObject) receiver)).isMemberInsertable(member); } /** * Debug Info:
             *   Specialization {@link VariablesObject#getMembers(VariablesObject, boolean, SLWriteLocalVariableNode[], int, int)}
             *     Activation probability: 0.11111
             *     With/without class size: 7/12 bytes
             * 
*/ @Override public Object getMembers(Object arg0Value_, boolean arg1Value) throws UnsupportedMessageException { assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver."; assert assertAdopted(); VariablesObject arg0Value = ((VariablesObject) arg0Value_); int state_0 = this.state_0_; if ((state_0 & 0b100000000000) != 0 /* is SpecializationActive[VariablesObject.getMembers(VariablesObject, boolean, SLWriteLocalVariableNode[], int, int)] */) { GetMembersNode_GetMembersData s0_ = this.getMembersNode__getMembers_cache; if (s0_ != null) { return arg0Value.getMembers(arg1Value, s0_.writeNodes_, s0_.visibleVariablesIndex_, s0_.parentBlockIndex_); } } CompilerDirectives.transferToInterpreterAndInvalidate(); return getMembersNode_AndSpecialize(arg0Value, arg1Value); } private Object getMembersNode_AndSpecialize(VariablesObject arg0Value, boolean arg1Value) { int state_0 = this.state_0_; GetMembersNode_GetMembersData s0_ = this.insert(new GetMembersNode_GetMembersData()); s0_.writeNodes_ = (arg0Value.block.getDeclaredLocalVariables()); s0_.visibleVariablesIndex_ = (arg0Value.getVisibleVariablesIndex()); s0_.parentBlockIndex_ = (arg0Value.block.getParentBlockIndex()); VarHandle.storeStoreFence(); this.getMembersNode__getMembers_cache = s0_; state_0 = state_0 | 0b100000000000 /* add SpecializationActive[VariablesObject.getMembers(VariablesObject, boolean, SLWriteLocalVariableNode[], int, int)] */; this.state_0_ = state_0; return arg0Value.getMembers(arg1Value, s0_.writeNodes_, s0_.visibleVariablesIndex_, s0_.parentBlockIndex_); } @GeneratedBy(VariablesObject.class) @DenyReplace private static final class ExistsMemberCachedData implements SpecializationDataNode { @CompilationFinal final ExistsMemberCachedData next_; /** * Source Info:
                 *   Specialization: {@link ExistsMember#doCached}
                 *   Parameter: {@link String} cachedMember
*/ @CompilationFinal String cachedMember_; /** * Source Info:
                 *   Specialization: {@link ExistsMember#doCached}
                 *   Parameter: boolean cachedResult
*/ @CompilationFinal boolean cachedResult_; ExistsMemberCachedData(ExistsMemberCachedData next_) { this.next_ = next_; } } @GeneratedBy(VariablesObject.class) @DenyReplace private static final class ModifiableMemberCachedData implements SpecializationDataNode { @CompilationFinal final ModifiableMemberCachedData next_; /** * Source Info:
                 *   Specialization: {@link ModifiableMember#doCached}
                 *   Parameter: {@link String} cachedMember
*/ @CompilationFinal String cachedMember_; /** * Source Info:
                 *   Specialization: {@link ModifiableMember#doCached}
                 *   Parameter: boolean cachedResult
*/ @CompilationFinal boolean cachedResult_; ModifiableMemberCachedData(ModifiableMemberCachedData next_) { this.next_ = next_; } } @GeneratedBy(VariablesObject.class) @DenyReplace private static final class ReadMemberCachedData implements SpecializationDataNode { @CompilationFinal final ReadMemberCachedData next_; /** * Source Info:
                 *   Specialization: {@link ReadMember#doCached}
                 *   Parameter: {@link String} cachedMember
*/ @CompilationFinal String cachedMember_; /** * Source Info:
                 *   Specialization: {@link ReadMember#doCached}
                 *   Parameter: int slot
*/ @CompilationFinal int slot_; ReadMemberCachedData(ReadMemberCachedData next_) { this.next_ = next_; } } @GeneratedBy(VariablesObject.class) @DenyReplace private static final class WriteMemberCachedData extends Node implements SpecializationDataNode { @Child WriteMemberCachedData next_; /** * Source Info:
                 *   Specialization: {@link WriteMember#doCached}
                 *   Parameter: {@link String} cachedMember
*/ @CompilationFinal String cachedMember_; /** * Source Info:
                 *   Specialization: {@link WriteMember#doCached}
                 *   Parameter: {@link SLWriteLocalVariableNode} writeNode
*/ @CompilationFinal SLWriteLocalVariableNode writeNode_; WriteMemberCachedData(WriteMemberCachedData next_) { this.next_ = next_; } } @GeneratedBy(VariablesObject.class) @DenyReplace private static final class GetMembersNode_GetMembersData extends Node implements SpecializationDataNode { /** * Source Info:
                 *   Specialization: {@link VariablesObject#getMembers(VariablesObject, boolean, SLWriteLocalVariableNode[], int, int)}
                 *   Parameter: {@link SLWriteLocalVariableNode} writeNodes
*/ @CompilationFinal(dimensions = 1) SLWriteLocalVariableNode[] writeNodes_; /** * Source Info:
                 *   Specialization: {@link VariablesObject#getMembers(VariablesObject, boolean, SLWriteLocalVariableNode[], int, int)}
                 *   Parameter: int visibleVariablesIndex
*/ @CompilationFinal int visibleVariablesIndex_; /** * Source Info:
                 *   Specialization: {@link VariablesObject#getMembers(VariablesObject, boolean, SLWriteLocalVariableNode[], int, int)}
                 *   Parameter: int parentBlockIndex
*/ @CompilationFinal int parentBlockIndex_; GetMembersNode_GetMembersData() { } } } @GeneratedBy(VariablesObject.class) @DenyReplace private static final class Uncached extends InteropLibrary implements UnadoptableNode { protected Uncached() { } @Override @TruffleBoundary public boolean accepts(Object receiver) { assert !(receiver instanceof VariablesObject) || DYNAMIC_DISPATCH_LIBRARY_.getUncached().dispatch(receiver) == null : "Invalid library export. Exported receiver with dynamic dispatch found but not expected."; return receiver instanceof VariablesObject && accepts_(receiver); } @TruffleBoundary @Override public boolean isMemberReadable(Object arg0Value_, String arg1Value) { // declared: true assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver."; VariablesObject arg0Value = ((VariablesObject) arg0Value_); return ExistsMember.doGeneric(arg0Value, arg1Value); } @TruffleBoundary @Override public boolean isMemberModifiable(Object arg0Value_, String arg1Value) { // declared: true assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver."; VariablesObject arg0Value = ((VariablesObject) arg0Value_); return ModifiableMember.doGeneric(arg0Value, arg1Value); } @TruffleBoundary @Override public Object readMember(Object arg0Value_, String arg1Value) throws UnknownIdentifierException { // declared: true assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver."; VariablesObject arg0Value = ((VariablesObject) arg0Value_); return ReadMember.doGeneric(arg0Value, arg1Value); } @TruffleBoundary @Override public void writeMember(Object arg0Value_, String arg1Value, Object arg2Value) throws UnknownIdentifierException, UnsupportedMessageException { // declared: true assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver."; VariablesObject arg0Value = ((VariablesObject) arg0Value_); WriteMember.doGeneric(arg0Value, arg1Value, arg2Value); return; } @TruffleBoundary @Override public boolean isScope(Object receiver) { // declared: true assert this.accepts(receiver) : "Invalid library usage. Library does not accept given receiver."; return ((VariablesObject) receiver) .isScope(); } @TruffleBoundary @Override public boolean hasLanguage(Object receiver) { // declared: true assert this.accepts(receiver) : "Invalid library usage. Library does not accept given receiver."; return ((VariablesObject) receiver) .hasLanguage(); } @TruffleBoundary @Override public Class> getLanguage(Object receiver) throws UnsupportedMessageException { // declared: true assert this.accepts(receiver) : "Invalid library usage. Library does not accept given receiver."; return ((VariablesObject) receiver) .getLanguage(); } @TruffleBoundary @Override public Object toDisplayString(Object arg0Value_, boolean arg1Value) { // declared: true assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver."; VariablesObject arg0Value = ((VariablesObject) arg0Value_); return arg0Value.toDisplayString(arg1Value, (arg0Value.block), (arg0Value.block.findBlock())); } @TruffleBoundary @Override public boolean hasScopeParent(Object arg0Value_) { // declared: true assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver."; VariablesObject arg0Value = ((VariablesObject) arg0Value_); return arg0Value.hasScopeParent((arg0Value.block), (arg0Value.block.findBlock())); } @TruffleBoundary @Override public Object getScopeParent(Object arg0Value_) throws UnsupportedMessageException { // declared: true assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver."; VariablesObject arg0Value = ((VariablesObject) arg0Value_); return arg0Value.getScopeParent((arg0Value.block), (arg0Value.block.findBlock())); } @TruffleBoundary @Override public boolean hasSourceLocation(Object receiver) { // declared: true assert this.accepts(receiver) : "Invalid library usage. Library does not accept given receiver."; return ((VariablesObject) receiver) .hasSourceLocation(); } @TruffleBoundary @Override public SourceSection getSourceLocation(Object receiver) throws UnsupportedMessageException { // declared: true assert this.accepts(receiver) : "Invalid library usage. Library does not accept given receiver."; return ((VariablesObject) receiver) .getSourceLocation(); } @TruffleBoundary @Override public boolean hasMembers(Object receiver) { // declared: true assert this.accepts(receiver) : "Invalid library usage. Library does not accept given receiver."; return ((VariablesObject) receiver) .hasMembers(); } @TruffleBoundary @Override public boolean isMemberInsertable(Object receiver, String member) { // declared: true assert this.accepts(receiver) : "Invalid library usage. Library does not accept given receiver."; return ((VariablesObject) receiver) .isMemberInsertable(member); } @TruffleBoundary @Override public Object getMembers(Object arg0Value_, boolean arg1Value) { // declared: true assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver."; VariablesObject arg0Value = ((VariablesObject) arg0Value_); return arg0Value.getMembers(arg1Value, (arg0Value.block.getDeclaredLocalVariables()), (arg0Value.getVisibleVariablesIndex()), (arg0Value.block.getParentBlockIndex())); } @TruffleBoundary private static boolean accepts_(Object arg0Value_) { VariablesObject arg0Value = ((VariablesObject) arg0Value_); return arg0Value.accepts((arg0Value.node), (arg0Value.nodeEnter)); } } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy