about summary refs log tree commit diff stats
path: root/apps/subx-params.subx
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* 6064Kartik Agaram2020-02-271-2/+2
| | | | Fix CI.
* 5999Kartik Agaram2020-02-091-1/+1
| | | | | Fix CI. apps/survey was running out of space in the trace segment when translating apps/mu.subx
* 5933Kartik Agaram2020-01-271-2/+2
| | | | Expand some buffer sizes to continue building mu.subx natively.
* 5765Kartik Agaram2019-11-261-0/+4
| | | | | | | | | 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.
* 5675 - move helpers from subx-common into layersKartik Agaram2019-09-191-0/+15
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.