about summary refs log tree commit diff stats
path: root/apps/mu.subx
Commit message (Collapse)AuthorAgeFilesLines
* 5849 - more integration testing of function callsKartik Agaram2020-01-011-7/+98
| | | | | | | | | | | | | | | | I can now run this program: fn main -> result/ebx: int { result <- do-add 3 4 } fn do-add a: int, b: int -> result/ebx: int { result <- copy a result <- add b } We still can't define local variables, but can write any programs involving ints by passing in enough arguments for temporaries.
* 5848Kartik Agaram2020-01-011-5/+5
|
* 5847 - literal inputsKartik Agaram2019-12-311-1/+207
|
* 5846Kartik Agaram2019-12-301-10/+10
|
* 5845Kartik Agaram2019-12-301-0/+3
|
* 5834Kartik Agaram2019-12-271-3/+4
| | | | Bugfix.
* 5833Kartik Agaram2019-12-271-1/+1
|
* 5832 - support for function outputsKartik Agaram2019-12-271-14/+138
| | | | | | | | | | | We haven't implemented it yet, but there's now a design for how we check whether a function has written its output correctly. Functions must write to each output at the top level at least once, and never overwrite an output register in the top-level once it's been defined. This is conservative (it can be perfectly reasonable for functions to write the output, reuse the register for a temporary, and then write the output again) but easy to check.
* 5831Kartik Agaram2019-12-271-27/+38
|
* 5830Kartik Agaram2019-12-261-1/+5
| | | | | Bugfix: statements defining a new register variable require an initializer instruction.
* 5828 - copy (mov) instructionsKartik Agaram2019-12-261-22/+144
|
* 5827 - give primitives one more bit of metadataKartik Agaram2019-12-261-4/+59
| | | | | Copy (mov) instructions are unlike instructions we've encoded so far, in that their destination is not read.
* 5826 - done with basic binary opsKartik Agaram2019-12-261-0/+197
|
* 5825 - code-generation for add opcodesKartik Agaram2019-12-261-26/+158
|
* 5824 - code-generation for all inc/dec opcodesKartik Agaram2019-12-261-2/+199
|
* 5823Kartik Agaram2019-12-221-0/+55
|
* 5821 - now translating function argumentsKartik Agaram2019-12-221-110/+156
| | | | See test-convert-function-with-arg-and-body.
* 5820Kartik Agaram2019-12-221-38/+177
| | | | | | | | | | | One test failing. It took enough debugging just to get to the expected failure that it seems worth saving this snapshot. Saw some signs that I have to remember to zero-out allocated memory. We need a scalable solution for this. I think parse-var-with-type needs to be rewritten. Just added a test and a hacky fix for now.
* 5804Kartik Agaram2019-12-081-222/+229
| | | | | Try to make the comments consistent with the type system we'll eventually have.
* 5795Kartik Agaram2019-12-071-1/+5
|
* 5790Kartik Agaram2019-12-051-23/+23
| | | | | | Standardize conventions for labels within objects in the data segment. We're going to use this in a new tool.
* 5785 - initial skeleton for parsing fn bodiesKartik Agaram2019-11-301-5/+21
| | | | | All tests passing again. We have big gaping holes for type- and var-management. We're going to work on the latter first.
* 5784Kartik Agaram2019-11-301-7/+27
| | | | | Lots of debugging to add two curly braces. I need tests for populate-mu-function-body, or even parse-mu-block.
* 5782 - fix a widespread bug with Heap-sizeKartik Agaram2019-11-301-1/+1
|
* 5781Kartik Agaram2019-11-301-3/+194
| | | | | parse-mu-stmt now working, though we'll need to go back and stop creating a new var for every instance of a variable in a scope.
* 5780Kartik Agaram2019-11-291-43/+50
|
* 5779Kartik Agaram2019-11-291-100/+308
| | | | | Snapshot with new skeleton for parsing function body. New test still failing, but only in the one expected place.
* 5778Kartik Agaram2019-11-291-19/+19
|
* 5777Kartik Agaram2019-11-291-3/+159
|
* 5776Kartik Agaram2019-11-291-34/+48
|
* 5775Kartik Agaram2019-11-291-9/+105
|
* 5774Kartik Agaram2019-11-291-26/+82
| | | | Function headers seem to be parsing right.
* 5773Kartik Agaram2019-11-281-0/+205
| | | | Rudimentary support for parsing variable declarations.
* 5772Kartik Agaram2019-11-281-0/+110
|
* 5770Kartik Agaram2019-11-281-0/+189
|
* 5768 - start parsing fn headersKartik Agaram2019-11-271-14/+63
|
* 5767Kartik Agaram2019-11-271-16/+175
| | | | Some groundwork for parsing.
* 5765Kartik Agaram2019-11-261-0/+112
| | | | | | | | | A couple more primitives now working. In the process I ran into an issue with some buffer filling up when running ntranslate. Isolating it to survey.subx was straightforward, but --trace ran out of RAM, and --trace --dump ran out of (7GB of) disk. In the end what helped was just repeatedly inserting exits at different points, and I realized there was a magic number that hadn't been turned into a named constant.
* 5763Kartik Agaram2019-11-261-12/+64
|
* 5762Kartik Agaram2019-11-261-5/+0
|
* 5761Kartik Agaram2019-11-261-2/+43
|
* 5760Kartik Agaram2019-11-251-8/+31
|
* 5759 - design statement data structureKartik Agaram2019-11-251-14/+80
|
* 5756Kartik Agaram2019-11-181-12/+30
|
* 5755Kartik Agaram2019-11-181-0/+66
| | | | Support function calls with literal arguments.
* 5754Kartik Agaram2019-11-181-3/+81
| | | | Support binary instructions with an immediate operand.
* 5752Kartik Agaram2019-11-181-77/+97
| | | | | | | Support binary operations with reg/mem and reg operands. Everything is passing. However, the self-hosting translator now generates some discrepancies compared to the C++ translator :(
* 5751 - start of table of Mu primitivesKartik Agaram2019-11-181-0/+168
| | | | | So far this is just the same as our most recent tests. But now we have a 'DSL' for adding more primitives.
* 5750Kartik Agaram2019-11-171-25/+411
| | | | | We can now compile primitive statements while selecting the right template to code-gen each one from. Even when multiple templates have the same name.
* 5746Kartik Agaram2019-11-151-37/+336
| | | | | | | | | | | | | | | | After much struggle, one more test: emitting a primitive with a register operand. The following two instructions have the same name: reg <- increment increment var and they emit the same opcodes: ff 0/subop But they're considered distinct policies in the code-generation 'table', one for incrementing variables on the stack and the other for incrementing variables in a register.