/*****
* frame.h
* Andy Hammerlindl 2002/07/22
*
* Describes the frame levels for the functions of the language.
* Also creates accesses for the variable for automated loading
* and saving of variables.
*****/
#ifndef FRAME_H
#define FRAME_H
#include <cassert>
#include "access.h"
namespace trans {
class frame : public gc {
frame *parent;
size_t numFormals;
Int numLocals;
// With the SIMPLE_FRAME flag, the size of frames cannot be changed at
// runtime. This is an issue for runnable-at-a-time mode, where global
// variables can be continually added. To handle this, the frame for
// global variables is an "indirect" frame. It holds one variable, which is
// a link to another frame. When the subframe is too small, a larger
// runtime array is allocated, and the link is changed.
enum {DIRECT_FRAME, INDIRECT_FRAME} style;