PIPS
|
Go to the source code of this file.
Macros | |
#define | TYPE(bp) (bp-Domains-Number_imports-Current_start) |
#define | NEWGEN_IMPL "#+akcl lisp:vector #-akcl (lisp:vector lisp:t)" |
#define | OR_VALUE_INDEX 3 |
Unused in Lisp. More... | |
Functions | |
char * | init_member (dp) |
INIT_MEMBER returns the initialization code for a value in the domain DP. More... | |
void | gen_external (bp) |
GEN_EXTERNAL generates the type code for external type BP. More... | |
int | gen_external_member (dp, offset) |
GEN_EXTERNAL_MEMBER generates the manipulation functions for a possible external member (either and or or) in domain DP and OFFSET. More... | |
static void | gen_prelude (bp) |
GEN_PRELUDE generates prelude declarations for potentially tabulated domain BP. More... | |
static void | gen_postlude (bp) |
GEN_POSTLUDE generates tabulation table updates. More... | |
static | generate_type_member (bp) |
GEN_TYPE generates the type member for potentially tabulated BP domain. More... | |
void | gen_and (bp) |
GEN_AND generates the manipulation functions for an AND type BP. More... | |
void | gen_or (bp) |
GEN_OR generates the manipulation function for an OR_OP type BP. More... | |
void | gen_list (bp) |
GEN_LIST defines the manipulation functions for a list type BP. More... | |
void | gen_array (bp) |
GEN_ARRAY defines the manipulation functions for an array type BP. More... | |
void | gen_set (bp) |
GEN_SET defines the manipulation functions for a set type BP. More... | |
void | gen_domain (bp) |
GEN_DOMAIN generates the manipulation functions for a type BP. More... | |
void | gencode (file) |
GENCODE generates the code necessary to manipulate every non-inlinable type in the Domains table. More... | |
Variables | |
static char | start [1024] |
The name of the variable from which to start counting domain numbers. More... | |
static char * | package |
The package name in which functions will be defined. More... | |
struct gen_binding * | Tabulated_bp |
int | Read_spec_mode |
extern int Current_first ; More... | |
static int | or_counter |
#define NEWGEN_IMPL "#+akcl lisp:vector #-akcl (lisp:vector lisp:t)" |
#define TYPE | ( | bp | ) | (bp-Domains-Number_imports-Current_start) |
void gen_and | ( | bp | ) |
GEN_AND generates the manipulation functions for an AND type BP.
Definition at line 211 of file genLisp.c.
References domain::ba, domain::co, domain::components, domain::constructor, gen_binding::domain, gen_external_member(), gen_postlude(), gen_prelude(), generate_type_member(), init_member(), gen_binding::name, NEWGEN_IMPL, and printf().
Referenced by gen_domain().
void gen_array | ( | bp | ) |
GEN_ARRAY defines the manipulation functions for an array type BP.
Definition at line 305 of file genLisp.c.
References domain::ar, domain::constructor, gen_binding::domain, domain::element, gen_postlude(), gen_prelude(), generate_type_member(), init_member(), gen_binding::name, NEWGEN_IMPL, and printf().
Referenced by gen_domain().
void gen_domain | ( | bp | ) |
GEN_DOMAIN generates the manipulation functions for a type BP.
This is manily a dispatching function.
Definition at line 338 of file genLisp.c.
References AND_OP, ARRAY_DT, domain::ba, domain::co, CONSTRUCTED_DT, gen_binding::domain, EXTERNAL_DT, fatal(), gen_and(), gen_array(), gen_external(), gen_list(), gen_or(), gen_set(), i2a(), IS_EXTERNAL, IS_INLINABLE, LIST_DT, gen_binding::name, domain::op, OR_OP, printf(), SET_DT, and domain::type.
Referenced by gencode().
void gen_external | ( | bp | ) |
GEN_EXTERNAL generates the type code for external type BP.
Definition at line 117 of file genLisp.c.
References gen_binding::name, printf(), start, and TYPE.
Referenced by gen_domain().
GEN_EXTERNAL_MEMBER generates the manipulation functions for a possible external member (either and or or) in domain DP and OFFSET.
It returns whether some code has been generated or not.
See INIT_MEMBER to understand mutation code.
Definition at line 130 of file genLisp.c.
References domain::ba, BASIS_DT, domain::constructand, domain::constructor, IS_EXTERNAL, IS_INLINABLE, gen_binding::name, offset, printf(), and domain::type.
Referenced by gen_and(), and gen_or().
void gen_list | ( | bp | ) |
GEN_LIST defines the manipulation functions for a list type BP.
Definition at line 292 of file genLisp.c.
References domain::constructor, gen_binding::domain, gen_postlude(), gen_prelude(), generate_type_member(), domain::li, gen_binding::name, NEWGEN_IMPL, and printf().
Referenced by gen_domain().
void gen_or | ( | bp | ) |
GEN_OR generates the manipulation function for an OR_OP type BP.
Note that for a UNIT_TYPE_NAME, no access function is defined since the value is meaningless.
Definition at line 240 of file genLisp.c.
References domain::ba, domain::co, domain::components, domain::constructand, domain::constructor, gen_binding::domain, gen_external_member(), gen_postlude(), gen_prelude(), IS_TABULATED, gen_binding::name, or_counter, OR_VALUE_INDEX, printf(), start, TYPE, domain::type, and UNIT_TYPE_NAME.
Referenced by gen_domain().
|
static |
GEN_POSTLUDE generates tabulation table updates.
Definition at line 173 of file genLisp.c.
References HASH_OFFSET, IS_TABULATED, gen_binding::name, and printf().
Referenced by gen_and(), gen_array(), gen_list(), gen_or(), and gen_set().
|
static |
GEN_PRELUDE generates prelude declarations for potentially tabulated domain BP.
Definition at line 155 of file genLisp.c.
References IS_TABULATED, gen_binding::name, package, printf(), start, and TYPE.
Referenced by gen_and(), gen_array(), gen_list(), gen_or(), and gen_set().
void gen_set | ( | bp | ) |
GEN_SET defines the manipulation functions for a set type BP.
Definition at line 321 of file genLisp.c.
References domain::constructor, gen_binding::domain, domain::element, gen_postlude(), gen_prelude(), generate_type_member(), init_member(), gen_binding::name, NEWGEN_IMPL, printf(), and domain::se.
Referenced by gen_domain().
void gencode | ( | file | ) |
GENCODE generates the code necessary to manipulate every non-inlinable type in the Domains table.
Definition at line 377 of file genLisp.c.
References Domains, gen_domain(), IS_IMPORT, IS_INLINABLE, MAX_DOMAIN, gen_binding::name, or_counter, start, and Tabulated_bp.
|
static |
GEN_TYPE generates the type member for potentially tabulated BP domain.
Definition at line 197 of file genLisp.c.
References IS_TABULATED, printf(), start, and TYPE.
Referenced by gen_and(), gen_array(), gen_list(), and gen_set().
char* init_member | ( | dp | ) |
INIT_MEMBER returns the initialization code for a value in the domain DP.
OTREACHED
Definition at line 72 of file genLisp.c.
References domain::ar, ARRAY_DT, domain::ba, BASIS_DT, buffer, domain::constructand, domain::dimensions, fatal(), i2a(), gen_binding::inlined, IS_EXTERNAL, IS_INLINABLE, inlinable::Lisp_value, LIST_DT, gen_binding::name, SET_DT, start, TYPE, and domain::type.
Referenced by gen_and(), gen_array(), and gen_set().
|
static |
|
static |
The package name in which functions will be defined.
Definition at line 59 of file genLisp.c.
Referenced by FindEntity(), FindEntityFromUserName(), FindOrCreateEntity(), FindOrCreateEntityLikeModel(), gen_prelude(), gfc2pips_char2entity(), make_complexity_unknown(), and SafeFindOrCreateEntity().
|
static |
The name of the variable from which to start counting domain numbers.
Definition at line 55 of file genLisp.c.
Referenced by address_of_variable_is_taken(), addStatementToSequence(), clear_log_subwindow(), fun_completion(), gen_external(), gen_or(), gen_prelude(), gencode(), generate_type_member(), gfc2pips_array_ref2indices(), gfc2pips_truncate_useless_zeroes(), init_member(), init_reachable(), main(), save_edited_file(), and str_sub().
struct gen_binding* Tabulated_bp |