Commit Graph

5800 Commits

Author SHA1 Message Date
Kartik Agaram f821c0e28b 5800 - move `browse_trace` to `tools/` dir 2019-12-07 18:15:49 -08:00
Kartik Agaram 9e45cae061 5799 - move html-generation to `tools/` directory 2019-12-07 18:06:17 -08:00
Kartik Agaram 25636f70d0 5798
Fuck, 'tmp' is a generic name, and running `clean` deleted some files I'd
stashed away.
2019-12-07 18:06:17 -08:00
Kartik Agaram 72f278ae6b 5797 - move `enumerate/` to `tools/` directory 2019-12-07 18:06:16 -08:00
Kartik Agaram c1d596f56a 5796 - move treeshake to a new tools/ directory 2019-12-07 18:05:06 -08:00
Kartik Agaram e9aee071f4 5795 2019-12-07 11:21:30 -08:00
Kartik Agaram 68719bebc0 5794
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.
2019-12-06 01:12:08 -08:00
Kartik Agaram b6d62cc91c 5793
Start of a new script called treeshake to emit stats for minimal line counts
and binary sizes for all apps.

It doesn't actually do any dead-code deletion yet. But it does build and
run all apps successfully. (Except apps/mu; we'll ignore that for now.
It's probably not being disciplined about identifying internal labels.)
2019-12-05 23:45:22 -08:00
Kartik Agaram 58467e6cbc 5792
Fix a bug in one test: it checks eax when the component under test returns
nothing. It's been just accidentally passing all these months.
2019-12-05 23:29:24 -08:00
Kartik Agaram c7a5d74252 5791 2019-12-05 23:25:00 -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 714d6e15ba 5789 2019-12-03 21:45:06 -08:00
Kartik Agaram db66de4a75 5788 2019-12-02 23:59:14 -08:00
Kartik Agaram 41302404c7 5787 2019-12-02 23:57:13 -08:00
Kartik Agaram f25f2e98f9 5786 2019-11-30 14:18:36 -08:00
Kartik Agaram eb6e4a1339 5785 - initial skeleton for parsing fn bodies
All tests passing again. We have big gaping holes for type- and var-management.
We're going to work on the latter first.
2019-11-30 14:16:05 -08:00
Kartik Agaram ab752bc9ca 5784
Lots of debugging to add two curly braces. I need tests for populate-mu-function-body,
or even parse-mu-block.
2019-11-30 12:28:19 -08:00
Kartik Agaram 3ccc100b32 5783 2019-11-30 11:15:15 -08:00
Kartik Agaram 931b17daa0 5782 - fix a widespread bug with Heap-size 2019-11-30 11:14:49 -08:00
Kartik Agaram 1d4e6a76ef 5781
parse-mu-stmt now working, though we'll need to go back and stop creating
a new var for every instance of a variable in a scope.
2019-11-30 01:26:55 -08:00
Kartik Agaram f6ff6005f7 5780 2019-11-29 15:35:28 -08:00
Kartik Agaram a3443cac7d 5779
Snapshot with new skeleton for parsing function body.
New test still failing, but only in the one expected place.
2019-11-29 15:23:22 -08:00
Kartik Agaram 8d5437838b 5778 2019-11-29 01:27:39 -08:00
Kartik Agaram cc253a74a2 5777 2019-11-29 01:24:03 -08:00
Kartik Agaram 5da865c7fd 5776 2019-11-29 00:43:10 -08:00
Kartik Agaram 2bc11ffb97 5775 2019-11-29 00:31:29 -08:00
Kartik Agaram 65b26ea169 5774
Function headers seem to be parsing right.
2019-11-29 00:09:06 -08:00
Kartik Agaram 31ed455886 5773
Rudimentary support for parsing variable declarations.
2019-11-28 23:20:39 -08:00
Kartik Agaram 0c24aa334e 5772 2019-11-28 01:14:15 -08:00
Kartik Agaram 367394c7de 5771 2019-11-28 01:02:40 -08:00
Kartik Agaram 0546546c15 5770 2019-11-28 01:01:37 -08:00
Kartik Agaram 3a7da4e735 5769 - support uppercase hex in SubX 2019-11-28 00:37:26 -08:00
Kartik Agaram 0d741834f3 5768 - start parsing fn headers 2019-11-27 19:14:42 -08:00
Kartik Agaram 703f6ab1ae 5767
Some groundwork for parsing.
2019-11-27 17:02:13 -08:00
Kartik Agaram 374397f0cb 5766 2019-11-26 22:21:06 -08:00
Kartik Agaram 70187b1c01 5765
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.
2019-11-26 22:11:23 -08:00
Kartik Agaram 55628fb693 5764 2019-11-26 21:42:42 -08:00
Kartik Agaram b697b34318 5763 2019-11-26 18:07:55 -08:00
Kartik Agaram fee3e91d85 5762 2019-11-26 17:47:14 -08:00
Kartik Agaram 4d20c9ee94 5761 2019-11-26 17:41:25 -08:00
Kartik Agaram 28044a3bcb 5760 2019-11-25 21:07:30 -08:00
Kartik Agaram edce9c00ee 5759 - design statement data structure 2019-11-25 21:00:07 -08:00
Kartik Agaram f88f77cdab 5758 2019-11-25 17:49:20 -08:00
Kartik Agaram e88ee4ee91 5757 2019-11-18 17:38:12 -08:00
Kartik Agaram 49ffb03084 5756 2019-11-18 17:36:59 -08:00
Kartik Agaram dd6c5fff9e 5755
Support function calls with literal arguments.
2019-11-18 17:29:50 -08:00
Kartik Agaram e9db8e1f25 5754
Support binary instructions with an immediate operand.
2019-11-18 16:30:30 -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 442fdabe30 5752
Support binary operations with reg/mem and reg operands.

Everything is passing. However, the self-hosting translator now generates
some discrepancies compared to the C++ translator :(
2019-11-18 01:15:29 -08:00
Kartik Agaram 0ea0ebcf81 5751 - start of table of Mu primitives
So far this is just the same as our most recent tests. But now we have a
'DSL' for adding more primitives.
2019-11-18 00:24:24 -08:00