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 {
90
90
void terminate () override {}
91
91
bool usesWasmByteOrder () override { return true ; }
92
92
93
- void warm () override {}
93
+ void warm () override ;
94
94
95
95
private:
96
96
template <typename ... Args>
@@ -109,6 +109,9 @@ class Wamr : public WasmVm {
109
109
void getModuleFunctionImpl (std::string_view function_name,
110
110
std::function<R(ContextBase *, Args...)> *function);
111
111
112
+ // Initialize the Wamr store if necessary.
113
+ void initStore ();
114
+
112
115
WasmStorePtr store_;
113
116
WasmModulePtr module_;
114
117
WasmSharedModulePtr shared_module_;
@@ -710,7 +713,7 @@ void Wamr::warm() { initStore(); }
710
713
711
714
} // namespace wamr
712
715
713
- bool initWamrEngine () { return wamr::engine () != nullptr ; }
716
+ bool initWamrEngine () { return wamr::engine () != nullptr ; }
714
717
715
718
std::unique_ptr<WasmVm> createWamrVm () { return std::make_unique<wamr::Wamr>(); }
716
719
Original file line number Diff line number Diff line change @@ -264,6 +264,9 @@ class WasmEdge : public WasmVm {
264
264
};
265
265
FOR_ALL_WASM_VM_EXPORTS (_GET_MODULE_FUNCTION)
266
266
#undef _GET_MODULE_FUNCTION
267
+
268
+ void warm () override ;
269
+
267
270
private:
268
271
template <typename ... Args>
269
272
void registerHostFunctionImpl (std::string_view module_name, std::string_view function_name,
@@ -284,7 +287,8 @@ class WasmEdge : public WasmVm {
284
287
void terminate () override {}
285
288
bool usesWasmByteOrder () override { return true ; }
286
289
287
- void warm () override {}
290
+ // Initialize the WasmEdge store if necessary.
291
+ void initStore ();
288
292
289
293
WasmEdgeLoaderPtr loader_;
290
294
WasmEdgeValidatorPtr validator_;
Original file line number Diff line number Diff line change @@ -80,6 +80,9 @@ class Wasmtime : public WasmVm {
80
80
};
81
81
FOR_ALL_WASM_VM_EXPORTS (_GET_MODULE_FUNCTION)
82
82
#undef _GET_MODULE_FUNCTION
83
+
84
+ void warm () override ;
85
+
83
86
private:
84
87
template <typename ... Args>
85
88
void registerHostFunctionImpl (std::string_view module_name, std::string_view function_name,
@@ -100,7 +103,8 @@ class Wasmtime : public WasmVm {
100
103
void terminate () override {}
101
104
bool usesWasmByteOrder () override { return true ; }
102
105
103
- void warm () override {}
106
+ // Initialize the Wasmtime store if necessary.
107
+ void initStore ();
104
108
105
109
WasmStorePtr store_;
106
110
WasmModulePtr module_;
You can’t perform that action at this time.
0 commit comments