Commit Graph

24 Commits

Author SHA1 Message Date
Kartik Agaram
0102aa377a 7176 - type checks for 'copy' instruction 2020-11-04 19:04:15 -08:00
Kartik Agaram
17623a628a 7154 2020-11-01 22:02:13 -08:00
Kartik Agaram
480fd9958a 7032 2020-10-14 13:42:03 -07:00
Kartik Agaram
d9f8784d4c 7031 2020-10-14 12:46:53 -07:00
Kartik Agaram
7dd5a41e07 7030 2020-10-14 12:22:32 -07:00
Kartik Agaram
9635163bdc 7029 2020-10-14 12:00:19 -07:00
Kartik Agaram
e8ffaf29ce 6719 - error-checking for 'index' instructions
1000+ LoC spent; just 300+ excluding tests.

Still one known gap; we don't check the entirety of an array's element
type if it's a compound. So far we just check if say both sides start with
'addr'. Obviously that's not good enough.
2020-08-21 21:32:48 -07:00
Kartik Agaram
3a558d22ec 6573 2020-06-21 23:29:46 -07:00
Kartik Agaram
4d14c3fefd 6393 - start running .mu apps in CI 2020-05-24 20:36:31 -07:00
Kartik Agaram
27b1e19ebe 6392 - 'length' instruction done in all complexity 2020-05-24 19:46:47 -07:00
Kartik Agaram
c48ce3c8bf 6153 - switch 'main' to use Mu strings
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.
2020-03-15 21:03:12 -07:00
Kartik Agaram
6db056110b 6144 2020-03-14 01:25:34 -07:00
Kartik Agaram
9428990bd6 6143 2020-03-14 01:06:27 -07:00
Kartik Agaram
d5171ad7fe 6130 2020-03-11 21:34:49 -07:00
Kartik Agaram
189d34dcff 6076 2020-03-02 08:20:20 -08:00
Kartik Agaram
fee1bbd8b4 6041 - array indexing starting to work
And we're using it now in factorial.mu!

In the process I had to fix a couple of bugs in pointer dereferencing.

There are still some limitations:
a) Indexing by a literal doesn't work yet.
b) Only arrays of ints supported so far.

Looking ahead, I'm not sure how I can support indexing arrays by non-literals
(variables in registers) unless the element size is a power of 2.
2020-02-21 10:09:59 -08:00
Kartik Agaram
7c2ac5dcaa 6026 2020-02-18 16:05:13 -08:00
Kartik Agaram
8eec3eae35 6024 - finally, commandline parsing in Mu 2020-02-18 01:34:49 -08:00
Kartik Agaram
d2316e415b 6010 - starting to flesh out run-tests 2020-02-16 01:49:46 -08:00
Kartik Agaram
d9ff5c3fb8 6009 - significantly cleaner lexing
This cleans up a bunch of little warts that had historically accumulated
because of my bull-headedness in not designing a grammar up front. Let's
see if the lack of a grammar comes up again.

We now require that there be no space in variable declarations between
the name and the colon separating it from its type.
2020-02-16 01:44:29 -08:00
Kartik Agaram
deacf2c94e 6008
Allow comments at the end of all kinds of statements.

To do this I replaced all calls to next-word with next-mu-token.. except
one. I'm not seeing any bugs yet, any places where comments break things.
But this exception makes me nervous.
2020-02-16 01:14:06 -08:00
Kartik Agaram
5946a64453 6006 2020-02-14 01:57:30 -08:00
Kartik Agaram
1f029c3b57 6005
Support calling SubX code from Mu. I have _zero_ idea how to make this
safe.

Now we can start writing tests. We can't use commandline args yet. That
requires support for kernel strings.
2020-02-14 01:46:37 -08:00
Kartik Agaram
ea62afb1da 5954 - 'factorial' working! 2020-01-29 23:17:36 -08:00