about summary refs log tree commit diff stats
path: root/apps/survey.subx
Commit message (Collapse)AuthorAgeFilesLines
* fix a discrepancy in the generated apps/ex1 binaryKartik Agaram2020-05-181-1/+1
|
* fix a crash when translating apps/ex1Kartik Agaram2020-05-181-6/+6
|
* survey.subx now workingKartik Agaram2020-05-181-265/+51
|
* emit-segments in survey.subx now workingKartik Agaram2020-05-181-72/+104
|
* second test also passingKartik Agaram2020-05-181-14/+79
|
* compute-addresses now working? Maybe?Kartik Agaram2020-05-181-92/+375
|
* compute-offsets in survey.subx now workingKartik Agaram2020-05-181-59/+100
|
* -Kartik Agaram2020-05-181-4/+13
|
* -Kartik Agaram2020-05-181-4/+4
|
* -Kartik Agaram2020-05-181-21/+23
|
* -Kartik Agaram2020-05-181-45/+0
|
* -Kartik Agaram2020-05-181-1/+1
|
* -Kartik Agaram2020-05-181-74/+0
|
* 6199Kartik Agaram2020-04-081-1/+1
|
* 6198Kartik Agaram2020-04-081-14/+10
|
* 6197Kartik Agaram2020-04-081-18/+18
|
* 6196Kartik Agaram2020-04-061-2/+2
|
* 6195Kartik Agaram2020-04-061-1/+1
| | | | This bug was never caught because we've never tested with more than 2 segments.
* 6194Kartik Agaram2020-04-061-3/+6
|
* 6193Kartik Agaram2020-04-061-3/+6
|
* 6192Kartik Agaram2020-04-061-3/+6
|
* 6191Kartik Agaram2020-04-061-5/+6
|
* 6190Kartik Agaram2020-04-061-31/+33
|
* 6189Kartik Agaram2020-04-061-15/+14
|
* 6188Kartik Agaram2020-04-061-7/+18
|
* 6187Kartik Agaram2020-04-061-1/+3
|
* 6186Kartik Agaram2020-04-061-6/+2
|
* 6185Kartik Agaram2020-04-061-8/+8
|
* 6182 - start of support for safe handlesKartik Agaram2020-04-031-20/+20
| | | | | | | | | | | | | | So far it's unclear how to do this in a series of small commits. Still nibbling around the edges. In this commit we standardize some terminology: The length of an array or stream is denominated in the high-level elements. The _size_ is denominated in bytes. The thing we encode into the type is always the size, not the length. There's still an open question of what to do about the Mu `length` operator. I'd like to modify it to provide the length. Currently it provides the size. If I can't fix that I'll rename it.
* 6181Kartik Agaram2020-04-031-3/+4
|
* 6180Kartik Agaram2020-04-031-73/+11
| | | | | It's going to be hard work retrofitting 8-byte handles in place of 4-byte addrs. Here we just clean up some unused args.
* 6179Kartik Agaram2020-04-031-2/+2
|
* 6094 - new 'compute-offset' instructionKartik Agaram2020-03-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | If indexing into a type with power-of-2-sized elements we can access them in one instruction: x/reg1: (addr int) <- index A/reg2: (addr array int), idx/reg3: int This translates to a single instruction because x86 instructions support an addressing mode with left-shifts. For non-powers-of-2, however, we need a multiply. To keep things type-safe, it is performed like this: x/reg1: (offset T) <- compute-offset A: (addr array T), idx: int y/reg2: (addr T) <- index A, x An offset is just an int that is guaranteed to be a multiple of size-of(T). Offsets can only be used in index instructions, and the types will eventually be required to line up. In the process, I have to expand Input-size because mu.subx is growing big.
* 6089Kartik Agaram2020-03-061-2/+2
|
* 6083Kartik Agaram2020-03-061-4/+4
|
* 6014Kartik Agaram2020-02-171-2/+2
|
* 5924Kartik Agaram2020-01-271-52/+52
|
* 5897 - rename comparison instructionsKartik Agaram2020-01-161-37/+37
| | | | | | | Signed and unsigned don't quite capture the essence of what the different combinations of x86 flags are doing for SubX. The crucial distinction is that one set of comparison operators is for integers and the second is for addresses.
* 5883 - drop the `ref` keywordKartik Agaram2020-01-121-23/+23
| | | | | | | | | | When I created it I was conflating two things: a) needing to refer to just the start, rather than the whole, and b) counting indirections. Both are kinda ill-posed. Now Mu will have just `addr` and `handle` types. Normal types will translate implicitly to `addr` types, while `handle` will always require explicit handling.
* 5876 - address -> addrKartik Agaram2020-01-031-28/+28
|
* 5804Kartik Agaram2019-12-081-71/+71
| | | | | Try to make the comments consistent with the type system we'll eventually have.
* 5794Kartik Agaram2019-12-061-43/+43
| | | | | | | | | Rather surprisingly, all the treeshake tooling is done in just about 2 hours of work. From now on it'll be easier to update stats.txt. Observations: a) Binaries are tiny compared to conventional stacks. Tens of KB. b) ~80% of binaries are tests and unused libraries in all my apps. c) ~75% of LoC in SubX sources are tests or comments.
* 5790Kartik Agaram2019-12-051-26/+26
| | | | | | Standardize conventions for labels within objects in the data segment. We're going to use this in a new tool.
* 5782 - fix a widespread bug with Heap-sizeKartik Agaram2019-11-301-1/+1
|
* 5765Kartik Agaram2019-11-261-3/+3
| | | | | | | | | 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.
* 5715Kartik Agaram2019-10-261-22/+17
| | | | | | | Clean up pseudocode to match planned syntax for the type- and memory-safe level-2 Mu language. http://akkartik.name/post/mu-2019-2 is already out of date.
* 5714Kartik Agaram2019-10-251-80/+26
| | | | Replace calculations of constants with labels.
* 5700Kartik Agaram2019-10-171-1/+1
|
* 5698Kartik Agaram2019-10-151-69/+69
| | | | Thanks Andrew Owen for reporting this typo.
* 5675 - move helpers from subx-common into layersKartik Agaram2019-09-191-20/+20
| | | | | | | | | | | | | | | | This undoes 5672 in favor of a new plan: Layers 000 - 099 are for running without syntax sugar. We use them for building syntax-sugar passes. Layers 100 and up are for running with all syntax sugar. The layers are arranged in approximate order so more phases rely on earlier layers than later ones. I plan to not use intermediate syntax sugar (just sigils without calls, or sigils and calls without braces) anywhere except in the specific passes implementing them.