class CGEN < $BACK_END |
---|
$BACK_END | CS_COMPONENT |
attr archive_files:FLIST{STR}; |
---|
**** | `library' archive files |
attr builtin_cntr_n:INT; |
---|
**** | used to make uniq vars for builtins |
attr c_files:FSET{STR}; |
---|
**** | C source files |
attr c_flags:FLIST{STR}; |
---|
**** | Flags to pass to C compiler |
attr comp_home:STR; |
---|
**** | The location of the SHOME variable in the generated Makefile. This is different than prog.home if relative path names are used |
attr debug:BOOL; |
---|
**** | Generate debugging information |
attr deterministic:BOOL; |
---|
**** | generate id determinism |
attr executable:STR; |
---|
**** | The executable to output, or void |
attr externals:FMAP{STR,FSET{STR}}; |
---|
**** | Files linked if class reachable |
attr force_all:BOOL; |
---|
**** | Force all generation |
attr force_routines:FSET{STR}; |
---|
**** | Routines to be generated no matter what |
attr func_tables:BOOL; |
---|
**** | generate func tables |
attr gen:GENERATE_AM; |
---|
attr gen_c:BOOL; |
---|
**** | If true, generate C files |
attr globals_c:CODE_FILE; |
---|
**** | The header and C files. |
attr sather_h, tags_h, makefile:CODE_FILE; |
---|
attr mangler:MANGLE; |
---|
attr nested_bits:FMAP{AM_ROUT_DEF,FLIST{AM_BND_ITER_CALL_EXPR}}; |
---|
**** | Map of biter calls |
attr nested_its:FMAP{AM_ROUT_DEF,FLIST{AM_ITER_CALL_EXPR}}; |
---|
**** | Stack of iter calls |
attr null_segfaults:BOOL; |
---|
**** |
attr object_files:FSET{STR}; |
---|
**** | object files |
attr only_C:BOOL; |
---|
**** | Stop after making C |
attr only_check:BOOL; |
---|
**** | Don't do code generation |
attr optimize:BOOL; |
---|
**** | Attempt optimizations |
attr |
---|
**** | Make generated C look nice |
attr print_ob:BOOL; |
---|
**** | generate PO() function |
attr print_ob_g:BOOL; |
---|
**** | generate POG() function |
attr prog:PROG; |
---|
attr sather_h, tags_h, makefile:CODE_FILE; |
---|
attr tags:FMAP{$TP,INT}; |
---|
**** | Integers associated with classes |
attr sather_h, tags_h, makefile:CODE_FILE; |
---|
attr threshold:INT; |
---|
**** | How big to make files before splitting up. |
attr type_tables:BOOL; |
---|
**** | generate type tables |
attr zones:BOOL; |
---|
**** | Use zoned runtime (experimental) |
attr archive_files:FLIST{STR}; |
---|
**** | `library' archive files |
attr builtin_cntr_n:INT; |
---|
**** | used to make uniq vars for builtins |
attr c_files:FSET{STR}; |
---|
**** | C source files |
attr c_flags:FLIST{STR}; |
---|
**** | Flags to pass to C compiler |
attr debug:BOOL; |
---|
**** | Generate debugging information |
attr deterministic:BOOL; |
---|
**** | generate id determinism |
attr executable:STR; |
---|
**** | The executable to output, or void |
attr externals:FMAP{STR,FSET{STR}}; |
---|
**** | Files linked if class reachable |
attr force_all:BOOL; |
---|
**** | Force all generation |
attr force_routines:FSET{STR}; |
---|
**** | Routines to be generated no matter what |
attr func_tables:BOOL; |
---|
**** | generate func tables |
attr gen:GENERATE_AM; |
---|
attr gen_c:BOOL; |
---|
**** | If true, generate C files |
attr globals_c:CODE_FILE; |
---|
**** | The header and C files. |
attr mangler:MANGLE; |
---|
attr nested_bits:FMAP{AM_ROUT_DEF,FLIST{AM_BND_ITER_CALL_EXPR}}; |
---|
**** | Map of biter calls |
attr nested_its:FMAP{AM_ROUT_DEF,FLIST{AM_ITER_CALL_EXPR}}; |
---|
**** | Stack of iter calls |
attr null_segfaults:BOOL; |
---|
**** |
attr object_files:FSET{STR}; |
---|
**** | object files |
attr only_C:BOOL; |
---|
**** | Stop after making C |
attr only_check:BOOL; |
---|
**** | Don't do code generation |
attr optimize:BOOL; |
---|
**** | Attempt optimizations |
attr |
---|
**** | Make generated C look nice |
attr print_ob:BOOL; |
---|
**** | generate PO() function |
attr print_ob_g:BOOL; |
---|
**** | generate POG() function |
attr prog:PROG; |
---|
attr threshold:INT; |
---|
**** | How big to make files before splitting up. |
attr type_tables:BOOL; |
---|
**** | generate type tables |
attr zones:BOOL; |
---|
**** | Use zoned runtime (experimental) |
adjust_tag_table:BOOL |
---|
**** | Assign numbers to the types that are in needs_tag but not in the table, that is those added in the leftovers. return true if there were new tags, false otherwise |
am_ob_def_for_tp(tp:$TP):AM_OB_DEF |
---|
**** | The object layout for the type `tp'. |
arg_type_str(e:AM_FORMAL_ARG): STR |
---|
arg_type_str(e:ARG): STR |
---|
barf(msg:STR) |
---|
**** | Something wrong within the compiler, but we can't say where. |
barf_at(msg:STR,at:$PROG_ERR) |
---|
**** | Something wrong, and we know where. |
broadcast(global:AM_GLOBAL_EXPR) |
---|
builtin_cntr:INT |
---|
callee_copy_out |
---|
**** | take care of inout/out args before the function returns |
caller_copy_out(ce:$AM_CALL_EXPR, arg_list:ARRAY{STR}) |
---|
**** | Update the out/inout arguments in the external call and sometimes out arguments in internal calls (usually done by the callee), to reflect the results of execution (value-result semantics) |
caller_ext_copy_out(arg: AM_CALL_ARG, sig_arg: ARG, arg_str:STR) |
---|
**** | copy out in caller to ensure pass by value/result for external calls. It has to be done here since ext. routines are beyond our control |
caller_value_boxing(arg: AM_CALL_ARG, sig_arg: ARG, arg_str:STR) |
---|
**** | Do boxing for out args if needed: actual arg is abstract and formal is value |
create(p:PROG):SAME |
---|
emit(func:AM_ROUT_DEF) |
---|
emit_call_arg(a:AM_CALL_ARG, sa:ARG, need_local:BOOL, force_reference:BOOL):STR |
---|
err(s:STR) |
---|
**** | Report an error. |
err_loc(t:$PROG_ERR) |
---|
**** | Set where a future error should be reported at. |
expand_macro(r:STR,fun:SIG,args:ARRAY{STR},uniq:STR):STR |
---|
expand_macro(r:STR,fun:SIG,args:ARRAY{STR},uniq:STR,frame:STR):STR |
---|
expand_macro(r:STR,fun:SIG,args:ARRAY{STR},uniq:STR,frame:STR,loop_index:STR):STR |
---|
finalize |
---|
**** | finish up files, and call C compiler. |
init |
---|
**** | initialization should occur after the layouts and sigs have been constructed |
is_valid_lhs(e:$AM_EXPR):BOOL |
---|
iter_frame:STR |
---|
make_sure_emitted(s:SIG) |
---|
**** | Some routines are skipped because they are inlined. If they need to be generated anyway, e.g. for dispatching, then they get put in 'leftovers'. |
need_caller_copy_out(ce:$AM_CALL_EXPR): BOOL |
---|
tag_for(tp:$TP):STR |
---|
**** | Expression corresponding to a particular type. If not known, make a new one. |
warning(s:STR) |
---|
**** | report a warning (doesn't stop compile); |
attr abstract_calls, concrete_calls, |
---|
attr abstract_calls, concrete_calls, |
---|
attr abstract_iters:FLIST{AM_ROUT_DEF}; |
---|
**** | List of abstract iters to make dispatch tables for |
attr abstract_iters:FLIST{AM_ROUT_DEF}; |
---|
**** | List of abstract iters to make dispatch tables for |
attr abstract_routs:FLIST{AM_ROUT_DEF}; |
---|
**** | List of abstract routines to make dispatch tables for |
attr abstract_routs:FLIST{AM_ROUT_DEF}; |
---|
**** | List of abstract routines to make dispatch tables for |
allocate(t:$TP):STR |
---|
**** | generate call which allocates memory and fills in tag for an object of type t. This properly sets the tag field too. If t is a value type it allocates the boxed version. |
announce_at(s:SFILE_ID) |
---|
attr arg_frames:FSET{SIG}; |
---|
**** | List of routs to generate arg frames for |
attr arg_frames:FSET{SIG}; |
---|
**** | List of routs to generate arg frames for |
array_allocate(t:$TP,n:STR):STR |
---|
**** | generate call which allocates memory and fills in tag for an object of type t and an array portion with n elements. This sets the tag field but NOT asize, because it isn't reachable from an untyped C routine. If t is a value type it allocates the boxed version. |
attr bnd_iter_creates:FLIST{AM_BND_CREATE_EXPR}; |
---|
**** | List of bound iter stubs to generate |
attr bnd_iter_creates:FLIST{AM_BND_CREATE_EXPR}; |
---|
**** | List of bound iter stubs to generate |
attr bnd_rout_creates:FLIST{AM_BND_CREATE_EXPR}; |
---|
**** | List of bound routine stubs to generate |
attr bnd_rout_creates:FLIST{AM_BND_CREATE_EXPR}; |
---|
**** | List of bound routine stubs to generate |
cast(dest_tp,src_tp:$TP,expr:STR, only_boxing:BOOL):STR |
---|
cast_arg(dest_tp,src_tp:$TP,expr:STR, only_boxing:BOOL, mode:$MODE):STR |
---|
chk_arith, chk_bounds, chk_void, chk_when, chk_return:BOOL; |
---|
**** | whether different checks are on for the current function |
chk_arith, chk_bounds, chk_void, chk_when, chk_return:BOOL; |
---|
**** | whether different checks are on for the current function |
attr chk_pre, chk_post, chk_invariant, chk_assert, |
---|
attr chk_pre, chk_post, chk_invariant, chk_assert, |
---|
chk_arith, chk_bounds, chk_void, chk_when, chk_return:BOOL; |
---|
**** | whether different checks are on for the current function |
chk_arith, chk_bounds, chk_void, chk_when, chk_return:BOOL; |
---|
**** | whether different checks are on for the current function |
attr chk_pre, chk_post, chk_invariant, chk_assert, |
---|
attr chk_pre, chk_post, chk_invariant, chk_assert, |
---|
attr chk_pre, chk_post, chk_invariant, chk_assert, |
---|
attr chk_pre, chk_post, chk_invariant, chk_assert, |
---|
attr chk_pre, chk_post, chk_invariant, chk_assert, |
---|
attr chk_pre, chk_post, chk_invariant, chk_assert, |
---|
chk_arith, chk_bounds, chk_void, chk_when, chk_return:BOOL; |
---|
**** | whether different checks are on for the current function |
chk_arith, chk_bounds, chk_void, chk_when, chk_return:BOOL; |
---|
**** | whether different checks are on for the current function |
chk_arith, chk_bounds, chk_void, chk_when, chk_return:BOOL; |
---|
**** | whether different checks are on for the current function |
chk_arith, chk_bounds, chk_void, chk_when, chk_return:BOOL; |
---|
**** | whether different checks are on for the current function |
chk_arith, chk_bounds, chk_void, chk_when, chk_return:BOOL; |
---|
**** | whether different checks are on for the current function |
chk_arith, chk_bounds, chk_void, chk_when, chk_return:BOOL; |
---|
**** | whether different checks are on for the current function |
attr code_c, system_c, dispatch_c, unbox_c, strings_c:CODE_FILE; |
---|
attr code_c, system_c, dispatch_c, unbox_c, strings_c:CODE_FILE; |
---|
attr code_dir:STR; |
---|
**** | The directory all this happens in |
attr code_dir:STR; |
---|
**** | The directory all this happens in |
code_file_for_tp(t:$TP):CODE_FILE |
---|
attr code_files:FMAP{$TP,CODE_FILE}; |
---|
attr code_files:FMAP{$TP,CODE_FILE}; |
---|
comment(f:CODE_FILE,com:STR) |
---|
**** | make a C comment |
comment(com:STR) |
---|
**** | make C comment in routine_code. Has newline. |
attr comp_home:STR; |
---|
**** | The location of the SHOME variable in the generated Makefile. This is different than prog.home if relative path names are used |
attr abstract_calls, concrete_calls, |
---|
attr abstract_calls, concrete_calls, |
---|
create_iter(func:AM_ROUT_DEF) |
---|
attr current_am_rout_def:AM_ROUT_DEF; |
---|
**** | AM_ROUT_DEF of current function being translated |
attr current_am_rout_def:AM_ROUT_DEF; |
---|
**** | AM_ROUT_DEF of current function being translated |
attr current_arg_list:ARRAY{STR}; |
---|
**** | mangled names of args of current function |
attr current_arg_list:ARRAY{STR}; |
---|
**** | mangled names of args of current function |
attr current_function_str:STR; |
---|
**** | Name of current function being translated |
attr current_function_str:STR; |
---|
**** | Name of current function being translated |
attr current_iter_out_arg_locals:FLIST{AM_LOCAL_EXPR}; |
---|
**** | iter locals used in place of out/inout args to ensure value/result semantics |
attr current_iter_out_arg_locals:FLIST{AM_LOCAL_EXPR}; |
---|
**** | iter locals used in place of out/inout args to ensure value/result semantics |
attr current_loop:STR; |
---|
**** | label to goto to at end of loop |
attr current_loop:STR; |
---|
**** | label to goto to at end of loop |
attr ex_nesting, current_loop_ex_nesting:INT; |
---|
**** | Number of protects we are in syntactically, so that we can pop out on a iterator quit, or a return. |
attr ex_nesting, current_loop_ex_nesting:INT; |
---|
**** | Number of protects we are in syntactically, so that we can pop out on a iterator quit, or a return. |
attr current_sig:SIG; |
---|
**** | SIG of current function being translated |
attr current_sig:SIG; |
---|
**** | SIG of current function being translated |
dec_local(t:$TP):STR |
---|
**** | declare local with no comment |
dec_local_comment(t:$TP,com:STR):STR |
---|
dec_local_for_arg(a:AM_FORMAL_ARG, sig:SIG, s:STR): STR |
---|
**** | declare local of type a.tp initialized to s To be used instead of arg in out/inout args |
dec_local_object(t:$TP):STR |
---|
**** | declare local object (not reference) of reference type t used in implementation of out/inout arguments |
dec_local_ptr(t:$TP):STR |
---|
**** | declare local pointer to type t used in implementation of out/inout arguments |
default_init(t:$TP):STR |
---|
**** | string representing default initialization expression for a given type. |
defer(s:STR) |
---|
**** | queue up code for emmission |
defer_newline |
---|
**** | start a new line in queued-up code |
define_main_and_globals |
---|
**** | generate actual main call, which then calls sather_main. has to initialize any globals and declare them. |
attr code_c, system_c, dispatch_c, unbox_c, strings_c:CODE_FILE; |
---|
attr code_c, system_c, dispatch_c, unbox_c, strings_c:CODE_FILE; |
---|
do_cast(dest_tp,src_tp:$TP,expr:STR, only_boxing:BOOL, mode:$MODE):STR |
---|
**** |
________pre_dest_tp=src_tp_--_make_sure_cast_isn't_nonsense ________________or_(dest_tp.is_abstract_and_src_tp.is_abstract) ________________or_dest_tp.is_subtype(src_tp) ________________or_src_tp.is_subtype(dest_tp) |
emit_am_any_expr(arg:AM_ANY_EXPR):STR |
---|
emit_am_arr_const(arg:AM_ARR_CONST):STR |
---|
emit_am_array_expr(arg:AM_ARRAY_EXPR):STR |
---|
emit_am_assert_stmt(arg:AM_ASSERT_STMT) |
---|
emit_am_assign_stmt(arg:AM_ASSIGN_STMT) |
---|
emit_am_at_expr(arg:AM_AT_EXPR):STR |
---|
emit_am_attach_stmt(arg:AM_ATTACH_STMT) |
---|
**** | arg_frames:=arg_frames.insert(arg.rout); code_c.uses_layout(#ARG_LAYOUT(arg.rout)); |
emit_am_attr_expr(arg:AM_ATTR_EXPR):STR |
---|
emit_am_bnd_create_expr(arg:AM_BND_CREATE_EXPR):STR |
---|
emit_am_bnd_iter_call_expr(arg:AM_BND_ITER_CALL_EXPR):STR |
---|
emit_am_bnd_iter_create_expr(arg:AM_BND_CREATE_EXPR):STR |
---|
**** | momentarily not implementedif arg.fun.is_builtin then barf("Binding of builtin iters is currently not possible.\n"); end; |
emit_am_bnd_rout_call_expr(arg:AM_BND_ROUT_CALL_EXPR):STR |
---|
emit_am_bnd_rout_create_expr(arg:AM_BND_CREATE_EXPR, |
---|
emit_am_bool_const(arg:AM_BOOL_CONST):STR |
---|
emit_am_break_stmt(arg:AM_BREAK_STMT) |
---|
emit_am_case_stmt(arg:AM_CASE_STMT) |
---|
emit_am_char_const(arg:AM_CHAR_CONST):STR |
---|
emit_am_cluster_expr(arg:AM_CLUSTER_EXPR):STR |
---|
emit_am_cluster_size_expr(arg:AM_CLUSTER_SIZE_EXPR):STR |
---|
emit_am_comment_stmt(arg:AM_COMMENT_STMT) |
---|
emit_am_except_expr(arg:AM_EXCEPT_EXPR):STR |
---|
emit_am_expr_stmt(arg:AM_EXPR_STMT) |
---|
**** |
emit_am_ext_call_expr(arg:AM_EXT_CALL_EXPR):STR |
---|
emit_am_far_expr(arg:AM_FAR_EXPR):STR |
---|
emit_am_flt_const(arg:AM_FLT_CONST):STR |
---|
**** |
emit_am_fltd_const(arg:AM_FLTD_CONST):STR |
---|
**** |
emit_am_fltdx_const(arg:AM_FLTDX_CONST):STR |
---|
emit_am_flti_const(arg:AM_FLTI_CONST):STR |
---|
emit_am_fltx_const(arg:AM_FLTX_CONST):STR |
---|
emit_am_global_expr(arg:AM_GLOBAL_EXPR):STR |
---|
**** | get the global definition stored in the global table, so it will be mangled correctly |
emit_am_here_expr(arg:AM_HERE_EXPR):STR |
---|
emit_am_if_expr(arg:AM_IF_EXPR):STR |
---|
emit_am_if_stmt(arg:AM_IF_STMT) |
---|
emit_am_initial_stmt(arg:AM_INITIAL_STMT) |
---|
emit_am_int_const(arg:AM_INT_CONST):STR |
---|
emit_am_inti_const(arg:AM_INTI_CONST):STR |
---|
emit_am_invariant_stmt(arg:AM_INVARIANT_STMT) |
---|
emit_am_is_void_expr(arg:AM_IS_VOID_EXPR):STR |
---|
emit_am_local_expr(arg:AM_LOCAL_EXPR):STR |
---|
emit_am_lock_stmt(arg:AM_LOCK_STMT) |
---|
emit_am_loop_stmt(arg:AM_LOOP_STMT) |
---|
emit_am_near_expr(arg:AM_NEAR_EXPR):STR |
---|
emit_am_new_expr(arg:AM_NEW_EXPR):STR |
---|
emit_am_post_stmt(arg:AM_POST_STMT) |
---|
emit_am_pre_stmt(arg:AM_PRE_STMT) |
---|
emit_am_prefetch_stmt(arg:AM_PREFETCH_STMT) |
---|
emit_am_protect_stmt(arg:AM_PROTECT_STMT) |
---|
emit_am_raise_stmt(arg:AM_RAISE_STMT) |
---|
emit_am_return_stmt(arg:AM_RETURN_STMT) |
---|
emit_am_stmt_expr(arg:AM_STMT_EXPR):STR |
---|
emit_am_str_const(asc:AM_STR_CONST):STR |
---|
emit_am_sync_stmt(arg:AM_SYNC_STMT) |
---|
emit_am_typecase_stmt(arg:AM_TYPECASE_STMT) |
---|
emit_am_unlock_stmt(arg:AM_UNLOCK_STMT) |
---|
emit_am_vattr_assign_expr(arg:AM_VATTR_ASSIGN_EXPR):STR |
---|
emit_am_void_const(arg:AM_VOID_CONST):STR |
---|
emit_am_waitfor_stmt(arg:AM_WAITFOR_STMT) |
---|
emit_am_where_expr(arg:AM_WHERE_EXPR):STR |
---|
emit_am_with_near_stmt(arg:AM_WITH_NEAR_STMT) |
---|
emit_am_yield_stmt(arg:AM_YIELD_STMT) |
---|
emit_and_cast_args(arce:$AM_CALL_EXPR):ARRAY{STR} |
---|
**** | emit args, properly casted for the given routine call |
emit_and_cast_hot_args(arce:AM_ITER_CALL_EXPR):ARRAY{STR} |
---|
emit_and_cast_once_args(arce:AM_ITER_CALL_EXPR):ARRAY{STR} |
---|
**** | emit args, properly casted for the given routine call |
emit_args(arg:$AM_CALL_EXPR):ARRAY{STR} |
---|
**** | declare auto variables for any subexpressions that can't be in-line; at the moment that means anything which is a call. Anything which might be emitted as a macro (built in functions) need to not have subexpressions as arguments either |
emit_bnd_iter_initialization(biter:AM_BND_ITER_CALL_EXPR) |
---|
**** | emit code setting once arguments |
emit_builtin_iter_call(aice:AM_ITER_CALL_EXPR):STR |
---|
emit_call(fun:SIG, arg_list:ARRAY{STR}):STR |
---|
**** | assumes all args are appropriately casted already |
emit_code(arg:$AM_STMT) |
---|
**** | emit code associated with sequence of $AM_STMTs |
emit_dispatch_func_table(f:AM_ROUT_DEF) |
---|
**** | emit function pointer table for dispatched routines |
emit_dispatch_iter_table(f:AM_ROUT_DEF) |
---|
**** | emit function pointer table for dispatched iters The entry corresponding to a particular tag contains 2 function pointers: one to a function implementing the iter, and the other to the function that allocates the frame of an appropriate size. |
emit_dispatched_allocator(s, abs:SIG):STR |
---|
emit_dispatched_version(s,abs:SIG):STR |
---|
**** | emit a wrapper function for boxing/unboxing value types when dispatched. Return the function name generated. If no boxing has to happen, don't generate anything. 's' is the signature to call, and 'abs' is the signature of the dispatch. |
emit_epilogue(f:AM_ROUT_DEF) |
---|
emit_expr(arg:$AM_EXPR):STR |
---|
**** | emit code for computing expr if necessary, and return handle to the result. |
emit_globals |
---|
**** | emit declarations for globals and any code in main that has to execute to initialize to them before other code |
emit_iter_call_expr(aice:AM_ITER_CALL_EXPR):STR |
---|
emit_iter_initialization(aice:AM_ITER_CALL_EXPR) |
---|
emit_prologue(f:AM_ROUT_DEF) |
---|
emit_rout_call_expr(arce:AM_ROUT_CALL_EXPR):STR |
---|
emit_routine(func:AM_ROUT_DEF) |
---|
emit_stubs_for_forked_call(fun:SIG) |
---|
emit_typeswitch(test_expr: $AM_EXPR, tgts:FLIST{$TP}, stmts:FLIST{$AM_STMT}) |
---|
**** | Emit a structure that switches on type. This is used by both protect and typecase statements. The type of an exception expression should be $OB. It stops after emitting the "default:" entry which should then be generated appropriately by the caller, along with an "out;" and closing curly braces. |
attr emitted_dispatch_wrappers:FMAP{SIG,STR}; |
---|
attr emitted_dispatch_wrappers:FMAP{SIG,STR}; |
---|
attr emitted_iter_allocators:FSET{SIG}; |
---|
**** | List of dispatched iters for which allocators have been generated |
attr emitted_iter_allocators:FSET{SIG}; |
---|
**** | List of dispatched iters for which allocators have been generated |
attr emitted_leftovers:FSET{AM_ROUT_DEF}; |
---|
**** | leftover routines that have been already emitted |
attr emitted_leftovers:FSET{AM_ROUT_DEF}; |
---|
**** | leftover routines that have been already emitted |
eol:STR |
---|
**** | generate a newline or backslash newline, depending on whether or not debugging #line directives are happening. |
attr ex_nesting, current_loop_ex_nesting:INT; |
---|
**** | Number of protects we are in syntactically, so that we can pop out on a iterator quit, or a return. |
attr ex_nesting, current_loop_ex_nesting:INT; |
---|
**** | Number of protects we are in syntactically, so that we can pop out on a iterator quit, or a return. |
forbid(s:STR) |
---|
generate_bnd_iter_stubs |
---|
**** | generates wrapper function for iter call |
generate_bnd_rout_stubs |
---|
**** | Generate declarations for bound routine objects and make stub functions to execute them |
generate_dispatch_rout_and_iters |
---|
**** | make sure that all functions reachable through dispatch tables are actually emited Note that we do not emit any features in partial classes since partial classes cannot be instantiated |
generate_dispatch_tables |
---|
**** | first, emit dispatch tables for functions |
generate_leftovers |
---|
**** | Generate code for routines which were inlined but need a definition anyway because they were dispatched or bound. |
generate_sys_tables |
---|
**** | make routines/tables needed by the SYS class also, make const declarations for all the tags encountered |
get_inout_args_back(arg:AM_BND_CREATE_EXPR,arglist:FLIST{STR},local:STR,where:STR) |
---|
in |
---|
**** | move indentation in a logical level |
attr in_bnd_iter_call:BOOL; |
---|
**** | true if we are generating the stub for bound iter (only needed with print_ob) |
attr in_bnd_iter_call:BOOL; |
---|
**** | true if we are generating the stub for bound iter (only needed with print_ob) |
attr in_bnd_rout_call:BOOL; |
---|
**** | true if we are generating the stub for bound routines (only needed with print_ob) |
attr in_bnd_rout_call:BOOL; |
---|
**** | true if we are generating the stub for bound routines (only needed with print_ob) |
attr in_constant:BOOL; |
---|
**** | true if the translated expression occurs in constant initialization code (to bypass inlining) |
attr in_constant:BOOL; |
---|
**** | true if the translated expression occurs in constant initialization code (to bypass inlining) |
attr indent:INT; |
---|
**** | current level of indentation |
attr indent:INT; |
---|
**** | current level of indentation |
attr inlined_iter_count:INT; |
---|
**** | count of how many iters got inlined |
attr inlined_iter_count:INT; |
---|
**** | count of how many iters got inlined |
inlined_pointer_ob_eq_calls:INT; |
---|
inlined_pointer_ob_eq_calls:INT; |
---|
inlined_value_ob_eq_calls, |
---|
inlined_value_ob_eq_calls, |
---|
is_const_expr(e:$AM_EXPR):BOOL |
---|
**** | is this something we can make a C initializing constant for? |
attr itersig_map: FMAP{SIG,AM_ROUT_DEF}; |
---|
**** | an auxiluary datastructure which is filled in emit_am_bnd_iter_create to map iter sigs to their am_rout_defs, which is needed across code_file boundaries |
attr itersig_map: FMAP{SIG,AM_ROUT_DEF}; |
---|
**** | an auxiluary datastructure which is filled in emit_am_bnd_iter_create to map iter sigs to their am_rout_defs, which is needed across code_file boundaries |
attr last_file:STR; |
---|
attr last_file:STR; |
---|
attr last_lineno:INT; |
---|
attr last_lineno:INT; |
---|
attr leftovers:FSET{AM_ROUT_DEF}; |
---|
**** | routines that need to be generated even though inlined |
attr leftovers:FSET{AM_ROUT_DEF}; |
---|
**** | routines that need to be generated even though inlined |
attr main_sig:SIG; |
---|
**** | SIG corresponding to main |
attr main_sig:SIG; |
---|
**** | SIG corresponding to main |
make_tag_table |
---|
**** | Assign numbers to every type which needs a tag. This needs to be deterministic to avoid recompiling everything when tag numbers change. So we sort them alphabetically. |
attr sather_h, tags_h, makefile:CODE_FILE; |
---|
mang(ob:$OB):STR |
---|
mang(ob,ns:$OB):STR |
---|
attr manual_loop_unlock:BOOL; |
---|
**** | true if the current code is inside a lock statement that has to be manually unlocked before leaving the lock. |
attr manual_loop_unlock:BOOL; |
---|
**** | true if the current code is inside a lock statement that has to be manually unlocked before leaving the lock. |
attr manual_unlock:BOOL; |
---|
**** | true if the current code is in a lock statment that has to be manually unlocked before leaving the function |
attr manual_unlock:BOOL; |
---|
**** | true if the current code is in a lock statment that has to be manually unlocked before leaving the function |
move_out |
---|
**** | move indentation out a logical level |
ndefer(s:STR) |
---|
**** | same as defer but emits preceding newline |
attr needs_tag:FSET{$TP}; |
---|
**** | Types which will need tags assigned |
attr needs_tag:FSET{$TP}; |
---|
**** | Types which will need tags assigned |
newline |
---|
**** | start a new line to code file |
attr not_emitted:FMAP{SIG,AM_ROUT_DEF}; |
---|
**** | routines not initially emitted because they were inlined |
attr not_emitted:FMAP{SIG,AM_ROUT_DEF}; |
---|
**** | routines not initially emitted because they were inlined |
attr options:CS_OPTIONS; |
---|
**** | Typesafe options |
attr options:CS_OPTIONS; |
---|
**** | Typesafe options |
pop_exceptions(n:INT) |
---|
**** | Pop out n exception levels |
attr print_c:CODE_FILE; |
---|
attr print_c:CODE_FILE; |
---|
process_builtin_routs(fun:SIG, arg_list:ARRAY{STR}):STR |
---|
attr routine_code:FSTR; |
---|
**** | code waiting to be emitted |
attr routine_code:FSTR; |
---|
**** | code waiting to be emitted |
attr routine_count:INT; |
---|
**** | count of emitted routines, reset for each new file |
attr routine_count:INT; |
---|
**** | count of emitted routines, reset for each new file |
runtime_error(s:STR) |
---|
**** | emit (deferred) code to generate a fatal error at runtime. |
attr sather_h, tags_h, makefile:CODE_FILE; |
---|
attr saw_outer_return:BOOL; |
---|
**** | was a return at outer level seen in this routine? |
attr saw_outer_return:BOOL; |
---|
**** | was a return at outer level seen in this routine? |
set_chks |
---|
**** | set checking states for this function |
setup_routine(func:AM_ROUT_DEF) |
---|
sizeof(tp:$TP):STR |
---|
**** | an expression for the storage size of a given type. |
sizeof_boxed(tp:$TP):STR |
---|
**** | an expression for the size of a boxed value type |
attr state_counter:INT; |
---|
**** | for yield goto's |
attr state_counter:INT; |
---|
**** | for yield goto's |
attr str_count:INT; |
---|
**** | number of STR constants emitted (for making their id) |
attr str_count:INT; |
---|
**** | number of STR constants emitted (for making their id) |
attr string_constants:FMAP{STR,STR}; |
---|
**** | cache of emitted string constants, so we don't duplicate them |
attr string_constants:FMAP{STR,STR}; |
---|
**** | cache of emitted string constants, so we don't duplicate them |
attr code_c, system_c, dispatch_c, unbox_c, strings_c:CODE_FILE; |
---|
attr code_c, system_c, dispatch_c, unbox_c, strings_c:CODE_FILE; |
---|
attr code_c, system_c, dispatch_c, unbox_c, strings_c:CODE_FILE; |
---|
attr code_c, system_c, dispatch_c, unbox_c, strings_c:CODE_FILE; |
---|
attr tags:FMAP{$TP,INT}; |
---|
**** | Integers associated with classes |
attr sather_h, tags_h, makefile:CODE_FILE; |
---|
attr code_c, system_c, dispatch_c, unbox_c, strings_c:CODE_FILE; |
---|
attr code_c, system_c, dispatch_c, unbox_c, strings_c:CODE_FILE; |
---|
value_compare(tp:$TP,e1,e2:STR):STR |
---|
**** | expression for comparing contents of two value types |
value_void(tp:$TP,e:STR):STR |
---|
**** | expression for comparing value types to void (all zero elements) |