Add a FuncEnvironment::make_direct_func() callback.
This allows the environment to control the signatures used for direct
function calls. The signature and calling convention may depend on
whether the function is imported or local.
Also add WasmRuntime::declare_func_{import,type} to notify the runtime
about imported and local functions. This is necessary so the runtime
knows what function indexes are referring to .
Since imported and local functions are now declared to the runtime, it
is no longer necessary to return hashes mapping between WebAssembly
indexes and Cretonne entities.
Also stop return null entries for the imported functions in the
TranslationResult. Just return a vector of local functions.
This commit is contained in:
@@ -23,8 +23,7 @@ mod sections_translator;
|
||||
mod state;
|
||||
mod translation_utils;
|
||||
|
||||
pub use module_translator::{translate_module, TranslationResult, FunctionTranslation,
|
||||
ImportMappings};
|
||||
pub use runtime::{WasmRuntime, DummyRuntime};
|
||||
pub use module_translator::{translate_module, TranslationResult};
|
||||
pub use runtime::{FuncEnvironment, WasmRuntime, DummyRuntime};
|
||||
pub use translation_utils::{Local, FunctionIndex, GlobalIndex, TableIndex, MemoryIndex, RawByte,
|
||||
MemoryAddress, SignatureIndex, Global, GlobalInit, Table, Memory};
|
||||
|
||||
Reference in New Issue
Block a user