rrthomas / mit

A simple stack-based VM
Other
10 stars 3 forks source link

Heterogeneous types with a single stack #362

Open rrthomas opened 4 years ago

rrthomas commented 4 years ago

To support heterogeneous types with a single stack, observe that if basic blocks are typed labels (as in WASM), then we know statically the type of each stack item.

Can use a tagged union for stack items in a naive interpreter.