Set thread names
This makes it easier to see which thread is which when inspecting the VM
in GDB.
Fix: missing include of <stdexcept>
Move bytecode size type to codec header
Move bits size type to codec header
Ensure that the test does not produce mangled output
This required introducing additional process that manages standard error
stream. All other processes just send their output to that process. The
printing becomes serialised this way, but it is the only bottleneck as
the processes run otherwise unsynchronised.
Use size_t instead of typedef for schedulers and processes count
That type was a tad too big anyway, so there is no reason to keep it
typedefed. Just use size_t and be done with it. Unless the number of
schedulers is capped at some "weird" value (e.g. 42) then I see no
reason to try to be fancy with typedefs.
Move register index type to codec
Use uint8_t instead of our custom byte type
There is no use in typedefing that.
Move more types to codec namespace
I would like to remove the "bytetypedef.h" header and keep types in more
sensible places. This file has become a kind of dump-everything place.
Clean up register set enums
There should be only one enum defining the available register sets.
Use big-endian to encode addresses in bytecode
Use big-endian to encode non-address integers in operands
Integer literals and register indexes are represented in big-endian in
bytecode.
Use decoder in disassembler
There is no reason to duplicate code that decodes the bytecode. Let's
only use what is the main implementation.
Use 16 bits to represent register index
65k registers ought to be enough for everybody ;-)
Make FRAME instruction take one operand (finally)
The second operand was not used since a long time ago, but it was still
encoded in order not to disturb the bytecode format. But since the
encoding and decoding subsystems were reworked I figured that I may as
well make some drastic changes.