Commit 669fd684 authored by Zhi An Ng's avatar Zhi An Ng Committed by Commit Bot

[cleanup] Remove DISALLOW_COPY_AND_ASSIGN in torque/

Bug: v8:11074
Change-Id: Iab3ae7fc16f759e6c6d70234b558ecb0c465cce8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2525541Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71099}
parent 2c95775d
......@@ -47,6 +47,8 @@ class ContextualVariable {
DCHECK_EQ(this, Top());
Top() = previous_;
}
Scope(const Scope&) = delete;
Scope& operator=(const Scope&) = delete;
VarType& Value() { return value_; }
......@@ -58,7 +60,6 @@ class ContextualVariable {
"Curiously Recurring Template Pattern");
DISALLOW_NEW_AND_DELETE()
DISALLOW_COPY_AND_ASSIGN(Scope);
};
// Access the most recent active {Scope}. There has to be an active {Scope}
......
......@@ -167,6 +167,8 @@ class ParseResultIterator {
// Check that all parse results have been used.
CHECK_EQ(results_.size(), i_);
}
ParseResultIterator(const ParseResultIterator&) = delete;
ParseResultIterator& operator=(const ParseResultIterator&) = delete;
ParseResult Next() {
CHECK_LT(i_, results_.size());
......@@ -184,8 +186,6 @@ class ParseResultIterator {
std::vector<ParseResult> results_;
size_t i_ = 0;
MatchedInput matched_input_;
DISALLOW_COPY_AND_ASSIGN(ParseResultIterator);
};
struct LexerResult {
......@@ -251,6 +251,10 @@ class Symbol {
Symbol() : Symbol({}) {}
Symbol(std::initializer_list<Rule> rules) { *this = rules; }
// Disallow copying and moving to ensure Symbol has a stable address.
Symbol(const Symbol&) = delete;
Symbol& operator=(const Symbol&) = delete;
V8_EXPORT_PRIVATE Symbol& operator=(std::initializer_list<Rule> rules);
bool IsTerminal() const { return rules_.empty(); }
......@@ -267,9 +271,6 @@ class Symbol {
private:
std::vector<std::unique_ptr<Rule>> rules_;
// Disallow copying and moving to ensure Symbol has a stable address.
DISALLOW_COPY_AND_ASSIGN(Symbol);
};
// Items are the core datastructure of Earley's algorithm.
......
......@@ -278,6 +278,8 @@ class Binding : public T {
manager_->current_bindings_[name_] = previous_binding_;
}
Binding(const Binding&) = delete;
Binding& operator=(const Binding&) = delete;
std::string BindingTypeString() const;
bool CheckWritten() const;
......@@ -300,7 +302,6 @@ class Binding : public T {
SourcePosition declaration_position_ = CurrentSourcePosition::Get();
bool used_;
bool written_;
DISALLOW_COPY_AND_ASSIGN(Binding);
};
template <class T>
......
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