Compilers Explained

Understanding parsing techniques and the runtime stack

Parsing Techniques

Runtime Stack & Activation Records

Diagram of runtime stack showing activation records and offsets

The runtime stack manages function calls and local variables during program execution. Each function call creates an activation record (or stack frame) that stores:

Offsets are used within activation records to access these elements relative to the stack pointer or frame pointer, enabling efficient memory addressing during runtime.

Hi, I'm Morgan Wong, and I really love you.