| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Unfortunate that our type system requires this to be explicit..
|
|
|
|
|
| |
Is this a violation of our requirement to always treat ingredients as
immutable? We shouldn't be using it much anyway..
|
| |
|
|
|
|
| |
Finish 2595.
|
|
|
|
|
|
|
|
|
|
| |
Reading http://www.jonathanturner.org/2016/01/rust-and-blub-paradox.html,
I realize there's nothing currently stopping mu programs from taking a
unique (non-shared) address into a shared allocation, abandoning the
allocation and being left with an invalid address. No fix for this yet,
but let's try to minimize its effect by limiting lifetimes of unique
addresses. We really should only be using them to write to array or
container elements.
|
| |
|
|
|
|
| |
This required completely redesigning scrolling.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I'm now thinking about how to support scrolling on the sandbox side.
Caleb's idea is to use down-arrow inside the sandbox editor, and then
"scroll off" the editor to the top of each successive sandbox. I think
I'll reserve the white background as the cursor color in that situation.
I wonder if I should just undo all the support for sandbox labels since
yesterday. Labels are perhaps superfluous once I support scrolling and
reorder sandboxes to always throw ones with errors up top. But then you
can end up scrolling through lots of tests without any sense of how far
down you are. So the other approach is to keep labels and try to keep
them stable, not reorder them.
Looking further ahead I'm going to need a way to jump to a specific
sandbox. Maybe instead of reordering sandboxes I should just
automatically render from the first sandbox with error. Maybe show the
number of failed sandboxes in the status instead of the index of the
first failure.
|
| |
|
|
|
|
| |
See `cannot_write_tests_for`.
|
| |
|
|
|
|
|
|
|
|
|
| |
It also seems useful that the number maps to the name of the file the
sandbox is saved in. However this mapping is currently a happy accident
and not actually tested.
I'm starting to switch gears and help make the editor useable with
many many sandboxes. This is just the first step of several.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also start auto-abandoning addresses when their refcount returns to 0.
I'm mixing this auto-abandon support with my earlier/hackier support for
automatically abandoning default-space created by 'local-scope'. We need
to flesh out the story for automatically reclaiming memory using
C++-style destructors.
But that's a value-add. Memory corruption is far more important to avoid
than memory *leaks*.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
We don't yet actually maintain the refcount. That's next.
Hardest part of this was debugging the assume-console scenarios in layer
85. That took some detailed manual diffing of traces (because the output
of diff was no good).
New tracing added in this commit add 8% to .traces LoC. Commented out
trace() calls (used during debugging) make that 45%.
|
|
|
|
| |
I had to undo some over-zealous changes in 2576.
|
|
|
|
| |
Separate core mu tests from those loaded from the commandline.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the one major refinement on the C programming model I'm planning
to introduce in mu. Instead of Rust's menagerie of pointer types and
static checking, I want to introduce just one new type, and use it to
perform ref-counting at runtime.
So far all we're doing is updating new's interface. The actual
ref-counting implementation is next.
One implication: I might sometimes need duplicate implementations for a
recipe with allocated vs vanilla addresses of the same type. So far it
seems I can get away with just always passing in allocated addresses;
the situations when you want to pass an unallocated address to a recipe
should be few and far between.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
I realize that my current doesn't allow nesting a:b:c linear type syntax
inside a dilated property. So you can't currently say:
(recipe address:number)
Need to fix that at some point. Non-trivial since linear syntax is
oblivious to dilated syntax. I should probably make the dilated syntax
more fundamental and introduce it at an earlier layer.
|
| |
|
|
|
|
|
| |
Reorganize layers in preparation for a better way to manage heap
allocations without ever risking use-after-free errors.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Still need to type-check it, though.
|
|
|
|
|
|
|
|
|
|
|
|
| |
We want to use the type 'recipe' for recipe *variables*, because it
seems nicer to say `recipe number -> number` rather than recipe-ordinal,
etc. To support this we'll allow recipe names to be mentioned without
any type.
This might make a couple of places in this commit more brittle. I'm
dropping error messages, causing them to not happen in some situations.
Maybe I should just bite the bullet and require an explicit
:recipe-literal. We'll see.
|
|
|
|
|
| |
Reorganize layers in preparation for a better, more type-safe
implementation of first-class and higher-order recipes.
|
| |
|
|
|
|
|
| |
I still need it in some situations because I have no way to set a
non-zero default for an optional ingredient. Open question..
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Eventually you'll need to create a doubly-linked list, and `isolated`
won't save you then.
|
|
|
|
| |
Thanks Caleb Couch.
|
| |
|