Skip to content

87right/YSVM-GeometricVirtualMachine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YSVM-GeometricVirtualMachine

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.


Definition

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.


Implementation Note

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages