MoarVM as a Machine
If you read my blog, you'll likely know what MoarVM is and what it does. For readers who do not, MoarVM is a virtual machine that is designed to execute perl6 efficiently. Like a real computer, a virtual machine provides the following: A 'processor', that is to say, something that reads a file and executes a program. This simulation is complete with registers and an instruction set. An infinite amount of memory, using a garbage collector schema. IO ports, including file and network access. Concurrency (the simulation of an infinite amount of processors via threads) In this post I'll focus on the 'processor' aspect of MoarVM. MoarVM is a 'register virtual machine'. This means simply that all instructions operate on a limited set of storage locations in which all variables reside. These storage locations are called registers. Every instruction in the bytecode stream contains the address of the memory locations (registers) on which it operates. Fo