| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
Current plan:
- get rid of get-address and index-address, and therefore any address
that is not address:shared
- rename address:shared to just 'shared'
|
| |
|
| |
|
|
|
|
|
| |
Undo commit 9da3fc3118; looks like we don't need it anymore, and the
test was poorly done. Let's see if we hit the error again.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Move all bounds checks for types and recipes to one place.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I realize that there's still a serious problem with refcounts.
Everything's fine as long as I copy those shared addresses manually
elsewhere, but there's a couple of places where I just do a memcopy
right now without any extra smarts: in 'copy' and 'merge' instructions.
I need to replace support for arbitrary types in these instructions, and
replace it with transforms to generate the right code. Mu basically
needs copy constructors and destructors, so that containers can
decrement the refcounts of any elements (or elements of elements, or
elements of elements of elements..) that are shared addresses.
But my confidence in this whole approach is shaken. Maybe I should stop
this project. It's turning into a language+OS design project where I was
hoping that being a toy would shelter me from these concerns. I just
want to explore turning manual tests into reproducible automatic ones.
Maybe I should just build libraries for each interface to hardware
(network, disk, screen, keyboard, ...) in C++11 or something. Use no
high-level libraries for sockets, files, etc. Instead rely on just the
kernel syscalls, memory allocator, RAII, STL. Build things from scratch
atop those building blocks.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Thanks Caleb for finding this. Repeatedly running sandboxes was in some
reliably reproducing situations causing 'new' to return 1, or to run
into writes to the free list.
No test yet; the issue is likely only mitigated at this point, not
fixed. Even if routines share the Free_list, that should probably not
cause memory corruption.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This brings back some of the complexity I thought I'd gotten rid of in
2799.
The regression brought home the point that I'd forgotten to write tests
for those bits. Written now.
It also brought home the point that our cleanup in 'reload' has always
been hacky and incomplete.
It's also ugly that those tests in the sandbox/ and edit/ apps need
changing (particularly when the test is about how the output doesn't
change).
|
|
|
|
| |
Fix test failures caused by 2804 in sandbox/ app.
|
|
|
|
|
| |
Now to extend 'stash' for arrays, just extend array-to-text-line instead
and perform the lookup inside it.
|
|
|
|
|
| |
Show more thorough information about instructions in the trace, but keep
the original form in error messages.
|
|
|
|
|
| |
Don't let rewrite_stash transform working programs into non-working
ones.
|
|
|
|
| |
Next I'll start improving it.
|
|
|
|
|
|
|
|
|
| |
Several times now I've wasted time tracking down a failing test only to
eventually remember that order of definition matters in tests even
though it doesn't elsewhere -- I've been having tests implicitly start
running the first function defined in them. Now I stop doing that if a
test defines a function called 'main', and just start the test at main
instead.
|
|
|
|
|
|
|
|
| |
As outlined at the end of 2797. This worked out surprisingly well. Now
the snapshotting code touches fewer layers, and it's much better
behaved, with less need for special-case logic, particularly inside
run_interactive(). 30% slower, but should hopefully not cause any more
bugs.
|
|
|
|
|
|
|
|
|
|
| |
This way when you pass one end to a function or routine, you can
implicitly give it the right to either read or write the channel, but
not both.
The cost: code gets more convoluted, names get more convoluted. You can
see this in particular in the test for buffer-lines. Let's see how it
goes..
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When I started to make channels generic in 2784, I introduced an
infinite loop when running until just layer 72. This happens because
transform_all() can create new recipes while specializing, and these
were getting added to Recently_added_recipes and then deleted. I didn't
notice until now because layer 91 was clearing Recently_added_recipes
soon after.
Solution: make calls to transform_all after calls to load_permanently
also clear Recently_added_recipes like load_permanently does.
No transforms yet create new types. If they do we'll need to start
handling the other Recently_added_* variables as well.
I should rethink this whole approach of tracking changes to global state
while running tests, and undoing such changes. Ideally I wouldn't need
to manually track changes for each global. I should just encapsulate all
global state in an object, copy it for each test and delete the copy
when I'm done.
|
| |
|
|
|
|
|
|
|
|
| |
It turns out that my extensible stash doesn't yet work well in all
situations. If you try to stash an array, you end up trying to create an
array local that's not statically sized -- a no-no.
Bah, just throw it all out.
|
|
|
|
| |
Arrange for tests to run multiple variants of channel functions.
|
|
|
|
| |
Finally..
|
| |
|
|
|
|
|
|
|
| |
Simplify 2790 by simply not computing any type->value inside
parse_type_tree. It now only generates names, and it turns out the
consumers handle the absence of values anyway. Now parse_type_tree no
longer pollutes the Type_ordinal table with type ingredients.
|
|
|
|
|
|
|
|
| |
The issue alluded to in the previous 2789 is now fixed. I'm not happy
with my solution, though. I pollute Type_ordinal with type ingredients
in parse_type_tree and simply ignore such entries later on. I'd much
rather avoid the pollution in the first place, but I'm not sure how to
do that..
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why do earlier unit tests start to fail if I load chessboard.mu fail
after correcting the definition of new-channel to be properly generic? I
have narrowed it down to a manual test but am still struggling to turn
it into a scenario.
It looks like the 'new' instruction is the culprit:
first transform:
load a recipe containing a call to new with a generic type
parse_type_tree is called, and pollutes the Type_ordinal table with the generic type
second transform:
load a generic container containing the same generic type ingredient
it fails to be detected as a generic type ingredient
To reproduce, compare these two commands:
mu test
mu test z.mu
|
| |
|
|
|
|
|
|
| |
*Really* make channels generic. I'd fixed all the call sites in 2785,
but forgotten to actually switch the declaration. It works though;
generics working smoothly.
|
| |
|
| |
|
|
|
|
|
|
| |
I've ignored Mu's concurrency primitives for a while, but they're
starting to return to front-and-center as I work on the file system
interfaces.
|
| |
|
| |
|
| |
|
|
|
|
| |
Automate this manual test I've been using.
|
| |
|