lestes::md::mem::local_variable_allocator Class Reference

Manager for local variable allocation. More...

#include <memory_allocators.g.hh>

Inheritance diagram for lestes::md::mem::local_variable_allocator:

Inheritance graph
[legend]
List of all members.

Public Member Functions

bool placement_calculated_get () const
 The method placement_calculated_get returns the value of the field local_variable_allocator::placement_calculated.
void placement_calculated_set (bool)
 The method placement_calculated_set sets the field local_variable_allocator::placement_calculated to the given value.
t_ssize preserved_space_size_get () const
 The method preserved_space_size_get returns the value of the field local_variable_allocator::preserved_space_size.
void preserved_space_size_set (t_ssize)
 The method preserved_space_size_set sets the field local_variable_allocator::preserved_space_size to the given value.
t_ssize vars_space_start_offset_get () const
 The method vars_space_start_offset_get returns the value of the field local_variable_allocator::vars_space_start_offset.
void vars_space_start_offset_set (t_ssize)
 The method vars_space_start_offset_set sets the field local_variable_allocator::vars_space_start_offset to the given value.
t_ssize tmps_space_start_offset_get () const
 The method tmps_space_start_offset_get returns the value of the field local_variable_allocator::tmps_space_start_offset.
void tmps_space_start_offset_set (t_ssize)
 The method tmps_space_start_offset_set sets the field local_variable_allocator::tmps_space_start_offset to the given value.
t_ssize local_end_offset_get () const
 The method local_end_offset_get returns the value of the field local_variable_allocator::local_end_offset.
void local_end_offset_set (t_ssize)
 The method local_end_offset_set sets the field local_variable_allocator::local_end_offset to the given value.
ptr< ::lestes::std::list<
srp< ::lestes::backend_v2::intercode::pi_mf_stack > > > 
tmps_get () const
 The method tmps_get returns the value of the field local_variable_allocator::tmps.
void tmps_set (const ptr< ::lestes::std::list< srp< ::lestes::backend_v2::intercode::pi_mf_stack > > > &)
 The method tmps_set sets the field local_variable_allocator::tmps to the given value.
ptr< ::lestes::std::map< srp<
::lestes::lang::cplus::sem::ss_object_declaration >,
srp< ::lestes::backend_v2::intercode::pi_mf_stack > > > 
variables_get () const
 The method variables_get returns the value of the field local_variable_allocator::variables.
void variables_set (const ptr< ::lestes::std::map< srp< ::lestes::lang::cplus::sem::ss_object_declaration >, srp< ::lestes::backend_v2::intercode::pi_mf_stack > > > &)
 The method variables_set sets the field local_variable_allocator::variables to the given value.
virtual ptr< ::lestes::backend_v2::intercode::pi_mem_factoryallocate_tmp (ptr< ::lestes::md::types::tm_data_type_base > type)
 Allocates space for variable on the local stack.
virtual ptr< ::lestes::backend_v2::intercode::pi_mem_factoryallocate (ptr< ::lestes::lang::cplus::sem::ss_object_declaration > decl)
 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)
 Deallocates space for variable on the local stack.
virtual void calculate_placement ()
 Calculates placement of local variables and parameters in memory.
void calculate_vars_placement ()
 Calculates placement of regular local variables in memory.
void calculate_tmps_placement ()
 Calculates placement of temporal local variables in memory.
virtual ptr< reflection_listreflection_get () const
 for purposes of dumping
virtual ptr< field_list_listfield_values_get () const
 for purposes of dumping

Static Public Member Functions

static ptr< ::lestes::std::map<
srp< ::lestes::lang::cplus::sem::ss_function_declaration >,
srp< local_variable_allocator > > > 
singleton_instances_get ()
 The method singleton_instances_get returns the value of the field local_variable_allocator::singleton_instances.
static void singleton_instances_set (const ptr< ::lestes::std::map< srp< ::lestes::lang::cplus::sem::ss_function_declaration >, srp< local_variable_allocator > > > &)
 The method singleton_instances_set sets the field local_variable_allocator::singleton_instances to the given value.
static ptr< local_variable_allocatorinstance (ptr< ::lestes::lang::cplus::sem::ss_function_declaration > function)
 Return allocator instance for specific function.
static ptr< local_variable_allocatorcreate (ptr< ::lestes::lang::cplus::sem::ss_function_declaration > a__local_variable_allocator_base__function, bool a__local_variable_allocator__placement_calculated, t_ssize a__local_variable_allocator__preserved_space_size, t_ssize a__local_variable_allocator__vars_space_start_offset, t_ssize a__local_variable_allocator__tmps_space_start_offset, t_ssize a__local_variable_allocator__local_end_offset, ptr< ::lestes::std::list< srp< ::lestes::backend_v2::intercode::pi_mf_stack > > > a__local_variable_allocator__tmps, ptr< ::lestes::std::map< srp< ::lestes::lang::cplus::sem::ss_object_declaration >, srp< ::lestes::backend_v2::intercode::pi_mf_stack > > > a__local_variable_allocator__variables)
 First generated factory method for class local_variable_allocator.
static ptr< local_variable_allocatorcreate (ptr< ::lestes::lang::cplus::sem::ss_function_declaration > a__local_variable_allocator_base__function)
 Second generated factory method for class local_variable_allocator.

Protected Member Functions

 local_variable_allocator (ptr< ::lestes::lang::cplus::sem::ss_function_declaration > a__local_variable_allocator_base__function, bool a__local_variable_allocator__placement_calculated, t_ssize a__local_variable_allocator__preserved_space_size, t_ssize a__local_variable_allocator__vars_space_start_offset, t_ssize a__local_variable_allocator__tmps_space_start_offset, t_ssize a__local_variable_allocator__local_end_offset, ptr< ::lestes::std::list< srp< ::lestes::backend_v2::intercode::pi_mf_stack > > > a__local_variable_allocator__tmps, ptr< ::lestes::std::map< srp< ::lestes::lang::cplus::sem::ss_object_declaration >, srp< ::lestes::backend_v2::intercode::pi_mf_stack > > > a__local_variable_allocator__variables)
 Generated constructor for class local_variable_allocator.
virtual void gc_mark ()
 Marking routine for class local_variable_allocator.

Private Attributes

bool placement_calculated
 Tells whether placement has been already calculated.
t_ssize preserved_space_size
 Space on function's stack used for storing preserved register.
t_ssize vars_space_start_offset
 Stack offset where space for regular variables starts.
t_ssize tmps_space_start_offset
 Stack offset where space for temporal variables starts.
t_ssize local_end_offset
 Stack offset where the function's local space ends.
srp< ::lestes::std::list<
srp< ::lestes::backend_v2::intercode::pi_mf_stack > > > 
tmps
 Temporal variables.
srp< ::lestes::std::map< srp<
::lestes::lang::cplus::sem::ss_object_declaration >,
srp< ::lestes::backend_v2::intercode::pi_mf_stack > > > 
variables
 Regular variables.

Static Private Attributes

static ptr< ::lestes::std::map<
srp< ::lestes::lang::cplus::sem::ss_function_declaration >,
srp< local_variable_allocator > > > 
singleton_instances = ::lestes::std::map< srp< ::lestes::lang::cplus::sem::ss_function_declaration >, srp< local_variable_allocator > > ::create()
static ptr< reflection_listreflection = reflection

Detailed Description

Manager for local variable allocation.


Constructor & Destructor Documentation

lestes::md::mem::local_variable_allocator::local_variable_allocator ( ptr< ::lestes::lang::cplus::sem::ss_function_declaration a__local_variable_allocator_base__function,
bool  a__local_variable_allocator__placement_calculated,
t_ssize  a__local_variable_allocator__preserved_space_size,
t_ssize  a__local_variable_allocator__vars_space_start_offset,
t_ssize  a__local_variable_allocator__tmps_space_start_offset,
t_ssize  a__local_variable_allocator__local_end_offset,
ptr< ::lestes::std::list< srp< ::lestes::backend_v2::intercode::pi_mf_stack > > >  a__local_variable_allocator__tmps,
ptr< ::lestes::std::map< srp< ::lestes::lang::cplus::sem::ss_object_declaration >, srp< ::lestes::backend_v2::intercode::pi_mf_stack > > >  a__local_variable_allocator__variables 
) [protected]

Generated constructor for class local_variable_allocator.

Generated constructor for class local_variable_allocator.

Author:
lsg


Member Function Documentation

bool lestes::md::mem::local_variable_allocator::placement_calculated_get (  )  const

The method placement_calculated_get returns the value of the field local_variable_allocator::placement_calculated.

Returns:
The value of local_variable_allocator::placement_calculated.
Author:
lsg

void lestes::md::mem::local_variable_allocator::placement_calculated_set ( bool  x  ) 

The method placement_calculated_set sets the field local_variable_allocator::placement_calculated to the given value.

Parameters:
[in] x The new value to set local_variable_allocator::placement_calculated to.
Author:
lsg

t_ssize lestes::md::mem::local_variable_allocator::preserved_space_size_get (  )  const

The method preserved_space_size_get returns the value of the field local_variable_allocator::preserved_space_size.

Returns:
The value of local_variable_allocator::preserved_space_size.
Author:
lsg

void lestes::md::mem::local_variable_allocator::preserved_space_size_set ( t_ssize  x  ) 

The method preserved_space_size_set sets the field local_variable_allocator::preserved_space_size to the given value.

Parameters:
[in] x The new value to set local_variable_allocator::preserved_space_size to.
Author:
lsg

t_ssize lestes::md::mem::local_variable_allocator::vars_space_start_offset_get (  )  const

The method vars_space_start_offset_get returns the value of the field local_variable_allocator::vars_space_start_offset.

Returns:
The value of local_variable_allocator::vars_space_start_offset.
Author:
lsg

void lestes::md::mem::local_variable_allocator::vars_space_start_offset_set ( t_ssize  x  ) 

The method vars_space_start_offset_set sets the field local_variable_allocator::vars_space_start_offset to the given value.

Parameters:
[in] x The new value to set local_variable_allocator::vars_space_start_offset to.
Author:
lsg

t_ssize lestes::md::mem::local_variable_allocator::tmps_space_start_offset_get (  )  const

The method tmps_space_start_offset_get returns the value of the field local_variable_allocator::tmps_space_start_offset.

Returns:
The value of local_variable_allocator::tmps_space_start_offset.
Author:
lsg

void lestes::md::mem::local_variable_allocator::tmps_space_start_offset_set ( t_ssize  x  ) 

The method tmps_space_start_offset_set sets the field local_variable_allocator::tmps_space_start_offset to the given value.

Parameters:
[in] x The new value to set local_variable_allocator::tmps_space_start_offset to.
Author:
lsg

t_ssize lestes::md::mem::local_variable_allocator::local_end_offset_get (  )  const

The method local_end_offset_get returns the value of the field local_variable_allocator::local_end_offset.

Returns:
The value of local_variable_allocator::local_end_offset.
Author:
lsg

void lestes::md::mem::local_variable_allocator::local_end_offset_set ( t_ssize  x  ) 

The method local_end_offset_set sets the field local_variable_allocator::local_end_offset to the given value.

Parameters:
[in] x The new value to set local_variable_allocator::local_end_offset to.
Author:
lsg

ptr<::lestes::std::map< srp<::lestes::lang::cplus::sem::ss_function_declaration >, srp< local_variable_allocator > > > lestes::md::mem::local_variable_allocator::singleton_instances_get (  )  [static]

The method singleton_instances_get returns the value of the field local_variable_allocator::singleton_instances.

Returns:
The value of local_variable_allocator::singleton_instances.
Author:
lsg

void lestes::md::mem::local_variable_allocator::singleton_instances_set ( const ptr< ::lestes::std::map< srp< ::lestes::lang::cplus::sem::ss_function_declaration >, srp< local_variable_allocator > > > &  x  )  [static]

The method singleton_instances_set sets the field local_variable_allocator::singleton_instances to the given value.

Parameters:
[in] x The new value to set local_variable_allocator::singleton_instances to.
Author:
lsg

ptr<::lestes::std::list< srp<::lestes::backend_v2::intercode::pi_mf_stack > > > lestes::md::mem::local_variable_allocator::tmps_get (  )  const

The method tmps_get returns the value of the field local_variable_allocator::tmps.

Returns:
The value of local_variable_allocator::tmps.
Author:
lsg

void lestes::md::mem::local_variable_allocator::tmps_set ( const ptr< ::lestes::std::list< srp< ::lestes::backend_v2::intercode::pi_mf_stack > > > &  x  ) 

The method tmps_set sets the field local_variable_allocator::tmps to the given value.

Parameters:
[in] x The new value to set local_variable_allocator::tmps to.
Author:
lsg

ptr<::lestes::std::map< srp<::lestes::lang::cplus::sem::ss_object_declaration >, srp<::lestes::backend_v2::intercode::pi_mf_stack > > > lestes::md::mem::local_variable_allocator::variables_get (  )  const

The method variables_get returns the value of the field local_variable_allocator::variables.

Returns:
The value of local_variable_allocator::variables.
Author:
lsg

void lestes::md::mem::local_variable_allocator::variables_set ( const ptr< ::lestes::std::map< srp< ::lestes::lang::cplus::sem::ss_object_declaration >, srp< ::lestes::backend_v2::intercode::pi_mf_stack > > > &  x  ) 

The method variables_set sets the field local_variable_allocator::variables to the given value.

Parameters:
[in] x The new value to set local_variable_allocator::variables to.
Author:
lsg

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

Allocates space for variable on the local stack.

Implements lestes::md::mem::local_variable_allocator_base.

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

Allocates space for variable on the local stack.

Implements lestes::md::mem::local_variable_allocator_base.

virtual void lestes::md::mem::local_variable_allocator::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 
) [virtual]

Deallocates space for variable on the local stack.

Implements lestes::md::mem::local_variable_allocator_base.

void lestes::md::mem::local_variable_allocator::calculate_placement (  )  [virtual]

Calculates placement of local variables and parameters in memory.

Implements lestes::md::mem::local_variable_allocator_base.

void lestes::md::mem::local_variable_allocator::calculate_vars_placement (  ) 

Calculates placement of regular local variables in memory.

void lestes::md::mem::local_variable_allocator::calculate_tmps_placement (  ) 

Calculates placement of temporal local variables in memory.

static ptr< local_variable_allocator > lestes::md::mem::local_variable_allocator::instance ( ptr< ::lestes::lang::cplus::sem::ss_function_declaration function  )  [static]

Return allocator instance for specific function.

ptr< local_variable_allocator > lestes::md::mem::local_variable_allocator::create ( ptr< ::lestes::lang::cplus::sem::ss_function_declaration a__local_variable_allocator_base__function,
bool  a__local_variable_allocator__placement_calculated,
t_ssize  a__local_variable_allocator__preserved_space_size,
t_ssize  a__local_variable_allocator__vars_space_start_offset,
t_ssize  a__local_variable_allocator__tmps_space_start_offset,
t_ssize  a__local_variable_allocator__local_end_offset,
ptr< ::lestes::std::list< srp< ::lestes::backend_v2::intercode::pi_mf_stack > > >  a__local_variable_allocator__tmps,
ptr< ::lestes::std::map< srp< ::lestes::lang::cplus::sem::ss_object_declaration >, srp< ::lestes::backend_v2::intercode::pi_mf_stack > > >  a__local_variable_allocator__variables 
) [static]

First generated factory method for class local_variable_allocator.

This factory method for class local_variable_allocator takes values of all fields as arguments.

Author:
lsg

ptr< local_variable_allocator > lestes::md::mem::local_variable_allocator::create ( ptr< ::lestes::lang::cplus::sem::ss_function_declaration a__local_variable_allocator_base__function  )  [static]

Second generated factory method for class local_variable_allocator.

This factory method for class local_variable_allocator uses initializers.

Author:
lsg

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

for purposes of dumping

Reimplemented from lestes::md::mem::local_variable_allocator_base.

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

for purposes of dumping

Reimplemented from lestes::md::mem::local_variable_allocator_base.

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

Marking routine for class local_variable_allocator.

Marking routine is used for garbage collection.

Author:
lsg

Reimplemented from lestes::md::mem::local_variable_allocator_base.


Member Data Documentation

bool lestes::md::mem::local_variable_allocator::placement_calculated [private]

Tells whether placement has been already calculated.

t_ssize lestes::md::mem::local_variable_allocator::preserved_space_size [private]

Space on function's stack used for storing preserved register.

t_ssize lestes::md::mem::local_variable_allocator::vars_space_start_offset [private]

Stack offset where space for regular variables starts.

t_ssize lestes::md::mem::local_variable_allocator::tmps_space_start_offset [private]

Stack offset where space for temporal variables starts.

t_ssize lestes::md::mem::local_variable_allocator::local_end_offset [private]

Stack offset where the function's local space ends.

ptr<::lestes::std::map< srp<::lestes::lang::cplus::sem::ss_function_declaration >, srp< local_variable_allocator > > > lestes::md::mem::local_variable_allocator::singleton_instances = ::lestes::std::map< srp< ::lestes::lang::cplus::sem::ss_function_declaration >, srp< local_variable_allocator > > ::create() [static, private]

srp< ::lestes::std::list< srp< ::lestes::backend_v2::intercode::pi_mf_stack > > > lestes::md::mem::local_variable_allocator::tmps [private]

Temporal variables.

srp< ::lestes::std::map< srp< ::lestes::lang::cplus::sem::ss_object_declaration >, srp< ::lestes::backend_v2::intercode::pi_mf_stack > > > lestes::md::mem::local_variable_allocator::variables [private]

Regular variables.

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

Reimplemented from lestes::md::mem::local_variable_allocator_base.


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