PIPS
|
#include <stdio.h>
#include <ctype.h>
#include "genC.h"
#include "linear.h"
#include "misc.h"
#include "pipsdbm.h"
#include "properties.h"
#include "ri-util.h"
Go to the source code of this file.
Macros | |
#define | NL "\n" |
#define | current_module_is_a_function() (entity_function_p(get_current_module_entity())) |
#define | html_print(format, args...) |
Variables | |
static FILE * | out_fp = 0 |
#define current_module_is_a_function | ( | ) | (entity_function_p(get_current_module_entity())) |
Definition at line 59 of file html_prettyprinter.c.
#define html_print | ( | format, | |
args... | |||
) |
Definition at line 79 of file html_prettyprinter.c.
#define NL "\n" |
Definition at line 56 of file html_prettyprinter.c.
|
static |
Definition at line 86 of file html_prettyprinter.c.
References html_print, and NL.
Referenced by html_prettyprint(), html_print_area(), html_print_basic(), html_print_call(), html_print_code(), html_print_constant(), html_print_dimension(), html_print_entity_full(), html_print_entity_name(), html_print_expression(), html_print_forloop(), html_print_formal(), html_print_functional(), html_print_loop(), html_print_mode(), html_print_parameter(), html_print_qualifier(), html_print_ram(), html_print_range(), html_print_reference(), html_print_rom(), html_print_sequence(), html_print_statement(), html_print_storage(), html_print_subscript(), html_print_symbol_table(), html_print_test(), html_print_type(), html_print_unstructured(), html_print_value(), html_print_variable(), and html_print_whileloop().
|
static |
Definition at line 98 of file html_prettyprinter.c.
References html_print, and NL.
Referenced by html_prettyprint(), html_print_area(), html_print_basic(), html_print_call(), html_print_code(), html_print_constant(), html_print_dimension(), html_print_entity_full(), html_print_entity_name(), html_print_expression(), html_print_forloop(), html_print_formal(), html_print_functional(), html_print_loop(), html_print_mode(), html_print_parameter(), html_print_qualifier(), html_print_ram(), html_print_range(), html_print_reference(), html_print_rom(), html_print_sequence(), html_print_statement(), html_print_storage(), html_print_subscript(), html_print_symbol_table(), html_print_test(), html_print_type(), html_print_unstructured(), html_print_value(), html_print_variable(), and html_print_whileloop().
void html_output | ( | const char * | out, |
bool | cr | ||
) |
out | ut |
cr | r |
Definition at line 105 of file html_prettyprinter.c.
References html_print, NL, and out.
Referenced by html_print_area(), html_print_basic(), html_print_constant(), html_print_entity_full(), html_print_entity_name(), html_print_expression(), html_print_formal(), html_print_mode(), html_print_parameter(), html_print_qualifier(), html_print_ram(), html_print_rom(), html_print_statement(), html_print_storage(), html_print_type(), html_print_unstructured(), html_print_value(), and html_print_whileloop().
Set the current module entity required to have many things working in PIPS:
The debug is now controled by this environment variable name:
Print current module
mod_name | od_name |
Definition at line 818 of file html_prettyprinter.c.
References begin_block(), concatenate(), db_build_file_resource_name(), db_get_current_workspace_directory(), db_get_memory_resource(), DB_PUT_FILE_RESOURCE, debug_on, end_block(), get_bool_property(), html_print, html_print_statement(), html_print_symbol_table(), html_set_output(), module_name_to_entity(), module_statement, NL, pips_assert, pips_debug, reset_current_module_entity(), reset_current_module_statement(), safe_fclose(), safe_fopen(), set_current_module_entity(), set_current_module_statement(), statement_consistent_p(), and strdup().
module | odule |
Definition at line 872 of file html_prettyprinter.c.
References concatenate(), db_build_file_resource_name(), db_get_current_workspace_directory(), DB_PUT_FILE_RESOURCE, html_set_output(), module, pips_debug, safe_fclose(), safe_fopen(), and strdup().
|
static |
Definition at line 275 of file html_prettyprinter.c.
References area_layout, area_size, asprintf, begin_block(), buf, end_block(), FOREACH, free(), html_output(), html_print_entity_name(), and pips_assert.
Referenced by html_print_type().
|
static |
Definition at line 213 of file html_prettyprinter.c.
References asprintf, basic_derived, basic_int, basic_pointer, basic_string, basic_tag, basic_typedef, basic_undefined, begin_block(), buf, end_block(), free(), html_output(), html_print_entity_name(), html_print_type(), html_print_value(), is_basic_bit, is_basic_complex, is_basic_derived, is_basic_float, is_basic_int, is_basic_logical, is_basic_overloaded, is_basic_pointer, is_basic_string, is_basic_typedef, and pips_assert.
Referenced by html_print_variable().
|
static |
Definition at line 531 of file html_prettyprinter.c.
References begin_block(), call_arguments, call_function, end_block(), FOREACH, html_print_entity_name(), and html_print_expression().
Referenced by html_print_expression(), and html_print_statement().
|
static |
Definition at line 167 of file html_prettyprinter.c.
References begin_block(), code_declarations, end_block(), ENDP, FOREACH, and html_print_entity_name().
Referenced by html_print_value().
|
static |
Definition at line 440 of file html_prettyprinter.c.
References asprintf, begin_block(), buf, constant_call, constant_float, constant_int, constant_logical, constant_tag, constant_undefined, end_block(), free(), html_output(), html_print_entity_name(), is_constant_call, is_constant_float, is_constant_int, is_constant_litteral, is_constant_logical, is_constant_unknown, and pips_assert.
Referenced by html_print_value().
|
static |
Definition at line 319 of file html_prettyprinter.c.
References begin_block(), dimension_lower, dimension_upper, end_block(), and html_print_expression().
Referenced by html_print_variable().
void html_print_entity_full | ( | entity | e | ) |
Definition at line 521 of file html_prettyprinter.c.
References begin_block(), end_block(), entity_initial, entity_name, entity_storage, entity_type, html_output(), html_print_storage(), html_print_type(), and html_print_value().
Referenced by html_print_symbol_table().
|
static |
Definition at line 113 of file html_prettyprinter.c.
References begin_block(), end_block(), entity_name, and html_output().
Referenced by html_print_area(), html_print_basic(), html_print_call(), html_print_code(), html_print_constant(), html_print_formal(), html_print_loop(), html_print_ram(), html_print_reference(), html_print_statement(), html_print_storage(), and html_print_type().
|
static |
Definition at line 593 of file html_prettyprinter.c.
References begin_block(), end_block(), expression_syntax, html_output(), html_print_call(), html_print_range(), html_print_reference(), html_print_subscript(), is_syntax_application, is_syntax_call, is_syntax_cast, is_syntax_range, is_syntax_reference, is_syntax_sizeofexpression, is_syntax_subscript, is_syntax_va_arg, pips_internal_error, syntax_call, syntax_range, syntax_reference, syntax_subscript, and syntax_tag.
Referenced by html_print_call(), html_print_dimension(), html_print_forloop(), html_print_range(), html_print_reference(), html_print_statement(), html_print_subscript(), html_print_test(), html_print_value(), and html_print_whileloop().
|
static |
partial implementation...
Definition at line 691 of file html_prettyprinter.c.
References begin_block(), end_block(), f(), forloop_body, forloop_condition, forloop_increment, forloop_initialization, html_print_expression(), and html_print_statement().
Referenced by html_print_statement().
|
static |
Definition at line 144 of file html_prettyprinter.c.
References asprintf, begin_block(), buf, end_block(), f(), formal_function, formal_offset, html_output(), html_print_entity_name(), and pips_assert.
Referenced by html_print_storage().
|
static |
Definition at line 368 of file html_prettyprinter.c.
References begin_block(), end_block(), f(), FOREACH, functional_parameters, functional_result, html_print_parameter(), and html_print_type().
Referenced by html_print_type().
|
static |
partial implementation ???
Definition at line 645 of file html_prettyprinter.c.
References begin_block(), end_block(), html_print_entity_name(), html_print_range(), html_print_statement(), loop_body, loop_index, and loop_range.
Referenced by html_print_statement().
|
static |
Definition at line 340 of file html_prettyprinter.c.
References begin_block(), end_block(), html_output(), is_mode_reference, is_mode_value, and mode_tag.
Referenced by html_print_parameter().
|
static |
Definition at line 358 of file html_prettyprinter.c.
References begin_block(), end_block(), html_output(), html_print_mode(), html_print_type(), parameter_mode, and parameter_type.
Referenced by html_print_functional().
|
static |
Definition at line 292 of file html_prettyprinter.c.
References begin_block(), end_block(), html_output(), is_qualifier_auto, is_qualifier_const, is_qualifier_register, is_qualifier_restrict, is_qualifier_volatile, and qualifier_tag.
Referenced by html_print_variable().
|
static |
Definition at line 119 of file html_prettyprinter.c.
References asprintf, begin_block(), buf, end_block(), FOREACH, free(), html_output(), html_print_entity_name(), NL, pips_assert, ram_function, ram_offset, ram_section, and ram_shared.
Referenced by html_print_storage().
|
static |
Definition at line 631 of file html_prettyprinter.c.
References begin_block(), end_block(), html_print_expression(), range_increment, range_lower, and range_upper.
Referenced by html_print_expression(), and html_print_loop().
|
static |
Definition at line 558 of file html_prettyprinter.c.
References begin_block(), end_block(), FOREACH, html_print_entity_name(), html_print_expression(), reference_indices, and reference_variable.
Referenced by html_print_expression().
Definition at line 159 of file html_prettyprinter.c.
References begin_block(), end_block(), and html_output().
Referenced by html_print_storage().
|
static |
Definition at line 715 of file html_prettyprinter.c.
References begin_block(), end_block(), FOREACH, html_print_statement(), and sequence_statements.
Referenced by html_print_statement().
|
static |
statement g = instruction_goto(i); entity el = statement_label(g); string l = entity_local_name(el) + sizeof(LABEL_PREFIX) -1; printf("%s", strdup( concatenate( "goto ", l, SEMICOLON, NULL ) ) );
add switch, forloop break, continue, return instructions here
Definition at line 743 of file html_prettyprinter.c.
References begin_block(), end_block(), ENDP, entity_undefined, FOREACH, html_output(), html_print_call(), html_print_entity_name(), html_print_expression(), html_print_forloop(), html_print_loop(), html_print_sequence(), html_print_test(), html_print_unstructured(), html_print_whileloop(), instruction_call, instruction_expression, instruction_forloop, instruction_loop, instruction_sequence, instruction_tag, instruction_test, instruction_unstructured, instruction_whileloop, is_instruction_call, is_instruction_expression, is_instruction_forloop, is_instruction_goto, is_instruction_loop, is_instruction_sequence, is_instruction_test, is_instruction_unstructured, is_instruction_whileloop, NL, statement_declarations, statement_instruction, and statement_label.
Referenced by html_prettyprint(), html_print_forloop(), html_print_loop(), html_print_sequence(), html_print_test(), and html_print_whileloop().
|
static |
Definition at line 186 of file html_prettyprinter.c.
References begin_block(), end_block(), html_output(), html_print_entity_name(), html_print_formal(), html_print_ram(), html_print_rom(), is_storage_formal, is_storage_ram, is_storage_return, is_storage_rom, storage_formal, storage_ram, storage_return, storage_rom, storage_tag, and storage_undefined_p.
Referenced by html_print_entity_full().
|
static |
Definition at line 580 of file html_prettyprinter.c.
References begin_block(), end_block(), FOREACH, html_print_expression(), subscript_array, and subscript_indices.
Referenced by html_print_expression().
void html_print_symbol_table | ( | void | ) |
Print symbol table
Definition at line 805 of file html_prettyprinter.c.
References begin_block(), end_block(), entity_domain, FOREACH, gen_filter_tabulated(), gen_true(), html_print, html_print_entity_full(), and NL.
Referenced by html_prettyprint().
|
static |
Definition at line 723 of file html_prettyprinter.c.
References begin_block(), empty_statement_p(), end_block(), html_print_expression(), html_print_statement(), test_condition, test_false, and test_true.
Referenced by html_print_statement().
|
static |
Definition at line 381 of file html_prettyprinter.c.
References begin_block(), end_block(), FOREACH, html_output(), html_print_area(), html_print_entity_name(), html_print_functional(), html_print_variable(), is_type_area, is_type_enum, is_type_functional, is_type_statement, is_type_struct, is_type_union, is_type_unknown, is_type_varargs, is_type_variable, is_type_void, type_area, type_enum, type_functional, type_struct, type_tag, type_undefined, type_union, type_varargs, and type_variable.
Referenced by html_print_basic(), html_print_entity_full(), html_print_functional(), and html_print_parameter().
|
static |
Definition at line 552 of file html_prettyprinter.c.
References begin_block(), end_block(), and html_output().
Referenced by html_print_statement().
|
static |
Definition at line 487 of file html_prettyprinter.c.
References begin_block(), end_block(), html_output(), html_print_code(), html_print_constant(), html_print_expression(), is_value_code, is_value_constant, is_value_expression, is_value_intrinsic, is_value_symbolic, is_value_unknown, value_code, value_constant, value_expression, value_tag, and value_undefined.
Referenced by html_print_basic(), and html_print_entity_full().
|
static |
Definition at line 326 of file html_prettyprinter.c.
References begin_block(), end_block(), FOREACH, html_print_basic(), html_print_dimension(), html_print_qualifier(), variable_basic, variable_dimensions, and variable_qualifiers.
Referenced by html_print_type().
|
static |
partial implementation... ??
o while and while do loops
Definition at line 662 of file html_prettyprinter.c.
References begin_block(), end_block(), eval(), evaluation_before_p, html_output(), html_print_expression(), html_print_statement(), NL, whileloop_body, whileloop_condition, and whileloop_evaluation.
Referenced by html_print_statement().
|
static |
Definition at line 72 of file html_prettyprinter.c.
References out_fp.
Referenced by html_prettyprint(), and html_prettyprint_symbol_table().
|
static |
Definition at line 69 of file html_prettyprinter.c.
Referenced by html_set_output().