File tree Expand file tree Collapse file tree 3 files changed +15
-4
lines changed
Expand file tree Collapse file tree 3 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ class Wamr : public WasmVm {
9090 void terminate () override {}
9191 bool usesWasmByteOrder () override { return true ; }
9292
93- void warm () override {}
93+ void warm () override ;
9494
9595private:
9696 template <typename ... Args>
@@ -109,6 +109,9 @@ class Wamr : public WasmVm {
109109 void getModuleFunctionImpl (std::string_view function_name,
110110 std::function<R(ContextBase *, Args...)> *function);
111111
112+ // Initialize the Wamr store if necessary.
113+ void initStore ();
114+
112115 WasmStorePtr store_;
113116 WasmModulePtr module_;
114117 WasmSharedModulePtr shared_module_;
@@ -710,7 +713,7 @@ void Wamr::warm() { initStore(); }
710713
711714} // namespace wamr
712715
713- bool initWamrEngine () { return wamr::engine () != nullptr ; }
716+ bool initWamrEngine () { return wamr::engine () != nullptr ; }
714717
715718std::unique_ptr<WasmVm> createWamrVm () { return std::make_unique<wamr::Wamr>(); }
716719
Original file line number Diff line number Diff line change @@ -264,6 +264,9 @@ class WasmEdge : public WasmVm {
264264 };
265265 FOR_ALL_WASM_VM_EXPORTS (_GET_MODULE_FUNCTION)
266266#undef _GET_MODULE_FUNCTION
267+
268+ void warm () override ;
269+
267270private:
268271 template <typename ... Args>
269272 void registerHostFunctionImpl (std::string_view module_name, std::string_view function_name,
@@ -284,7 +287,8 @@ class WasmEdge : public WasmVm {
284287 void terminate () override {}
285288 bool usesWasmByteOrder () override { return true ; }
286289
287- void warm () override {}
290+ // Initialize the WasmEdge store if necessary.
291+ void initStore ();
288292
289293 WasmEdgeLoaderPtr loader_;
290294 WasmEdgeValidatorPtr validator_;
Original file line number Diff line number Diff line change @@ -80,6 +80,9 @@ class Wasmtime : public WasmVm {
8080 };
8181 FOR_ALL_WASM_VM_EXPORTS (_GET_MODULE_FUNCTION)
8282#undef _GET_MODULE_FUNCTION
83+
84+ void warm () override ;
85+
8386private:
8487 template <typename ... Args>
8588 void registerHostFunctionImpl (std::string_view module_name, std::string_view function_name,
@@ -100,7 +103,8 @@ class Wasmtime : public WasmVm {
100103 void terminate () override {}
101104 bool usesWasmByteOrder () override { return true ; }
102105
103- void warm () override {}
106+ // Initialize the Wasmtime store if necessary.
107+ void initStore ();
104108
105109 WasmStorePtr store_;
106110 WasmModulePtr module_;
You can’t perform that action at this time.
0 commit comments