about summary refs log tree commit diff stats
path: root/apps
Commit message (Collapse)AuthorAgeFilesLines
* 6537Kartik Agaram2020-06-151-21/+21
|
* 6536Kartik Agaram2020-06-151-8/+7
| | | | Cleaner way to handle EOF.
* 6535Kartik Agaram2020-06-151-36/+36
|
* 6534 - arith: add/subtractKartik Agaram2020-06-151-3/+37
|
* 6533 - arith: ignore spacesKartik Agaram2020-06-151-18/+49
|
* 6532 - arith: REPL converting ints to hexKartik Agaram2020-06-151-6/+18
| | | | | I'm using one character of lookahead, inspired by Crenshaw's "let's build a compiler".
* 6531Kartik Agaram2020-06-151-25/+17
|
* 6530Kartik Agaram2020-06-151-0/+40
| | | | | New prototype: a simple 4-operator calculator. Inspired (yet again) by Crenshaw.
* 6529 - don't let `addr`s escape functionsKartik Agaram2020-06-152-19/+24
| | | | | | | | | | | | | | | | | | 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.
* 6528Kartik Agaram2020-06-1512-20/+147
|
* 6526Kartik Agaram2020-06-151-1/+1
|
* 6525Kartik Agaram2020-06-152-11/+157
|
* 6524Kartik Agaram2020-06-152-7/+65
|
* 6523Kartik Agaram2020-06-152-0/+95
| | | | | Still some issues; add some tests. I have more that were passing a couple of days ago but aren't currently.
* 6522 - redo support for 'byte'Kartik Agaram2020-06-152-13/+81
| | | | | | | | | | | 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.
* 6521 - new primitive: array size in bytesKartik Agaram2020-06-141-0/+0
|
* 6520 - new app: parse-intKartik Agaram2020-06-1415-8/+229
| | | | | | 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.
* 6519Kartik Agaram2020-06-131-1/+47
| | | | More fucking amateur hour.
* 6518 - extra args through a whole swathe of placesKartik Agaram2020-06-132-7/+54
| | | | | | | | 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.
* 6516 - operations on bytesKartik Agaram2020-06-132-10/+206
| | | | | | 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'.
* 6515 - error if 'get' on unknown fieldKartik Agaram2020-06-122-2/+117
| | | | We can't yet say in the error message precisely where the 'get' occurs.
* 6511 - start of error-checkingKartik Agaram2020-06-122-17/+84
| | | | | We now raise an error if a variable is declared on the stack with an initializer. And there are unit tests for this functionality.
* 6510Kartik Agaram2020-06-111-1/+1
|
* 6509 - mu.subx: exit-descriptors everywhereKartik Agaram2020-06-112-323/+285
|
* 6508 - support null exit-descriptorKartik Agaram2020-06-1016-24/+6
|
* 6507 - use syscall names everywhereKartik Agaram2020-06-1033-134/+67
|
* 6506Kartik Agaram2020-06-101-3/+0
|
* 6503Kartik Agaram2020-06-083-12/+4
|
* 6479Kartik Agaram2020-06-052-1/+59
| | | | | Fix a stray copy-paste when deciding whether to emit spills for registers (commit 6464).
* 6477Kartik Agaram2020-06-052-36/+157
| | | | | | | I had a little "optimization" to avoid creating nested blocks if "they weren't needed". Except, of course, they were. Lose the optimization. Sometimes we create multiple jumps when a single one would suffice. Ignore that for now.
* 6474Kartik Agaram2020-06-051-3/+3
|
* 6466Kartik Agaram2020-06-042-0/+48
|
* 6464 - support temporaries in fn output registersKartik Agaram2020-06-042-11/+262
| | | | | | | | The rule: emit spills for a register unless the output is written somewhere in the current block after the current instruction. Including in nested blocks. Let's see if this is right.
* 6463 - clean up some duplicationKartik Agaram2020-06-032-148/+115
| | | | | | Rather than have two ways to decide whether to emit push/pop instructions, just record for each var on the 'vars' stack whether we emitted a push for it, and reuse the decision to emit a pop.
* 6462Kartik Agaram2020-06-032-1/+1
| | | | Stack bug.
* 6461Kartik Agaram2020-06-032-15/+17
|
* 6460Kartik Agaram2020-06-032-7/+6
|
* 6459Kartik Agaram2020-06-032-5/+7
|
* 6458Kartik Agaram2020-06-032-9/+5
|
* 6457 - revert apps/browse.mu to a working stateKartik Agaram2020-06-011-195/+61
|
* 6455 - abortive second attempt at parsing headingsKartik Agaram2020-05-311-53/+146
| | | | | | | | | | | | | This 'OO' approach seems more scalable, but I need to first wrestle with a parsing issue: this text has a heading: abc *def # ghi* Ugh, so I can't do this translation in a single pass. Then again, maybe I should just keep going and not try to be compatible with GitHub-Flavored Markdown. Require that new headings are also new paragraphs.
* 6454: abortive first attempt at parsing headingsKartik Agaram2020-05-311-3/+41
| | | | | The state machine is already out of control, and I already have bugs like turning '*abc_' into bold text.
* 6453Kartik Agaram2020-05-301-5/+5
|
* 6452Kartik Agaram2020-05-301-6/+7
| | | | Support more than two states.
* 6451Kartik Agaram2020-05-301-2/+6
| | | | Now the trailing asterisk or underscore renders correctly, for starters.
* 6450Kartik Agaram2020-05-301-52/+50
| | | | | The current organization doesn't really work for the next feature (section headings) so let's inline attribute-handling.
* 6449 - italicsKartik Agaram2020-05-301-0/+19
| | | | | | | We're not going to render italics since they still feel like an advanced feature for terminals, and different terminals have different escape sequences for them, and since they often look weird to my eyes on the monospace font of a terminal window. So underscores and italics will both be bold.
* 6448 - markdown for boldKartik Agaram2020-05-301-2/+39
|
* 6447Kartik Agaram2020-05-304-2/+30
|
* 6446Kartik Agaram2020-05-302-6/+1
|