diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-08-21 21:20:38 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-08-21 21:32:48 -0700 |
commit | e8ffaf29cea786e1c1266273c65bdb5eb42b39ab (patch) | |
tree | e1ec26201727f5bd3a05895e46cb8b9175342fe7 /apps/factorial.mu | |
parent | be2a94d9b82021109f3ef0510c3fc9cfe9537a29 (diff) | |
download | mu-e8ffaf29cea786e1c1266273c65bdb5eb42b39ab.tar.gz |
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.
Diffstat (limited to 'apps/factorial.mu')
-rw-r--r-- | apps/factorial.mu | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/factorial.mu b/apps/factorial.mu index 4c389a57..7be73342 100644 --- a/apps/factorial.mu +++ b/apps/factorial.mu @@ -31,8 +31,8 @@ fn test-factorial { check-ints-equal result 0x78 "F - test-factorial" } -fn main args-on-stack: (addr array (addr array byte)) -> exit-status/ebx: int { - var args/eax: (addr array (addr array byte)) <- copy args-on-stack +fn main args-on-stack: (addr array addr array byte) -> exit-status/ebx: int { + var args/eax: (addr array addr array byte) <- copy args-on-stack var tmp/ecx: int <- length args $main-body: { # if (len(args) <= 1) factorial(5) |