@@ -185,7 +185,7 @@ TEST(execute_call, call_indirect_imported_table)
185185 table_elements table{
186186 {{f3, out_i32}}, {{f2, out_i32}}, {{f1, out_i32}}, {{f4, out_i64}}, {{f5, out_i32}}};
187187
188- auto instance = instantiate (module , {}, {{&table, {5 , 20 }}});
188+ auto instance = instantiate (* module , {}, {{&table, {5 , 20 }}});
189189
190190 for (const auto param : {0u , 1u , 2u })
191191 {
@@ -275,7 +275,7 @@ TEST(execute_call, imported_function_call)
275275 constexpr auto host_foo = [](Instance&, span<const Value>, int ) { return Value{42 }; };
276276 const auto host_foo_type = module ->typesec [0 ];
277277
278- auto instance = instantiate (module , {{host_foo, host_foo_type}});
278+ auto instance = instantiate (* module , {{host_foo, host_foo_type}});
279279
280280 EXPECT_THAT (execute (*instance, 1 , {}), Result (42 ));
281281}
@@ -302,7 +302,7 @@ TEST(execute_call, imported_function_call_with_arguments)
302302 };
303303 const auto host_foo_type = module ->typesec [0 ];
304304
305- auto instance = instantiate (module , {{host_foo, host_foo_type}});
305+ auto instance = instantiate (* module , {{host_foo, host_foo_type}});
306306
307307 EXPECT_THAT (execute (*instance, 1 , {20 }), Result (42 ));
308308}
@@ -350,7 +350,7 @@ TEST(execute_call, imported_functions_call_indirect)
350350 return Value{(11 + uint64_t {x} / 11 ) / 2 };
351351 };
352352
353- auto instance = instantiate (module , {{sqr, module ->typesec [0 ]}, {isqrt, module ->typesec [0 ]}});
353+ auto instance = instantiate (* module , {{sqr, module ->typesec [0 ]}, {isqrt, module ->typesec [0 ]}});
354354 EXPECT_THAT (execute (*instance, 3 , {0 , 10 }), Result (20 )); // double(10)
355355 EXPECT_THAT (execute (*instance, 3 , {1 , 9 }), Result (81 )); // sqr(9)
356356 EXPECT_THAT (execute (*instance, 3 , {2 , 50 }), Result (7 )); // isqrt(50)
@@ -370,7 +370,7 @@ TEST(execute_call, imported_function_from_another_module)
370370 const auto bin1 = from_hex (
371371 " 0061736d0100000001070160027f7f017f030201000707010373756200000a09010700200020016b0b" );
372372 const auto module1 = parse (bin1);
373- auto instance1 = instantiate (module1);
373+ auto instance1 = instantiate (* module1);
374374
375375 /* wat2wasm
376376 (module
@@ -395,7 +395,7 @@ TEST(execute_call, imported_function_from_another_module)
395395 return fizzy::execute (*instance1, *func_idx, args.data ());
396396 };
397397
398- auto instance2 = instantiate (module2, {{sub, module1->typesec [0 ]}});
398+ auto instance2 = instantiate (* module2, {{sub, module1->typesec [0 ]}});
399399
400400 EXPECT_THAT (execute (*instance2, 1 , {44 , 2 }), Result (42 ));
401401}
@@ -416,7 +416,7 @@ TEST(execute_call, imported_table_from_another_module)
416416 " 0061736d0100000001070160027f7f017f030201000404017000010707010374616201000907010041000b0100"
417417 " 0a09010700200020016b0b" );
418418 const auto module1 = parse (bin1);
419- auto instance1 = instantiate (module1);
419+ auto instance1 = instantiate (* module1);
420420
421421 /* wat2wasm
422422 (module
@@ -438,7 +438,7 @@ TEST(execute_call, imported_table_from_another_module)
438438 const auto table = fizzy::find_exported_table (*instance1, " tab" );
439439 ASSERT_TRUE (table.has_value ());
440440
441- auto instance2 = instantiate (module2, {}, {*table});
441+ auto instance2 = instantiate (* module2, {}, {*table});
442442
443443 EXPECT_THAT (execute (*instance2, 0 , {44 , 2 }), Result (42 ));
444444}
@@ -460,7 +460,7 @@ TEST(execute_call, imported_table_modified_by_uninstantiable_module)
460460 " 0061736d0100000001070160027f7f017f030201000404017000010707010374616201000a0d010b0020002001"
461461 " 41001100000b" );
462462 const auto module1 = parse (bin1);
463- auto instance1 = instantiate (module1);
463+ auto instance1 = instantiate (* module1);
464464
465465 /* wat2wasm
466466 (module
@@ -483,7 +483,7 @@ TEST(execute_call, imported_table_modified_by_uninstantiable_module)
483483 ASSERT_TRUE (table.has_value ());
484484
485485 EXPECT_THROW_MESSAGE (
486- instantiate (module2, {}, {*table}), instantiate_error, " start function failed to execute" );
486+ instantiate (* module2, {}, {*table}), instantiate_error, " start function failed to execute" );
487487
488488 EXPECT_THAT (execute (*instance1, 0 , {44 , 2 }), Result (42 ));
489489}
@@ -531,7 +531,7 @@ TEST(execute_call, call_max_depth)
531531 const auto bin = from_hex (" 0061736d010000000105016000017f03030200000a0b020400412a0b040010000b" );
532532
533533 const auto module = parse (bin);
534- auto instance = instantiate (module );
534+ auto instance = instantiate (* module );
535535
536536 EXPECT_THAT (execute (*instance, 0 , {}, MaxDepth), Result (42 ));
537537 EXPECT_THAT (execute (*instance, 1 , {}, MaxDepth), Traps ());
@@ -574,7 +574,7 @@ TEST(execute_call, call_imported_infinite_recursion)
574574 };
575575 const auto host_foo_type = module ->typesec [0 ];
576576
577- auto instance = instantiate (module , {{host_foo, host_foo_type}});
577+ auto instance = instantiate (* module , {{host_foo, host_foo_type}});
578578
579579 EXPECT_THAT (execute (*instance, 0 , {}), Traps ());
580580}
@@ -598,7 +598,7 @@ TEST(execute_call, call_via_imported_infinite_recursion)
598598 };
599599 const auto host_foo_type = module ->typesec [0 ];
600600
601- auto instance = instantiate (module , {{host_foo, host_foo_type}});
601+ auto instance = instantiate (* module , {{host_foo, host_foo_type}});
602602
603603 EXPECT_THAT (execute (*instance, 1 , {}), Traps ());
604604}
@@ -618,7 +618,7 @@ TEST(execute_call, call_imported_max_depth_recursion)
618618 };
619619 const auto host_foo_type = module ->typesec [0 ];
620620
621- auto instance = instantiate (module , {{host_foo, host_foo_type}});
621+ auto instance = instantiate (* module , {{host_foo, host_foo_type}});
622622
623623 EXPECT_THAT (execute (*instance, 0 , {}), Result (uint32_t {1 }));
624624}
@@ -643,7 +643,7 @@ TEST(execute_call, call_via_imported_max_depth_recursion)
643643 };
644644 const auto host_foo_type = module ->typesec [0 ];
645645
646- auto instance = instantiate (module , {{host_foo, host_foo_type}});
646+ auto instance = instantiate (* module , {{host_foo, host_foo_type}});
647647
648648 EXPECT_THAT (execute (*instance, 1 , {}), Result (uint32_t {1 }));
649649}
@@ -664,7 +664,7 @@ TEST(execute_call, call_indirect_imported_table_infinite_recursion)
664664 " 0061736d010000000105016000017f030201000404017000020707010374616201000907010041000b01000a09"
665665 " 01070041011100000b" );
666666 const auto module1 = parse (bin1);
667- auto instance1 = instantiate (module1);
667+ auto instance1 = instantiate (* module1);
668668
669669 /* wat2wasm
670670 (module
@@ -684,7 +684,7 @@ TEST(execute_call, call_indirect_imported_table_infinite_recursion)
684684 const auto table = fizzy::find_exported_table (*instance1, " tab" );
685685 ASSERT_TRUE (table.has_value ());
686686
687- auto instance2 = instantiate (module2, {}, {*table});
687+ auto instance2 = instantiate (* module2, {}, {*table});
688688
689689 EXPECT_THAT (execute (*instance1, 0 , {}), Traps ());
690690}
@@ -708,6 +708,6 @@ TEST(execute_call, drop_call_result)
708708 EXPECT_EQ (module ->codesec [0 ].max_stack_height , 1 );
709709 EXPECT_EQ (module ->codesec [1 ].max_stack_height , 1 );
710710 const auto func_idx = find_exported_function (*module , " drop_call_result" );
711- auto instance = instantiate (module );
711+ auto instance = instantiate (* module );
712712 EXPECT_THAT (fizzy::execute (*instance, *func_idx, {}), Result ());
713713}
0 commit comments