Use the WasmRuntime's signature list rather than keeping a separate list.

This way, if the runtime modifies the signature, such as to add special
arguments, they are reflected in the resulting function defintions.
This commit is contained in:
Dan Gohman
2017-10-04 16:55:14 -07:00
parent 196795017b
commit 7410ddfe08
4 changed files with 11 additions and 8 deletions

View File

@@ -153,6 +153,9 @@ pub trait WasmRuntime: FuncEnvironment {
/// Declares a function signature to the runtime.
fn declare_signature(&mut self, sig: &ir::Signature);
/// Return the signature with the given index.
fn get_signature(&self, sig_index: SignatureIndex) -> &ir::Signature;
/// Declares a function import to the runtime.
fn declare_func_import(&mut self, sig_index: SignatureIndex, module: &[u8], field: &[u8]);