| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- #ifndef TYPES_H
- #define TYPES_H
- #include "nodes.h"
- typedef struct binding {
- TOKEN* name;
- int env_offset;
- int is_saved;
- struct environ *env;
- } BIND;
- typedef struct blist {
- BIND* binding;
- struct blist *next;
- } BLIST;
- typedef struct environ {
- int return_addr;
- BLIST *bindings;
- struct environ *parent;
- struct environ *previous;
- int counter;
- int param_counter;
- int arg_counter;
- } ENV;
- typedef struct tac_elem {
- TOKEN* src;
- TOKEN* dst;
- TOKEN* tgt;
- int op;
- } TAC_T;
- typedef struct tac_list {
- TAC_T* elem;
- struct tac_list* next;
- } TLIST;
- typedef struct tacs {
- TLIST* list;
- } TACS;
- typedef struct reg {
- int num;
- int stored;
- } REG;
- typedef struct varloc {
- TOKEN* var;
- int loc_idx;
- } VARLOC;
- #endif
|