other segments

This commit is contained in:
Daniel Lubarov 2022-07-02 23:17:33 -07:00
parent 28603b85d1
commit c389abc140

View File

@ -1,7 +1,22 @@
/// Contains EVM bytecode.
pub const CODE: usize = 0;
pub const STACK: usize = 1;
pub const MAIN_MEM: usize = 2;
pub const CALLDATA: usize = 3;
pub const RETURNDATA: usize = 4;
pub const NUM_SEGMENTS: usize = 5;
pub const STACK: usize = 1;
/// Main memory, owned by the contract code.
pub const MAIN_MEM: usize = 2;
/// Memory owned by the kernel.
pub const KERNEL_MEM: usize = 3;
/// Data passed to the current context by its caller.
pub const CALLDATA: usize = 4;
/// Data returned to the current context by its latest callee.
pub const RETURNDATA: usize = 5;
/// A segment which contains a few fixed-size metadata fields, such as the caller's context, or the
/// size of `CALLDATA` and `RETURNDATA`.
pub const METADATA: usize = 6;
pub const NUM_SEGMENTS: usize = 7;