@@ -258,7 +258,7 @@ struct Wavm : public WasmVm {
258
258
std::map<std::string, Intrinsics::Module> intrinsic_modules_;
259
259
std::map<std::string, WAVM::Runtime::GCPointer<WAVM::Runtime::Instance>>
260
260
intrinsic_module_instances_;
261
- std::vector<std::unique_ptr<Intrinsics::Function>> envoyFunctions_ ;
261
+ std::vector<std::unique_ptr<Intrinsics::Function>> host_functions_ ;
262
262
uint8_t *memory_base_ = nullptr ;
263
263
AbiVersion abi_version_ = AbiVersion::Unknown;
264
264
};
@@ -268,7 +268,7 @@ Wavm::~Wavm() {
268
268
context_ = nullptr ;
269
269
intrinsic_module_instances_.clear ();
270
270
intrinsic_modules_.clear ();
271
- envoyFunctions_ .clear ();
271
+ host_functions_ .clear ();
272
272
if (compartment_) {
273
273
ASSERT (tryCollectCompartment (std::move (compartment_)));
274
274
}
@@ -415,7 +415,7 @@ std::string_view Wavm::getPrecompiledSectionName() { return "wavm.precompiled_ob
415
415
std::unique_ptr<WasmVm> createWavmVm () { return std::make_unique<proxy_wasm::Wavm::Wavm>(); }
416
416
417
417
template <typename R, typename ... Args>
418
- IR::FunctionType inferEnvoyFunctionType (R (*)(void *, Args...)) {
418
+ IR::FunctionType inferHostFunctionType (R (*)(void *, Args...)) {
419
419
return IR::FunctionType (IR::inferResultType<R>(), IR::TypeTuple ({IR::inferValueType<Args>()...}),
420
420
IR::CallingConvention::intrinsic);
421
421
}
@@ -426,9 +426,9 @@ template <typename R, typename... Args>
426
426
void registerCallbackWavm (WasmVm *vm, std::string_view module_name, std::string_view function_name,
427
427
R (*f)(Args...)) {
428
428
auto wavm = static_cast <proxy_wasm::Wavm::Wavm *>(vm);
429
- wavm->envoyFunctions_ .emplace_back (new Intrinsics::Function (
429
+ wavm->host_functions_ .emplace_back (new Intrinsics::Function (
430
430
&wavm->intrinsic_modules_ [std::string (module_name)], function_name.data (),
431
- reinterpret_cast <void *>(f), inferEnvoyFunctionType (f)));
431
+ reinterpret_cast <void *>(f), inferHostFunctionType (f)));
432
432
}
433
433
434
434
template void registerCallbackWavm<void , void *>(WasmVm *vm, std::string_view module_name,
0 commit comments