Go to the first, previous, next, last section, table of contents.
A name_table_entry
represents an individual name.
Each name has a SUIF variable or a string as the name and an
associated name_table_entry_kind
.
The name_table_entry_kind
describes the properties of the name.
Valid kinds are:
Even though two different names are of different kinds, they can match
up if the names match. For example, name table entries NA
and
NB
both have SUIF variable v
as the name. But
NA
is a symbolic constant and NB
is a loop index variable.
When aligning, NA
and NB
will match up and the resulting
name will be of loop index kind.
The following are functions and operations available on
name_table_entry
.
In this list of functions,
symbols nte
, nte1
and
nte2
are of the class name_table_entry
,
symbol knd
is a name_table_entry_kind
and
im
is of the class immed
.
name_table_entry nte();
nte.init();
nte
as a null entry.
name_table_entry nte(im);
nte.init(im);
nte
using im
. If im
is a variable name
(class var_sym
) or character string, the kind will be a symbolic
constant; otherwise no name is set and nte
will be an auxiliary
variable.
name_table_entry nte(knd, im);
nte.init(knd, im);
im
and the kind is set to knd
.
If knd
is of auxiliary variable type, im
is disregarded.
name_table_entry nte(nte1);
nte.init(nte1);
nte1
is made.
im = nte.name();
char * str = nte.string();
var_sym * vs = nte.var();
name()
and string()
will
work for both character strings and SUIF variable symbols,
var()
can be used only on entries with SUIF variable symbol
names. If the name table entry is of auxiliary variable kind, none of
the above functions are applicable.
nte.set_name(im);
knd = nte.kind();
nte.mark_sym();
nte.mark_cond();
nte.mark_loop();
nte.mark_dim();
nte.mark_summary();
nte.mark_aux();
nte1 == nte2
nte1 != nte2
FILE * fp;
nte.print(fp);
Go to the first, previous, next, last section, table of contents.