| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Lots of copy-pasta.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
More bugfixes, now all apps are working.
In the process of fixing the bugs in translating apps/browse, I found a
typo in apps/tile that just happened to accidentally be compiling fine.
|
|
|
|
|
|
| |
After this bugfix, apps/tile/ is now working.
apps/browse/ is still failing.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
All tests passing again.
|
| |
|
| |
|
|
|
|
| |
One more test.
|
|
|
|
|
|
|
| |
Now test-return-unavailable-value is passing,
but test-convert-return-with-duplicate-values is failing.
Time to think.
|
|
|
|
|
|
|
|
| |
2 new tests:
test-return-unavailable-value - currently failing
test-convert-return-with-duplicate-values - currently passing
I don't yet know how to make both pass.
|
| |
|
| |
|
|
|
|
|
| |
All tasks of https://github.com/akkartik/mu/issues/45#issuecomment-719990879
should now be complete.
|
| |
|
| |
|
|
|
|
|
|
| |
Assignments to them will no longer work, and they can never be live variables.
https://github.com/akkartik/mu/issues/45#issuecomment-719990879, task 3.
|
| |
|
|
|
|
| |
Bugfix in computing the label a return should jump to.
|
|
|
|
|
|
| |
https://github.com/akkartik/mu/issues/45#issuecomment-719990879, task 1.
We don't have checking for it yet. Soon.
|
|
|
|
| |
Drop pending tests for the old plan of liveness analysis.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This isn't done, but an intermediate snapshot seems worth capturing.
Back in March (commit 6082), I made a plan to check writes to function
outputs using liveness analysis. I've been shying away from actually acting
on this plan ever since. In recent weeks I've had this gap bite me three
times.
Returning to the problem now, I think I don't actually need to compute
variable liveness. The compiler can, I think, do the same thing for output
registers whether their variables are alive or dead. The new rule is this:
Once a register gets a function output written to it, no local is popped
into it. Instead of popping outer locals to the register, we simply increment
the stack and keep going.
Since the function output will continue to live on the vars stack past
this point (see clean-up-block), any attempts to read shadowed variables
will throw an error as usual.
This rule is also now easy to explain to people, I think. "You wrote the
function output. Now the register can't be used for anything else."
It's really cool that this works (if it does). Another fruit from "Mu's
lovely property."
|
|
|
|
| |
Am I starting to have too much code duplication?
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Lots of copy-pasta.
|
| |
|
|
|
|
|
| |
Hacking on apps has created some urgency now for several additional safety
checks.
|
|
|
|
| |
Requires a quick hacky change to Mu compiler.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Turns out I've been including some unnecessary files when building apps/mu!
Treeshaken stats before:
LoC 26258 => 9717
LoC including common libraries: 29736 => 12719
binary size: 406K => 79K
After:
LoC 26258 => 9717
LoC including common libraries: 28322 => 12370
binary size: 406K => 77K
So our treeshaking isn't perfect. No surprise there..
The treeshaken build also starts to fail without the one-liner change to
mu.subx, which looks like a bug in the treeshaker.
|
| |
|
|
|
|
|
|
|
|
| |
The final fix to the raytracing program involves rounding modes. It turns
out x86 processors round floats by default, unlike C which has trained
me to expect truncation. Rather than mess with the MXCSR register, I added
another instruction for truncation. Now milestone 3 emits perfectly correct
results.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Not yet right, but worth a snapshot just because it gives a cool result.
Here, try it out:
$ ./translate_mu_debug apps/raytracing/3.mu
$ ./a.elf > x.ppm
Now view x.ppm as an image.
In general, this was quite tedious to write. And a still-open question
is how to emit the progress bar to stderr. My options are to either duplicate
all my print-* functions (already proliferating) or add global variables
to Mu.
|
|
|
|
|
|
|
|
| |
Move some implementation around for floating-point.
I originally thought I wouldn't bother supporting sigils like %xmm0. But
it turns out I need them to pass floats into SubX function calls. And it
turns out the sigils work fine for free.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
For most of Mu's history we've selected between primitives based on types
just by checking whether a type is a literal or not. Now we've started
checking if it's a float as well. However, floats need one additional check:
the call site may have an (addr float) that is dereferenced.
|