Skip to content

Commit 2390090

Browse files
committed
Addressed test errors.
Signed-off-by: Rachel Green <[email protected]>
1 parent 15166fc commit 2390090

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

src/wamr/wamr.cc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff 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

9595
private:
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

715718
std::unique_ptr<WasmVm> createWamrVm() { return std::make_unique<wamr::Wamr>(); }
716719

src/wasmedge/wasmedge.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff 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+
267270
private:
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_;

src/wasmtime/wasmtime.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff 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+
8386
private:
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_;

0 commit comments

Comments
 (0)