Clear up that ancient todo.
We don't particularly care about what abstraction we write tests at, as
long as we do so at *some* layer and document the intent. That lets us
move tests up or down in the future when we know more/have better taste.
Was dropped in commit 149. But we need it for more convenient
overloading, especially now that the right way to build tagged-values is
unclear.
The original concern was that type/otype would make code harder to
'assemble' down to native. But we should be able to insert CALL
instructions to the right clause inside a function's code. So keep it
around in the toolbox.
Biggest change was to the interface to the 'sizeof' helper. Where it
used to accept either a type symbol or a cons operand, it now always
accepts an operand, though the value of the operand can be _. In the
process the implementation is radically simpler.
Also reorg'd unit tests a little, putting those for 'deref' before
'sizeof'.
Finally, I'm giving in and enabling the printing of test names as
they're run. We still need this all the time in our surgery.
When I'm doing extensive surgery to the internals I want to avoid
loading higher levels; they aren't expected to work. But I don't want to
keep different levels in separate files just for that. And I definitely
don't want to put low-level stuff first. Now I can influence loading in
a cross-cutting manner by creating sections with numbers:
(section 100
...code...)
And disabling them by running:
$ ./anarki/arc 99 mu.arc.t
Currently we load all mu 'system software' in level 100, so running at
level 99 sidesteps them. Lower levels coming soon.
But most of the time we don't need to worry about levels, and the 'mu'
script lets us forget about them. Just run .mu files with:
$ ./mu factorial.mu
To run tests:
$ ./mu test mu.arc.t