mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 15:51:12 +00:00
Wasm: fix test_wrapper function index
This commit is contained in:
parent
b46124234f
commit
535927a85e
1 changed files with 3 additions and 2 deletions
|
@ -14,8 +14,9 @@ pub trait Wasm32TestResult {
|
||||||
wrapper_name: &str,
|
wrapper_name: &str,
|
||||||
main_function_index: u32,
|
main_function_index: u32,
|
||||||
) {
|
) {
|
||||||
// Assumes the main function was the first one to be generated
|
let index = module.import.function_count()
|
||||||
let index = main_function_index + module.code.code_builders.len() as u32;
|
+ module.code.preloaded_count
|
||||||
|
+ module.code.code_builders.len() as u32;
|
||||||
|
|
||||||
module.add_function_signature(Signature {
|
module.add_function_signature(Signature {
|
||||||
param_types: Vec::with_capacity_in(0, arena),
|
param_types: Vec::with_capacity_in(0, arena),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue