use of st.gravel.support.compiler.jvm.JVMType in project gravel by gravel-st.
the class JVMMethodType method descriptorOn_.
public JVMMethodType descriptorOn_(final StringBuilder _aStream) {
_aStream.append('(');
for (final JVMType _each : _arguments) {
_each.descriptorOn_(_aStream);
}
_aStream.append(')');
_returnType.descriptorOn_(_aStream);
return this;
}
use of st.gravel.support.compiler.jvm.JVMType in project gravel by gravel-st.
the class JVMStack method popWide.
public JVMType popWide() {
final JVMType _last;
_last = _elements[_elements.length - 1];
if (!_last.isWide()) {
throw new RuntimeException("Cannot pop a small element");
}
_elements = st.gravel.support.jvm.ArrayExtensions.copyWithoutLast(_elements);
return _last;
}
use of st.gravel.support.compiler.jvm.JVMType in project gravel by gravel-st.
the class JVMStack method popType_.
public JVMStack popType_(final JVMType _aJVMType) {
final JVMType _last;
_last = _aJVMType.isWide() ? this.popWide() : this.pop();
st.gravel.support.jvm.ObjectExtensions.assert_(this, st.gravel.support.jvm.ObjectExtensions.equals_(_last, _aJVMType) || (st.gravel.support.jvm.ObjectExtensions.equals_(_last, JVMDynamicObjectType.factory.basicNew()) && st.gravel.support.jvm.ObjectExtensions.equals_(_aJVMType, JVMDefinedObjectType.factory.object())));
return this;
}
use of st.gravel.support.compiler.jvm.JVMType 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;
}
Aggregations