/* * File: * irtframe.h * Author: * Samuel A. Rebelsky, based on code from Andrew Appel * Version: * 0.1 of 23 November 1998 * Description: * A header that describes the structures used in irtframe.c. * See also: * frame.h * Required headers: * frame.h - defines lots of useful stuff * temp.h - defines Temp_label and string * tree.h - defines T_exp and T_stm */ #ifndef _IRTFRAME_H_ #define _IRTFRAME_H_ /*********************************************************** * Types * *********/ /* * A frame. Frames are used to gather information about memory * usage in functions. */ struct F_frame_ { /* How many words have been allocated in the current frame? */ int allocated; /* What label is used for the current frame? */ Temp_label name; /* The intermediate-representation tree used for the view-shift */ T_stm viewShift; /* The parameters */ F_accessList formals; }; /* struct F_frame_ */ /* * A storage location (or something that allows us to get a storage * location). */ struct F_access_ { /* Is it in a register or in a frame? */ enum { F_inRegister, f_inFrame } kind; /* Kind-specific data */ union { Temp_temp reg; /* The register */ int offset; /* The offset in the current frame */ } u; }; /* struct F_access_ */ #endif /* _IRT_FRAME_H_ */