about summary refs log tree commit diff stats
path: root/069allocate.subx
Commit message (Collapse)AuthorAgeFilesLines
* 6507 - use syscall names everywhereKartik Agaram2020-06-101-8/+4
|
* 6406 - primitive 'copy-handle'Kartik Agaram2020-05-251-0/+23
|
* increase some buffer sizesKartik Agaram2020-05-221-1/+1
| | | | We can now natively translate mu.subx again.
* mu.subx: first code-gen test passing!Kartik Agaram2020-05-181-0/+32
|
* handle nulls in lookupKartik Agaram2020-05-181-4/+36
| | | | | | | | | Cleaner abstraction, but adds 3 instructions to our overhead for handles, including one potentially-hard-to-predict jump :/ I wish I could have put the alloc id in eax for the comparison as well, to save a few bytes of instruction space. But that messes up the non-null case.
* mu.subx: first passing testKartik Agaram2020-05-181-0/+1
| | | | test-parse-mu-var now passing. After I had to extensively fix parse-type.
* mu.subx: parse-typeKartik Agaram2020-05-181-3/+5
|
* support 'fake' handles allocated staticallyKartik Agaram2020-05-181-6/+4
| | | | | | | | Mystery solved of why the syntax sugar phases don't work even though they don't use any functions whose signatures changed in the migration to handles. The answer: they use the Registers table, and it needs to use handles rather than raw strings.
* support 'fake' handles allocated staticallyKartik Agaram2020-05-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | Mystery solved of why the syntax sugar phases don't work even though they don't use any functions whose signatures changed in the migration to handles. The answer: they use the Registers table, and it currently doesn't use handles. Rather than create a whole new set of functions that operate on addresses, I'm going to create fake handles that are never intended to be reclaimed. Which raises the question of the best way to do that. I'd like to continue using string syntax, so I'm going to use a prefix in the payload that can also be rendered as a string. But all the printable characters start with 0x20, and we don't currently have escape sequences for null or any other non-printable characters. I _could_ use newlines, but that seems overly clever. So instead I'll once again not worry about some hypothetical problem with running out of alloc-ids, and just carve out half of the id space that can't be used for real alloc ids. Ascii doesn't use the most significant bit of bytes, so it seems like a natural separation.
* table primitives workingKartik Agaram2020-05-181-32/+489
| | | | $ ./translate_subx init.linux 0*.subx && ./a.elf test
* start migrating handles to fat pointersKartik Agaram2020-05-181-23/+61
| | | | | | | | | | | | | | | | | | | CI will fail from this commit onward. Currently working: $ bootstrap translate init.linux 0[4-7]*.subx 080zero-out.subx -o a.elf && ./a.elf test $ bootstrap run a.elf test $ chmod +x a.elf; ./a.elf test Plan: migrate functions that used to return handles to pass in a new arg of type (addr handle). That's a bit of a weird type. There should be few of these functions. (Open question: do we even want to expose this type in the Mu language?) Functions that just need to read from heap without modifying the handle will receive `(addr T)` or `(handle T)` types as arguments. As I sanitize each new file, I need to update signatures for any new functions and add them to a list. I also need to update calls to any functions on the list.
* 6208Kartik Agaram2020-04-221-16/+121
|
* 6178Kartik Agaram2020-03-311-1/+1
|
* 6153 - switch 'main' to use Mu stringsKartik Agaram2020-03-151-0/+32
| | | | | | | | | | | At the SubX level we have to put up with null-terminated kernel strings for commandline args. But so far we haven't done much with them. Rather than try to support them we'll just convert them transparently to standard length-prefixed strings. In the process I realized that it's not quite right to treat the combination of argc and argv as an array of kernel strings. Argc counts the number of elements, whereas the length of an array is usually denominated in bytes.
* 6064Kartik Agaram2020-02-271-1/+1
| | | | Fix CI.
* 5924Kartik Agaram2020-01-271-6/+6
|
* 5897 - rename comparison instructionsKartik Agaram2020-01-161-2/+2
| | | | | | | 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-4/+4
| | | | | | | | | | 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-2/+2
|
* 5804Kartik Agaram2019-12-081-8/+8
| | | | | Try to make the comments consistent with the type system we'll eventually have.
* 5784Kartik Agaram2019-11-301-2/+0
| | | | | 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
|
* 5698Kartik Agaram2019-10-151-8/+8
| | | | Thanks Andrew Owen for reporting this typo.
* 5675 - move helpers from subx-common into layersKartik Agaram2019-09-191-0/+2
| | | | | | | | | | | | | | | | 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.
* 5673 - standardize a few knobsKartik Agaram2019-09-191-3/+8
|
* 5669Kartik Agaram2019-09-191-0/+28
|
* 5592 - switch register names to lowercaseKartik Agaram2019-08-261-71/+71
|
* 5485 - promote SubX to top-levelKartik Agaram2019-07-271-0/+204