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

org.jruby.truffle.cext.CharPointerWriteNodeSubNodeGen Maven / Gradle / Ivy

The newest version!
// CheckStyle: start generated
package org.jruby.truffle.cext;

import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.CompilerDirectives.CompilationFinal;
import com.oracle.truffle.api.dsl.GeneratedBy;
import com.oracle.truffle.api.dsl.UnsupportedSpecializationException;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.nodes.Node;
import com.oracle.truffle.api.nodes.NodeCost;

@GeneratedBy(CharPointerWriteNodeSub.class)
public final class CharPointerWriteNodeSubNodeGen extends CharPointerWriteNodeSub {

    @CompilationFinal private boolean seenUnsupported0;

    private CharPointerWriteNodeSubNodeGen() {
    }

    @Override
    public NodeCost getCost() {
        return NodeCost.MONOMORPHIC;
    }

    @Override
    public Object executeWithTarget(VirtualFrame frameValue, Object arg0Value, Object arg1Value, Object arg2Value) {
        if (arg0Value instanceof StringCharPointerAdapter && arg1Value instanceof Integer) {
            StringCharPointerAdapter arg0Value_ = (StringCharPointerAdapter) arg0Value;
            int arg1Value_ = (int) arg1Value;
            return this.accessWithTarget(arg0Value_, arg1Value_, arg2Value);
        }
        throw unsupported(arg0Value, arg1Value, arg2Value);
    }

    private UnsupportedSpecializationException unsupported(Object arg0Value, Object arg1Value, Object arg2Value) {
        if (!seenUnsupported0) {
            CompilerDirectives.transferToInterpreterAndInvalidate();
            seenUnsupported0 = true;
        }
        return new UnsupportedSpecializationException(this, new Node[] {null, null, null}, arg0Value, arg1Value, arg2Value);
    }

    public static CharPointerWriteNodeSub create() {
        return new CharPointerWriteNodeSubNodeGen();
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy