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, ...@@ -2168,10 +2168,7 @@ static void EmitCharClass(RegExpMacroAssembler* macro_assembler,
macro_assembler->Bind(&fall_through); macro_assembler->Bind(&fall_through);
} }
RegExpNode::~RegExpNode() = default;
RegExpNode::~RegExpNode() {
}
RegExpNode::LimitResult RegExpNode::LimitVersions(RegExpCompiler* compiler, RegExpNode::LimitResult RegExpNode::LimitVersions(RegExpCompiler* compiler,
Trace* trace) { Trace* trace) {
......
...@@ -1398,7 +1398,7 @@ struct PreloadState { ...@@ -1398,7 +1398,7 @@ struct PreloadState {
class NodeVisitor { class NodeVisitor {
public: public:
virtual ~NodeVisitor() { } virtual ~NodeVisitor() = default;
#define DECLARE_VISIT(Type) \ #define DECLARE_VISIT(Type) \
virtual void Visit##Type(Type##Node* that) = 0; virtual void Visit##Type(Type##Node* that) = 0;
FOR_EACH_NODE_TYPE(DECLARE_VISIT) FOR_EACH_NODE_TYPE(DECLARE_VISIT)
......
...@@ -39,7 +39,7 @@ class RegExpTree; ...@@ -39,7 +39,7 @@ class RegExpTree;
class RegExpVisitor { class RegExpVisitor {
public: public:
virtual ~RegExpVisitor() {} virtual ~RegExpVisitor() = default;
#define MAKE_CASE(Name) \ #define MAKE_CASE(Name) \
virtual void* Visit##Name(RegExp##Name*, void* data) = 0; virtual void* Visit##Name(RegExp##Name*, void* data) = 0;
FOR_EACH_REG_EXP_TREE_TYPE(MAKE_CASE) FOR_EACH_REG_EXP_TREE_TYPE(MAKE_CASE)
...@@ -195,7 +195,7 @@ class TextElement final { ...@@ -195,7 +195,7 @@ class TextElement final {
class RegExpTree : public ZoneObject { class RegExpTree : public ZoneObject {
public: public:
static const int kInfinity = kMaxInt; static const int kInfinity = kMaxInt;
virtual ~RegExpTree() {} virtual ~RegExpTree() = default;
virtual void* Accept(RegExpVisitor* visitor, void* data) = 0; virtual void* Accept(RegExpVisitor* visitor, void* data) = 0;
virtual RegExpNode* ToNode(RegExpCompiler* compiler, virtual RegExpNode* ToNode(RegExpCompiler* compiler,
RegExpNode* on_success) = 0; RegExpNode* on_success) = 0;
...@@ -577,7 +577,7 @@ class RegExpBackReference final : public RegExpTree { ...@@ -577,7 +577,7 @@ class RegExpBackReference final : public RegExpTree {
class RegExpEmpty final : public RegExpTree { class RegExpEmpty final : public RegExpTree {
public: public:
RegExpEmpty() {} RegExpEmpty() = default;
void* Accept(RegExpVisitor* visitor, void* data) override; void* Accept(RegExpVisitor* visitor, void* data) override;
RegExpNode* ToNode(RegExpCompiler* compiler, RegExpNode* on_success) override; RegExpNode* ToNode(RegExpCompiler* compiler, RegExpNode* on_success) override;
RegExpEmpty* AsEmpty() override; RegExpEmpty* AsEmpty() override;
......
...@@ -20,10 +20,7 @@ RegExpMacroAssemblerTracer::RegExpMacroAssemblerTracer( ...@@ -20,10 +20,7 @@ RegExpMacroAssemblerTracer::RegExpMacroAssemblerTracer(
PrintF("RegExpMacroAssembler%s();\n", impl_names[type]); PrintF("RegExpMacroAssembler%s();\n", impl_names[type]);
} }
RegExpMacroAssemblerTracer::~RegExpMacroAssemblerTracer() = default;
RegExpMacroAssemblerTracer::~RegExpMacroAssemblerTracer() {
}
void RegExpMacroAssemblerTracer::AbortedCodeGeneration() { void RegExpMacroAssemblerTracer::AbortedCodeGeneration() {
PrintF(" AbortedCodeGeneration\n"); PrintF(" AbortedCodeGeneration\n");
......
...@@ -23,10 +23,7 @@ RegExpMacroAssembler::RegExpMacroAssembler(Isolate* isolate, Zone* zone) ...@@ -23,10 +23,7 @@ RegExpMacroAssembler::RegExpMacroAssembler(Isolate* isolate, Zone* zone)
isolate_(isolate), isolate_(isolate),
zone_(zone) {} zone_(zone) {}
RegExpMacroAssembler::~RegExpMacroAssembler() = default;
RegExpMacroAssembler::~RegExpMacroAssembler() {
}
int RegExpMacroAssembler::CaseInsensitiveCompareUC16(Address byte_offset1, int RegExpMacroAssembler::CaseInsensitiveCompareUC16(Address byte_offset1,
Address byte_offset2, Address byte_offset2,
...@@ -117,10 +114,7 @@ NativeRegExpMacroAssembler::NativeRegExpMacroAssembler(Isolate* isolate, ...@@ -117,10 +114,7 @@ NativeRegExpMacroAssembler::NativeRegExpMacroAssembler(Isolate* isolate,
Zone* zone) Zone* zone)
: RegExpMacroAssembler(isolate, zone) {} : RegExpMacroAssembler(isolate, zone) {}
NativeRegExpMacroAssembler::~NativeRegExpMacroAssembler() = default;
NativeRegExpMacroAssembler::~NativeRegExpMacroAssembler() {
}
bool NativeRegExpMacroAssembler::CanReadUnaligned() { bool NativeRegExpMacroAssembler::CanReadUnaligned() {
return FLAG_enable_regexp_unaligned_accesses && !slow_safe(); 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