Commit cbb400a7 authored by Florian Sattler's avatar Florian Sattler Committed by Commit Bot

[cleanup] Refactor wasm to use default members.

Fixing clang-tidy warning.

Bug: v8:8015
Change-Id: Ib3b6bdeb404ed6fe9c69107b4683a99c96dd8352
Reviewed-on: https://chromium-review.googlesource.com/1224053Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Florian Sattler <sattlerf@google.com>
Cr-Commit-Position: refs/heads/master@{#55866}
parent 49d1c866
......@@ -56,7 +56,7 @@ class Decoder {
DCHECK_EQ(static_cast<uint32_t>(end - start), end - start);
}
virtual ~Decoder() {}
virtual ~Decoder() = default;
inline bool validate_size(const byte* pc, uint32_t length, const char* msg) {
DCHECK_LE(start_, pc);
......
......@@ -69,7 +69,7 @@ WasmCompilationUnit::WasmCompilationUnit(WasmEngine* wasm_engine,
// Declared here such that {LiftoffCompilationUnit} and
// {TurbofanWasmCompilationUnit} can be opaque in the header file.
WasmCompilationUnit::~WasmCompilationUnit() {}
WasmCompilationUnit::~WasmCompilationUnit() = default;
void WasmCompilationUnit::ExecuteCompilation(WasmFeatures* detected) {
auto size_histogram = SELECT_WASM_COUNTER(counters_, env_->module->origin,
......
......@@ -2262,7 +2262,7 @@ void AsyncCompileJob::AsyncCompileSucceeded(Handle<WasmModuleObject> result) {
// task) and schedule the next step(s), if any.
class AsyncCompileJob::CompileStep {
public:
virtual ~CompileStep() {}
virtual ~CompileStep() = default;
void Run(bool on_foreground) {
if (on_foreground) {
......
......@@ -30,14 +30,14 @@ class V8_EXPORT_PRIVATE CompilationResultResolver {
public:
virtual void OnCompilationSucceeded(Handle<WasmModuleObject> result) = 0;
virtual void OnCompilationFailed(Handle<Object> error_reason) = 0;
virtual ~CompilationResultResolver() {}
virtual ~CompilationResultResolver() = default;
};
class V8_EXPORT_PRIVATE InstantiationResultResolver {
public:
virtual void OnInstantiationSucceeded(Handle<WasmInstanceObject> result) = 0;
virtual void OnInstantiationFailed(Handle<Object> error_reason) = 0;
virtual ~InstantiationResultResolver() {}
virtual ~InstantiationResultResolver() = default;
};
// The central data structure that represents an engine instance capable of
......
......@@ -19,7 +19,7 @@ namespace wasm {
class WasmMemoryTracker {
public:
WasmMemoryTracker() {}
WasmMemoryTracker() = default;
~WasmMemoryTracker();
// ReserveAddressSpace attempts to increase the reserved address space counter
......
......@@ -453,7 +453,7 @@ WasmFunctionCompiler::WasmFunctionCompiler(Zone* zone, FunctionSig* sig,
function_ = builder_->GetFunctionAt(index);
}
WasmFunctionCompiler::~WasmFunctionCompiler() {}
WasmFunctionCompiler::~WasmFunctionCompiler() = default;
FunctionSig* WasmRunnerBase::CreateSig(MachineType return_type,
Vector<MachineType> param_types) {
......
......@@ -2130,7 +2130,7 @@ TEST_F(WasmModuleVerifyTest, Regression684855) {
class WasmInitExprDecodeTest : public TestWithZone {
public:
WasmInitExprDecodeTest() {}
WasmInitExprDecodeTest() = default;
WasmFeatures enabled_features_;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment