Commit Graph

34 Commits

Author SHA1 Message Date
Kartik Agaram
59cf3ae983 6597 2020-06-29 18:33:52 -07:00
Kartik Agaram
1afc882890 6596 2020-06-29 18:31:17 -07:00
Kartik Agaram
7dac9ade15 6507 - use syscall names everywhere 2020-06-10 23:09:30 -07:00
Kartik Agaram
d430778711 dquotes.subx now working 2020-05-18 00:44:46 -07:00
Kartik Agaram
4c19dd3968 6089 2020-03-06 18:09:16 -08:00
Kartik Agaram
71eb22a5bf 5924 2020-01-27 00:36:44 -08:00
Kartik Agaram
6070c23e5e 5897 - rename comparison instructions
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.
2020-01-16 18:31:12 -08:00
Kartik Agaram
f1eade7286 5883 - drop the ref keyword
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.
2020-01-12 14:49:35 -08:00
Kartik Agaram
0bcfe6e5cf 5880 2020-01-10 10:35:17 -08:00
Kartik Agaram
7e7a8a6eae 5876 - address -> addr 2020-01-03 01:36:34 -08:00
Kartik Agaram
2a2a5b1e43 5804
Try to make the comments consistent with the type system we'll eventually
have.
2019-12-08 23:31:05 -08:00
Kartik Agaram
686a52bd2e 5790
Standardize conventions for labels within objects in the data segment.

We're going to use this in a new tool.
2019-12-05 22:57:51 -08:00
Kartik Agaram
6488bfcf85 5753
Binaries are now identical again.
There's a little hack here that we should clean up at some point. But it
requires more thought.

Ordering compiler phases is hard. So far we're only at the start of the
slippery slope into that abyss.
2019-11-18 12:50:01 -08:00
Kartik Agaram
0fba3393a5 5715
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.
2019-10-26 23:42:27 -07:00
Kartik Agaram
f0b7e327c5 5714
Replace calculations of constants with labels.
2019-10-25 06:10:36 -07:00
Kartik Agaram
5409743432 5700 2019-10-17 21:59:51 -07:00
Kartik Agaram
7a5832204a 5698
Thanks Andrew Owen for reporting this typo.
2019-10-15 19:35:19 -07:00
Kartik Agaram
a19dddcabe 5676 2019-09-19 23:29:28 -07:00
Kartik Agaram
fd91f7f61b 5675 - move helpers from subx-common into layers
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.
2019-09-19 23:25:49 -07:00
Kartik Agaram
a9d473e224 5668 - start reorg to permit syntax sugar in layers
Right now we always build the library before any apps.
Apps are where our syntax sugar translators (sigils, calls, braces) live.
So we can't use sugar in the standard library.

New idea: move all code for SubX phases into the top-level.
Perhaps we should also just build a single file rather than pipeline stages.
But for now we'll build each phase by building up to some specific layer.

This will simplify test_apps and move lots of one-off logic to a more standard
form in test_layers.

I'm also going to reorg existing layers so that we introduce each phase
at a point where it mostly only gets the helpers it needs.

This commit itself is just cleaning up some common strings. Using explicit
names for them streamlines binaries a bit.
2019-09-19 15:12:50 -07:00
Kartik Agaram
f39eaf81fa 5661 2019-09-15 00:29:52 -07:00
Kartik Agaram
3a8c4df29f 5615 - long strings in self-hosted translator
My SubX translator phases assume lines are never longer than 512 bytes.
However, dquotes.subx was generating lines longer than that by blowing
up string literals by 4-5x.
2019-09-04 16:57:57 -07:00
Kartik Agaram
604c8315bd 5607 2019-09-01 23:57:29 -07:00
Kartik Agaram
282681c729 5600 2019-08-31 23:42:45 -07:00
Kartik Agaram
333525360b 5592 - switch register names to lowercase 2019-08-26 11:59:21 -07:00
Kartik Agaram
e0d034b565 5590 2019-08-25 23:33:49 -07:00
Kartik Agaram
fc55af70a5 5589 2019-08-25 23:25:08 -07:00
Kartik Agaram
d8c2f71ce9 5586 - bugfix: no desugar inside string literals 2019-08-25 22:03:23 -07:00
Kartik Agaram
ba5a2eff2c lexing complex expressions inside '*(...)' 2019-08-23 01:27:36 -07:00
Kartik Agaram
37ea8c410e . 2019-08-16 00:10:55 -07:00
Kartik Agaram
129d812c2e Merge branch 'master' into desugar 2019-07-31 17:35:15 -07:00
Kartik Agaram
0b4e8494d6 desugar: clean up top-level convert
Model it on `dquotes` rather than `pack`, since it needs almost zero
state across words.

Manual testing:
  $ echo 'ab %eax' |subx run apps/desugar
  ab 0
2019-07-31 17:34:30 -07:00
Kartik Agaram
1ed1d1c842 5499 2019-07-31 15:28:23 -07:00
Kartik Agaram
6e1eeeebfb 5485 - promote SubX to top-level 2019-07-27 17:47:59 -07:00