Add repr.rs module containing the representation of functions.

A function owns instructions and extended basic blocks. References to these
entities are implemented as opaque structs indexing into the functions internal
tables. This avoids fighting Rust's ownership checking and it also makes
references 4 bytes on all platforms.

SSA values are identified similarly, but with an optimization for the first
value produced by an instruction. Very few instructions will produce more than
one value, and there is an extended value table for those.
This commit is contained in:
Jakob Stoklund Olesen
2016-04-07 11:09:36 -07:00
parent d650d551a0
commit 3a570e8b21
2 changed files with 342 additions and 0 deletions

View File

@@ -7,3 +7,4 @@
pub mod types;
pub mod immediates;
pub mod repr;