diff --git a/crates/cli-support/src/js.rs b/crates/cli-support/src/js.rs index 3a30d0324..10f3c62a7 100644 --- a/crates/cli-support/src/js.rs +++ b/crates/cli-support/src/js.rs @@ -1439,7 +1439,13 @@ impl<'a, 'b> SubContext<'a, 'b> { format!("getObject(arg{})", i) } shared::TYPE_STACK_FUNC0 | - shared::TYPE_STACK_FUNC1 => { + shared::TYPE_STACK_FUNC1 | + shared::TYPE_STACK_FUNC2 | + shared::TYPE_STACK_FUNC3 | + shared::TYPE_STACK_FUNC4 | + shared::TYPE_STACK_FUNC5 | + shared::TYPE_STACK_FUNC6 | + shared::TYPE_STACK_FUNC7 => { let nargs = *arg - shared::TYPE_STACK_FUNC0; let args = (0..nargs) .map(|i| format!("arg{}", i)) diff --git a/crates/shared/src/lib.rs b/crates/shared/src/lib.rs index 87b56c6a6..3c0a1b762 100644 --- a/crates/shared/src/lib.rs +++ b/crates/shared/src/lib.rs @@ -148,8 +148,14 @@ pub const TYPE_JS_OWNED: u32 = 22; pub const TYPE_JS_REF: u32 = 23; pub const TYPE_STACK_FUNC0: u32 = 24; pub const TYPE_STACK_FUNC1: u32 = 25; +pub const TYPE_STACK_FUNC2: u32 = 26; +pub const TYPE_STACK_FUNC3: u32 = 27; +pub const TYPE_STACK_FUNC4: u32 = 28; +pub const TYPE_STACK_FUNC5: u32 = 29; +pub const TYPE_STACK_FUNC6: u32 = 30; +pub const TYPE_STACK_FUNC7: u32 = 31; -pub const TYPE_CUSTOM_START: u32 = 26; +pub const TYPE_CUSTOM_START: u32 = 32; pub const TYPE_CUSTOM_REF_FLAG: u32 = 1; pub fn name_to_descriptor(name: &str) -> u32 { diff --git a/src/convert.rs b/src/convert.rs index 07866e6d0..3e4862349 100644 --- a/src/convert.rs +++ b/src/convert.rs @@ -23,6 +23,12 @@ pub const DESCRIPTOR_JS_REF: Descriptor = Descriptor { __x: *b" 23", }; pub const DESCRIPTOR_STACK_FUNC0: Descriptor = Descriptor { __x: *b" 24", }; pub const DESCRIPTOR_STACK_FUNC1: Descriptor = Descriptor { __x: *b" 25", }; +pub const DESCRIPTOR_STACK_FUNC2: Descriptor = Descriptor { __x: *b" 26", }; +pub const DESCRIPTOR_STACK_FUNC3: Descriptor = Descriptor { __x: *b" 27", }; +pub const DESCRIPTOR_STACK_FUNC4: Descriptor = Descriptor { __x: *b" 28", }; +pub const DESCRIPTOR_STACK_FUNC5: Descriptor = Descriptor { __x: *b" 29", }; +pub const DESCRIPTOR_STACK_FUNC6: Descriptor = Descriptor { __x: *b" 30", }; +pub const DESCRIPTOR_STACK_FUNC7: Descriptor = Descriptor { __x: *b" 31", }; pub trait WasmBoundary { type Abi: WasmAbi; @@ -407,4 +413,10 @@ macro_rules! stack_closures { stack_closures! { () => DESCRIPTOR_STACK_FUNC0 (A) => DESCRIPTOR_STACK_FUNC1 + (A B) => DESCRIPTOR_STACK_FUNC2 + (A B C) => DESCRIPTOR_STACK_FUNC3 + (A B C D) => DESCRIPTOR_STACK_FUNC4 + (A B C D E) => DESCRIPTOR_STACK_FUNC5 + (A B C D E F) => DESCRIPTOR_STACK_FUNC6 + (A B C D E F G) => DESCRIPTOR_STACK_FUNC7 }