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

com.oracle.truffle.tck.ComplexNumbersAWriteNodeSubNodeGen Maven / Gradle / Ivy

Go to download

A collection of tests that can certify language implementation to be compliant with most recent requirements of the Truffle infrastructure and tooling.

There is a newer version: 1.0.0-rc7
Show newest version
// CheckStyle: start generated
package com.oracle.truffle.tck;

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.interop.TruffleObject;
import com.oracle.truffle.api.nodes.Node;
import com.oracle.truffle.api.nodes.NodeCost;

@GeneratedBy(ComplexNumbersAWriteNodeSub.class)
final class ComplexNumbersAWriteNodeSubNodeGen extends ComplexNumbersAWriteNodeSub {

    @CompilationFinal private boolean seenUnsupported0;

    private ComplexNumbersAWriteNodeSubNodeGen() {
    }

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

    @Override
    public Object executeWithTarget(VirtualFrame frameValue, Object arg0Value, Object arg1Value, Object arg2Value) {
        if (arg0Value instanceof ComplexNumbersA && arg1Value instanceof Number && arg2Value instanceof TruffleObject) {
            ComplexNumbersA arg0Value_ = (ComplexNumbersA) arg0Value;
            Number arg1Value_ = (Number) arg1Value;
            TruffleObject arg2Value_ = (TruffleObject) arg2Value;
            return this.accessWithTarget(frameValue, 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 ComplexNumbersAWriteNodeSub create() {
        return new ComplexNumbersAWriteNodeSubNodeGen();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy