Disconnects Store state fields from Compiler (#1761)
* Moves CodeMemory, VMInterrupts and SignatureRegistry from Compiler * CompiledModule holds CodeMemory and GdbJitImageRegistration * Store keeps track of its JIT code * Makes "jit_int.rs" stuff Send+Sync * Adds the threads example.
This commit is contained in:
@@ -247,10 +247,7 @@ pub fn create_handle_with_function(
|
||||
mem::size_of::<u128>(),
|
||||
)?;
|
||||
assert!(relocations.is_empty());
|
||||
let sig_id = store
|
||||
.compiler()
|
||||
.signatures()
|
||||
.register(ft.to_wasm_func_type(), sig);
|
||||
let sig_id = store.register_signature(ft.to_wasm_func_type(), sig);
|
||||
trampolines.insert(sig_id, trampoline);
|
||||
|
||||
// Next up we wrap everything up into an `InstanceHandle` by publishing our
|
||||
@@ -300,10 +297,7 @@ pub unsafe fn create_handle_with_raw_function(
|
||||
.exports
|
||||
.insert("trampoline".to_string(), EntityIndex::Function(func_id));
|
||||
finished_functions.push(func);
|
||||
let sig_id = store
|
||||
.compiler()
|
||||
.signatures()
|
||||
.register(ft.to_wasm_func_type(), sig);
|
||||
let sig_id = store.register_signature(ft.to_wasm_func_type(), sig);
|
||||
trampolines.insert(sig_id, trampoline);
|
||||
|
||||
create_handle(module, store, finished_functions, trampolines, state)
|
||||
|
||||
Reference in New Issue
Block a user