Major changes inlude:
* Bit the bullet and now instructions have their length hard-coded
* Move from_utf8 object parsing to be done by their objects (instead of
a Parser god object)
* A list of AST sections are assembled into an Object using the new
vm::obj::assemble module.
* Changed the object layout some in the spec, and adjusted code to match
this.
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
* Object layout and parsing are done in the vm::obj module
* Add MemCursor, a wrapper around the std::io::Cursor type for walking
through VM memory
* Add vm::tick module for containing the Vm::tick() method
implementation, since it's pretty big
* Instructions are now variable-sized, and are read lazily,
one-at-a-time directly from memory.
* Add VM runtime error structure
* Probably some other stuff I forgot
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
* StoreImm just uses a u64 instead of u32 - we'll figure out the layout
later
* Jmp implementation added (can't believe I forgot this)
* Add Inst AST item, whose immediates don't have to be a u64 right away
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
Originally, arithmetic instructions were in the form of
REG2 = REG1 (OP) REG2
but then I started storing the result in REG1 (both in implementation,
and later defs of the arth instructions). So I'm updating it to match
what was actually in my head.
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>