Commit b06f7da4 authored by Zhi An Ng's avatar Zhi An Ng Committed by Commit Bot

[cleanup] Remove DISALLOW_COPY_AND_ASSIGN in regexp/

Bug: v8:11074
Change-Id: I8deefa9cf5ac10b769e4ebb7029a82957cf669c3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2525540Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71029}
parent b5823ea7
...@@ -194,6 +194,11 @@ struct Label { ...@@ -194,6 +194,11 @@ struct Label {
DCHECK_GE(bound_index_, 0); DCHECK_GE(bound_index_, 0);
} }
// Don't copy, don't move. Moving could be implemented, but it's not
// needed anywhere.
Label(const Label&) = delete;
Label& operator=(const Label&) = delete;
private: private:
friend class BytecodeAssembler; friend class BytecodeAssembler;
...@@ -204,10 +209,6 @@ struct Label { ...@@ -204,10 +209,6 @@ struct Label {
int unbound_patch_list_begin_ = -1; int unbound_patch_list_begin_ = -1;
int bound_index_; int bound_index_;
}; };
// Don't copy, don't move. Moving could be implemented, but it's not
// needed anywhere.
DISALLOW_COPY_AND_ASSIGN(Label);
}; };
class BytecodeAssembler { class BytecodeAssembler {
......
...@@ -1777,10 +1777,11 @@ class LoopInitializationMarker { ...@@ -1777,10 +1777,11 @@ class LoopInitializationMarker {
DCHECK(node_->traversed_loop_initialization_node_); DCHECK(node_->traversed_loop_initialization_node_);
node_->traversed_loop_initialization_node_ = false; node_->traversed_loop_initialization_node_ = false;
} }
LoopInitializationMarker(const LoopInitializationMarker&) = delete;
LoopInitializationMarker& operator=(const LoopInitializationMarker&) = delete;
private: private:
LoopChoiceNode* node_; LoopChoiceNode* node_;
DISALLOW_COPY_AND_ASSIGN(LoopInitializationMarker);
}; };
// Temporarily decrements min_loop_iterations_. // Temporarily decrements min_loop_iterations_.
...@@ -1791,10 +1792,11 @@ class IterationDecrementer { ...@@ -1791,10 +1792,11 @@ class IterationDecrementer {
--node_->min_loop_iterations_; --node_->min_loop_iterations_;
} }
~IterationDecrementer() { ++node_->min_loop_iterations_; } ~IterationDecrementer() { ++node_->min_loop_iterations_; }
IterationDecrementer(const IterationDecrementer&) = delete;
IterationDecrementer& operator=(const IterationDecrementer&) = delete;
private: private:
LoopChoiceNode* node_; LoopChoiceNode* node_;
DISALLOW_COPY_AND_ASSIGN(IterationDecrementer);
}; };
RegExpNode* SeqRegExpNode::FilterOneByte(int depth) { RegExpNode* SeqRegExpNode::FilterOneByte(int depth) {
......
...@@ -125,6 +125,8 @@ uint32_t LoadPacked24Unsigned(int32_t bytecode_and_packed_arg) { ...@@ -125,6 +125,8 @@ uint32_t LoadPacked24Unsigned(int32_t bytecode_and_packed_arg) {
class BacktrackStack { class BacktrackStack {
public: public:
BacktrackStack() = default; BacktrackStack() = default;
BacktrackStack(const BacktrackStack&) = delete;
BacktrackStack& operator=(const BacktrackStack&) = delete;
V8_WARN_UNUSED_RESULT bool push(int v) { V8_WARN_UNUSED_RESULT bool push(int v) {
data_.emplace_back(v); data_.emplace_back(v);
...@@ -157,8 +159,6 @@ class BacktrackStack { ...@@ -157,8 +159,6 @@ class BacktrackStack {
static constexpr int kMaxSize = static constexpr int kMaxSize =
RegExpStack::kMaximumStackSize / sizeof(ValueT); RegExpStack::kMaximumStackSize / sizeof(ValueT);
DISALLOW_COPY_AND_ASSIGN(BacktrackStack);
}; };
// Registers used during interpreter execution. These consist of output // Registers used during interpreter execution. These consist of output
......
...@@ -26,13 +26,13 @@ class RegExpStackScope { ...@@ -26,13 +26,13 @@ class RegExpStackScope {
// Initializes the stack memory area if necessary. // Initializes the stack memory area if necessary.
explicit RegExpStackScope(Isolate* isolate); explicit RegExpStackScope(Isolate* isolate);
~RegExpStackScope(); // Releases the stack if it has grown. ~RegExpStackScope(); // Releases the stack if it has grown.
RegExpStackScope(const RegExpStackScope&) = delete;
RegExpStackScope& operator=(const RegExpStackScope&) = delete;
RegExpStack* stack() const { return regexp_stack_; } RegExpStack* stack() const { return regexp_stack_; }
private: private:
RegExpStack* regexp_stack_; RegExpStack* regexp_stack_;
DISALLOW_COPY_AND_ASSIGN(RegExpStackScope);
}; };
...@@ -40,6 +40,8 @@ class RegExpStack { ...@@ -40,6 +40,8 @@ class RegExpStack {
public: public:
RegExpStack(); RegExpStack();
~RegExpStack(); ~RegExpStack();
RegExpStack(const RegExpStack&) = delete;
RegExpStack& operator=(const RegExpStack&) = delete;
// Number of allocated locations on the stack below the limit. // Number of allocated locations on the stack below the limit.
// No sequence of pushes must be longer that this without doing a stack-limit // No sequence of pushes must be longer that this without doing a stack-limit
...@@ -138,8 +140,6 @@ class RegExpStack { ...@@ -138,8 +140,6 @@ class RegExpStack {
friend class ExternalReference; friend class ExternalReference;
friend class Isolate; friend class Isolate;
friend class RegExpStackScope; friend class RegExpStackScope;
DISALLOW_COPY_AND_ASSIGN(RegExpStack);
}; };
} // namespace internal } // namespace internal
......
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