Go to the previous, next section.

Flat Annotation Definitions

Flat annotation definitions (see section Flat Annotations) are represented by base annote_def objects, for which the is_structured method returns FALSE. Other than the annotation name, these entries contain a flag that indicates whether the annotations should be written to the SUIF output file. The output method is used to retrieve this flag and the set_output method to change its value.

The ANNOTE macro provides a convenient way to register flat annotations. This macro enters the annotation name in the lexicon, creates an annote_def object, and registers it with the manager. It takes three arguments: the variable that will hold the pointer to the annotation name in the lexicon, the annotation name, and the value of its output flag. For example:

char *k_my_annote;
ANNOTE(k_my_annote, "my_annote", TRUE);

This enters the name "my_annote" in the lexicon and sets k_my_annote to point to that string. It also registers that name as a flat annotation that will be written to the SUIF output file. Typically, k_my_annote will be a global variable that is used throughout the program to refer to annotations of this type.

Go to the previous, next section.