about summary refs log tree commit diff stats
path: root/072slice.subx
Commit message (Collapse)AuthorAgeFilesLines
* 6507 - use syscall names everywhereKartik Agaram2020-06-101-4/+2
|
* mu.subx: new-var, new-var-from-sliceKartik Agaram2020-05-181-1/+1
|
* start migrating handles to fat pointersKartik Agaram2020-05-181-6/+25
| | | | | | | | | | | | | | | | | | | 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.
* 6182 - start of support for safe handlesKartik Agaram2020-04-031-16/+16
| | | | | | | | | | | | | | 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.
* 5924Kartik Agaram2020-01-271-48/+48
|
* 5898 - strengthen slice-empty? checkKartik Agaram2020-01-191-7/+36
| | | | | | | | | | | Anytime we create a slice, the first check tends to be whether it's empty. If we handle ill-formed slices here where start > end, that provides a measure of safety. In the Mu translator (mu.subx) we often check for a trailing ':' or ',' and decrement slice->end to ignore it. But that could conceivably yield ill-formed slices if the slice started out empty. Now we make sure we never operate on such ill-formed slices.
* 5897 - rename comparison instructionsKartik Agaram2020-01-161-14/+14
| | | | | | | 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-20/+20
| | | | | | | | | | 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-17/+17
|
* 5804Kartik Agaram2019-12-081-52/+54
| | | | | Try to make the comments consistent with the type system we'll eventually have.
* 5790Kartik Agaram2019-12-051-2/+2
| | | | | | Standardize conventions for labels within objects in the data segment. We're going to use this in a new tool.
* 5773Kartik Agaram2019-11-281-0/+1
| | | | Rudimentary support for parsing variable declarations.
* 5714Kartik Agaram2019-10-251-4/+2
| | | | Replace calculations of constants with labels.
* 5698Kartik Agaram2019-10-151-50/+50
| | | | Thanks Andrew Owen for reporting this typo.
* 5675 - move helpers from subx-common into layersKartik Agaram2019-09-191-0/+1173
| | | | | | | | | | | | | | | | 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.
* 5671Kartik Agaram2019-09-191-1173/+0
|
* 5592 - switch register names to lowercaseKartik Agaram2019-08-261-585/+585
|
* 5485 - promote SubX to top-levelKartik Agaram2019-07-271-0/+1173