| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
Thanks Caleb for finding this. We'd been using sandboxes for so long, I
hadn't tried a null/0 screen/console in a while and somewhere down the
road Mu stopped matching 0 against concrete addresses.
|
|
|
|
|
| |
This had been broken ever since 2854, because we can't write tests for
restore-snapshots at the moment.
|
| |
|
|
|
|
| |
Typo introduced in 2854.
|
|
|
|
| |
Thanks Caleb Couch for showing the need for this check.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
A better primitive: manage refcounts for an assignment without actually
doing the assignment itself. This way we can add refcounts as a new,
independent bit of bookkeeping without littering early returns and
duplicate code paths.
(OCD: commit number.)
|
| |
|
|
|
|
|
|
|
| |
This commit covers instructions 'put', 'put-index' and 'maybe-convert'.
Next up are the harder ones: 'copy' and 'merge'. In these cases there's
a non-scalar being copied, and we need to figure out which locations
within it need to update their refcount.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Reorganize the 'address' layer and split it up before we start greatly
expanding them to manage refcounts in nested objects.
|
| |
|
| |
|
|
|
|
|
|
|
| |
It's a bit of a trade-off because we need to store copies of
container metadata in each reagent (to support shape-shifting
containers), and metadata is not lightweight and will get heavier. But
it'll become more unambiguously useful when we switch to a compiler.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
All code to be tangled at a label should be defined between two calls to
transform_all(). This property is trivially satisfied if a production
run only ever has one call to transform_all().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This continues a line of thought sparked in commit 2831. I spent a while
trying to avoid calling size_of() at transform-time, but there's no
getting around the fact that translating names to addresses requires
knowing how much space they need.
This raised the question of what happens if the size of a container
changes after a recipe using it is already transformed. I could go down
the road of trying to detect such situations and redoing work, but that
massively goes against the grain of my original design, which assumed
that recipes don't get repeatedly transformed. Even though we call
transform_all() in every test, in a non-testing run we should be loading
all code and calling transform_all() just once to 'freeze-dry'
everything.
But even if we don't want to support multiple transforms it's worth
checking that they don't occur. This commit does so in just one
situation. There are likely others.
|
|
|
|
|
|
|
| |
If you accidentally use a recipe name in an ingredient you usually get
an error because types don't match. But jumps need to be flexible enough
to support both addresses and booleans, so they were accepting recipe
literals as well. Now a useful error results.
|
|
|
|
|
|
|
|
|
|
|
| |
Turns out we don't need a primitive to return an empty value of
arbitrary type. Just create it on the heap using 'new'.
But this uncovered *yet* another bug, sigh. When I specialize generic
functions I was running all transforms on the generated functions after
specialization completed. But there's one transform that includes code
from elsewhere. If such code included type-ingredients -- kaboom. Now
fixed and there's a test, so I've got that going for me which is nice.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Be more consistent that 'return' is the name of the instruction, and
'reply' just a synonym. Maybe I should take it out. It wouldn't affect
the recipe/ingredient terminology while I teach..
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was an interaction between two transforms. The first turned:
return-if ...
into:
jump-unless ..., 1:offset # skip next instruction
return ...
The second added an unconditional return at the end of the recipe if it
didn't already exist (so that functions always end with a return).
However, it was getting confused by the return instructions generated
above, which look unconditional but sometimes get skipped.
To fix this, conditional returns are now transformed into this:
{
break-unless ...
return ...
}
Since the final instruction is now no longer a reply (but rather the '}'
label), the second transform triggers and adds the unconditional return
after it.
This commit removes the final place marked 'BUG:' in the codebase
yesterday (see commit 2870).
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The solution for avoiding deadlock is for routines to close channels
before they exit. So that's good.
Once I implemented 'close', I also found and fixed 2 unrelated bugs in
chessboard.mu:
a) one long-missed and long-masked case of forgetting to store
character literals in character variables
b) one typo in translating get-address to put
So that's good.
What's not so good: in the process of fixing this I've found three
unrelated bugs (marked 'BUG:' in the changes). All three have
workarounds, so existing tests pass for now. But they are my top
priority next.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Now that we no longer have non-shared addresses, we can just always
track refcounts for all addresses.
Phew!
|
|
|
|
|
| |
Finally after much massaging, the 'address' and 'new' layers are
adjacent.
|
|
|
|
|
| |
Layers 0-29 are now a complete rudimentary platform except for pointers
and indirection.
|
| |
|
| |
|
|
|
|
|
|
| |
This reinfoces that it's only really intended to be used by
'wait-for-location'. To reinforce that we also move it to the same layer
as 'wait-for-location'.
|