File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -225,9 +225,6 @@ using HostModuleDataPtr = std::unique_ptr<HostModuleData>;
225225class WasmEdge : public WasmVm {
226226public:
227227 WasmEdge () {
228- loader_ = WasmEdge_LoaderCreate (nullptr );
229- validator_ = WasmEdge_ValidatorCreate (nullptr );
230- executor_ = WasmEdge_ExecutorCreate (nullptr , nullptr );
231228 store_ = nullptr ;
232229 ast_module_ = nullptr ;
233230 module_ = nullptr ;
@@ -324,6 +321,9 @@ void WasmEdge::initStore() {
324321 if (store_ != nullptr ) {
325322 return ;
326323 }
324+ loader_ = WasmEdge_LoaderCreate (nullptr );
325+ validator_ = WasmEdge_ValidatorCreate (nullptr );
326+ executor_ = WasmEdge_ExecutorCreate (nullptr , nullptr );
327327 store_ = WasmEdge_StoreCreate ();
328328}
329329
Original file line number Diff line number Diff line change @@ -55,10 +55,9 @@ TEST_P(TestVm, Init) {
5555 EXPECT_LE (warm, warm_time_ns_limit);
5656
5757 // Verify that getting a "warm" engine takes at least 50x less time than getting a "cold" one.
58- // We skip NullVM because warm() is a noop, and we skip wasmedge because its engine is initialized
59- // in the constructor vs. on cold start.
60- if (engine_ == " null" || engine_ == " wasmedge" ) {
61- std::cout << " Skipping warm() performance assertions for " << engine_ << " ." << std::endl;
58+ // We skip NullVM because warm() is a noop.
59+ if (engine_ == " null" ) {
60+ std::cout << " Skipping warm() performance assertions for NullVM." << std::endl;
6261 return ;
6362 }
6463 EXPECT_LE (warm * 50 , cold);
You can’t perform that action at this time.
0 commit comments