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

org.truffleruby.debug.GlobalVariablesObjectGen Maven / Gradle / Ivy

The newest version!
// CheckStyle: start generated
package org.truffleruby.debug;

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.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.UnadoptableNode;
import java.lang.invoke.VarHandle;
import java.util.Objects;
import org.truffleruby.language.dispatch.DispatchNode;

@GeneratedBy(GlobalVariablesObject.class)
@SuppressWarnings("javadoc")
final class GlobalVariablesObjectGen {

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

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

    private GlobalVariablesObjectGen() {
    }

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

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

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

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

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

            /**
             * State Info: 
             *   0: SpecializationActive {@link GlobalVariablesObject#readMember(GlobalVariablesObject, String, InteropLibrary, DispatchNode)}
             *   1: SpecializationActive {@link GlobalVariablesObject#writeMember(GlobalVariablesObject, String, Object, InteropLibrary, DispatchNode, DispatchNode)}
             * 
*/ @CompilationFinal private int state_0_; /** * Source Info:
             *   Specialization: {@link GlobalVariablesObject#readMember(GlobalVariablesObject, String, InteropLibrary, DispatchNode)}
             *   Parameter: {@link DispatchNode} evalNode
*/ @Child private DispatchNode readMemberNode__readMember_evalNode_; /** * Source Info:
             *   Specialization: {@link GlobalVariablesObject#writeMember(GlobalVariablesObject, String, Object, InteropLibrary, DispatchNode, DispatchNode)}
             *   Parameter: {@link DispatchNode} evalNode
*/ @Child private DispatchNode writeMemberNode__writeMember_evalNode_; /** * Source Info:
             *   Specialization: {@link GlobalVariablesObject#writeMember(GlobalVariablesObject, String, Object, InteropLibrary, DispatchNode, DispatchNode)}
             *   Parameter: {@link DispatchNode} callNode
*/ @Child private DispatchNode writeMemberNode__writeMember_callNode_; protected Cached() { } @Override public boolean accepts(Object receiver) { assert !(receiver instanceof GlobalVariablesObject) || DYNAMIC_DISPATCH_LIBRARY_.getUncached().dispatch(receiver) == null : "Invalid library export. Exported receiver with dynamic dispatch found but not expected."; return receiver instanceof GlobalVariablesObject; } @Override public boolean hasMembers(Object receiver) { assert this.accepts(receiver) : "Invalid library usage. Library does not accept given receiver."; assert assertAdopted(); return (((GlobalVariablesObject) receiver)).hasMembers(); } @TruffleBoundary @Override public Object getMembers(Object receiver, boolean includeInternal) throws UnsupportedMessageException { assert this.accepts(receiver) : "Invalid library usage. Library does not accept given receiver."; assert assertAdopted(); return (((GlobalVariablesObject) receiver)).getMembers(includeInternal); } /** * Debug Info:
             *   Specialization {@link GlobalVariablesObject#readMember(GlobalVariablesObject, String, InteropLibrary, DispatchNode)}
             *     Activation probability: 0.25000
             *     With/without class size: 9/4 bytes
             * 
*/ @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(); GlobalVariablesObject arg0Value = ((GlobalVariablesObject) arg0Value_); int state_0 = this.state_0_; if ((state_0 & 0b1) != 0 /* is SpecializationActive[GlobalVariablesObject.readMember(GlobalVariablesObject, String, InteropLibrary, DispatchNode)] */) { { DispatchNode evalNode__ = this.readMemberNode__readMember_evalNode_; if (evalNode__ != null) { InteropLibrary node__ = (this); return arg0Value.readMember(arg1Value, node__, evalNode__); } } } CompilerDirectives.transferToInterpreterAndInvalidate(); return readMemberNode_AndSpecialize(arg0Value, arg1Value); } private Object readMemberNode_AndSpecialize(GlobalVariablesObject arg0Value, String arg1Value) throws UnknownIdentifierException { int state_0 = this.state_0_; { InteropLibrary node__ = null; node__ = (this); DispatchNode evalNode__ = this.insert((DispatchNode.create())); Objects.requireNonNull(evalNode__, "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."); VarHandle.storeStoreFence(); this.readMemberNode__readMember_evalNode_ = evalNode__; state_0 = state_0 | 0b1 /* add SpecializationActive[GlobalVariablesObject.readMember(GlobalVariablesObject, String, InteropLibrary, DispatchNode)] */; this.state_0_ = state_0; return arg0Value.readMember(arg1Value, node__, evalNode__); } } /** * Debug Info:
             *   Specialization {@link GlobalVariablesObject#writeMember(GlobalVariablesObject, String, Object, InteropLibrary, DispatchNode, DispatchNode)}
             *     Activation probability: 0.25000
             *     With/without class size: 10/8 bytes
             * 
*/ @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(); GlobalVariablesObject arg0Value = ((GlobalVariablesObject) arg0Value_); int state_0 = this.state_0_; if ((state_0 & 0b10) != 0 /* is SpecializationActive[GlobalVariablesObject.writeMember(GlobalVariablesObject, String, Object, InteropLibrary, DispatchNode, DispatchNode)] */) { { DispatchNode evalNode__ = this.writeMemberNode__writeMember_evalNode_; if (evalNode__ != null) { DispatchNode callNode__ = this.writeMemberNode__writeMember_callNode_; if (callNode__ != null) { InteropLibrary node__ = (this); arg0Value.writeMember(arg1Value, arg2Value, node__, evalNode__, callNode__); return; } } } } CompilerDirectives.transferToInterpreterAndInvalidate(); writeMemberNode_AndSpecialize(arg0Value, arg1Value, arg2Value); return; } private void writeMemberNode_AndSpecialize(GlobalVariablesObject arg0Value, String arg1Value, Object arg2Value) throws UnknownIdentifierException { int state_0 = this.state_0_; { InteropLibrary node__ = null; node__ = (this); DispatchNode evalNode__ = this.insert((DispatchNode.create())); Objects.requireNonNull(evalNode__, "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."); VarHandle.storeStoreFence(); this.writeMemberNode__writeMember_evalNode_ = evalNode__; DispatchNode callNode__ = this.insert((DispatchNode.create())); Objects.requireNonNull(callNode__, "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."); VarHandle.storeStoreFence(); this.writeMemberNode__writeMember_callNode_ = callNode__; state_0 = state_0 | 0b10 /* add SpecializationActive[GlobalVariablesObject.writeMember(GlobalVariablesObject, String, Object, InteropLibrary, DispatchNode, DispatchNode)] */; this.state_0_ = state_0; arg0Value.writeMember(arg1Value, arg2Value, node__, evalNode__, callNode__); return; } } /** * Debug Info:
             *   Specialization {@link GlobalVariablesObject#hasMemberSideEffects(GlobalVariablesObject, String, InteropLibrary)}
             *     Activation probability: 0.25000
             *     With/without class size: 7/0 bytes
             * 
*/ @Override public boolean hasMemberReadSideEffects(Object arg0Value_, String arg1Value) { assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver."; assert assertAdopted(); GlobalVariablesObject arg0Value = ((GlobalVariablesObject) arg0Value_); { InteropLibrary node__ = (this); return arg0Value.hasMemberSideEffects(arg1Value, node__); } } /** * Debug Info:
             *   Specialization {@link GlobalVariablesObject#hasMemberSideEffects(GlobalVariablesObject, String, InteropLibrary)}
             *     Activation probability: 0.25000
             *     With/without class size: 7/0 bytes
             * 
*/ @Override public boolean hasMemberWriteSideEffects(Object arg0Value_, String arg1Value) { assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver."; assert assertAdopted(); GlobalVariablesObject arg0Value = ((GlobalVariablesObject) arg0Value_); { InteropLibrary node__ = (this); return arg0Value.hasMemberSideEffects(arg1Value, node__); } } @TruffleBoundary @Override public boolean isMemberReadable(Object receiver, String member) { assert this.accepts(receiver) : "Invalid library usage. Library does not accept given receiver."; assert assertAdopted(); return (((GlobalVariablesObject) receiver)).isMemberReadable(member); } @TruffleBoundary @Override public boolean isMemberModifiable(Object receiver, String member) { assert this.accepts(receiver) : "Invalid library usage. Library does not accept given receiver."; assert assertAdopted(); return (((GlobalVariablesObject) receiver)).isMemberModifiable(member); } @TruffleBoundary @Override public boolean isMemberInsertable(Object receiver, String member) { assert this.accepts(receiver) : "Invalid library usage. Library does not accept given receiver."; assert assertAdopted(); return (((GlobalVariablesObject) receiver)).isMemberInsertable(member); } } @GeneratedBy(GlobalVariablesObject.class) @DenyReplace private static final class Uncached extends InteropLibrary implements UnadoptableNode { protected Uncached() { } @Override @TruffleBoundary public boolean accepts(Object receiver) { assert !(receiver instanceof GlobalVariablesObject) || DYNAMIC_DISPATCH_LIBRARY_.getUncached().dispatch(receiver) == null : "Invalid library export. Exported receiver with dynamic dispatch found but not expected."; return receiver instanceof GlobalVariablesObject; } @TruffleBoundary @Override public boolean hasMembers(Object receiver) { // declared: true assert this.accepts(receiver) : "Invalid library usage. Library does not accept given receiver."; return ((GlobalVariablesObject) receiver) .hasMembers(); } @TruffleBoundary @Override public Object getMembers(Object receiver, boolean includeInternal) throws UnsupportedMessageException { // declared: true assert this.accepts(receiver) : "Invalid library usage. Library does not accept given receiver."; return ((GlobalVariablesObject) receiver) .getMembers(includeInternal); } @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."; GlobalVariablesObject arg0Value = ((GlobalVariablesObject) arg0Value_); return arg0Value.readMember(arg1Value, (this), (DispatchNode.getUncached())); } @TruffleBoundary @Override public void writeMember(Object arg0Value_, String arg1Value, Object arg2Value) throws UnknownIdentifierException { // declared: true assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver."; GlobalVariablesObject arg0Value = ((GlobalVariablesObject) arg0Value_); arg0Value.writeMember(arg1Value, arg2Value, (this), (DispatchNode.getUncached()), (DispatchNode.getUncached())); return; } @TruffleBoundary @Override public boolean hasMemberReadSideEffects(Object arg0Value_, String arg1Value) { // declared: true assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver."; GlobalVariablesObject arg0Value = ((GlobalVariablesObject) arg0Value_); return arg0Value.hasMemberSideEffects(arg1Value, (this)); } @TruffleBoundary @Override public boolean hasMemberWriteSideEffects(Object arg0Value_, String arg1Value) { // declared: true assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver."; GlobalVariablesObject arg0Value = ((GlobalVariablesObject) arg0Value_); return arg0Value.hasMemberSideEffects(arg1Value, (this)); } @TruffleBoundary @Override public boolean isMemberReadable(Object receiver, String member) { // declared: true assert this.accepts(receiver) : "Invalid library usage. Library does not accept given receiver."; return ((GlobalVariablesObject) receiver) .isMemberReadable(member); } @TruffleBoundary @Override public boolean isMemberModifiable(Object receiver, String member) { // declared: true assert this.accepts(receiver) : "Invalid library usage. Library does not accept given receiver."; return ((GlobalVariablesObject) receiver) .isMemberModifiable(member); } @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 ((GlobalVariablesObject) receiver) .isMemberInsertable(member); } } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy