| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
I'm using one character of lookahead, inspired by Crenshaw's "let's build
a compiler".
|
| |
|
|
|
|
|
| |
New prototype: a simple 4-operator calculator. Inspired (yet again) by
Crenshaw.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I've gone back and forth on this. I initially disallowed this, then allowed
it because I forgot why I disallowed it. The reason to disallow it: if
you return an `addr` to a variable allocated on the stack, the space might
be reused for a different type, which violates type-safety. And once you
can reinterpret bits of one type as another you lose memory-safety as well.
This has some interesting implications for Mu programs; certain kinds of
helper functions become impossible to write. Now I find myself relying a
lot more on scopes (and editor folding support) for abstracting details.
And they won't help manage duplication. We'll see how this goes.
While I'm being draconian about `addr`s on the stack, I'm still abusing
`addr`s on the heap, with the expectation that future checks on reclamation
will protect me. The boon and bane of stack space is that it's constantly
reclaimed.
|
| |
|
|
|
|
|
|
| |
We haven't run into this limit yet, but everytime I see a 'stream overflow'
error I run into it while going over all the knobs in apps/subx-params.subx,
if I increase Input-size (used by survey.subx) too much.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Still some issues; add some tests. I have more that were passing a couple
of days ago but aren't currently.
|
|
|
|
|
|
|
|
|
|
|
| |
Before: bytes can't live on the stack, so size(byte) == 1 just for array
elements.
After: bytes mostly can't live on the stack except for function args (which
seem too useful to disallow), so size(byte) == 4 except there's now a new
primitive called element-size for array elements where size(byte) == 1.
Now apps/browse.subx starts working again.
|
| |
|
|
|
|
|
|
| |
Several bugs fixed in the process, and expectation of further bugs is growing.
I'd somehow started assuming I don't need to have separate cases for rm32
as a register vs mem. That's not right. We might need more reg-reg Primitives.
|
|
|
|
| |
More fucking amateur hour.
|
|
|
|
|
|
|
|
| |
Most unbelievably, I'd forgotten to pass the output 'out' arg to 'lookup-var'
long before the recent additions of 'err' and 'ed' args. But things continued
to work because an earlier call just happened to leave the arg at just
the right place on the stack. So we only caught all these places when we
had to provide error messages.
|
| |
|
|
|
|
|
|
| |
Byte-oriented addressing is only supported in a couple of instructions
in SubX. As a result, variables of type 'byte' can't live on the stack,
or in registers 'esi' and 'edi'.
|
|
|
|
| |
We can't yet say in the error message precisely where the 'get' occurs.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
We now raise an error if a variable is declared on the stack with an initializer.
And there are unit tests for this functionality.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Bugfix in support for CRLF line-endings.
|
|
|
|
| |
Minor formatting tweaks.
|
| |
|
|
|
|
|
| |
Switch bullet lists in Markdown files away from `*`; it's ambiguous with
emphasis.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Again quite ugly. There's an increasing amount of state here, particularly
the interplay between headers and soft newlines.
|
| |
|
|
|
|
|
| |
I'm not bothering with this for bold regions just yet. Might need rethinking,
given how ugly this is.
|
| |
|
| |
|
|
|
|
| |
Ooh, it's nice and composable if we just never render the delimiters. Perfect.
|
|
|
|
|
|
| |
The state machines are still not composing perfectly. The initial asterisk
gets added in one, and the trailing asterisk in another. I suppose "always
render the terminator" is fairly regular.
|