Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unfortunately our memory model has had to change in order to support the kinds of type punning that we see in the output of `rustc`. What this primarily means is that we have changed to a byte-addressable model, reducing overall memory usage on the Cairo VM at the cost of more computation steps. Each machine word fits 28 bytes, along with 28 bits worth of flags for future use by the memory subsystem. These flags are not treated as part of contiguous memory. The primary changes are: - A swap to calculate both `size_of` and `align_of` in bytes in the LLVM type system used by the compiler. This relies on the specified data layout for accurate computation. - Alterations to the semantics of the memory-related polyfills and opcodes to compute offsets and sizes properly using the new machinery for doing so. This commit also includes documentation of the new memory model.
- Loading branch information