lestes::md::instructions::tm_instr_op_base Class Reference

Operand of tm_instr instruction. More...

#include <tm_instr_base.g.hh>

Inheritance diagram for lestes::md::instructions::tm_instr_op_base:

lestes::std::object lestes::std::mem::keystone lestes::md::instructions::tm_instr_op_imm_base lestes::md::instructions::tm_instr_op_mem_base lestes::md::instructions::tm_instr_op_reg_base lestes::md::instructions::tm_instr_op_imm lestes::md::instructions::tm_instr_op_mem lestes::md::instructions::tm_instr_op_reg List of all members.

Public Types

enum  kind_type { REGISTER, MEMORY, IMMEDIATE }
 Operand kinds. More...

Public Member Functions

ulint id_get () const
 The method id_get returns the value of the field tm_instr_op_base::id.
void id_set (ulint)
 The method id_set sets the field tm_instr_op_base::id to the given value.
ptr< ::lestes::std::set<
::lestes::md::types::tm_data_type_base::id_type > > 
allowed_types_get () const
 The method allowed_types_get returns the value of the field tm_instr_op_base::allowed_types.
void allowed_types_set (const ptr< ::lestes::std::set< ::lestes::md::types::tm_data_type_base::id_type > > &)
 The method allowed_types_set sets the field tm_instr_op_base::allowed_types to the given value.
ptr< ::lestes::std::vector<
ulint > > 
destroyed_by_get () const
 The method destroyed_by_get returns the value of the field tm_instr_op_base::destroyed_by.
void destroyed_by_set (const ptr< ::lestes::std::vector< ulint > > &)
 The method destroyed_by_set sets the field tm_instr_op_base::destroyed_by to the given value.
ulint destroys_get () const
 The method destroys_get returns the value of the field tm_instr_op_base::destroys.
void destroys_set (ulint)
 The method destroys_set sets the field tm_instr_op_base::destroys to the given value.
virtual tm_instr_op_base::kind_type kind_get () override
virtual ptr< ::lestes::backend_v2::intercode::ge_operandconvert_to_ge (ptr< ::lestes::md::types::tm_data_type_base > type) override
virtual ptr< reflection_listreflection_get () const
 for purposes of dumping
virtual ptr< field_list_listfield_values_get () const
 for purposes of dumping

Protected Member Functions

 tm_instr_op_base (ulint a__tm_instr_op_base__id, ptr< ::lestes::std::set< ::lestes::md::types::tm_data_type_base::id_type > > a__tm_instr_op_base__allowed_types, ptr< ::lestes::std::vector< ulint > > a__tm_instr_op_base__destroyed_by, ulint a__tm_instr_op_base__destroys)
 Generated constructor for class tm_instr_op_base.
virtual void gc_mark ()
 Marking routine for class tm_instr_op_base.

Private Attributes

ulint id
 The operand's id.
srp< ::lestes::std::set<
::lestes::md::types::tm_data_type_base::id_type > > 
allowed_types
 A list of types that can be used by current operand.
srp< ::lestes::std::vector<
ulint > > 
destroyed_by
 If the current operand is input operand, it is an id list of output operands of the parent instruction that destroy value of the current operand (i.e. register overwrite ).
ulint destroys
 If the current operand if output one, it is id of an input operand that is destroyed by the current operand.

Static Private Attributes

static ptr< reflection_listreflection = reflection

Detailed Description

Operand of tm_instr instruction.

Definition at line 186 of file tm_instr_base.g.hh.


Member Enumeration Documentation

enum lestes::md::instructions::tm_instr_op_base::kind_type

Operand kinds.

Enumerator:
REGISTER 
MEMORY 
IMMEDIATE 

Definition at line 189 of file tm_instr_base.g.hh.

00189                        {
00190                 REGISTER,
00191                 MEMORY,
00192                 IMMEDIATE
00193         };


Constructor & Destructor Documentation

lestes::md::instructions::tm_instr_op_base::tm_instr_op_base ( ulint  a__tm_instr_op_base__id,
ptr< ::lestes::std::set< ::lestes::md::types::tm_data_type_base::id_type > >  a__tm_instr_op_base__allowed_types,
ptr< ::lestes::std::vector< ulint > >  a__tm_instr_op_base__destroyed_by,
ulint  a__tm_instr_op_base__destroys 
) [protected]

Generated constructor for class tm_instr_op_base.

Generated constructor for class tm_instr_op_base.

Author:
lsg

Definition at line 315 of file tm_instr_base.g.cc.

00319         : ::lestes::std::object(), id(a__tm_instr_op_base__id), allowed_types(checked(a__tm_instr_op_base__allowed_types)), destroyed_by(checked(a__tm_instr_op_base__destroyed_by)), destroys(a__tm_instr_op_base__destroys)
00320 {}


Member Function Documentation

ulint lestes::md::instructions::tm_instr_op_base::id_get (  )  const

The method id_get returns the value of the field tm_instr_op_base::id.

Returns:
The value of tm_instr_op_base::id.
Author:
lsg

Definition at line 243 of file tm_instr_base.g.cc.

References id.

00244 {
00245         return id;
00246 }

void lestes::md::instructions::tm_instr_op_base::id_set ( ulint  x  ) 

The method id_set sets the field tm_instr_op_base::id to the given value.

Parameters:
[in] x The new value to set tm_instr_op_base::id to.
Author:
lsg

Definition at line 252 of file tm_instr_base.g.cc.

References id.

00253 {
00254         tm_instr_op_base::id = x;
00255 }

ptr<::lestes::std::set<::lestes::md::types::tm_data_type_base::id_type > > lestes::md::instructions::tm_instr_op_base::allowed_types_get (  )  const

The method allowed_types_get returns the value of the field tm_instr_op_base::allowed_types.

Returns:
The value of tm_instr_op_base::allowed_types.
Author:
lsg

Definition at line 261 of file tm_instr_base.g.cc.

References allowed_types.

00262 {
00263         return allowed_types;
00264 }

void lestes::md::instructions::tm_instr_op_base::allowed_types_set ( const ptr< ::lestes::std::set< ::lestes::md::types::tm_data_type_base::id_type > > &  x  ) 

The method allowed_types_set sets the field tm_instr_op_base::allowed_types to the given value.

Parameters:
[in] x The new value to set tm_instr_op_base::allowed_types to.
Author:
lsg

Definition at line 270 of file tm_instr_base.g.cc.

References allowed_types.

00271 {
00272         tm_instr_op_base::allowed_types = x;
00273 }

ptr<::lestes::std::vector< ulint > > lestes::md::instructions::tm_instr_op_base::destroyed_by_get (  )  const

The method destroyed_by_get returns the value of the field tm_instr_op_base::destroyed_by.

Returns:
The value of tm_instr_op_base::destroyed_by.
Author:
lsg

Definition at line 279 of file tm_instr_base.g.cc.

References destroyed_by.

00280 {
00281         return destroyed_by;
00282 }

void lestes::md::instructions::tm_instr_op_base::destroyed_by_set ( const ptr< ::lestes::std::vector< ulint > > &  x  ) 

The method destroyed_by_set sets the field tm_instr_op_base::destroyed_by to the given value.

Parameters:
[in] x The new value to set tm_instr_op_base::destroyed_by to.
Author:
lsg

Definition at line 288 of file tm_instr_base.g.cc.

References destroyed_by.

00289 {
00290         tm_instr_op_base::destroyed_by = x;
00291 }

ulint lestes::md::instructions::tm_instr_op_base::destroys_get (  )  const

The method destroys_get returns the value of the field tm_instr_op_base::destroys.

Returns:
The value of tm_instr_op_base::destroys.
Author:
lsg

Definition at line 297 of file tm_instr_base.g.cc.

References destroys.

00298 {
00299         return destroys;
00300 }

void lestes::md::instructions::tm_instr_op_base::destroys_set ( ulint  x  ) 

The method destroys_set sets the field tm_instr_op_base::destroys to the given value.

Parameters:
[in] x The new value to set tm_instr_op_base::destroys to.
Author:
lsg

Definition at line 306 of file tm_instr_base.g.cc.

References destroys.

00307 {
00308         tm_instr_op_base::destroys = x;
00309 }

virtual tm_instr_op_base::kind_type lestes::md::instructions::tm_instr_op_base::kind_get (  )  [pure virtual]

Implemented in lestes::md::instructions::tm_instr_op_mem_base, lestes::md::instructions::tm_instr_op_reg_base, and lestes::md::instructions::tm_instr_op_imm_base.

virtual ptr< ::lestes::backend_v2::intercode::ge_operand > lestes::md::instructions::tm_instr_op_base::convert_to_ge ( ptr< ::lestes::md::types::tm_data_type_base type  )  [pure virtual]

Implemented in lestes::md::instructions::tm_instr_op_mem_base, lestes::md::instructions::tm_instr_op_reg_base, and lestes::md::instructions::tm_instr_op_imm_base.

ptr< object::reflection_list > lestes::md::instructions::tm_instr_op_base::reflection_get (  )  const [virtual]

for purposes of dumping

Reimplemented from lestes::std::object.

Reimplemented in lestes::md::instructions::tm_instr_op_mem_base, lestes::md::instructions::tm_instr_op_reg_base, lestes::md::instructions::tm_instr_op_imm_base, lestes::md::instructions::tm_instr_op_mem, lestes::md::instructions::tm_instr_op_reg, and lestes::md::instructions::tm_instr_op_imm.

Definition at line 322 of file tm_instr_base.g.cc.

References lestes::std::list< T >::create(), reflection, and lestes::std::object::reflection_get().

Referenced by lestes::md::instructions::tm_instr_op_imm_base::reflection_get(), lestes::md::instructions::tm_instr_op_reg_base::reflection_get(), and lestes::md::instructions::tm_instr_op_mem_base::reflection_get().

00323 {
00324         if (!reflection) {
00325                 typedef class_reflection::field_metadata md;
00326                 typedef class_reflection::field_metadata_list mdlist;
00327                 ptr<mdlist> mdl = mdlist::create();
00328                 mdl->push_back( md::create( "id", "ulint" ) );
00329                 mdl->push_back( md::create( "allowed_types", "set&lt; ::lestes::md::types::tm_data_type_base::id_type &gt;" ) );
00330                 mdl->push_back( md::create( "destroyed_by", "vector&lt; ulint &gt;" ) );
00331                 mdl->push_back( md::create( "destroys", "ulint" ) );
00332                 reflection = reflection_list::create( ::lestes::std::object::reflection_get() );
00333                 reflection->push_back( class_reflection::create( "tm_instr_op_base", mdl ) );
00334         }
00335         return reflection;
00336 }

ptr< object::field_list_list > lestes::md::instructions::tm_instr_op_base::field_values_get (  )  const [virtual]

for purposes of dumping

Reimplemented from lestes::std::object.

Reimplemented in lestes::md::instructions::tm_instr_op_mem_base, lestes::md::instructions::tm_instr_op_reg_base, lestes::md::instructions::tm_instr_op_imm_base, lestes::md::instructions::tm_instr_op_mem, lestes::md::instructions::tm_instr_op_reg, and lestes::md::instructions::tm_instr_op_imm.

Definition at line 338 of file tm_instr_base.g.cc.

References lestes::std::list< T >::create(), and lestes::std::object::field_values_get().

Referenced by lestes::md::instructions::tm_instr_op_imm_base::field_values_get(), lestes::md::instructions::tm_instr_op_reg_base::field_values_get(), and lestes::md::instructions::tm_instr_op_mem_base::field_values_get().

00339 {
00340         ptr < field_list_list > result = ::lestes::std::object::field_values_get();
00341         result->push_back( value_list::create() );
00342         result->back()->push_back( objectize< ulint > ::create( this->id ) );
00343         result->push_back( value_list::create() );
00344         result->back()->push_back( this->allowed_types );
00345         result->push_back( value_list::create() );
00346         result->back()->push_back( this->destroyed_by );
00347         result->push_back( value_list::create() );
00348         result->back()->push_back( objectize< ulint > ::create( this->destroys ) );
00349         return result;
00350 }

void lestes::md::instructions::tm_instr_op_base::gc_mark ( void   )  [protected, virtual]

Marking routine for class tm_instr_op_base.

Marking routine is used for garbage collection.

Author:
lsg

Reimplemented from lestes::std::mem::keystone.

Reimplemented in lestes::md::instructions::tm_instr_op_mem_base, lestes::md::instructions::tm_instr_op_reg_base, lestes::md::instructions::tm_instr_op_imm_base, lestes::md::instructions::tm_instr_op_mem, lestes::md::instructions::tm_instr_op_reg, and lestes::md::instructions::tm_instr_op_imm.

Definition at line 357 of file tm_instr_base.g.cc.

References lestes::std::mem::keystone::gc_mark().

Referenced by lestes::md::instructions::tm_instr_op_imm_base::gc_mark(), lestes::md::instructions::tm_instr_op_reg_base::gc_mark(), and lestes::md::instructions::tm_instr_op_mem_base::gc_mark().

00358 {
00359 	::lestes::std::object::gc_mark();
00360 }


Member Data Documentation

ulint lestes::md::instructions::tm_instr_op_base::id [private]

The operand's id.

Definition at line 243 of file tm_instr_base.g.hh.

Referenced by id_get(), and id_set().

srp< ::lestes::std::set< ::lestes::md::types::tm_data_type_base::id_type > > lestes::md::instructions::tm_instr_op_base::allowed_types [private]

A list of types that can be used by current operand.

Definition at line 245 of file tm_instr_base.g.hh.

Referenced by allowed_types_get(), and allowed_types_set().

srp< ::lestes::std::vector< ulint > > lestes::md::instructions::tm_instr_op_base::destroyed_by [private]

If the current operand is input operand, it is an id list of output operands of the parent instruction that destroy value of the current operand (i.e. register overwrite ).

Definition at line 247 of file tm_instr_base.g.hh.

Referenced by destroyed_by_get(), and destroyed_by_set().

ulint lestes::md::instructions::tm_instr_op_base::destroys [private]

If the current operand if output one, it is id of an input operand that is destroyed by the current operand.

Definition at line 249 of file tm_instr_base.g.hh.

Referenced by destroys_get(), and destroys_set().

ptr< object::reflection_list > lestes::md::instructions::tm_instr_op_base::reflection = reflection [static, private]

Reimplemented from lestes::std::object.

Reimplemented in lestes::md::instructions::tm_instr_op_mem_base, lestes::md::instructions::tm_instr_op_reg_base, lestes::md::instructions::tm_instr_op_imm_base, lestes::md::instructions::tm_instr_op_mem, lestes::md::instructions::tm_instr_op_reg, and lestes::md::instructions::tm_instr_op_imm.

Definition at line 250 of file tm_instr_base.g.hh.

Referenced by reflection_get().


The documentation for this class was generated from the following files:
Generated on Mon Feb 12 18:25:46 2007 for lestes by doxygen 1.5.1-20070107