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

com.oracle.truffle.nfi.FP80BufferGen Maven / Gradle / Ivy

The newest version!
// CheckStyle: start generated
package com.oracle.truffle.nfi;

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.UnsupportedMessageException;
import com.oracle.truffle.api.library.DynamicDispatchLibrary;
import com.oracle.truffle.api.library.Library;
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 com.oracle.truffle.api.utilities.FinalBitSet;
import com.oracle.truffle.nfi.LongDoubleUtil.FP80Buffer;
import java.math.BigInteger;

@GeneratedBy(FP80Buffer.class)
@SuppressWarnings("javadoc")
final class FP80BufferGen {

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

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

    private FP80BufferGen() {
    }

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

        static final FinalBitSet ENABLED_MESSAGES = createMessageBitSet(INTEROP_LIBRARY_, "isNumber", "fitsInByte", "fitsInShort", "fitsInInt", "fitsInLong", "fitsInBigInteger", "fitsInFloat", "fitsInDouble", "asByte", "asShort", "asInt", "asLong", "asBigInteger", "asFloat", "asDouble", "toDisplayString");
        private static final Uncached UNCACHED = new Uncached();

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

        @Override
        protected InteropLibrary createUncached(Object receiver) {
            assert receiver instanceof FP80Buffer;
            InteropLibrary uncached = createDelegate(INTEROP_LIBRARY_, InteropLibraryExports.UNCACHED);
            return uncached;
        }

        @Override
        protected InteropLibrary createCached(Object receiver) {
            assert receiver instanceof FP80Buffer;
            return createDelegate(INTEROP_LIBRARY_, new Cached(receiver));
        }

        @GeneratedBy(FP80Buffer.class)
        private static final class Cached extends InteropLibrary implements DelegateExport {

            @Child private InteropLibrary receiverBufferInteropLibrary_;

            protected Cached(Object receiver) {
                FP80Buffer castReceiver = ((FP80Buffer) receiver) ;
                this.receiverBufferInteropLibrary_ = INTEROP_LIBRARY_.create((castReceiver.buffer));
            }

            @Override
            public FinalBitSet getDelegateExportMessages() {
                return ENABLED_MESSAGES;
            }

            @Override
            public Object readDelegateExport(Object receiver_) {
                return ((FP80Buffer) receiver_).buffer;
            }

            @Override
            public Library getDelegateExportLibrary(Object delegate) {
                return this.receiverBufferInteropLibrary_;
            }

            @Override
            public boolean accepts(Object receiver) {
                assert !(receiver instanceof FP80Buffer) || DYNAMIC_DISPATCH_LIBRARY_.getUncached().dispatch(receiver) == null : "Invalid library export. Exported receiver with dynamic dispatch found but not expected.";
                if (!(receiver instanceof FP80Buffer)) {
                    return false;
                } else if (!this.receiverBufferInteropLibrary_.accepts((((FP80Buffer) receiver).buffer))) {
                    return false;
                } else {
                    return true;
                }
            }

            /**
             * Debug Info: 
             *   Specialization {@link FP80Buffer#isNumber(FP80Buffer, InteropLibrary)}
             *     Activation probability: 0.06250
             *     With/without class size: 4/0 bytes
             * 
*/ @Override public boolean isNumber(Object arg0Value_) { assert arg0Value_ instanceof FP80Buffer : "Invalid library usage. Library does not accept given receiver."; FP80Buffer arg0Value = ((FP80Buffer) arg0Value_); { InteropLibrary interop__ = this.receiverBufferInteropLibrary_; return arg0Value.isNumber(interop__); } } /** * Debug Info:
             *   Specialization {@link FP80Buffer#fitsInByte(FP80Buffer, InteropLibrary)}
             *     Activation probability: 0.06250
             *     With/without class size: 4/0 bytes
             * 
*/ @Override public boolean fitsInByte(Object arg0Value_) { assert arg0Value_ instanceof FP80Buffer : "Invalid library usage. Library does not accept given receiver."; FP80Buffer arg0Value = ((FP80Buffer) arg0Value_); { InteropLibrary interop__ = this.receiverBufferInteropLibrary_; return arg0Value.fitsInByte(interop__); } } /** * Debug Info:
             *   Specialization {@link FP80Buffer#fitsInShort(FP80Buffer, InteropLibrary)}
             *     Activation probability: 0.06250
             *     With/without class size: 4/0 bytes
             * 
*/ @Override public boolean fitsInShort(Object arg0Value_) { assert arg0Value_ instanceof FP80Buffer : "Invalid library usage. Library does not accept given receiver."; FP80Buffer arg0Value = ((FP80Buffer) arg0Value_); { InteropLibrary interop__ = this.receiverBufferInteropLibrary_; return arg0Value.fitsInShort(interop__); } } /** * Debug Info:
             *   Specialization {@link FP80Buffer#fitsInInt(FP80Buffer, InteropLibrary)}
             *     Activation probability: 0.06250
             *     With/without class size: 4/0 bytes
             * 
*/ @Override public boolean fitsInInt(Object arg0Value_) { assert arg0Value_ instanceof FP80Buffer : "Invalid library usage. Library does not accept given receiver."; FP80Buffer arg0Value = ((FP80Buffer) arg0Value_); { InteropLibrary interop__ = this.receiverBufferInteropLibrary_; return arg0Value.fitsInInt(interop__); } } /** * Debug Info:
             *   Specialization {@link FP80Buffer#fitsInLong(FP80Buffer, InteropLibrary)}
             *     Activation probability: 0.06250
             *     With/without class size: 4/0 bytes
             * 
*/ @Override public boolean fitsInLong(Object arg0Value_) { assert arg0Value_ instanceof FP80Buffer : "Invalid library usage. Library does not accept given receiver."; FP80Buffer arg0Value = ((FP80Buffer) arg0Value_); { InteropLibrary interop__ = this.receiverBufferInteropLibrary_; return arg0Value.fitsInLong(interop__); } } /** * Debug Info:
             *   Specialization {@link FP80Buffer#fitsInBigInteger(FP80Buffer, InteropLibrary)}
             *     Activation probability: 0.06250
             *     With/without class size: 4/0 bytes
             * 
*/ @Override public boolean fitsInBigInteger(Object arg0Value_) { assert arg0Value_ instanceof FP80Buffer : "Invalid library usage. Library does not accept given receiver."; FP80Buffer arg0Value = ((FP80Buffer) arg0Value_); { InteropLibrary interop__ = this.receiverBufferInteropLibrary_; return arg0Value.fitsInBigInteger(interop__); } } /** * Debug Info:
             *   Specialization {@link FP80Buffer#fitsInFloat(FP80Buffer, InteropLibrary)}
             *     Activation probability: 0.06250
             *     With/without class size: 4/0 bytes
             * 
*/ @Override public boolean fitsInFloat(Object arg0Value_) { assert arg0Value_ instanceof FP80Buffer : "Invalid library usage. Library does not accept given receiver."; FP80Buffer arg0Value = ((FP80Buffer) arg0Value_); { InteropLibrary interop__ = this.receiverBufferInteropLibrary_; return arg0Value.fitsInFloat(interop__); } } @Override public boolean fitsInDouble(Object receiver) { assert receiver instanceof FP80Buffer : "Invalid library usage. Library does not accept given receiver."; return (((FP80Buffer) receiver)).fitsInDouble(); } /** * Debug Info:
             *   Specialization {@link FP80Buffer#asByte(FP80Buffer, InteropLibrary)}
             *     Activation probability: 0.06250
             *     With/without class size: 4/0 bytes
             * 
*/ @Override public byte asByte(Object arg0Value_) throws UnsupportedMessageException { assert arg0Value_ instanceof FP80Buffer : "Invalid library usage. Library does not accept given receiver."; FP80Buffer arg0Value = ((FP80Buffer) arg0Value_); { InteropLibrary interop__ = this.receiverBufferInteropLibrary_; return arg0Value.asByte(interop__); } } /** * Debug Info:
             *   Specialization {@link FP80Buffer#asShort(FP80Buffer, InteropLibrary)}
             *     Activation probability: 0.06250
             *     With/without class size: 4/0 bytes
             * 
*/ @Override public short asShort(Object arg0Value_) throws UnsupportedMessageException { assert arg0Value_ instanceof FP80Buffer : "Invalid library usage. Library does not accept given receiver."; FP80Buffer arg0Value = ((FP80Buffer) arg0Value_); { InteropLibrary interop__ = this.receiverBufferInteropLibrary_; return arg0Value.asShort(interop__); } } /** * Debug Info:
             *   Specialization {@link FP80Buffer#asInt(FP80Buffer, InteropLibrary)}
             *     Activation probability: 0.06250
             *     With/without class size: 4/0 bytes
             * 
*/ @Override public int asInt(Object arg0Value_) throws UnsupportedMessageException { assert arg0Value_ instanceof FP80Buffer : "Invalid library usage. Library does not accept given receiver."; FP80Buffer arg0Value = ((FP80Buffer) arg0Value_); { InteropLibrary interop__ = this.receiverBufferInteropLibrary_; return arg0Value.asInt(interop__); } } /** * Debug Info:
             *   Specialization {@link FP80Buffer#asLong(FP80Buffer, InteropLibrary)}
             *     Activation probability: 0.06250
             *     With/without class size: 4/0 bytes
             * 
*/ @Override public long asLong(Object arg0Value_) throws UnsupportedMessageException { assert arg0Value_ instanceof FP80Buffer : "Invalid library usage. Library does not accept given receiver."; FP80Buffer arg0Value = ((FP80Buffer) arg0Value_); { InteropLibrary interop__ = this.receiverBufferInteropLibrary_; return arg0Value.asLong(interop__); } } /** * Debug Info:
             *   Specialization {@link FP80Buffer#asBigInteger(FP80Buffer, InteropLibrary)}
             *     Activation probability: 0.06250
             *     With/without class size: 4/0 bytes
             * 
*/ @Override public BigInteger asBigInteger(Object arg0Value_) throws UnsupportedMessageException { assert arg0Value_ instanceof FP80Buffer : "Invalid library usage. Library does not accept given receiver."; FP80Buffer arg0Value = ((FP80Buffer) arg0Value_); { InteropLibrary interop__ = this.receiverBufferInteropLibrary_; return arg0Value.asBigInteger(interop__); } } /** * Debug Info:
             *   Specialization {@link FP80Buffer#asFloat(FP80Buffer, InteropLibrary)}
             *     Activation probability: 0.06250
             *     With/without class size: 4/0 bytes
             * 
*/ @Override public float asFloat(Object arg0Value_) throws UnsupportedMessageException { assert arg0Value_ instanceof FP80Buffer : "Invalid library usage. Library does not accept given receiver."; FP80Buffer arg0Value = ((FP80Buffer) arg0Value_); { InteropLibrary interop__ = this.receiverBufferInteropLibrary_; return arg0Value.asFloat(interop__); } } /** * Debug Info:
             *   Specialization {@link FP80Buffer#asDouble(FP80Buffer, InteropLibrary)}
             *     Activation probability: 0.06250
             *     With/without class size: 4/0 bytes
             * 
*/ @Override public double asDouble(Object arg0Value_) throws UnsupportedMessageException { assert arg0Value_ instanceof FP80Buffer : "Invalid library usage. Library does not accept given receiver."; FP80Buffer arg0Value = ((FP80Buffer) arg0Value_); { InteropLibrary interop__ = this.receiverBufferInteropLibrary_; return arg0Value.asDouble(interop__); } } /** * Debug Info:
             *   Specialization {@link FP80Buffer#toDisplayString(FP80Buffer, boolean, InteropLibrary)}
             *     Activation probability: 0.06250
             *     With/without class size: 4/0 bytes
             * 
*/ @Override public Object toDisplayString(Object arg0Value_, boolean arg1Value) { assert arg0Value_ instanceof FP80Buffer : "Invalid library usage. Library does not accept given receiver."; FP80Buffer arg0Value = ((FP80Buffer) arg0Value_); { InteropLibrary interop__ = this.receiverBufferInteropLibrary_; return arg0Value.toDisplayString(arg1Value, interop__); } } } @GeneratedBy(FP80Buffer.class) @DenyReplace private static final class Uncached extends InteropLibrary implements DelegateExport, UnadoptableNode { protected Uncached() { } @Override public FinalBitSet getDelegateExportMessages() { return ENABLED_MESSAGES; } @Override public Object readDelegateExport(Object receiver_) { return (((FP80Buffer) receiver_)).buffer; } @Override public Library getDelegateExportLibrary(Object delegate_) { return INTEROP_LIBRARY_.getUncached(delegate_); } @Override @TruffleBoundary public boolean accepts(Object receiver) { assert !(receiver instanceof FP80Buffer) || DYNAMIC_DISPATCH_LIBRARY_.getUncached().dispatch(receiver) == null : "Invalid library export. Exported receiver with dynamic dispatch found but not expected."; return receiver instanceof FP80Buffer; } @TruffleBoundary @Override public boolean isNumber(Object arg0Value_) { // declared: true assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver."; FP80Buffer arg0Value = ((FP80Buffer) arg0Value_); return arg0Value.isNumber(INTEROP_LIBRARY_.getUncached((arg0Value.buffer))); } @TruffleBoundary @Override public boolean fitsInByte(Object arg0Value_) { // declared: true assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver."; FP80Buffer arg0Value = ((FP80Buffer) arg0Value_); return arg0Value.fitsInByte(INTEROP_LIBRARY_.getUncached((arg0Value.buffer))); } @TruffleBoundary @Override public boolean fitsInShort(Object arg0Value_) { // declared: true assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver."; FP80Buffer arg0Value = ((FP80Buffer) arg0Value_); return arg0Value.fitsInShort(INTEROP_LIBRARY_.getUncached((arg0Value.buffer))); } @TruffleBoundary @Override public boolean fitsInInt(Object arg0Value_) { // declared: true assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver."; FP80Buffer arg0Value = ((FP80Buffer) arg0Value_); return arg0Value.fitsInInt(INTEROP_LIBRARY_.getUncached((arg0Value.buffer))); } @TruffleBoundary @Override public boolean fitsInLong(Object arg0Value_) { // declared: true assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver."; FP80Buffer arg0Value = ((FP80Buffer) arg0Value_); return arg0Value.fitsInLong(INTEROP_LIBRARY_.getUncached((arg0Value.buffer))); } @TruffleBoundary @Override public boolean fitsInBigInteger(Object arg0Value_) { // declared: true assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver."; FP80Buffer arg0Value = ((FP80Buffer) arg0Value_); return arg0Value.fitsInBigInteger(INTEROP_LIBRARY_.getUncached((arg0Value.buffer))); } @TruffleBoundary @Override public boolean fitsInFloat(Object arg0Value_) { // declared: true assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver."; FP80Buffer arg0Value = ((FP80Buffer) arg0Value_); return arg0Value.fitsInFloat(INTEROP_LIBRARY_.getUncached((arg0Value.buffer))); } @TruffleBoundary @Override public boolean fitsInDouble(Object receiver) { // declared: true assert this.accepts(receiver) : "Invalid library usage. Library does not accept given receiver."; return ((FP80Buffer) receiver) .fitsInDouble(); } @TruffleBoundary @Override public byte asByte(Object arg0Value_) throws UnsupportedMessageException { // declared: true assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver."; FP80Buffer arg0Value = ((FP80Buffer) arg0Value_); return arg0Value.asByte(INTEROP_LIBRARY_.getUncached((arg0Value.buffer))); } @TruffleBoundary @Override public short asShort(Object arg0Value_) throws UnsupportedMessageException { // declared: true assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver."; FP80Buffer arg0Value = ((FP80Buffer) arg0Value_); return arg0Value.asShort(INTEROP_LIBRARY_.getUncached((arg0Value.buffer))); } @TruffleBoundary @Override public int asInt(Object arg0Value_) throws UnsupportedMessageException { // declared: true assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver."; FP80Buffer arg0Value = ((FP80Buffer) arg0Value_); return arg0Value.asInt(INTEROP_LIBRARY_.getUncached((arg0Value.buffer))); } @TruffleBoundary @Override public long asLong(Object arg0Value_) throws UnsupportedMessageException { // declared: true assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver."; FP80Buffer arg0Value = ((FP80Buffer) arg0Value_); return arg0Value.asLong(INTEROP_LIBRARY_.getUncached((arg0Value.buffer))); } @TruffleBoundary @Override public BigInteger asBigInteger(Object arg0Value_) throws UnsupportedMessageException { // declared: true assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver."; FP80Buffer arg0Value = ((FP80Buffer) arg0Value_); return arg0Value.asBigInteger(INTEROP_LIBRARY_.getUncached((arg0Value.buffer))); } @TruffleBoundary @Override public float asFloat(Object arg0Value_) throws UnsupportedMessageException { // declared: true assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver."; FP80Buffer arg0Value = ((FP80Buffer) arg0Value_); return arg0Value.asFloat(INTEROP_LIBRARY_.getUncached((arg0Value.buffer))); } @TruffleBoundary @Override public double asDouble(Object arg0Value_) throws UnsupportedMessageException { // declared: true assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver."; FP80Buffer arg0Value = ((FP80Buffer) arg0Value_); return arg0Value.asDouble(INTEROP_LIBRARY_.getUncached((arg0Value.buffer))); } @TruffleBoundary @Override public Object toDisplayString(Object arg0Value_, boolean arg1Value) { // declared: true assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver."; FP80Buffer arg0Value = ((FP80Buffer) arg0Value_); return arg0Value.toDisplayString(arg1Value, INTEROP_LIBRARY_.getUncached((arg0Value.buffer))); } } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy