pi_mem_factory.g.hh

Go to the documentation of this file.
00001 // This file is automatically generated, do not edit.
00002 
00003 /*!
00004         \file
00005         \author jaz
00006 */
00007 
00008 #ifndef lestes__backend_v2__intercode__pi_mem_factory_g_hh__included
00009 #define lestes__backend_v2__intercode__pi_mem_factory_g_hh__included
00010 
00011 #include <lestes/std/list.hh>
00012 #include <lestes/backend_v2/common.hh>
00013 
00014 #include <lestes/std/objectize_macros.hh>
00015 package(lestes);
00016 package(std);
00017 class object;
00018 end_package(std);
00019 end_package(lestes);
00020 
00021 package(lestes);
00022 package(backend_v2);
00023 package(intercode);
00024 class pi_mem;
00025 end_package(intercode);
00026 end_package(backend_v2);
00027 end_package(lestes);
00028 
00029 package(lestes);
00030 package(backend_v2);
00031 package(intercode);
00032 class pi_preg;
00033 end_package(intercode);
00034 end_package(backend_v2);
00035 end_package(lestes);
00036 
00037 package(lestes);
00038 package(backend_v2);
00039 package(intercode);
00040 class ge_operand_mem;
00041 end_package(intercode);
00042 end_package(backend_v2);
00043 end_package(lestes);
00044 
00045 package(lestes);
00046 package(backend_v2);
00047 package(intercode);
00048 class ge_operand_reg;
00049 end_package(intercode);
00050 end_package(backend_v2);
00051 end_package(lestes);
00052 
00053 package(lestes);
00054 package(backend_v2);
00055 package(intercode);
00056 class pi_pi;
00057 end_package(intercode);
00058 end_package(backend_v2);
00059 end_package(lestes);
00060 
00061 package(lestes);
00062 package(backend_v2);
00063 package(intercode);
00064 class ge_pi;
00065 end_package(intercode);
00066 end_package(backend_v2);
00067 end_package(lestes);
00068 
00069 package(lestes);
00070 package(backend_v2);
00071 package(intercode);
00072 class pi_lit;
00073 end_package(intercode);
00074 end_package(backend_v2);
00075 end_package(lestes);
00076 
00077 package(lestes);
00078 package(md);
00079 package(types);
00080 class tm_data_type_base;
00081 end_package(types);
00082 end_package(md);
00083 end_package(lestes);
00084 
00085 package(lestes);
00086 package(lang);
00087 package(cplus);
00088 package(sem);
00089 class ss_object_declaration;
00090 end_package(sem);
00091 end_package(cplus);
00092 end_package(lang);
00093 end_package(lestes);
00094 
00095 package(lestes);
00096 package(md);
00097 package(mem);
00098 class allocator_base;
00099 end_package(mem);
00100 end_package(md);
00101 end_package(lestes);
00102 
00103 package(lestes);
00104 package(backend_v2);
00105 package(intercode);
00106 
00107 
00108 class pi_mem_factory;
00109 class pi_mf_stack;
00110 class pi_mf_decl;
00111 class pi_mf_lit;
00112 class pi_mf_member;
00113 class pi_mf_preg;
00114 class pi_mf_ptr_deref;
00115 
00116 
00117 /*! \brief Represents place in memory.
00118 
00119 
00120 Instance of pi_mem_factory represents unique place in memory. It can create instances of pi-level or ge-level memory operands, that 
00121 allows accessing this place.
00122 */
00123 class pi_mem_factory : public ::lestes::std::object {
00124 public:
00125         enum kind_type {
00126                 MF_DECL,
00127                 MF_LIT,
00128                 MF_STACK,
00129                 MF_PREG,
00130                 MF_TEMP,
00131                 MF_MEMBER,
00132                 MF_PTR_DEREF
00133         };
00134 
00135         //! The method allocator_get returns the value of the field pi_mem_factory::allocator.
00136         ptr< ::lestes::md::mem::allocator_base > allocator_get() const;
00137 
00138         //! The method allocator_set sets the field pi_mem_factory::allocator to the given value.
00139         void allocator_set(const ptr< ::lestes::md::mem::allocator_base > &);
00140 
00141         //! The method type_get returns the value of the field pi_mem_factory::type.
00142         ptr< ::lestes::md::types::tm_data_type_base > type_get() const;
00143 
00144         //! The method type_set sets the field pi_mem_factory::type to the given value.
00145         void type_set(const ptr< ::lestes::md::types::tm_data_type_base > &);
00146 
00147         virtual kind_type kind_get() abstract;
00148 
00149         virtual ptr< ::lestes::backend_v2::intercode::pi_mem > get_mem(ptr< ::lestes::backend_v2::intercode::pi_pi > origin) abstract;
00150 
00151         virtual ptr< ::lestes::backend_v2::intercode::ge_operand_mem > get_ge_mem(ptr< ::lestes::backend_v2::intercode::ge_pi > origin) abstract;
00152 
00153         
00154 
00155         //! for purposes of dumping
00156         virtual ptr<reflection_list> reflection_get() const;
00157         //! for purposes of dumping
00158         virtual ptr<field_list_list> field_values_get() const;
00159         
00160 protected:
00161         //! Generated constructor for class pi_mem_factory.
00162         pi_mem_factory (
00163                 ptr< ::lestes::md::mem::allocator_base > a__pi_mem_factory__allocator,
00164                 ptr< ::lestes::md::types::tm_data_type_base > a__pi_mem_factory__type);
00165 
00166         //! Marking routine for class pi_mem_factory. 
00167         virtual void gc_mark();
00168 
00169 private:
00170         //! An allocator that has allocated the factory.
00171         srp< ::lestes::md::mem::allocator_base > allocator;
00172         //! A data type of factory.
00173         srp< ::lestes::md::types::tm_data_type_base > type;
00174         static ptr<reflection_list> reflection;
00175         
00176 }; // pi_mem_factory
00177 
00178 
00179 //! Represents memory that has been allocated on a local stack of a function.
00180 class pi_mf_stack : public pi_mem_factory {
00181 public:
00182         //! The method offset_get returns the value of the field pi_mf_stack::offset.
00183         t_ssize offset_get() const;
00184 
00185         //! The method offset_set sets the field pi_mf_stack::offset to the given value.
00186         void offset_set(t_ssize);
00187 
00188         virtual ptr< ::lestes::backend_v2::intercode::pi_mem > get_mem(ptr< ::lestes::backend_v2::intercode::pi_pi > origin);
00189 
00190         virtual ptr< ::lestes::backend_v2::intercode::ge_operand_mem > get_ge_mem(ptr< ::lestes::backend_v2::intercode::ge_pi > origin);
00191 
00192         virtual kind_type kind_get();
00193 
00194         
00195         //! First generated factory method for class pi_mf_stack.
00196         static ptr< pi_mf_stack > create (
00197                 ptr< ::lestes::md::mem::allocator_base > a__pi_mem_factory__allocator,
00198                 ptr< ::lestes::md::types::tm_data_type_base > a__pi_mem_factory__type,
00199                 t_ssize a__pi_mf_stack__offset);
00200 
00201         
00202 
00203         //! for purposes of dumping
00204         virtual ptr<reflection_list> reflection_get() const;
00205         //! for purposes of dumping
00206         virtual ptr<field_list_list> field_values_get() const;
00207         
00208 protected:
00209         //! Generated constructor for class pi_mf_stack.
00210         pi_mf_stack (
00211                 ptr< ::lestes::md::mem::allocator_base > a__pi_mem_factory__allocator,
00212                 ptr< ::lestes::md::types::tm_data_type_base > a__pi_mem_factory__type,
00213                 t_ssize a__pi_mf_stack__offset);
00214 
00215         //! Marking routine for class pi_mf_stack. 
00216         virtual void gc_mark();
00217 
00218 private:
00219         //! Offset of the space represented by the factory within stack.
00220         t_ssize offset;
00221         static ptr<reflection_list> reflection;
00222         
00223 }; // pi_mf_stack
00224 
00225 
00226 //! Represents memory that has been allocated for global variables in global data space.
00227 class pi_mf_decl : public pi_mem_factory {
00228 public:
00229         //! The method decl_get returns the value of the field pi_mf_decl::decl.
00230         ptr< ::lestes::lang::cplus::sem::ss_object_declaration > decl_get() const;
00231 
00232         //! The method decl_set sets the field pi_mf_decl::decl to the given value.
00233         void decl_set(const ptr< ::lestes::lang::cplus::sem::ss_object_declaration > &);
00234 
00235         virtual ptr< ::lestes::backend_v2::intercode::pi_mem > get_mem(ptr< ::lestes::backend_v2::intercode::pi_pi > origin);
00236 
00237         virtual ptr< ::lestes::backend_v2::intercode::ge_operand_mem > get_ge_mem(ptr< ::lestes::backend_v2::intercode::ge_pi > origin);
00238 
00239         virtual kind_type kind_get();
00240 
00241         
00242         //! First generated factory method for class pi_mf_decl.
00243         static ptr< pi_mf_decl > create (
00244                 ptr< ::lestes::md::mem::allocator_base > a__pi_mem_factory__allocator,
00245                 ptr< ::lestes::md::types::tm_data_type_base > a__pi_mem_factory__type,
00246                 ptr< ::lestes::lang::cplus::sem::ss_object_declaration > a__pi_mf_decl__decl);
00247 
00248         
00249 
00250         //! for purposes of dumping
00251         virtual ptr<reflection_list> reflection_get() const;
00252         //! for purposes of dumping
00253         virtual ptr<field_list_list> field_values_get() const;
00254         
00255 protected:
00256         //! Generated constructor for class pi_mf_decl.
00257         pi_mf_decl (
00258                 ptr< ::lestes::md::mem::allocator_base > a__pi_mem_factory__allocator,
00259                 ptr< ::lestes::md::types::tm_data_type_base > a__pi_mem_factory__type,
00260                 ptr< ::lestes::lang::cplus::sem::ss_object_declaration > a__pi_mf_decl__decl);
00261 
00262         //! Marking routine for class pi_mf_decl. 
00263         virtual void gc_mark();
00264 
00265 private:
00266         //! A ss-level declaration of object that occupies memory space represented by factory.
00267         srp< ::lestes::lang::cplus::sem::ss_object_declaration > decl;
00268         static ptr<reflection_list> reflection;
00269         
00270 }; // pi_mf_decl
00271 
00272 
00273 //! Represents memory that is occupied by managed literal.
00274 class pi_mf_lit : public pi_mem_factory {
00275 public:
00276         //! The method lit_get returns the value of the field pi_mf_lit::lit.
00277         ptr< ::lestes::backend_v2::intercode::pi_lit > lit_get() const;
00278 
00279         //! The method lit_set sets the field pi_mf_lit::lit to the given value.
00280         void lit_set(const ptr< ::lestes::backend_v2::intercode::pi_lit > &);
00281 
00282         virtual ptr< ::lestes::backend_v2::intercode::pi_mem > get_mem(ptr< ::lestes::backend_v2::intercode::pi_pi > origin);
00283 
00284         virtual ptr< ::lestes::backend_v2::intercode::ge_operand_mem > get_ge_mem(ptr< ::lestes::backend_v2::intercode::ge_pi > origin);
00285 
00286         virtual kind_type kind_get();
00287 
00288         
00289         //! First generated factory method for class pi_mf_lit.
00290         static ptr< pi_mf_lit > create (
00291                 ptr< ::lestes::md::mem::allocator_base > a__pi_mem_factory__allocator,
00292                 ptr< ::lestes::md::types::tm_data_type_base > a__pi_mem_factory__type,
00293                 ptr< ::lestes::backend_v2::intercode::pi_lit > a__pi_mf_lit__lit);
00294 
00295         
00296 
00297         //! for purposes of dumping
00298         virtual ptr<reflection_list> reflection_get() const;
00299         //! for purposes of dumping
00300         virtual ptr<field_list_list> field_values_get() const;
00301         
00302 protected:
00303         //! Generated constructor for class pi_mf_lit.
00304         pi_mf_lit (
00305                 ptr< ::lestes::md::mem::allocator_base > a__pi_mem_factory__allocator,
00306                 ptr< ::lestes::md::types::tm_data_type_base > a__pi_mem_factory__type,
00307                 ptr< ::lestes::backend_v2::intercode::pi_lit > a__pi_mf_lit__lit);
00308 
00309         //! Marking routine for class pi_mf_lit. 
00310         virtual void gc_mark();
00311 
00312 private:
00313         srp< ::lestes::backend_v2::intercode::pi_lit > lit;
00314         static ptr<reflection_list> reflection;
00315         
00316 }; // pi_mf_lit
00317 
00318 
00319 //! Represents memory occupied by a struct member.
00320 class pi_mf_member : public pi_mem_factory {
00321 public:
00322         //! The method parent_get returns the value of the field pi_mf_member::parent.
00323         ptr< pi_mem_factory > parent_get() const;
00324 
00325         //! The method parent_set sets the field pi_mf_member::parent to the given value.
00326         void parent_set(const ptr< pi_mem_factory > &);
00327 
00328         //! The method member_offset_get returns the value of the field pi_mf_member::member_offset.
00329         ulint member_offset_get() const;
00330 
00331         //! The method member_offset_set sets the field pi_mf_member::member_offset to the given value.
00332         void member_offset_set(ulint);
00333 
00334         virtual ptr< ::lestes::backend_v2::intercode::pi_mem > get_mem(ptr< ::lestes::backend_v2::intercode::pi_pi > origin);
00335 
00336         virtual ptr< ::lestes::backend_v2::intercode::ge_operand_mem > get_ge_mem(ptr< ::lestes::backend_v2::intercode::ge_pi > origin);
00337 
00338         virtual kind_type kind_get();
00339 
00340         
00341         //! First generated factory method for class pi_mf_member.
00342         static ptr< pi_mf_member > create (
00343                 ptr< ::lestes::md::mem::allocator_base > a__pi_mem_factory__allocator,
00344                 ptr< ::lestes::md::types::tm_data_type_base > a__pi_mem_factory__type,
00345                 ptr< pi_mem_factory > a__pi_mf_member__parent,
00346                 ulint a__pi_mf_member__member_offset);
00347 
00348         
00349 
00350         //! for purposes of dumping
00351         virtual ptr<reflection_list> reflection_get() const;
00352         //! for purposes of dumping
00353         virtual ptr<field_list_list> field_values_get() const;
00354         
00355 protected:
00356         //! Generated constructor for class pi_mf_member.
00357         pi_mf_member (
00358                 ptr< ::lestes::md::mem::allocator_base > a__pi_mem_factory__allocator,
00359                 ptr< ::lestes::md::types::tm_data_type_base > a__pi_mem_factory__type,
00360                 ptr< pi_mem_factory > a__pi_mf_member__parent,
00361                 ulint a__pi_mf_member__member_offset);
00362 
00363         //! Marking routine for class pi_mf_member. 
00364         virtual void gc_mark();
00365 
00366 private:
00367         //! A memory space that holds the structure.
00368         srp< pi_mem_factory > parent;
00369         //! Member offset within parent structure.
00370         ulint member_offset;
00371         static ptr<reflection_list> reflection;
00372         
00373 }; // pi_mf_member
00374 
00375 
00376 /*! \brief Wrapper for pseudoregister.
00377 
00378 Wrapper for pseudoregister. This is a kind of hack to handle all possible types of operand as memory so that all
00379 function parameters are descendants of pi_mem_factory.
00380 */
00381 class pi_mf_preg : public pi_mem_factory {
00382 public:
00383         //! The method preg_get returns the value of the field pi_mf_preg::preg.
00384         ptr< ::lestes::backend_v2::intercode::pi_preg > preg_get() const;
00385 
00386         //! The method preg_set sets the field pi_mf_preg::preg to the given value.
00387         void preg_set(const ptr< ::lestes::backend_v2::intercode::pi_preg > &);
00388 
00389         virtual ptr< ::lestes::backend_v2::intercode::pi_mem > get_mem(ptr< ::lestes::backend_v2::intercode::pi_pi > origin);
00390 
00391         virtual ptr< ::lestes::backend_v2::intercode::ge_operand_mem > get_ge_mem(ptr< ::lestes::backend_v2::intercode::ge_pi > origin);
00392 
00393         virtual kind_type kind_get();
00394 
00395         
00396         //! First generated factory method for class pi_mf_preg.
00397         static ptr< pi_mf_preg > create (
00398                 ptr< ::lestes::md::mem::allocator_base > a__pi_mem_factory__allocator,
00399                 ptr< ::lestes::md::types::tm_data_type_base > a__pi_mem_factory__type,
00400                 ptr< ::lestes::backend_v2::intercode::pi_preg > a__pi_mf_preg__preg);
00401 
00402         
00403 
00404         //! for purposes of dumping
00405         virtual ptr<reflection_list> reflection_get() const;
00406         //! for purposes of dumping
00407         virtual ptr<field_list_list> field_values_get() const;
00408         
00409 protected:
00410         //! Generated constructor for class pi_mf_preg.
00411         pi_mf_preg (
00412                 ptr< ::lestes::md::mem::allocator_base > a__pi_mem_factory__allocator,
00413                 ptr< ::lestes::md::types::tm_data_type_base > a__pi_mem_factory__type,
00414                 ptr< ::lestes::backend_v2::intercode::pi_preg > a__pi_mf_preg__preg);
00415 
00416         //! Marking routine for class pi_mf_preg. 
00417         virtual void gc_mark();
00418 
00419 private:
00420         //! The pseudoregister.
00421         srp< ::lestes::backend_v2::intercode::pi_preg > preg;
00422         static ptr<reflection_list> reflection;
00423         
00424 }; // pi_mf_preg
00425 
00426 
00427 //! Represents memory space accessed through pointer (dereference).
00428 class pi_mf_ptr_deref : public pi_mem_factory {
00429 public:
00430         //! The method addr_get returns the value of the field pi_mf_ptr_deref::addr.
00431         ptr< ::lestes::backend_v2::intercode::pi_preg > addr_get() const;
00432 
00433         //! The method addr_set sets the field pi_mf_ptr_deref::addr to the given value.
00434         void addr_set(const ptr< ::lestes::backend_v2::intercode::pi_preg > &);
00435 
00436         //! The method ge_addr_get returns the value of the field pi_mf_ptr_deref::ge_addr.
00437         ptr< ::lestes::backend_v2::intercode::ge_operand_reg > ge_addr_get() const;
00438 
00439         //! The method ge_addr_set sets the field pi_mf_ptr_deref::ge_addr to the given value.
00440         void ge_addr_set(const ptr< ::lestes::backend_v2::intercode::ge_operand_reg > &);
00441 
00442         virtual ptr< ::lestes::backend_v2::intercode::pi_mem > get_mem(ptr< ::lestes::backend_v2::intercode::pi_pi > origin);
00443 
00444         virtual ptr< ::lestes::backend_v2::intercode::ge_operand_mem > get_ge_mem(ptr< ::lestes::backend_v2::intercode::ge_pi > origin);
00445 
00446         virtual kind_type kind_get();
00447 
00448         
00449         //! First generated factory method for class pi_mf_ptr_deref.
00450         static ptr< pi_mf_ptr_deref > create (
00451                 ptr< ::lestes::md::mem::allocator_base > a__pi_mem_factory__allocator,
00452                 ptr< ::lestes::md::types::tm_data_type_base > a__pi_mem_factory__type,
00453                 ptr< ::lestes::backend_v2::intercode::pi_preg > a__pi_mf_ptr_deref__addr,
00454                 ptr< ::lestes::backend_v2::intercode::ge_operand_reg > a__pi_mf_ptr_deref__ge_addr);
00455 
00456         //! Second generated factory method for class pi_mf_ptr_deref.
00457         static ptr< pi_mf_ptr_deref > create (
00458                 ptr< ::lestes::md::mem::allocator_base > a__pi_mem_factory__allocator,
00459                 ptr< ::lestes::md::types::tm_data_type_base > a__pi_mem_factory__type,
00460                 ptr< ::lestes::backend_v2::intercode::pi_preg > a__pi_mf_ptr_deref__addr);
00461 
00462         
00463 
00464         //! for purposes of dumping
00465         virtual ptr<reflection_list> reflection_get() const;
00466         //! for purposes of dumping
00467         virtual ptr<field_list_list> field_values_get() const;
00468         
00469 protected:
00470         //! Generated constructor for class pi_mf_ptr_deref.
00471         pi_mf_ptr_deref (
00472                 ptr< ::lestes::md::mem::allocator_base > a__pi_mem_factory__allocator,
00473                 ptr< ::lestes::md::types::tm_data_type_base > a__pi_mem_factory__type,
00474                 ptr< ::lestes::backend_v2::intercode::pi_preg > a__pi_mf_ptr_deref__addr,
00475                 ptr< ::lestes::backend_v2::intercode::ge_operand_reg > a__pi_mf_ptr_deref__ge_addr);
00476 
00477         //! Marking routine for class pi_mf_ptr_deref. 
00478         virtual void gc_mark();
00479 
00480 private:
00481         //! A pseudoregister that holds the address.
00482         srp< ::lestes::backend_v2::intercode::pi_preg > addr;
00483         //! A pseudoregister that holds the address.
00484         srp< ::lestes::backend_v2::intercode::ge_operand_reg > ge_addr;
00485         static ptr<reflection_list> reflection;
00486         
00487 }; // pi_mf_ptr_deref
00488 
00489 
00490 end_package(intercode);
00491 end_package(backend_v2);
00492 end_package(lestes);
00493 
00494 package(lestes);
00495 package(std);
00496 specialize_objectize_for_enum( ::lestes::backend_v2::intercode::pi_mem_factory::kind_type );
00497 end_package(std);
00498 end_package(lestes);
00499 
00500 #endif // lestes__backend_v2__intercode__pi_mem_factory_g_hh__included

Generated on Mon Feb 12 18:27:04 2007 for lestes by doxygen 1.5.1-20070107