Proposed by 87right, January 22, 2026
This repository documents the original definition and implementation concept of the Prepared Collapse Model (PCM) — a geometric approach to stack frame return in virtual machines.
Prepared Collapse Model (PCM)
A model where the child frame's command pointer (cmd) is geometrically
aligned with the parent frame's operand top.
The RET operation overwrites (collapses) its own command pointer with the
return value and restores the previous frame.
As a result, the return value automatically appears at the top of the parent’s
operand stack — without explicit transfer.
Example pseudocode:
// RET - Prepared Collapse Model (PCM)
// Proposed by 87right, 2026-01-22
current_command_index() = operand_value(1); // collapse
current_frame_index() = prev_frame_index(); // escape