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 {
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:
friend class BytecodeAssembler;
......@@ -204,10 +209,6 @@ struct Label {
int unbound_patch_list_begin_ = -1;
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 {
......
......@@ -1777,10 +1777,11 @@ class LoopInitializationMarker {
DCHECK(node_->traversed_loop_initialization_node_);
node_->traversed_loop_initialization_node_ = false;
}
LoopInitializationMarker(const LoopInitializationMarker&) = delete;
LoopInitializationMarker& operator=(const LoopInitializationMarker&) = delete;
private:
LoopChoiceNode* node_;
DISALLOW_COPY_AND_ASSIGN(LoopInitializationMarker);
};
// Temporarily decrements min_loop_iterations_.
......@@ -1791,10 +1792,11 @@ class IterationDecrementer {
--node_->min_loop_iterations_;
}
~IterationDecrementer() { ++node_->min_loop_iterations_; }
IterationDecrementer(const IterationDecrementer&) = delete;
IterationDecrementer& operator=(const IterationDecrementer&) = delete;
private:
LoopChoiceNode* node_;
DISALLOW_COPY_AND_ASSIGN(IterationDecrementer);
};
RegExpNode* SeqRegExpNode::FilterOneByte(int depth) {
......
......@@ -125,6 +125,8 @@ uint32_t LoadPacked24Unsigned(int32_t bytecode_and_packed_arg) {
class BacktrackStack {
public:
BacktrackStack() = default;
BacktrackStack(const BacktrackStack&) = delete;
BacktrackStack& operator=(const BacktrackStack&) = delete;
V8_WARN_UNUSED_RESULT bool push(int v) {
data_.emplace_back(v);
......@@ -157,8 +159,6 @@ class BacktrackStack {
static constexpr int kMaxSize =
RegExpStack::kMaximumStackSize / sizeof(ValueT);
DISALLOW_COPY_AND_ASSIGN(BacktrackStack);
};
// Registers used during interpreter execution. These consist of output
......
......@@ -26,13 +26,13 @@ class RegExpStackScope {
// Initializes the stack memory area if necessary.
explicit RegExpStackScope(Isolate* isolate);
~RegExpStackScope(); // Releases the stack if it has grown.
RegExpStackScope(const RegExpStackScope&) = delete;
RegExpStackScope& operator=(const RegExpStackScope&) = delete;
RegExpStack* stack() const { return regexp_stack_; }
private:
RegExpStack* regexp_stack_;
DISALLOW_COPY_AND_ASSIGN(RegExpStackScope);
};
......@@ -40,6 +40,8 @@ class RegExpStack {
public:
RegExpStack();
~RegExpStack();
RegExpStack(const RegExpStack&) = delete;
RegExpStack& operator=(const RegExpStack&) = delete;
// Number of allocated locations on the stack below the limit.
// No sequence of pushes must be longer that this without doing a stack-limit
......@@ -138,8 +140,6 @@ class RegExpStack {
friend class ExternalReference;
friend class Isolate;
friend class RegExpStackScope;
DISALLOW_COPY_AND_ASSIGN(RegExpStack);
};
} // 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