class C_PRETTY_PRINTER
Summary
Overview
exported features
Set of features to bufferize the next C function to be generated:
Low-level set of feature to be used when one cannot use the pending_c_function mode, i.e. when one is not defining some code inside some C function:
Printing Current, local or argument :
pending_c_function: BOOLEAN
writable attribute
Indicates that a new C function is beeing prepared.
pending_c_function_signature: STRING
once function
The signature of the pending_c_function beeing prepared.
pending_c_function_body: STRING
once function
The body of the pending_c_function beeing prepared.
prepare_c_function
effective procedure
Start the preparation of a the next C function.
pending_c_function_lock_local (type: TYPE): INTERNAL_C_LOCAL
effective function
Reuse some un-locked variable of the pending_c_function_locals or add/create a new one.
internal_c_local_stack_level: INTEGER_32
effective function
To be used with unlock_internal_c_local.
unlock_internal_c_local (old_internal_c_local_stack_level: INTEGER_32)
effective procedure
Unlock now unused INTERNAL_C_LOCAL since last internal_c_local_stack_level call.
dump_pending_c_function (non_static_flag: BOOLEAN)
effective procedure
Actually dump the pending_c_function on out_h / out_c.
out_h_buffer: STRING
once function
Common buffer to write on the *.h file.
write_out_h_buffer
effective procedure
Actually write the out_h_buffer.
out_c_buffer: STRING
once function
Common buffer to write on the *.c file.
write_out_c_buffer
effective procedure
Actually write the out_c_buffer.
write_extern_0 (type_variable: STRING)
effective procedure
write_extern_1 (type_variable: STRING)
effective procedure
write_extern_2 (type_variable: STRING, initializer: STRING)
effective procedure
write_extern_array_1 (type_variable: STRING, array_size: INTEGER_32, array_content: STRING)
effective procedure
write_extern_array_2 (type_variable: STRING, array_size: INTEGER_32)
effective procedure
put_position (p: POSITION)
effective procedure
put_position_in_ds (p: POSITION)
effective procedure
put_target_as_target
effective procedure
Produce C code to pass the current stacked target as a target of a new call: user expanded are passed by address and class invariant code is produced.
put_target_as_value
effective procedure
Produce C code for a simple access to the stacked target.
put_error0 (msg: STRING)
effective procedure
Print msg and then stop execution.
put_position_comment (p: POSITION)
effective procedure
define_main (rf3: RUN_FEATURE_3)
effective procedure
trace_boolean_expression (type: TYPE, e: EXPRESSION)
effective procedure
Produce a C boolean expression including trace code.
put_arguments (arguments_count: INTEGER_32)
effective procedure
Produce code to access to the whole effective arguments list.
put_ith_argument (index: INTEGER_32)
effective procedure
Produce code to access to the ith argument.
put_trace_or_sedb_expression (position: POSITION)
effective procedure
Add an sedb(...)
put_trace_or_sedb_instruction (position: POSITION)
effective procedure
print_current
effective procedure
print_argument (rank: INTEGER_32)
effective procedure
print_local (name: STRING)
effective procedure
class_invariant_call_opening (type_of_target: TYPE, extra_cast_flag: BOOLEAN): INTEGER_32
effective function
Add extra code to call the class invariant when type_of_target actually has an invariant.
class_invariant_call_closing (integer_flag: INTEGER_32, semicolon_flag: BOOLEAN)
effective procedure
macro_def (str: STRING, id: INTEGER_32)
effective procedure
sys_runtime_h_and_c (name: STRING)
effective procedure
Inline corresponding SmartEiffel/sys/runtime/name.[hc] file.
recompilation_comment (lt: LIVE_TYPE)
effective procedure
set_dump_stack_top_for (t: TYPE, ds: STRING, comment: STRING)
effective procedure
pop
effective procedure