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

@@ -123,6 +123,10 @@ impl WasmRuntime for DummyRuntime {
self.signatures.push(sig.clone());
}
fn get_signature(&self, sig_index: SignatureIndex) -> &ir::Signature {
&self.signatures[sig_index]
}
fn declare_func_import(&mut self, sig_index: SignatureIndex, module: &[u8], field: &[u8]) {
assert_eq!(
self.func_types.len(),