about summary refs log tree commit diff stats
path: root/apps/mu.subx
Commit message (Collapse)AuthorAgeFilesLines
* 7185 - type checks for 'populate-stream'Kartik Agaram2020-11-051-4/+437
| | | | Lots of copy-pasta.
* 7184 - type checks for 'populate'Kartik Agaram2020-11-051-7/+447
|
* 7183 - type checks for 'allocate'Kartik Agaram2020-11-051-1/+347
|
* 7182 - type checks for 'copy-object'Kartik Agaram2020-11-051-1/+412
|
* 7181 - type checks for 'address' instructionKartik Agaram2020-11-051-0/+593
|
* 7180Kartik Agaram2020-11-041-11/+172
| | | | | | | 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.
* 7179Kartik Agaram2020-11-041-0/+31
| | | | | | After this bugfix, apps/tile/ is now working. apps/browse/ is still failing.
* 7178 - type checks for 'compare' instructionKartik Agaram2020-11-041-1/+553
|
* 7177 - type checks for 'copy-to' instructionKartik Agaram2020-11-041-12/+400
|
* 7176 - type checks for 'copy' instructionKartik Agaram2020-11-041-103/+472
|
* 7174 - function returns should now be safeKartik Agaram2020-11-031-4/+197
|
* 7173Kartik Agaram2020-11-031-11/+107
| | | | All tests passing again.
* 7172Kartik Agaram2020-11-031-1/+1
|
* 7171Kartik Agaram2020-11-031-1/+1
|
* 7170Kartik Agaram2020-11-031-0/+47
| | | | One more test.
* 7169Kartik Agaram2020-11-031-7/+88
| | | | | | | Now test-return-unavailable-value is passing, but test-convert-return-with-duplicate-values is failing. Time to think.
* 7168 - snapshotKartik Agaram2020-11-031-0/+93
| | | | | | | | 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.
* 7167Kartik Agaram2020-11-031-1/+74
|
* 7166Kartik Agaram2020-11-031-3/+130
|
* 7165Kartik Agaram2020-11-031-19/+86
| | | | | All tasks of https://github.com/akkartik/mu/issues/45#issuecomment-719990879 should now be complete.
* 7164Kartik Agaram2020-11-031-1/+112
|
* 7163 - first type checks for 'return' statementsKartik Agaram2020-11-031-2/+124
|
* 7161 - stop processing function outputsKartik Agaram2020-11-021-601/+109
| | | | | | 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.
* 7160Kartik Agaram2020-11-021-133/+133
|
* 7153Kartik Agaram2020-11-011-3/+7
| | | | Bugfix in computing the label a return should jump to.
* 7152 - 'return' instructionKartik Agaram2020-11-011-1/+629
| | | | | | https://github.com/akkartik/mu/issues/45#issuecomment-719990879, task 1. We don't have checking for it yet. Soon.
* 7151Kartik Agaram2020-11-011-97/+46
| | | | Drop pending tests for the old plan of liveness analysis.
* 7148Kartik Agaram2020-10-311-5/+2
|
* 7145 - roll back to 7143Kartik Agaram2020-10-301-89/+174
|
* 7144 - tmp: redo checks for function outputsKartik Agaram2020-10-301-174/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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."
* 7143Kartik Agaram2020-10-291-1/+1
| | | | Am I starting to have too much code duplication?
* 7142Kartik Agaram2020-10-291-0/+4
|
* 7141Kartik Agaram2020-10-291-4/+1
|
* 7139 - type-check compute-offsetKartik Agaram2020-10-291-13/+908
|
* 7138 - type-check array 'length' instructionKartik Agaram2020-10-291-4/+836
|
* 7137Kartik Agaram2020-10-281-2/+2
|
* 7136Kartik Agaram2020-10-281-10/+10
|
* 7135 - type-check write-to-streamKartik Agaram2020-10-281-0/+668
| | | | Lots of copy-pasta.
* 7134 - type-check read-from-streamKartik Agaram2020-10-281-0/+562
|
* 7130 - back to the Mu compiler for a spellKartik Agaram2020-10-271-0/+106
| | | | | Hacking on apps has created some urgency now for several additional safety checks.
* 7120 - tile: array of lines from fileKartik Agaram2020-10-261-1/+9
| | | | Requires a quick hacky change to Mu compiler.
* 7109Kartik Agaram2020-10-251-1/+1
| | | | | | | | | | | | | | | | | | | 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.
* 7052Kartik Agaram2020-10-171-4/+4
|
* 6957Kartik Agaram2020-10-051-0/+50
| | | | | | | | 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.
* 6949 - snapshot of next raytracing milestoneKartik Agaram2020-10-041-0/+21
| | | | | | | | | | | | | 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.
* 6943Kartik Agaram2020-10-041-96/+13
| | | | | | | | 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.
* 6942Kartik Agaram2020-10-041-0/+20
|
* 6934Kartik Agaram2020-10-031-0/+26
|
* 6933Kartik Agaram2020-10-031-10/+11
|
* 6932 - another bug related to floatsKartik Agaram2020-10-031-0/+70
| | | | | | | 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.