Search in sources :

Example 11 with JVMType

use of st.gravel.support.compiler.jvm.JVMType in project gravel by gravel-st.

the class InvokeStatic method effectStack_.

@Override
public JVMInstruction effectStack_(final JVMStack _aJVMStack) {
    for (int _temp1 = 0; _temp1 < _signature.arguments().length; _temp1++) {
        final JVMType _each = _signature.arguments()[(_signature.arguments().length - _temp1) - 1];
        _aJVMStack.popType_(_each);
    }
    if (!_signature.returnType().isVoidType()) {
        _aJVMStack.push_(_signature.returnType());
    }
    return this;
}
Also used : JVMType(st.gravel.support.compiler.jvm.JVMType)

Example 12 with JVMType

use of st.gravel.support.compiler.jvm.JVMType in project gravel by gravel-st.

the class IfThenElse method effectBooleanTestStack_.

public IfBooleanValueThenElse effectBooleanTestStack_(final JVMStack _aJVMStack) {
    final JVMType _commonType;
    _commonType = _trueFrame.type().commonSuperTypeWith_(_falseFrame.type());
    return IfBooleanValueThenElse.factory.trueFrame_falseFrame_(_trueFrame.withReturnType_(_commonType), _falseFrame.withReturnType_(_commonType));
}
Also used : JVMType(st.gravel.support.compiler.jvm.JVMType)

Example 13 with JVMType

use of st.gravel.support.compiler.jvm.JVMType in project gravel by gravel-st.

the class IfThenElse method effectObjectTestStack_.

public IfBooleanObjectThenElse effectObjectTestStack_(final JVMStack _aJVMStack) {
    final JVMType _commonType;
    _commonType = _trueFrame.type().commonSuperTypeWith_(_falseFrame.type());
    return IfBooleanObjectThenElse.factory.trueFrame_falseFrame_(_trueFrame.withReturnType_(_commonType), _falseFrame.withReturnType_(_commonType));
}
Also used : JVMType(st.gravel.support.compiler.jvm.JVMType)

Example 14 with JVMType

use of st.gravel.support.compiler.jvm.JVMType in project gravel by gravel-st.

the class InvokeInterface method effectStack_.

@Override
public JVMInstruction effectStack_(final JVMStack _aJVMStack) {
    for (int _temp1 = 0; _temp1 < _signature.arguments().length; _temp1++) {
        final JVMType _each = _signature.arguments()[(_signature.arguments().length - _temp1) - 1];
        _aJVMStack.popType_(_each);
    }
    _aJVMStack.pop();
    if (!_signature.returnType().isVoidType()) {
        _aJVMStack.push_(_signature.returnType());
    }
    return this;
}
Also used : JVMType(st.gravel.support.compiler.jvm.JVMType)

Example 15 with JVMType

use of st.gravel.support.compiler.jvm.JVMType in project gravel by gravel-st.

the class InvokeSpecial method effectStack_.

@Override
public JVMInstruction effectStack_(final JVMStack _aJVMStack) {
    for (int _temp1 = 0; _temp1 < _signature.arguments().length; _temp1++) {
        final JVMType _each = _signature.arguments()[(_signature.arguments().length - _temp1) - 1];
        _aJVMStack.popType_(_each);
    }
    _aJVMStack.pop();
    if (!_signature.returnType().isVoidType()) {
        _aJVMStack.push_(_signature.returnType());
    }
    return this;
}
Also used : JVMType(st.gravel.support.compiler.jvm.JVMType)

Aggregations

JVMType (st.gravel.support.compiler.jvm.JVMType)24 ArrayList (java.util.ArrayList)4 List (java.util.List)3 BigInteger (java.math.BigInteger)2 JVMInstruction (st.gravel.support.compiler.jvm.JVMInstruction)2 JVMLocalDeclaration (st.gravel.support.compiler.jvm.JVMLocalDeclaration)2 JVMVariable (st.gravel.support.compiler.jvm.JVMVariable)2 TypeCast (st.gravel.support.compiler.ast.TypeCast)1 BlockInnerClass (st.gravel.support.compiler.jvm.BlockInnerClass)1 BlockSendArgument (st.gravel.support.compiler.jvm.BlockSendArgument)1 JVMArrayType (st.gravel.support.compiler.jvm.JVMArrayType)1 JVMClass (st.gravel.support.compiler.jvm.JVMClass)1 JVMMethodType (st.gravel.support.compiler.jvm.JVMMethodType)1 Load (st.gravel.support.compiler.jvm.Load)1 ObjectClass (st.gravel.support.jvm.ObjectClass)1