Skip to content
Release 0.7.0

NEWS

This release introduces some substantial changes to the machine, and
that is the reason for jumping from 0.6.1 straight to 0.7.0.

Some backwards incompatible changes:

- `throw` no longer leaves thrown objects in their registers,
  thrown objects are moved out of their stack frame,
- `free` instruction was renamed to `delete`,

Some more backwards incompatible changes, this time due to introduction
of pointers.
Using pointers if cheaper than using references (by a large margin) so a few
standard library functions were rewritten to accept pointers where they used to
accept references.
Pointers are cheaper because they do not escape machine's basic memory management
model.

Then, a fix.
If a detached thread generates uncaught exception the machine will print out
trace of the correct stack.
Previously always the stack of `main()` function was printed.

One feature implemented in this release is a "pass-by-move", a very efficient method
of passing parameters to functions.

Last, but not least, come the enhancements in multithreading.
First, return values can be extracted from threads when they are joined.
Second, threads can be suspended and woken up; this is important because the CPU can
easily skip suspended threads without looking at their state (other than the `suspended`
status).

Last feature introduced by the 0.7.0 is also one of the more important ones.
Machine provides a way for the programmers to specify a function to be run as
a "watchdog thread".
If a thread dies when a watchdog is active the machine passes a message to the watchdog
telling it what thread died, and why.
This enables the watchdog to restart the deceased thread if necessary.
If the watchdog itself dies it is restarted automatically by the machine.
In my opinion, this is a great win for the reliability of software written to run on the
machine.
Instead of worrying about every edge case the programmer can let the software crash,
log the error, restart the part of the program that failed, and carry on like if nothing
at all has happened.

As always, there are also numerours small improvements and bug fixes.