Search in sources :

Example 1 with JVMArrayType

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

the class ObjectArrayLoad method effectStack_.

@Override
public JVMInstruction effectStack_(final JVMStack _aJVMStack) {
    final JVMArrayType _arrayType;
    st.gravel.support.jvm.ObjectExtensions.assert_(this, _aJVMStack.pop().isIntType());
    _arrayType = ((JVMArrayType) _aJVMStack.pop());
    st.gravel.support.jvm.ObjectExtensions.assert_(this, _arrayType.isArrayType());
    st.gravel.support.jvm.ObjectExtensions.assert_(this, _arrayType.elementType().isObjectType());
    _aJVMStack.push_(_arrayType.elementType());
    return this;
}
Also used : JVMArrayType(st.gravel.support.compiler.jvm.JVMArrayType)

Example 2 with JVMArrayType

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

the class ObjectArrayStore method effectStack_.

@Override
public JVMInstruction effectStack_(final JVMStack _aJVMStack) {
    final JVMType _arrayType;
    final JVMType _valType;
    _valType = _aJVMStack.pop();
    st.gravel.support.jvm.ObjectExtensions.assert_(this, _valType.isObjectType());
    st.gravel.support.jvm.ObjectExtensions.assert_(this, _aJVMStack.pop().isIntType());
    _arrayType = _aJVMStack.pop();
    st.gravel.support.jvm.ObjectExtensions.assert_(this, _arrayType.isArrayType());
    st.gravel.support.jvm.ObjectExtensions.assert_(this, ((JVMArrayType) _arrayType).elementType().isObjectType());
    return this;
}
Also used : JVMType(st.gravel.support.compiler.jvm.JVMType) JVMArrayType(st.gravel.support.compiler.jvm.JVMArrayType)

Aggregations

JVMArrayType (st.gravel.support.compiler.jvm.JVMArrayType)2 JVMType (st.gravel.support.compiler.jvm.JVMType)1