lestes::md::mem::local_variable_allocator_base Class Reference

Manager for local variable allocation. More...

#include <memory_allocator_bases.g.hh>

Inheritance diagram for lestes::md::mem::local_variable_allocator_base:

lestes::md::mem::allocator_base lestes::std::object lestes::std::mem::keystone lestes::md::mem::local_variable_allocator List of all members.

Public Member Functions

ptr< ::lestes::lang::cplus::sem::ss_function_declarationfunction_get () const
 The method function_get returns the value of the field local_variable_allocator_base::function.
void function_set (const ptr< ::lestes::lang::cplus::sem::ss_function_declaration > &)
 The method function_set sets the field local_variable_allocator_base::function to the given value.
virtual ptr< ::lestes::backend_v2::intercode::pi_mem_factoryallocate (ptr< ::lestes::lang::cplus::sem::ss_object_declaration > decl) override
 Allocates space for variable on the local stack.
virtual ptr< ::lestes::backend_v2::intercode::pi_mem_factoryallocate_tmp (ptr< ::lestes::md::types::tm_data_type_base > type) override
 Allocates space for variable on the local stack.
virtual void deallocate (ptr< ::lestes::backend_v2::intercode::pi_mem_factory > mem, ptr< ::lestes::backend_v2::intercode::pi_sp > psp, ptr< ::lestes::backend_v2::intercode::pi_sp > nsp) override
 Deallocates space occupied by variable.
virtual void calculate_placement () override
 Calculates placement of local variables and parameters in memory.
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

 local_variable_allocator_base (ptr< ::lestes::lang::cplus::sem::ss_function_declaration > a__local_variable_allocator_base__function)
 Generated constructor for class local_variable_allocator_base.
virtual void gc_mark ()
 Marking routine for class local_variable_allocator_base.

Private Attributes

srp< ::lestes::lang::cplus::sem::ss_function_declarationfunction
 Declaration of the function in which's body the allocation is performed.

Static Private Attributes

static ptr< reflection_listreflection = reflection

Detailed Description

Manager for local variable allocation.

Note: A concrete implementation is target machine-dependent and it is placed in /target/machine/${TARGET_CPU}/lestes/md/memory/ directory.

Definition at line 148 of file memory_allocator_bases.g.hh.


Constructor & Destructor Documentation

lestes::md::mem::local_variable_allocator_base::local_variable_allocator_base ( ptr< ::lestes::lang::cplus::sem::ss_function_declaration a__local_variable_allocator_base__function  )  [protected]

Generated constructor for class local_variable_allocator_base.

Generated constructor for class local_variable_allocator_base.

Author:
lsg

Definition at line 91 of file memory_allocator_bases.g.cc.

00092         : allocator_base(), function(checked(a__local_variable_allocator_base__function))
00093 {}


Member Function Documentation

ptr<::lestes::lang::cplus::sem::ss_function_declaration > lestes::md::mem::local_variable_allocator_base::function_get (  )  const

The method function_get returns the value of the field local_variable_allocator_base::function.

Returns:
The value of local_variable_allocator_base::function.
Author:
lsg

Definition at line 73 of file memory_allocator_bases.g.cc.

References function.

00074 {
00075         return function;
00076 }

void lestes::md::mem::local_variable_allocator_base::function_set ( const ptr< ::lestes::lang::cplus::sem::ss_function_declaration > &  x  ) 

The method function_set sets the field local_variable_allocator_base::function to the given value.

Parameters:
[in] x The new value to set local_variable_allocator_base::function to.
Author:
lsg

Definition at line 82 of file memory_allocator_bases.g.cc.

References function.

00083 {
00084         local_variable_allocator_base::function = x;
00085 }

virtual ptr< ::lestes::backend_v2::intercode::pi_mem_factory > lestes::md::mem::local_variable_allocator_base::allocate ( ptr< ::lestes::lang::cplus::sem::ss_object_declaration decl  )  [pure virtual]

Allocates space for variable on the local stack.

Implemented in lestes::md::mem::local_variable_allocator.

virtual ptr< ::lestes::backend_v2::intercode::pi_mem_factory > lestes::md::mem::local_variable_allocator_base::allocate_tmp ( ptr< ::lestes::md::types::tm_data_type_base type  )  [pure virtual]

Allocates space for variable on the local stack.

Implemented in lestes::md::mem::local_variable_allocator.

virtual void lestes::md::mem::local_variable_allocator_base::deallocate ( ptr< ::lestes::backend_v2::intercode::pi_mem_factory mem,
ptr< ::lestes::backend_v2::intercode::pi_sp psp,
ptr< ::lestes::backend_v2::intercode::pi_sp nsp 
) [pure virtual]

Deallocates space occupied by variable.

Implements lestes::md::mem::allocator_base.

Implemented in lestes::md::mem::local_variable_allocator.

virtual void lestes::md::mem::local_variable_allocator_base::calculate_placement (  )  [pure virtual]

Calculates placement of local variables and parameters in memory.

Implements lestes::md::mem::allocator_base.

Implemented in lestes::md::mem::local_variable_allocator.

ptr< object::reflection_list > lestes::md::mem::local_variable_allocator_base::reflection_get (  )  const [virtual]

for purposes of dumping

Reimplemented from lestes::md::mem::allocator_base.

Reimplemented in lestes::md::mem::local_variable_allocator.

Definition at line 95 of file memory_allocator_bases.g.cc.

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

Referenced by lestes::md::mem::local_variable_allocator::reflection_get().

00096 {
00097         if (!reflection) {
00098                 typedef class_reflection::field_metadata md;
00099                 typedef class_reflection::field_metadata_list mdlist;
00100                 ptr<mdlist> mdl = mdlist::create();
00101                 mdl->push_back( md::create( "function", "ss_function_declaration" ) );
00102                 reflection = reflection_list::create( allocator_base::reflection_get() );
00103                 reflection->push_back( class_reflection::create( "local_variable_allocator_base", mdl ) );
00104         }
00105         return reflection;
00106 }

ptr< object::field_list_list > lestes::md::mem::local_variable_allocator_base::field_values_get (  )  const [virtual]

for purposes of dumping

Reimplemented from lestes::md::mem::allocator_base.

Reimplemented in lestes::md::mem::local_variable_allocator.

Definition at line 108 of file memory_allocator_bases.g.cc.

References lestes::std::list< T >::create(), and lestes::md::mem::allocator_base::field_values_get().

Referenced by lestes::md::mem::local_variable_allocator::field_values_get().

00109 {
00110         ptr < field_list_list > result = allocator_base::field_values_get();
00111         result->push_back( value_list::create() );
00112         result->back()->push_back( this->function );
00113         return result;
00114 }

void lestes::md::mem::local_variable_allocator_base::gc_mark ( void   )  [protected, virtual]

Marking routine for class local_variable_allocator_base.

Marking routine is used for garbage collection.

Author:
lsg

Reimplemented from lestes::md::mem::allocator_base.

Reimplemented in lestes::md::mem::local_variable_allocator.

Definition at line 121 of file memory_allocator_bases.g.cc.

References lestes::md::mem::allocator_base::gc_mark().

Referenced by lestes::md::mem::local_variable_allocator::gc_mark().

00122 {
00123         allocator_base::gc_mark();
00124 }


Member Data Documentation

srp< ::lestes::lang::cplus::sem::ss_function_declaration > lestes::md::mem::local_variable_allocator_base::function [private]

Declaration of the function in which's body the allocation is performed.

Definition at line 185 of file memory_allocator_bases.g.hh.

Referenced by function_get(), and function_set().

ptr< object::reflection_list > lestes::md::mem::local_variable_allocator_base::reflection = reflection [static, private]

Reimplemented from lestes::md::mem::allocator_base.

Reimplemented in lestes::md::mem::local_variable_allocator.

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

Referenced by reflection_get().


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