00001
00002
00003 #include <lestes/backend_v2/intercode/pi.g.hh>
00004 #include <lestes/backend_v2/intercode/pi_mem_factory.g.hh>
00005 #include <lestes/md/literals/literal_info_base.g.hh>
00006 #include <lestes/md/types/tm_data_type_base.g.hh>
00007 #include <lestes/lang/cplus/sem/ss_declaration.g.hh>
00008
00009 #include <lestes/std/list.hh>
00010 #include <lestes/std/pair.hh>
00011 #include <lestes/std/reflect.hh>
00012
00013 #include <lestes/md/mem/memory_allocators.g.hh>
00014
00015 package(lestes);
00016 package(md);
00017 package(mem);
00018
00019
00020
00021
00022
00023
00024
00025
00026 bool local_variable_allocator::placement_calculated_get() const
00027 {
00028 return placement_calculated;
00029 }
00030
00031
00032
00033
00034
00035 void local_variable_allocator::placement_calculated_set(bool x)
00036 {
00037 local_variable_allocator::placement_calculated = x;
00038 }
00039
00040
00041
00042
00043
00044 t_ssize local_variable_allocator::preserved_space_size_get() const
00045 {
00046 return preserved_space_size;
00047 }
00048
00049
00050
00051
00052
00053 void local_variable_allocator::preserved_space_size_set(t_ssize x)
00054 {
00055 local_variable_allocator::preserved_space_size = x;
00056 }
00057
00058
00059
00060
00061
00062 t_ssize local_variable_allocator::vars_space_start_offset_get() const
00063 {
00064 return vars_space_start_offset;
00065 }
00066
00067
00068
00069
00070
00071 void local_variable_allocator::vars_space_start_offset_set(t_ssize x)
00072 {
00073 local_variable_allocator::vars_space_start_offset = x;
00074 }
00075
00076
00077
00078
00079
00080 t_ssize local_variable_allocator::tmps_space_start_offset_get() const
00081 {
00082 return tmps_space_start_offset;
00083 }
00084
00085
00086
00087
00088
00089 void local_variable_allocator::tmps_space_start_offset_set(t_ssize x)
00090 {
00091 local_variable_allocator::tmps_space_start_offset = x;
00092 }
00093
00094
00095
00096
00097
00098 t_ssize local_variable_allocator::local_end_offset_get() const
00099 {
00100 return local_end_offset;
00101 }
00102
00103
00104
00105
00106
00107 void local_variable_allocator::local_end_offset_set(t_ssize x)
00108 {
00109 local_variable_allocator::local_end_offset = x;
00110 }
00111
00112
00113
00114
00115
00116 ptr< ::lestes::std::map< srp< ::lestes::lang::cplus::sem::ss_function_declaration >, srp< local_variable_allocator > > > local_variable_allocator::singleton_instances_get()
00117 {
00118 return singleton_instances;
00119 }
00120
00121
00122
00123
00124
00125 void local_variable_allocator::singleton_instances_set(const ptr< ::lestes::std::map< srp< ::lestes::lang::cplus::sem::ss_function_declaration >, srp< local_variable_allocator > > > & x)
00126 {
00127 local_variable_allocator::singleton_instances = x;
00128 }
00129
00130
00131
00132
00133
00134 ptr< ::lestes::std::list< srp< ::lestes::backend_v2::intercode::pi_mf_stack > > > local_variable_allocator::tmps_get() const
00135 {
00136 return tmps;
00137 }
00138
00139
00140
00141
00142
00143 void local_variable_allocator::tmps_set(const ptr< ::lestes::std::list< srp< ::lestes::backend_v2::intercode::pi_mf_stack > > > & x)
00144 {
00145 local_variable_allocator::tmps = x;
00146 }
00147
00148
00149
00150
00151
00152 ptr< ::lestes::std::map< srp< ::lestes::lang::cplus::sem::ss_object_declaration >, srp< ::lestes::backend_v2::intercode::pi_mf_stack > > > local_variable_allocator::variables_get() const
00153 {
00154 return variables;
00155 }
00156
00157
00158
00159
00160
00161 void 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)
00162 {
00163 local_variable_allocator::variables = x;
00164 }
00165
00166
00167
00168
00169
00170 ptr< local_variable_allocator > local_variable_allocator::create(ptr< ::lestes::lang::cplus::sem::ss_function_declaration > a__local_variable_allocator_base__function,
00171 bool a__local_variable_allocator__placement_calculated,
00172 t_ssize a__local_variable_allocator__preserved_space_size,
00173 t_ssize a__local_variable_allocator__vars_space_start_offset,
00174 t_ssize a__local_variable_allocator__tmps_space_start_offset,
00175 t_ssize a__local_variable_allocator__local_end_offset,
00176 ptr< ::lestes::std::list< srp< ::lestes::backend_v2::intercode::pi_mf_stack > > > a__local_variable_allocator__tmps,
00177 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)
00178 {
00179 return ptr< local_variable_allocator > ( new local_variable_allocator(a__local_variable_allocator_base__function,
00180 a__local_variable_allocator__placement_calculated,
00181 a__local_variable_allocator__preserved_space_size,
00182 a__local_variable_allocator__vars_space_start_offset,
00183 a__local_variable_allocator__tmps_space_start_offset,
00184 a__local_variable_allocator__local_end_offset,
00185 a__local_variable_allocator__tmps,
00186 a__local_variable_allocator__variables) );
00187 }
00188
00189
00190
00191
00192
00193 ptr< local_variable_allocator > local_variable_allocator::create(ptr< ::lestes::lang::cplus::sem::ss_function_declaration > a__local_variable_allocator_base__function)
00194 {
00195 return ptr< local_variable_allocator > ( new local_variable_allocator(a__local_variable_allocator_base__function, false, 0, 0, 0, 0, ::lestes::std::list< srp< ::lestes::backend_v2::intercode::pi_mf_stack > > ::create(), ::lestes::std::map< srp< ::lestes::lang::cplus::sem::ss_object_declaration >, srp< ::lestes::backend_v2::intercode::pi_mf_stack > > ::create()) );
00196 }
00197
00198
00199
00200
00201
00202 local_variable_allocator::local_variable_allocator (ptr< ::lestes::lang::cplus::sem::ss_function_declaration > a__local_variable_allocator_base__function,
00203 bool a__local_variable_allocator__placement_calculated,
00204 t_ssize a__local_variable_allocator__preserved_space_size,
00205 t_ssize a__local_variable_allocator__vars_space_start_offset,
00206 t_ssize a__local_variable_allocator__tmps_space_start_offset,
00207 t_ssize a__local_variable_allocator__local_end_offset,
00208 ptr< ::lestes::std::list< srp< ::lestes::backend_v2::intercode::pi_mf_stack > > > a__local_variable_allocator__tmps,
00209 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)
00210 : local_variable_allocator_base(a__local_variable_allocator_base__function), placement_calculated(a__local_variable_allocator__placement_calculated), preserved_space_size(a__local_variable_allocator__preserved_space_size), vars_space_start_offset(a__local_variable_allocator__vars_space_start_offset), tmps_space_start_offset(a__local_variable_allocator__tmps_space_start_offset), local_end_offset(a__local_variable_allocator__local_end_offset), tmps(checked(a__local_variable_allocator__tmps)), variables(checked(a__local_variable_allocator__variables))
00211 {}
00212
00213 ptr< object::reflection_list > local_variable_allocator::reflection_get() const
00214 {
00215 if (!reflection) {
00216 typedef class_reflection::field_metadata md;
00217 typedef class_reflection::field_metadata_list mdlist;
00218 ptr<mdlist> mdl = mdlist::create();
00219 mdl->push_back( md::create( "placement_calculated", "bool" ) );
00220 mdl->push_back( md::create( "preserved_space_size", "t_ssize" ) );
00221 mdl->push_back( md::create( "vars_space_start_offset", "t_ssize" ) );
00222 mdl->push_back( md::create( "tmps_space_start_offset", "t_ssize" ) );
00223 mdl->push_back( md::create( "local_end_offset", "t_ssize" ) );
00224 mdl->push_back( md::create( "singleton_instances", "map< srp< ::lestes::lang::cplus::sem::ss_function_declaration >, srp< local_variable_allocator > >" ) );
00225 mdl->push_back( md::create( "tmps", "list< srp< ::lestes::backend_v2::intercode::pi_mf_stack > >" ) );
00226 mdl->push_back( md::create( "variables", "map< srp< ::lestes::lang::cplus::sem::ss_object_declaration >, srp< ::lestes::backend_v2::intercode::pi_mf_stack > >" ) );
00227 reflection = reflection_list::create( local_variable_allocator_base::reflection_get() );
00228 reflection->push_back( class_reflection::create( "local_variable_allocator", mdl ) );
00229 }
00230 return reflection;
00231 }
00232
00233 ptr< object::field_list_list > local_variable_allocator::field_values_get() const
00234 {
00235 ptr < field_list_list > result = local_variable_allocator_base::field_values_get();
00236 result->push_back( value_list::create() );
00237 result->back()->push_back( objectize< bool > ::create( this->placement_calculated ) );
00238 result->push_back( value_list::create() );
00239 result->back()->push_back( objectize< t_ssize > ::create( this->preserved_space_size ) );
00240 result->push_back( value_list::create() );
00241 result->back()->push_back( objectize< t_ssize > ::create( this->vars_space_start_offset ) );
00242 result->push_back( value_list::create() );
00243 result->back()->push_back( objectize< t_ssize > ::create( this->tmps_space_start_offset ) );
00244 result->push_back( value_list::create() );
00245 result->back()->push_back( objectize< t_ssize > ::create( this->local_end_offset ) );
00246 result->push_back( value_list::create() );
00247 result->back()->push_back( this->singleton_instances );
00248 result->push_back( value_list::create() );
00249 result->back()->push_back( this->tmps );
00250 result->push_back( value_list::create() );
00251 result->back()->push_back( this->variables );
00252 return result;
00253 }
00254
00255
00256
00257
00258
00259
00260 void local_variable_allocator::gc_mark()
00261 {
00262 local_variable_allocator_base::gc_mark();
00263 }
00264
00265
00266
00267
00268
00269
00270
00271
00272
00273 ptr< global_variable_allocator > global_variable_allocator::singleton_instance_get()
00274 {
00275 return singleton_instance;
00276 }
00277
00278
00279
00280
00281
00282 void global_variable_allocator::singleton_instance_set(const ptr< global_variable_allocator > & x)
00283 {
00284 global_variable_allocator::singleton_instance = x;
00285 }
00286
00287
00288
00289
00290
00291 ptr< ::lestes::std::map< srp< ::lestes::lang::cplus::sem::ss_object_declaration >, srp< ::lestes::backend_v2::intercode::pi_mf_decl > > > global_variable_allocator::variables_get() const
00292 {
00293 return variables;
00294 }
00295
00296
00297
00298
00299
00300 void global_variable_allocator::variables_set(const ptr< ::lestes::std::map< srp< ::lestes::lang::cplus::sem::ss_object_declaration >, srp< ::lestes::backend_v2::intercode::pi_mf_decl > > > & x)
00301 {
00302 global_variable_allocator::variables = x;
00303 }
00304
00305
00306
00307
00308
00309 ptr< ::lestes::std::map< srp< ::lestes::backend_v2::intercode::pi_mem_factory >, srp< ::lestes::md::literals::literal_info_base > > > global_variable_allocator::values_get() const
00310 {
00311 return values;
00312 }
00313
00314
00315
00316
00317
00318 void global_variable_allocator::values_set(const ptr< ::lestes::std::map< srp< ::lestes::backend_v2::intercode::pi_mem_factory >, srp< ::lestes::md::literals::literal_info_base > > > & x)
00319 {
00320 global_variable_allocator::values = x;
00321 }
00322
00323
00324
00325
00326
00327 ptr< global_variable_allocator > global_variable_allocator::create(ptr< ::lestes::std::map< srp< ::lestes::lang::cplus::sem::ss_object_declaration >, srp< ::lestes::backend_v2::intercode::pi_mf_decl > > > a__global_variable_allocator__variables,
00328 ptr< ::lestes::std::map< srp< ::lestes::backend_v2::intercode::pi_mem_factory >, srp< ::lestes::md::literals::literal_info_base > > > a__global_variable_allocator__values)
00329 {
00330 return ptr< global_variable_allocator > ( new global_variable_allocator(a__global_variable_allocator__variables,
00331 a__global_variable_allocator__values) );
00332 }
00333
00334
00335
00336
00337
00338 ptr< global_variable_allocator > global_variable_allocator::create()
00339 {
00340 return ptr< global_variable_allocator > ( new global_variable_allocator(::lestes::std::map< srp< ::lestes::lang::cplus::sem::ss_object_declaration >, srp< ::lestes::backend_v2::intercode::pi_mf_decl > > ::create(), ::lestes::std::map< srp< ::lestes::backend_v2::intercode::pi_mem_factory >, srp< ::lestes::md::literals::literal_info_base > > ::create()) );
00341 }
00342
00343
00344
00345
00346
00347 global_variable_allocator::global_variable_allocator (ptr< ::lestes::std::map< srp< ::lestes::lang::cplus::sem::ss_object_declaration >, srp< ::lestes::backend_v2::intercode::pi_mf_decl > > > a__global_variable_allocator__variables,
00348 ptr< ::lestes::std::map< srp< ::lestes::backend_v2::intercode::pi_mem_factory >, srp< ::lestes::md::literals::literal_info_base > > > a__global_variable_allocator__values)
00349 : global_variable_allocator_base(), variables(checked(a__global_variable_allocator__variables)), values(checked(a__global_variable_allocator__values))
00350 {}
00351
00352 ptr< object::reflection_list > global_variable_allocator::reflection_get() const
00353 {
00354 if (!reflection) {
00355 typedef class_reflection::field_metadata md;
00356 typedef class_reflection::field_metadata_list mdlist;
00357 ptr<mdlist> mdl = mdlist::create();
00358 mdl->push_back( md::create( "singleton_instance", "global_variable_allocator" ) );
00359 mdl->push_back( md::create( "variables", "map< srp< ::lestes::lang::cplus::sem::ss_object_declaration >, srp< ::lestes::backend_v2::intercode::pi_mf_decl > >" ) );
00360 mdl->push_back( md::create( "values", "map< srp< ::lestes::backend_v2::intercode::pi_mem_factory >, srp< ::lestes::md::literals::literal_info_base > >" ) );
00361 reflection = reflection_list::create( global_variable_allocator_base::reflection_get() );
00362 reflection->push_back( class_reflection::create( "global_variable_allocator", mdl ) );
00363 }
00364 return reflection;
00365 }
00366
00367 ptr< object::field_list_list > global_variable_allocator::field_values_get() const
00368 {
00369 ptr < field_list_list > result = global_variable_allocator_base::field_values_get();
00370 result->push_back( value_list::create() );
00371 result->back()->push_back( this->singleton_instance );
00372 result->push_back( value_list::create() );
00373 result->back()->push_back( this->variables );
00374 result->push_back( value_list::create() );
00375 result->back()->push_back( this->values );
00376 return result;
00377 }
00378
00379
00380
00381
00382
00383
00384 void global_variable_allocator::gc_mark()
00385 {
00386 global_variable_allocator_base::gc_mark();
00387 }
00388
00389
00390
00391
00392
00393 ptr< ::lestes::std::map< srp< ::lestes::lang::cplus::sem::ss_function_declaration >, srp< local_variable_allocator > > > local_variable_allocator::singleton_instances = ::lestes::std::map< srp< ::lestes::lang::cplus::sem::ss_function_declaration >, srp< local_variable_allocator > > ::create();
00394 ptr<object::reflection_list> local_variable_allocator::reflection = reflection;
00395 ptr< global_variable_allocator > global_variable_allocator::singleton_instance = singleton_instance;
00396 ptr<object::reflection_list> global_variable_allocator::reflection = reflection;
00397
00398 end_package(mem);
00399 end_package(md);
00400 end_package(lestes);
00401