| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
This was why I was trying to use a different output register: a second
function to call.
And I managed to mess it up again, changing the output of load-file, but
not how it was computed in the body.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There were three confounding issues to get past before this seemed to be
working right:
- row/col count from 1 rather than 0
- I was thinking in decimal rather than hex
- print-byte buffers to stdout, but print-string does not. I didn't think
this mattered, but it does matter to flush the current line before
moving cursor again.
Only one of these issues was a bug in the code. The first two were bugs
in my mental model that necessitated no changes to code to be corrected.
|
| |
|
| |
|
|
|
|
|
| |
Perhaps the lack of safety just forces us to make smaller functions, like
Forth.
|
|
|
|
|
| |
Baby steps. I managed to mess up even this tiny refactoring of print-file.mu.
Wish output registers were already checked in calls.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Observations:
- the orchestration from 'in' to 'addr-in' to '_in-addr' to 'in-addr'
is quite painful. Once to turn a handle into its address, once to turn
a handle into the address of its payload, and a third time to switch
a variable out of the overloaded 'eax' variable to make room for read-byte-buffered.
- I'm starting to use SubX as an escape hatch for features missing in Mu:
- access to syscalls (which pass args in registers)
- access to global variables
|
| |
|
| |
|
|
|
|
|
|
|
| |
Starting to feel the need for more static checks, like when I must use a
register, or when a variable has been clobbered.
The good news: I thought I'd found a bug in apps/mu, but I hadn't.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Fix CI.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
How did new-literal ever work?! Somehow we had eax silently being clobbered
without affecting behavior over like 5 apps. Unsafe languages suck.
Anyways, factorial.mu is now part of CI.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
I thought I'd done this in the previous commit, but I hadn't. And, what's
more, there was a bug that seemed pretty tough for a time. Turns out my
self-hosted translator doesn't support '.' comment tokens in data segments.
Hopefully I'm past the valley of the shadow of death now.
"I HAVE NO TOOLS BECAUSE I’VE DESTROYED MY TOOLS WITH MY TOOLS."
-- James Mickens (https://www.usenix.org/system/files/1311_05-08_mickens.pdf)
|
|
|
|
| |
CI should start passing again now.
|
|
|
|
| |
We can now natively translate mu.subx again.
|
|
|
|
| |
X-( :-))
|
| |
|
| |
|
|
|
|
| |
Just for user-defined types.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
The remaining tests are all for user-defined types and arrays.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was again hard to debug, because:
- the mapping between recursive calls to emit-subx-stmt-list and the
nested blocks of code in the output kept blowing my stack, and
- I kept expecting the problem to be there, or in the data attached to
variables. But it was in the `emit-cleanup-code-until-depth` for the
previous/inner block, in code I thought I'd already fixed (`clean-up-blocks`)
that accidentally worked for previous tests.
Part of the problem here is that my library for the stack sucks. It's only
for 4-byte elements, but I'm using it for 8-byte elements (handles). Which
leads to double-pushes and double-pops and -- here -- an insidiously wrong
call to `top`.
Anyways: halfway there!
|
| |
|
|
|
|
|
| |
This bug was a bear to track down, but there's been a concomitant payoff:
6 tests starting to pass.
|