mirror of
https://github.com/fluencelabs/parity-wasm
synced 2025-06-28 22:22:02 +00:00
signature builder should resolve to function type, not function def
This commit is contained in:
@ -156,9 +156,7 @@ impl<F> ModuleBuilder<F> where F: Invoke<elements::Module> {
|
|||||||
/// Push one function signature, returning it's calling index.
|
/// Push one function signature, returning it's calling index.
|
||||||
/// Can create corresponding type in type section.
|
/// Can create corresponding type in type section.
|
||||||
pub fn push_signature(&mut self, signature: code::Signature) -> u32 {
|
pub fn push_signature(&mut self, signature: code::Signature) -> u32 {
|
||||||
let type_ref = self.resolve_type_ref(signature);
|
self.resolve_type_ref(signature)
|
||||||
self.module.functions.entries_mut().push(elements::Func::new(type_ref));
|
|
||||||
self.module.functions.entries_mut().len() as u32 - 1
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Push signatures in the module, returning corresponding indices of pushed signatures
|
/// Push signatures in the module, returning corresponding indices of pushed signatures
|
||||||
|
Reference in New Issue
Block a user