Remove the stack map registry.

This commit removes the stack map registry and instead uses the existing
information from the store's module registry to lookup stack maps.

A trait is now used to pass the lookup context to the runtime, implemented by
`Store` to do the lookup.

With this change, module registration in `Store` is now entirely limited to
inserting the module into the module registry.
This commit is contained in:
Peter Huene
2021-04-14 13:45:56 -07:00
parent a2466b3c23
commit ea72c621f0
16 changed files with 158 additions and 264 deletions

View File

@@ -283,7 +283,7 @@ pub fn create_function(
host_state: Box::new(trampoline_state),
interrupts: std::ptr::null(),
externref_activations_table: std::ptr::null_mut(),
stack_map_registry: std::ptr::null_mut(),
stack_map_lookup: None,
})?,
trampoline,
))
@@ -315,7 +315,7 @@ pub unsafe fn create_raw_function(
host_state,
interrupts: std::ptr::null(),
externref_activations_table: std::ptr::null_mut(),
stack_map_registry: std::ptr::null_mut(),
stack_map_lookup: None,
})?,
)
}