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:
7
cranelift/wasmtests/icall.wast
Normal file
7
cranelift/wasmtests/icall.wast
Normal file
@@ -0,0 +1,7 @@
|
||||
(module
|
||||
(type $ft (func (param f32) (result i32)))
|
||||
(func $foo (export "foo") (param i32 f32) (result i32)
|
||||
(call_indirect $ft (get_local 1) (get_local 0))
|
||||
)
|
||||
(table (;0;) 23 23 anyfunc)
|
||||
)
|
||||
Reference in New Issue
Block a user