package st.gravel.support.compiler.jvm;
/*
This file is automatically generated from typed smalltalk source. Do not edit by hand.
(C) AG5.com
*/
import java.math.BigInteger;
import st.gravel.support.jvm.NonLocalReturn;
import st.gravel.support.compiler.jvm.IfThenElse;
import st.gravel.support.compiler.jvm.IfThenElse.IfThenElse_Factory;
import st.gravel.support.compiler.jvm.PushTrue;
import st.gravel.support.compiler.jvm.PushFalse;
import st.gravel.support.compiler.jvm.Frame;
import st.gravel.support.compiler.jvm.JVMInstructionVisitor;
import st.gravel.support.compiler.jvm.JVMStack;
import st.gravel.support.compiler.jvm.JVMType;
public class IfBooleanObjectThenElse extends IfThenElse implements Cloneable {
public static IfBooleanObjectThenElse_Factory factory = new IfBooleanObjectThenElse_Factory();
public static class IfBooleanObjectThenElse_Factory extends IfThenElse_Factory {
public IfBooleanObjectThenElse basicNew() {
IfBooleanObjectThenElse newInstance = new IfBooleanObjectThenElse();
newInstance.initialize();
return newInstance;
}
@Override
public IfBooleanObjectThenElse r_boolean() {
return ((IfBooleanObjectThenElse) this.trueFrame_falseFrame_(PushTrue.factory.basicNew().asFrame(), PushFalse.factory.basicNew().asFrame()));
}
@Override
public IfBooleanObjectThenElse trueFrame_falseFrame_(final Frame _aFrame, final Frame _aFrame2) {
return ((IfBooleanObjectThenElse) this.basicNew().initializeTrueFrame_falseFrame_(_aFrame, _aFrame2));
}
}
static public IfBooleanObjectThenElse _r_boolean(Object receiver) {
return factory.r_boolean();
}
static public IfBooleanObjectThenElse _trueFrame_falseFrame_(Object receiver, final Frame _aFrame, final Frame _aFrame2) {
return factory.trueFrame_falseFrame_(_aFrame, _aFrame2);
}
@Override
public <X> X accept_(final JVMInstructionVisitor<X> _visitor) {
return _visitor.visitIfBooleanObjectThenElse_(this);
}
public IfBooleanObjectThenElse copy() {
try {
IfBooleanObjectThenElse _temp1 = (IfBooleanObjectThenElse) this.clone();
_temp1.postCopy();
return _temp1;
} catch (CloneNotSupportedException e) {
throw new RuntimeException(e);
}
}
public IfBooleanObjectThenElse_Factory factory() {
return factory;
}
@Override
public IfBooleanObjectThenElse initialize() {
if (_trueFrame == null) {
_trueFrame = PushTrue.factory.basicNew().asFrame();
}
if (_falseFrame == null) {
_falseFrame = PushFalse.factory.basicNew().asFrame();
}
return this;
}
@Override
public IfBooleanObjectThenElse initializeTrueFrame_falseFrame_(final Frame _aFrame, final Frame _aFrame2) {
_trueFrame = _aFrame;
_falseFrame = _aFrame2;
this.initialize();
return this;
}
@Override
public IfBooleanObjectThenElse printOn_(final StringBuilder _aStream) {
final String _title;
_title = this.factory().toString();
_aStream.append(st.gravel.support.jvm.CharacterExtensions.isVowel(_title.charAt(0)) ? "an " : "a ");
_aStream.append(_title);
_aStream.append('[');
this.sourceOn_(_aStream);
_aStream.append(']');
return this;
}
@Override
public IfBooleanObjectThenElse pushTypeOnStack_(final JVMStack _aJVMStack) {
if (!this.type().isBottomType()) {
_aJVMStack.push_(IfBooleanObjectThenElse.this.type());
}
return this;
}
@Override
public IfBooleanObjectThenElse sourceOn_(final StringBuilder _aStream) {
return this;
}
@Override
public IfBooleanObjectThenElse withReturnType_(final JVMType _aType) {
if (st.gravel.support.jvm.ObjectExtensions.equals_(this.type(), _aType)) {
return IfBooleanObjectThenElse.this;
}
throw new RuntimeException("niy");
}
}