Split out fiber stacks from fibers.
This commit splits out a `FiberStack` from `Fiber`, allowing the instance allocator trait to return `FiberStack` rather than raw stack pointers. This keeps the stack creation mostly in `wasmtime_fiber`, but now the on-demand instance allocator can make use of it. The instance allocators no longer have to return a "not supported" error to indicate that the store should allocate its own fiber stack. This includes a bunch of cleanup in the instance allocator to scope stacks to the new "async" feature in the runtime. Closes #2708.
This commit is contained in:
@@ -276,7 +276,7 @@ pub fn create_function(
|
||||
|
||||
unsafe {
|
||||
Ok((
|
||||
OnDemandInstanceAllocator::new(None).allocate(InstanceAllocationRequest {
|
||||
OnDemandInstanceAllocator::default().allocate(InstanceAllocationRequest {
|
||||
module: Arc::new(module),
|
||||
finished_functions: &finished_functions,
|
||||
imports: Imports::default(),
|
||||
@@ -308,7 +308,7 @@ pub unsafe fn create_raw_function(
|
||||
finished_functions.push(func);
|
||||
|
||||
Ok(
|
||||
OnDemandInstanceAllocator::new(None).allocate(InstanceAllocationRequest {
|
||||
OnDemandInstanceAllocator::default().allocate(InstanceAllocationRequest {
|
||||
module: Arc::new(module),
|
||||
finished_functions: &finished_functions,
|
||||
imports: Imports::default(),
|
||||
|
||||
Reference in New Issue
Block a user