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

[cleanup] Refactor regexp profiler to use default members.

Fixing clang-tidy warning.

Bug: v8:8015
Change-Id: If912b9d43f577ca3e9f3b8b27acf957c49e269dc
Reviewed-on: https://chromium-review.googlesource.com/1224113Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
Commit-Queue: Florian Sattler <sattlerf@google.com>
Cr-Commit-Position: refs/heads/master@{#55979}
parent 4703805b
......@@ -2168,10 +2168,7 @@ static void EmitCharClass(RegExpMacroAssembler* macro_assembler,
macro_assembler->Bind(&fall_through);
}
RegExpNode::~RegExpNode() {
}
RegExpNode::~RegExpNode() = default;
RegExpNode::LimitResult RegExpNode::LimitVersions(RegExpCompiler* compiler,
Trace* trace) {
......
......@@ -1398,7 +1398,7 @@ struct PreloadState {
class NodeVisitor {
public:
virtual ~NodeVisitor() { }
virtual ~NodeVisitor() = default;
#define DECLARE_VISIT(Type) \
virtual void Visit##Type(Type##Node* that) = 0;
FOR_EACH_NODE_TYPE(DECLARE_VISIT)
......
......@@ -39,7 +39,7 @@ class RegExpTree;
class RegExpVisitor {
public:
virtual ~RegExpVisitor() {}
virtual ~RegExpVisitor() = default;
#define MAKE_CASE(Name) \
virtual void* Visit##Name(RegExp##Name*, void* data) = 0;
FOR_EACH_REG_EXP_TREE_TYPE(MAKE_CASE)
......@@ -195,7 +195,7 @@ class TextElement final {
class RegExpTree : public ZoneObject {
public:
static const int kInfinity = kMaxInt;
virtual ~RegExpTree() {}
virtual ~RegExpTree() = default;
virtual void* Accept(RegExpVisitor* visitor, void* data) = 0;
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
RegExpNode* on_success) = 0;
......@@ -577,7 +577,7 @@ class RegExpBackReference final : public RegExpTree {
class RegExpEmpty final : public RegExpTree {
public:
RegExpEmpty() {}
RegExpEmpty() = default;
void* Accept(RegExpVisitor* visitor, void* data) override;
RegExpNode* ToNode(RegExpCompiler* compiler, RegExpNode* on_success) override;
RegExpEmpty* AsEmpty() override;
......
......@@ -20,10 +20,7 @@ RegExpMacroAssemblerTracer::RegExpMacroAssemblerTracer(
PrintF("RegExpMacroAssembler%s();\n", impl_names[type]);
}
RegExpMacroAssemblerTracer::~RegExpMacroAssemblerTracer() {
}
RegExpMacroAssemblerTracer::~RegExpMacroAssemblerTracer() = default;
void RegExpMacroAssemblerTracer::AbortedCodeGeneration() {
PrintF(" AbortedCodeGeneration\n");
......
......@@ -23,10 +23,7 @@ RegExpMacroAssembler::RegExpMacroAssembler(Isolate* isolate, Zone* zone)
isolate_(isolate),
zone_(zone) {}
RegExpMacroAssembler::~RegExpMacroAssembler() {
}
RegExpMacroAssembler::~RegExpMacroAssembler() = default;
int RegExpMacroAssembler::CaseInsensitiveCompareUC16(Address byte_offset1,
Address byte_offset2,
......@@ -117,10 +114,7 @@ NativeRegExpMacroAssembler::NativeRegExpMacroAssembler(Isolate* isolate,
Zone* zone)
: RegExpMacroAssembler(isolate, zone) {}
NativeRegExpMacroAssembler::~NativeRegExpMacroAssembler() {
}
NativeRegExpMacroAssembler::~NativeRegExpMacroAssembler() = default;
bool NativeRegExpMacroAssembler::CanReadUnaligned() {
return FLAG_enable_regexp_unaligned_accesses && !slow_safe();
......
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