Last active
November 20, 2015 21:16
-
-
Save solson/5f5302de561200235cda to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// A stack frame: | |
/// | |
/// ```text | |
/// +-----------------------+ | |
/// | ReturnPointer | return value | |
/// + - - - - - - - - - - - + | |
/// | Arg(0) | | |
/// | Arg(1) | arguments | |
/// | ... | | |
/// | Arg(num_args - 1) | | |
/// + - - - - - - - - - - - + | |
/// | Var(0) | | |
/// | Var(1) | variables | |
/// | ... | | |
/// | Var(num_vars - 1) | | |
/// + - - - - - - - - - - - + | |
/// | Temp(0) | | |
/// | Temp(1) | temporaries | |
/// | ... | | |
/// | Temp(num_temps - 1) | | |
/// + - - - - - - - - - - - + | |
/// | Aggregates | aggregates | |
/// +-----------------------+ | |
/// ``` | |
#[derive(Debug)] | |
struct Frame { | |
offset: usize, | |
num_args: usize, | |
num_vars: usize, | |
num_temps: usize, | |
// aggregates | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment