Calling conventions, value stack, and runtime stack layout.

This commit is contained in:
losfair
2019-02-12 23:15:57 +08:00
parent 2fbb5e3332
commit 4ebb22f8bc
5 changed files with 215 additions and 26 deletions

View File

@ -7,6 +7,7 @@ pub trait ModuleCodeGenerator<FCG: FunctionCodeGenerator> {
pub trait FunctionCodeGenerator {
fn feed_param(&mut self, ty: WpType) -> Result<(), CodegenError>;
fn feed_local(&mut self, ty: WpType, n: usize) -> Result<(), CodegenError>;
fn begin_body(&mut self) -> Result<(), CodegenError>;
fn feed_opcode(&mut self, op: Operator) -> Result<(), CodegenError>;
fn finalize(&mut self) -> Result<(), CodegenError>;
}