@@ -213,7 +213,7 @@ TEST(execute_call_depth, call_host_function_calling_wasm_function_inclusive)
213
213
constexpr auto host_f = [](std::any&, Instance& instance, const Value*,
214
214
ExecutionContext& ctx) noexcept {
215
215
recorded_depth = ctx.depth ;
216
- const auto ctx_guard = ctx.increment_call_depth ();
216
+ const auto ctx_guard = ctx.allocate_stack_space ();
217
217
return fizzy::execute (instance, 2 /* $leaf */ , {}, ctx);
218
218
};
219
219
@@ -304,7 +304,7 @@ TEST(execute_call_depth, call_host_function_calling_another_wasm_module)
304
304
ExecutionContext& ctx) noexcept {
305
305
recorded_depth = ctx.depth ;
306
306
auto instance = *std::any_cast<Instance*>(&host_context);
307
- const auto ctx_guard = ctx.increment_call_depth ();
307
+ const auto ctx_guard = ctx.allocate_stack_space ();
308
308
return fizzy::execute (*instance, 0 , {}, ctx);
309
309
};
310
310
@@ -466,7 +466,7 @@ TEST(execute_call_depth, execute_host_function_within_wasm_recursion_limit)
466
466
constexpr auto host_f = [](std::any&, Instance& instance, const Value*,
467
467
ExecutionContext& ctx) noexcept {
468
468
max_recorded_wasm_recursion_depth = std::max (max_recorded_wasm_recursion_depth, ctx.depth );
469
- const auto ctx_guard = ctx.increment_call_depth ();
469
+ const auto ctx_guard = ctx.allocate_stack_space ();
470
470
return fizzy::execute (instance, 0 , {}, ctx);
471
471
};
472
472
@@ -537,7 +537,7 @@ TEST(execute_call, call_host_function_calling_wasm_interleaved_infinite_recursio
537
537
ExecutionContext& ctx) noexcept {
538
538
EXPECT_LT (ctx.depth , DepthLimit);
539
539
++counter;
540
- const auto ctx_guard = ctx.increment_call_depth ();
540
+ const auto ctx_guard = ctx.allocate_stack_space ();
541
541
return fizzy::execute (instance, 1 , {}, ctx);
542
542
};
543
543
0 commit comments