| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
This has taken me almost 6 weeks :(
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I've been working on this slowly over several weeks, but it's too hard
to support 0 as the null value for addresses. I constantly have to add
exceptions for scalar value corresponding to an address type (now
occupying 2 locations). The final straw is the test for 'reload':
x:num <- reload text
'reload' returns an address. But there's no way to know that for
arbitrary instructions.
New plan: let's put this off for a bit and first create support for
literals. Then use 'null' instead of '0' for addresses everywhere. Then
it'll be easy to just change what 'null' means.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I have a plan for a way to avoid use-after-free errors without all the
overheads of maintaining refcounts. Has the nice side-effect of
requiring manual memory management. The Mu way is to leak memory by
default and build tools to help decide when and where to expend effort
plugging memory leaks. Arguably programs should be distributed with
summaries of their resource use characteristics.
Eliminating refcount maintenance reduces time to run tests by 30% for
`mu edit`:
this commit parent
mu test: 3.9s 4.5s
mu test edit: 2:38 3:48
Open questions:
- making reclamation easier; some sort of support for destructors
- reclaiming local scopes (which are allocated on the heap)
- should we support automatically reclaiming allocations inside them?
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Fix screen-checking functions to handle fake screen after scrolling.
I can't believe I forgot about this during commit 3882.
|
| |
|
| |
|
|
|
|
|
| |
Standardize on calling literate waypoints "Special-cases" rather than
"Cases". Invariably there's a default path already present.
|
| |
|
|
|
|
|
| |
Be consistent in checking for Scenario_testing_scenario when signalling
that a Mu scenario failed.
|
| |
|
|
|
|
|
| |
Undo commit 3500; turns out we need the duplicate scenario names for
good test failure messages.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A long-standing problem has been that I couldn't spread code across
'run' blocks because they were separate scopes, so I've ended up making
them effectively comments. Running code inside a 'run' block is
identical in every way to simply running the code directly. The 'run'
block is merely a visual aid to separate setup from the component under
test.
In the process I've also standardized all Mu scenarios to always run in
a local scope, and only use (raw) numeric addresses for values they want
to check later.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Can't use type abbreviations inside 'memory-should-contain'.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Undo 3272. The trouble with creating a new section for constants is that
there's no good place to order it since constants can be initialized
using globals as well as vice versa. And I don't want to add constraints
disallowing either side.
Instead, a new plan: always declare constants in the Globals section
using 'extern const' rather than just 'const', since otherwise constants
implicitly have internal linkage (http://stackoverflow.com/questions/14894698/why-does-extern-const-int-n-not-work-as-expected)
|
|
|
|
|
|
| |
Move global constants into their own section since we seem to be having
trouble linking in 'extern const' variables when manually cleaving mu.cc
into separate compilation units.
|
|
|
|
|
| |
Replace some asserts when checking scenario screens with better error
messages.
|
| |
|
|
|
|
| |
Built with Stephen Malina.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Always show instruction before any transforms in error messages.
This is likely going to make some errors unclear because they *need* to
show the original instruction. But if we don't have tests for those
situations did they ever really work?
|
| |
|
|
|
|
|
| |
When I floor the down-arrow too much, don't scroll unnecessarily off the
bottom of the screen. But *do* scroll if there's errors to show.
|
| |
|
|
|
|
|
|
|
| |
Now that we no longer have non-shared addresses, we can just always
track refcounts for all addresses.
Phew!
|
|
|
|
| |
This should eradicate the issue of 2771.
|
|
|
|
|
|
|
|
|
|
|
| |
Turns out that LLVM/Clang still doesn't support multiplying 64-bit
numbers on a 32-bit platform.
https://llvm.org/bugs/show_bug.cgi?id=14469
This is just a quick fix, because it turns out I don't have any integer
multiplication anywhere else. In the long run I think I'm going to just
drop 'long long int' in favor of 'int'. Overflow is less likely than
this configuration on somebody's machine.
|
|
|
|
|
|
|
|
|
|
|
|
| |
I'm dropping all mention of 'recipe' terminology from the Readme. That
way I hope to avoid further bike-shedding discussions while I very
slowly decide on the right terminology with my students.
I could be smarter in my error messages and use 'recipe' when code uses
it and 'function' otherwise. But what about other words like ingredient?
It would all add complexity that I'm not yet sure is worthwhile. But I
do want separate experiences for veteran programmers reading about Mu on
github and for people learning programming using Mu.
|
| |
|
|
|
|
|
| |
Only Hide_errors when strictly necessary. In other places let test
failures directly show the unexpected error.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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%.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
Still can't print non-integer numbers, so this is a bit hacky.
The big consequence is that you can't print literal characters anymore
because of our rules about how we pick which variant to statically
dispatch to. You have to save to a character variable first.
Maybe I can add an annotation to literals..
|
| |
|
| |
|
| |
|
| |
|