Index: test/unittests/wasm/ast-decoder-unittest.cc |
diff --git a/test/unittests/wasm/ast-decoder-unittest.cc b/test/unittests/wasm/ast-decoder-unittest.cc |
index 672158714af3ab7695fc67063e7ea22657e918e0..0d0449b205965a109ad8857ff3aaee95c5bd4cb0 100644 |
--- a/test/unittests/wasm/ast-decoder-unittest.cc |
+++ b/test/unittests/wasm/ast-decoder-unittest.cc |
@@ -1189,30 +1189,26 @@ class TestModuleEnv : public ModuleEnv { |
instance = nullptr; |
module = &mod; |
linker = nullptr; |
- mod.globals = new std::vector<WasmGlobal>; |
- mod.signatures = new std::vector<FunctionSig*>; |
- mod.functions = new std::vector<WasmFunction>; |
- mod.import_table = new std::vector<WasmImport>; |
} |
byte AddGlobal(MachineType mem_type) { |
- mod.globals->push_back({0, mem_type, 0, false}); |
- CHECK(mod.globals->size() <= 127); |
- return static_cast<byte>(mod.globals->size() - 1); |
+ mod.globals.push_back({0, mem_type, 0, false}); |
+ CHECK(mod.globals.size() <= 127); |
+ return static_cast<byte>(mod.globals.size() - 1); |
} |
byte AddSignature(FunctionSig* sig) { |
- mod.signatures->push_back(sig); |
- CHECK(mod.signatures->size() <= 127); |
- return static_cast<byte>(mod.signatures->size() - 1); |
+ mod.signatures.push_back(sig); |
+ CHECK(mod.signatures.size() <= 127); |
+ return static_cast<byte>(mod.signatures.size() - 1); |
} |
byte AddFunction(FunctionSig* sig) { |
- mod.functions->push_back({sig, 0, 0, 0, 0, 0, 0, 0, false, false}); |
- CHECK(mod.functions->size() <= 127); |
- return static_cast<byte>(mod.functions->size() - 1); |
+ mod.functions.push_back({sig, 0, 0, 0, 0, 0, 0, 0, false, false}); |
+ CHECK(mod.functions.size() <= 127); |
+ return static_cast<byte>(mod.functions.size() - 1); |
} |
byte AddImport(FunctionSig* sig) { |
- mod.import_table->push_back({sig, 0, 0}); |
- CHECK(mod.import_table->size() <= 127); |
- return static_cast<byte>(mod.import_table->size() - 1); |
+ mod.import_table.push_back({sig, 0, 0}); |
+ CHECK(mod.import_table.size() <= 127); |
+ return static_cast<byte>(mod.import_table.size() - 1); |
} |
private: |