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.
This commit is contained in:
Kartik Agaram 2020-08-21 21:20:38 -07:00
parent be2a94d9b8
commit e8ffaf29ce
13 changed files with 1219 additions and 5 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -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)

BIN
apps/hex

Binary file not shown.

BIN
apps/mu

Binary file not shown.

File diff suppressed because it is too large Load Diff

BIN
apps/pack

Binary file not shown.

Binary file not shown.

View File

@ -12,7 +12,7 @@ Input-size:
# number of labels we can translate to addresses
Max-labels:
0x30000/imm32/24K-labels/192KB
0x60000/imm32/24K-labels/192KB
# capacity of trace-stream
Trace-size:

Binary file not shown.

Binary file not shown.