Add a FuncEnvironment::make_indirect_sig() callback.
The function environment is now expected to keep track of the function signatures in the module, and it is asked to generate Cretonne signatures to be used for indirect calls. The combination of make_indirect_sig() and translate_call_indirect() callbacks allow the runtime to insert additional function arguments for indirect calls such as vmctx pointers and CFI-style signature identifiers.
This commit is contained in:
@@ -81,7 +81,7 @@ pub fn translate_module(
|
||||
loop {
|
||||
match *parser.read_with_input(next_input) {
|
||||
ParserState::BeginSection { code: SectionCode::Type, .. } => {
|
||||
match parse_function_signatures(&mut parser) {
|
||||
match parse_function_signatures(&mut parser, runtime) {
|
||||
Ok(sigs) => signatures = Some(sigs),
|
||||
Err(SectionParsingError::WrongSectionContent(s)) => {
|
||||
return Err(format!("wrong content in the type section: {}", s))
|
||||
|
||||
Reference in New Issue
Block a user