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.JVMInstruction; import st.gravel.support.compiler.jvm.JVMInstruction.JVMInstruction_Factory; import st.gravel.support.compiler.jvm.JVMType; import st.gravel.support.compiler.jvm.JVMLocalDeclaration; import st.gravel.support.compiler.jvm.JVMInstructionVisitor; import st.gravel.support.compiler.jvm.JVMStack; import st.gravel.support.compiler.jvm.AStore; import st.gravel.support.compiler.jvm.IStore; public class Store extends JVMInstruction implements Cloneable { public static Store_Factory factory = new Store_Factory(); int _index; JVMType _type; public static class Store_Factory extends JVMInstruction_Factory { public Store basicNew() { Store newInstance = new Store(); newInstance.initialize(); return newInstance; } public Store index_type_(final int _anInteger, final JVMType _aJVMDynamicObjectType) { return ((Store) this.basicNew().initializeIndex_type_(_anInteger, _aJVMDynamicObjectType)); } public Store local_(final JVMLocalDeclaration _aJVMLocalDeclaration) { return ((Store) this.index_type_(_aJVMLocalDeclaration.index(), _aJVMLocalDeclaration.type())); } } static public Store _index_type_(Object receiver, final int _anInteger, final JVMType _aJVMDynamicObjectType) { return factory.index_type_(_anInteger, _aJVMDynamicObjectType); } static public Store _local_(Object receiver, final JVMLocalDeclaration _aJVMLocalDeclaration) { return factory.local_(_aJVMLocalDeclaration); } @Override public <X> X accept_(final JVMInstructionVisitor<X> _visitor) { return _visitor.visitStore_(this); } public Store copy() { try { Store _temp1 = (Store) this.clone(); _temp1.postCopy(); return _temp1; } catch (CloneNotSupportedException e) { throw new RuntimeException(e); } } @Override public JVMInstruction effectStack_(final JVMStack _aJVMStack) { final JVMType _elemType; _elemType = _aJVMStack.pop(); if (_elemType.isObjectType() || _elemType.isArrayType()) { return AStore.factory.index_type_(_index, _type); } if (_elemType.isIntType()) { return IStore.factory.index_type_(_index, _type); } st.gravel.support.jvm.ObjectExtensions.halt(this); return this; } public Store_Factory factory() { return factory; } public int index() { return _index; } public Store initializeIndex_type_(final int _anInteger, final JVMType _aJVMDynamicObjectType) { _index = _anInteger; _type = _aJVMDynamicObjectType; this.initialize(); return this; } @Override public Store 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 Store sourceOn_(final StringBuilder _aStream) { return this; } @Override public JVMType type() { return _type; } @Override public Store withReturnType_(final JVMType _aType) { if (st.gravel.support.jvm.ObjectExtensions.equals_(this.type(), _aType)) { return Store.this; } throw new RuntimeException("niy"); } }