Skip to content

Latest commit

 

History

History
69 lines (34 loc) · 2.7 KB

File metadata and controls

69 lines (34 loc) · 2.7 KB

Collection of code snippets for everyday use

Allows implementing efficient interpretters or VMs. Each command (operation) should be encoded with an integer value which is then used as goto label in main loop instead of giant switch or if-then-else.

Reference: https://gcc.gnu.org/onlinedocs/gcc/Labels-as-Values.html

Update

Code snipped was extended to support one operand per operation, its type depends on the op.