pi_mem_factory.cc

Go to the documentation of this file.
00001 /*! \file
00002 \author jaz
00003 */
00004 
00005 #include <lestes/backend_v2/intercode/pi.g.hh>
00006 #include <lestes/backend_v2/intercode/ge.g.hh>
00007 #include <lestes/md/types/tm_data_type_base.g.hh>
00008 #include <lestes/lang/cplus/sem/ss_declaration.g.hh>
00009 
00010 #include "pi_mem_factory.g.hh"
00011 
00012 package(lestes);
00013 package(backend_v2);
00014 package(intercode);
00015 
00016 using namespace ::lestes::backend_v2::intercode;
00017 
00018 
00019 ptr<pi_mem> pi_mf_stack::get_mem(ptr<pi_pi> origin) {
00020         return pi_mem_stack::create(origin, this->type_get(), this);
00021 }
00022 
00023 ptr<ge_operand_mem> pi_mf_stack::get_ge_mem(ptr<ge_pi> origin) {
00024         return ge_operand_mem::create(this->type_get(),origin,NULL,this);
00025 }
00026 
00027 /*!
00028         \brief Returns kind of the factory.
00029 */
00030 pi_mem_factory::kind_type pi_mf_stack::kind_get() {
00031         return pi_mem_factory::MF_STACK;
00032 }
00033 
00034 
00035 /*!
00036         \brief Returns memory operand that references place in memory represented by the factory.
00037         
00038         \param origin A pseudoinstruction that should be set as origin of a created operand.
00039         \return A new memory operand.
00040 */
00041 ptr<pi_mem> pi_mf_decl::get_mem(ptr<pi_pi> origin) {
00042         return pi_mem_decl::create(origin, this->type_get(), this);
00043 }
00044 
00045 /*!
00046         \brief Returns memory operand that references place in memory represented by the factory.
00047         
00048         \param origin A pseudoinstruction that should be set as origin of a created operand.
00049         \return A new memory operand.
00050 */
00051 ptr<ge_operand_mem> pi_mf_decl::get_ge_mem(ptr<ge_pi> origin) {
00052         return ge_operand_mem::create(this->type_get(),origin,NULL,this);
00053 }
00054 
00055 /*!
00056         \brief Returns kind of the factory.
00057 */
00058 pi_mem_factory::kind_type pi_mf_decl::kind_get() {
00059         return pi_mem_factory::MF_DECL;
00060 }
00061 
00062 
00063 /*!
00064         \brief Returns memory operand that references place in memory represented by the factory.
00065         
00066         \param origin A pseudoinstruction that should be set as origin of a created operand.
00067         \return A new memory operand.
00068 */
00069 ptr<pi_mem> pi_mf_lit::get_mem(ptr<pi_pi> origin) {
00070         return pi_mem_lit::create(origin, this->type_get(), this);
00071 }
00072 
00073 /*!
00074         \brief Returns memory operand that references place in memory represented by the factory.
00075         
00076         \param origin A pseudoinstruction that should be set as origin of a created operand.
00077         \return A new memory operand.
00078 */
00079 ptr<ge_operand_mem> pi_mf_lit::get_ge_mem(ptr<ge_pi> origin) {
00080         return ge_operand_mem::create(this->type_get(),origin,NULL,this);
00081 }
00082 
00083 /*!
00084         \brief Returns kind of the factory.
00085 */
00086 pi_mem_factory::kind_type pi_mf_lit::kind_get() {
00087         return pi_mem_factory::MF_LIT;
00088 }
00089 
00090 /*!
00091         \brief Returns memory operand that references place in memory represented by the factory.
00092         
00093         \param origin A pseudoinstruction that should be set as origin of a created operand.
00094         \return A new memory operand.
00095 */
00096 ptr<pi_mem> pi_mf_member::get_mem(ptr<pi_pi> origin) {
00097         return pi_mem_member::create(origin, this->type_get(), this);
00098 }
00099 
00100 /*!
00101         \brief Returns memory operand that references place in memory represented by the factory.
00102         
00103         \param origin A pseudoinstruction that should be set as origin of a created operand.
00104         \return A new memory operand.
00105 */
00106 ptr<ge_operand_mem> pi_mf_member::get_ge_mem(ptr<ge_pi> origin) {
00107         return ge_operand_mem::create(this->type_get(),origin,NULL,this);
00108 }
00109 
00110 /*!
00111         \brief Returns kind of the factory.
00112 */
00113 pi_mem_factory::kind_type pi_mf_member::kind_get() {
00114         return pi_mem_factory::MF_MEMBER;
00115 }
00116 
00117 /*!
00118         \brief Returns memory operand that references place in memory represented by the factory.
00119         
00120         \param origin A pseudoinstruction that should be set as origin of a created operand.
00121         \return A new memory operand.
00122 */
00123 ptr<pi_mem> pi_mf_preg::get_mem(ptr<pi_pi> origin) {
00124         return pi_mem_preg::create(origin, this->type_get(), this);
00125 }
00126 
00127 /*!
00128         \brief Returns memory operand that references place in memory represented by the factory.
00129         
00130         \param origin A pseudoinstruction that should be set as origin of a created operand.
00131         \return A new memory operand.
00132 */
00133 ptr<ge_operand_mem> pi_mf_preg::get_ge_mem(ptr<ge_pi>) {
00134         lassert(false);
00135 }
00136 
00137 /*!
00138         \brief Returns kind of the factory.
00139 */
00140 pi_mem_factory::kind_type pi_mf_preg::kind_get() {
00141         return pi_mem_factory::MF_PREG;
00142 }
00143 
00144 
00145 /*!
00146         \brief Returns memory operand that references place in memory represented by the factory.
00147         
00148         \param origin A pseudoinstruction that should be set as origin of a created operand.
00149         \return A new memory operand.
00150 */
00151 ptr<pi_mem> pi_mf_ptr_deref::get_mem(ptr<pi_pi> origin) {
00152         return pi_mem_ptr_deref::create(origin, this->type_get(), this);
00153 }
00154 
00155 /*!
00156         \brief Returns memory operand that references place in memory represented by the factory.
00157         
00158         \param origin A pseudoinstruction that should be set as origin of a created operand.
00159         \return A new memory operand.
00160 */
00161 ptr<ge_operand_mem> pi_mf_ptr_deref::get_ge_mem(ptr<ge_pi> origin) {
00162         return ge_operand_mem::create(this->type_get(),origin,NULL,this);
00163 }
00164 
00165 /*!
00166         \brief Returns kind of the factory.
00167 */
00168 pi_mem_factory::kind_type pi_mf_ptr_deref::kind_get() {
00169         return pi_mem_factory::MF_PTR_DEREF;
00170 }
00171 
00172 
00173 end_package(intercode);
00174 end_package(backend_v2);
00175 end_package(lestes);
00176 

Generated on Mon Feb 12 18:23:07 2007 for lestes by doxygen 1.5.1-20070107