mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-29 08:31:32 +00:00
Run middlewares after begin_body
.
This commit is contained in:
@ -222,13 +222,6 @@ pub fn read_module<
|
|||||||
let fcg = mcg
|
let fcg = mcg
|
||||||
.next_function(Arc::clone(&info))
|
.next_function(Arc::clone(&info))
|
||||||
.map_err(|x| LoadError::Codegen(format!("{:?}", x)))?;
|
.map_err(|x| LoadError::Codegen(format!("{:?}", x)))?;
|
||||||
middlewares
|
|
||||||
.run(
|
|
||||||
Some(fcg),
|
|
||||||
Event::Internal(InternalEvent::FunctionBegin(id as u32)),
|
|
||||||
&info.read().unwrap(),
|
|
||||||
)
|
|
||||||
.map_err(|x| LoadError::Codegen(x))?;
|
|
||||||
|
|
||||||
let info_read = info.read().unwrap();
|
let info_read = info.read().unwrap();
|
||||||
let sig = info_read
|
let sig = info_read
|
||||||
@ -270,6 +263,13 @@ pub fn read_module<
|
|||||||
body_begun = true;
|
body_begun = true;
|
||||||
fcg.begin_body(&info.read().unwrap())
|
fcg.begin_body(&info.read().unwrap())
|
||||||
.map_err(|x| LoadError::Codegen(format!("{:?}", x)))?;
|
.map_err(|x| LoadError::Codegen(format!("{:?}", x)))?;
|
||||||
|
middlewares
|
||||||
|
.run(
|
||||||
|
Some(fcg),
|
||||||
|
Event::Internal(InternalEvent::FunctionBegin(id as u32)),
|
||||||
|
&info.read().unwrap(),
|
||||||
|
)
|
||||||
|
.map_err(|x| LoadError::Codegen(x))?;
|
||||||
}
|
}
|
||||||
middlewares
|
middlewares
|
||||||
.run(Some(fcg), Event::Wasm(op), &info.read().unwrap())
|
.run(Some(fcg), Event::Wasm(op), &info.read().unwrap())
|
||||||
|
Reference in New Issue
Block a user