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

[cleanup][diagnostics] Remove uses of DISALLOW_COPY_AND_ASSIGN

Bug: v8:11074
Change-Id: I478f4390523ddf7cfb87dd22cef5ed331be5c875
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2558267Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71468}
parent d0414e87
...@@ -54,6 +54,8 @@ class Decoder { ...@@ -54,6 +54,8 @@ class Decoder {
} }
~Decoder() {} ~Decoder() {}
Decoder(const Decoder&) = delete;
Decoder& operator=(const Decoder&) = delete;
// Writes one disassembled instruction into 'buffer' (0-terminated). // Writes one disassembled instruction into 'buffer' (0-terminated).
// Returns the length of the disassembled machine instruction in bytes. // Returns the length of the disassembled machine instruction in bytes.
...@@ -134,8 +136,6 @@ class Decoder { ...@@ -134,8 +136,6 @@ class Decoder {
const disasm::NameConverter& converter_; const disasm::NameConverter& converter_;
Vector<char> out_buffer_; Vector<char> out_buffer_;
int out_buffer_pos_; int out_buffer_pos_;
DISALLOW_COPY_AND_ASSIGN(Decoder);
}; };
// Support for assertions in the Decoder formatting functions. // Support for assertions in the Decoder formatting functions.
......
...@@ -29,6 +29,9 @@ class BasicBlockProfilerData { ...@@ -29,6 +29,9 @@ class BasicBlockProfilerData {
V8_EXPORT_PRIVATE BasicBlockProfilerData( V8_EXPORT_PRIVATE BasicBlockProfilerData(
OnHeapBasicBlockProfilerData js_heap_data); OnHeapBasicBlockProfilerData js_heap_data);
BasicBlockProfilerData(const BasicBlockProfilerData&) = delete;
BasicBlockProfilerData& operator=(const BasicBlockProfilerData&) = delete;
size_t n_blocks() const { size_t n_blocks() const {
DCHECK_EQ(block_ids_.size(), counts_.size()); DCHECK_EQ(block_ids_.size(), counts_.size());
return block_ids_.size(); return block_ids_.size();
...@@ -64,7 +67,6 @@ class BasicBlockProfilerData { ...@@ -64,7 +67,6 @@ class BasicBlockProfilerData {
std::string schedule_; std::string schedule_;
std::string code_; std::string code_;
int hash_ = 0; int hash_ = 0;
DISALLOW_COPY_AND_ASSIGN(BasicBlockProfilerData);
}; };
class BasicBlockProfiler { class BasicBlockProfiler {
...@@ -73,6 +75,8 @@ class BasicBlockProfiler { ...@@ -73,6 +75,8 @@ class BasicBlockProfiler {
BasicBlockProfiler() = default; BasicBlockProfiler() = default;
~BasicBlockProfiler() = default; ~BasicBlockProfiler() = default;
BasicBlockProfiler(const BasicBlockProfiler&) = delete;
BasicBlockProfiler& operator=(const BasicBlockProfiler&) = delete;
V8_EXPORT_PRIVATE static BasicBlockProfiler* Get(); V8_EXPORT_PRIVATE static BasicBlockProfiler* Get();
BasicBlockProfilerData* NewData(size_t n_blocks); BasicBlockProfilerData* NewData(size_t n_blocks);
...@@ -90,8 +94,6 @@ class BasicBlockProfiler { ...@@ -90,8 +94,6 @@ class BasicBlockProfiler {
private: private:
DataList data_list_; DataList data_list_;
base::Mutex data_list_mutex_; base::Mutex data_list_mutex_;
DISALLOW_COPY_AND_ASSIGN(BasicBlockProfiler);
}; };
std::ostream& operator<<(std::ostream& os, const BasicBlockProfilerData& s); std::ostream& operator<<(std::ostream& os, const BasicBlockProfilerData& s);
......
...@@ -25,6 +25,8 @@ struct AsPrintableStatistics { ...@@ -25,6 +25,8 @@ struct AsPrintableStatistics {
class CompilationStatistics final : public Malloced { class CompilationStatistics final : public Malloced {
public: public:
CompilationStatistics() = default; CompilationStatistics() = default;
CompilationStatistics(const CompilationStatistics&) = delete;
CompilationStatistics& operator=(const CompilationStatistics&) = delete;
class BasicStats { class BasicStats {
public: public:
...@@ -81,8 +83,6 @@ class CompilationStatistics final : public Malloced { ...@@ -81,8 +83,6 @@ class CompilationStatistics final : public Malloced {
PhaseKindMap phase_kind_map_; PhaseKindMap phase_kind_map_;
PhaseMap phase_map_; PhaseMap phase_map_;
base::Mutex record_mutex_; base::Mutex record_mutex_;
DISALLOW_COPY_AND_ASSIGN(CompilationStatistics);
}; };
std::ostream& operator<<(std::ostream& os, const AsPrintableStatistics& s); std::ostream& operator<<(std::ostream& os, const AsPrintableStatistics& s);
......
...@@ -72,6 +72,8 @@ class V8_EXPORT_PRIVATE EhFrameConstants final ...@@ -72,6 +72,8 @@ class V8_EXPORT_PRIVATE EhFrameConstants final
class V8_EXPORT_PRIVATE EhFrameWriter { class V8_EXPORT_PRIVATE EhFrameWriter {
public: public:
explicit EhFrameWriter(Zone* zone); explicit EhFrameWriter(Zone* zone);
EhFrameWriter(const EhFrameWriter&) = delete;
EhFrameWriter& operator=(const EhFrameWriter&) = delete;
// The empty frame is a hack to trigger fp-based unwinding in Linux perf // The empty frame is a hack to trigger fp-based unwinding in Linux perf
// compiled with libunwind support when processing DWARF-based call graphs. // compiled with libunwind support when processing DWARF-based call graphs.
...@@ -206,8 +208,6 @@ class V8_EXPORT_PRIVATE EhFrameWriter { ...@@ -206,8 +208,6 @@ class V8_EXPORT_PRIVATE EhFrameWriter {
Register base_register_; Register base_register_;
int base_offset_; int base_offset_;
ZoneVector<byte> eh_frame_buffer_; ZoneVector<byte> eh_frame_buffer_;
DISALLOW_COPY_AND_ASSIGN(EhFrameWriter);
}; };
class V8_EXPORT_PRIVATE EhFrameIterator { class V8_EXPORT_PRIVATE EhFrameIterator {
...@@ -290,6 +290,8 @@ class EhFrameDisassembler final { ...@@ -290,6 +290,8 @@ class EhFrameDisassembler final {
: start_(start), end_(end) { : start_(start), end_(end) {
DCHECK_LT(start, end); DCHECK_LT(start, end);
} }
EhFrameDisassembler(const EhFrameDisassembler&) = delete;
EhFrameDisassembler& operator=(const EhFrameDisassembler&) = delete;
void DisassembleToStream(std::ostream& stream); // NOLINT void DisassembleToStream(std::ostream& stream); // NOLINT
...@@ -301,8 +303,6 @@ class EhFrameDisassembler final { ...@@ -301,8 +303,6 @@ class EhFrameDisassembler final {
const byte* start_; const byte* start_;
const byte* end_; const byte* end_;
DISALLOW_COPY_AND_ASSIGN(EhFrameDisassembler);
}; };
#endif #endif
......
...@@ -52,6 +52,9 @@ class Decoder { ...@@ -52,6 +52,9 @@ class Decoder {
~Decoder() {} ~Decoder() {}
Decoder(const Decoder&) = delete;
Decoder& operator=(const Decoder&) = delete;
// Writes one disassembled instruction into 'buffer' (0-terminated). // Writes one disassembled instruction into 'buffer' (0-terminated).
// Returns the length of the disassembled machine instruction in bytes. // Returns the length of the disassembled machine instruction in bytes.
int InstructionDecode(byte* instruction); int InstructionDecode(byte* instruction);
...@@ -150,8 +153,6 @@ class Decoder { ...@@ -150,8 +153,6 @@ class Decoder {
const disasm::NameConverter& converter_; const disasm::NameConverter& converter_;
v8::internal::Vector<char> out_buffer_; v8::internal::Vector<char> out_buffer_;
int out_buffer_pos_; int out_buffer_pos_;
DISALLOW_COPY_AND_ASSIGN(Decoder);
}; };
// Support for assertions in the Decoder formatting functions. // Support for assertions in the Decoder formatting functions.
......
...@@ -52,6 +52,9 @@ class Decoder { ...@@ -52,6 +52,9 @@ class Decoder {
~Decoder() {} ~Decoder() {}
Decoder(const Decoder&) = delete;
Decoder& operator=(const Decoder&) = delete;
// Writes one disassembled instruction into 'buffer' (0-terminated). // Writes one disassembled instruction into 'buffer' (0-terminated).
// Returns the length of the disassembled machine instruction in bytes. // Returns the length of the disassembled machine instruction in bytes.
int InstructionDecode(byte* instruction); int InstructionDecode(byte* instruction);
...@@ -162,8 +165,6 @@ class Decoder { ...@@ -162,8 +165,6 @@ class Decoder {
const disasm::NameConverter& converter_; const disasm::NameConverter& converter_;
v8::internal::Vector<char> out_buffer_; v8::internal::Vector<char> out_buffer_;
int out_buffer_pos_; int out_buffer_pos_;
DISALLOW_COPY_AND_ASSIGN(Decoder);
}; };
// Support for assertions in the Decoder formatting functions. // Support for assertions in the Decoder formatting functions.
......
...@@ -52,6 +52,9 @@ class Decoder { ...@@ -52,6 +52,9 @@ class Decoder {
~Decoder() {} ~Decoder() {}
Decoder(const Decoder&) = delete;
Decoder& operator=(const Decoder&) = delete;
// Writes one disassembled instruction into 'buffer' (0-terminated). // Writes one disassembled instruction into 'buffer' (0-terminated).
// Returns the length of the disassembled machine instruction in bytes. // Returns the length of the disassembled machine instruction in bytes.
int InstructionDecode(byte* instruction); int InstructionDecode(byte* instruction);
...@@ -85,8 +88,6 @@ class Decoder { ...@@ -85,8 +88,6 @@ class Decoder {
const disasm::NameConverter& converter_; const disasm::NameConverter& converter_;
Vector<char> out_buffer_; Vector<char> out_buffer_;
int out_buffer_pos_; int out_buffer_pos_;
DISALLOW_COPY_AND_ASSIGN(Decoder);
}; };
// Support for assertions in the Decoder formatting functions. // Support for assertions in the Decoder formatting functions.
......
...@@ -52,6 +52,9 @@ class Decoder { ...@@ -52,6 +52,9 @@ class Decoder {
~Decoder() {} ~Decoder() {}
Decoder(const Decoder&) = delete;
Decoder& operator=(const Decoder&) = delete;
// Writes one disassembled instruction into 'buffer' (0-terminated). // Writes one disassembled instruction into 'buffer' (0-terminated).
// Returns the length of the disassembled machine instruction in bytes. // Returns the length of the disassembled machine instruction in bytes.
int InstructionDecode(byte* instruction); int InstructionDecode(byte* instruction);
...@@ -83,8 +86,6 @@ class Decoder { ...@@ -83,8 +86,6 @@ class Decoder {
const disasm::NameConverter& converter_; const disasm::NameConverter& converter_;
Vector<char> out_buffer_; Vector<char> out_buffer_;
int out_buffer_pos_; int out_buffer_pos_;
DISALLOW_COPY_AND_ASSIGN(Decoder);
}; };
// Support for assertions in the Decoder formatting functions. // Support for assertions in the Decoder formatting functions.
......
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