Next: The Representation of Up: LLAMA - The Previous: LLAMA - The

Registers and Memory Organization

The LLAMA was designed to have as few registers as possible.

P, SP, and H are shared with the WAM. Only the CT register is new; it is used for non-local exits (catch and throw) and loops (loop and do) which are implemented via non-local exits. Programs not using these builtins never access the CT register, thus no overhead for purely functional programs results.

The LLAMA has the following memory organization:

Stack, Heap, and Code are shared with the WAM. Catch Stack is used to store tuples of the form which are created by catch and removed by throw.

Memory is used to store data structures which have to live longer than entries in Stack and Heap which are reset between queries. Thus, Memory is mainly used to store global variables. Furthermore, Memory contains hash and jump tables which are created by the GAMA (see section 7).

Harold Boley & Michael Sintek (