about summary refs log tree commit diff stats
path: root/apps
Commit message (Collapse)AuthorAgeFilesLines
* 6985 - tile: make calls read-onlyKartik Agaram2020-10-091-0/+8
|
* 6984Kartik Agaram2020-10-091-8/+13
|
* 6983 - tile: right-arrow can now move out of callsKartik Agaram2020-10-091-0/+15
|
* 6982 - right-arrow now moves into expanded callsKartik Agaram2020-10-092-8/+124
| | | | | | | | | | | | Rendering is still ugly. Cursor isn't on the right row. But the hard part is behind us. This was a stupid mistake in function-body, and it happened because I've been getting lazy and passing (addr handle) objects when I should be passing in "constant" addr objects. I'm not sure why I was so resistant to debugging by print here. I spent 3 days waffling about with this bug.
* 6981Kartik Agaram2020-10-091-16/+14
| | | | Tile: simplify the contract for render-column.
* 6980Kartik Agaram2020-10-091-3/+2
| | | | Changing tack..
* 6979Kartik Agaram2020-10-092-3/+3
| | | | | Use the fake-screen infrastructure we already have for non-interactive mode.
* 6978Kartik Agaram2020-10-091-0/+36
| | | | | | We don't have tests yet in the tile prototype, mostly because we don't yet feel confident about what desired behavior should be. But it's still helpful to have a non-interactive mode for tracking down segfaults.
* 6977Kartik Agaram2020-10-092-14/+50
| | | | | Snapshot. We've gotten arrow keys navigating, but segfault when getting to the second word in an expanded function call body.
* 6976Kartik Agaram2020-10-091-4/+4
|
* 6975Kartik Agaram2020-10-091-1/+1
|
* 6974Kartik Agaram2020-10-081-10/+10
|
* 6972 - tile: stop persisting cursor-wordKartik Agaram2020-10-082-26/+94
| | | | Rather surprisingly, this transformation worked the first time!
* 6969Kartik Agaram2020-10-062-24/+5
| | | | Fix and cleanup.
* 6968Kartik Agaram2020-10-063-37/+162
| | | | | | | | | | | | Snapshot that requires a check in the Mu compiler. Currently I don't spill a register if it could possibly be over-written by a function output within. However, find-in-call-path is a good example of where this constraint is too lenient and results in unsafe code. The variable `curr` gets clobbered during loop update by the variable `match?`. What's the answer? Perhaps we should ban all conditional updates to function outputs? That'd be dashed inconvenient.
* 6967Kartik Agaram2020-10-052-15/+116
| | | | | Function expand/contract still works, but the implementation is totally different under the hood.
* 6966Kartik Agaram2020-10-052-35/+15
|
* 6965Kartik Agaram2020-10-053-24/+24
|
* 6964 - tile: start tracking word index in fn bodyKartik Agaram2020-10-051-0/+10
|
* 6963 - tile: more idiomatic conventional replKartik Agaram2020-10-051-37/+35
|
* 6962Kartik Agaram2020-10-053-38/+34
| | | | | Slowly hoist cursor-word from environment to sandbox. This isn't its final destination.
* 6961Kartik Agaram2020-10-051-4/+6
|
* 6960Kartik Agaram2020-10-054-53/+141
|
* 6957Kartik Agaram2020-10-055-20304/+20365
| | | | | | | | 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.
* 6953Kartik Agaram2020-10-052-0/+180006
|
* 6952 - raytracing: much betterKartik Agaram2020-10-045-2/+330
| | | | | | | | | | | | | | | The image is now visually indistinguishable from the baseline, though the file isn't quite bit-for-bit correct. I found 3 bugs: a) I forgot to normalize the ray. After creating a helper to "automatically" do it for me, it turns out said helper requires manually using. b) I forgot to multiply by t at one place. c) vec3-length was half-written. For the umpteenth time, the bugs were all in the last place I looked. I was worried about spending a lot of time transcribing `main` without any feedback, but that turned out to be perfect.
* 6949 - snapshot of next raytracing milestoneKartik Agaram2020-10-045-70/+372
| | | | | | | | | | | | | 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.
* 6948 - stress-testing prints of floatsKartik Agaram2020-10-043-0/+151
| | | | Looks good.
* 6946 - print floats somewhat intuitively in hexKartik Agaram2020-10-0413-0/+0
|
* 6943Kartik Agaram2020-10-044-97/+71
| | | | | | | | 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-042-0/+20
|
* 6940Kartik Agaram2020-10-031-10/+10
|
* 6937Kartik Agaram2020-10-031-16/+19
|
* 6935 - raytracing using floatsKartik Agaram2020-10-034-0/+65691
|
* 6934Kartik Agaram2020-10-032-0/+26
|
* 6933Kartik Agaram2020-10-031-10/+11
|
* 6932 - another bug related to floatsKartik Agaram2020-10-032-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.
* 6931 - support fp registers in variable lookupKartik Agaram2020-10-032-4/+82
|
* 6930Kartik Agaram2020-10-032-4/+2
|
* 6927 - working on a raytracing tutorialKartik Agaram2020-10-036-0/+65619
| | | | https://raytracing.github.io/books/RayTracingInOneWeekend.html
* 6925 - tile: don't try to print escape sequencesKartik Agaram2020-10-013-1/+50
|
* 6922Kartik Agaram2020-10-012-2/+60
|
* 6918Kartik Agaram2020-10-011-0/+0
| | | | Fix CI.
* 6915 - a new family of Mu branch instructionsKartik Agaram2020-09-301-2/+417
| | | | | | The realization of commit 6916 means that we should be using jump-if-addr* after comparing floats. Which is super ugly. Let's create aliases to them called jump-if-float*.
* 6908 - compiling all floating-point operationsKartik Agaram2020-09-3014-41/+725
| | | | | We don't yet support emulating these instructions in `bootstrap`. But generated binaries containing them run natively just fine.
* 6907 - converting to and from floating-pointKartik Agaram2020-09-292-9/+163
| | | | Some bugfixes to the previous commit.
* 6906Kartik Agaram2020-09-292-4/+4
|
* 6905 - first floating-point instruction compilingKartik Agaram2020-09-292-2/+275
| | | | (Though the generated code doesn't work yet.)
* 6904Kartik Agaram2020-09-292-133/+266
| | | | | New fields for primitives to support code-generation for floating-point primitives.
* 6903Kartik Agaram2020-09-292-0/+29
| | | | | | | | | | | | | | | | | | | Make a few tests more self-contained. I'd prefer to just run a function called `setup` first thing on startup and move this portion of convert-mu to it: # initialize global data structures c7 0/subop/copy *Next-block-index 1/imm32 8b/-> *Primitive-type-ids 0/r32/eax 89/<- *Type-id 0/r32/eax # stream-write c7 0/subop/copy *_Program-functions 0/imm32 c7 0/subop/copy *_Program-functions->payload 0/imm32 c7 0/subop/copy *_Program-types 0/imm32 c7 0/subop/copy *_Program-types->payload 0/imm32 c7 0/subop/copy *_Program-signatures 0/imm32 c7 0/subop/copy *_Program-signatures->payload 0/imm32 However, this approach doesn't fix my run_one_test tooling.