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 {
}
~Decoder() {}
Decoder(const Decoder&) = delete;
Decoder& operator=(const Decoder&) = delete;
// Writes one disassembled instruction into 'buffer' (0-terminated).
// Returns the length of the disassembled machine instruction in bytes.
......@@ -134,8 +136,6 @@ class Decoder {
const disasm::NameConverter& converter_;
Vector<char> out_buffer_;
int out_buffer_pos_;
DISALLOW_COPY_AND_ASSIGN(Decoder);
};
// Support for assertions in the Decoder formatting functions.
......
......@@ -29,6 +29,9 @@ class BasicBlockProfilerData {
V8_EXPORT_PRIVATE BasicBlockProfilerData(
OnHeapBasicBlockProfilerData js_heap_data);
BasicBlockProfilerData(const BasicBlockProfilerData&) = delete;
BasicBlockProfilerData& operator=(const BasicBlockProfilerData&) = delete;
size_t n_blocks() const {
DCHECK_EQ(block_ids_.size(), counts_.size());
return block_ids_.size();
......@@ -64,7 +67,6 @@ class BasicBlockProfilerData {
std::string schedule_;
std::string code_;
int hash_ = 0;
DISALLOW_COPY_AND_ASSIGN(BasicBlockProfilerData);
};
class BasicBlockProfiler {
......@@ -73,6 +75,8 @@ class BasicBlockProfiler {
BasicBlockProfiler() = default;
~BasicBlockProfiler() = default;
BasicBlockProfiler(const BasicBlockProfiler&) = delete;
BasicBlockProfiler& operator=(const BasicBlockProfiler&) = delete;
V8_EXPORT_PRIVATE static BasicBlockProfiler* Get();
BasicBlockProfilerData* NewData(size_t n_blocks);
......@@ -90,8 +94,6 @@ class BasicBlockProfiler {
private:
DataList data_list_;
base::Mutex data_list_mutex_;
DISALLOW_COPY_AND_ASSIGN(BasicBlockProfiler);
};
std::ostream& operator<<(std::ostream& os, const BasicBlockProfilerData& s);
......
......@@ -25,6 +25,8 @@ struct AsPrintableStatistics {
class CompilationStatistics final : public Malloced {
public:
CompilationStatistics() = default;
CompilationStatistics(const CompilationStatistics&) = delete;
CompilationStatistics& operator=(const CompilationStatistics&) = delete;
class BasicStats {
public:
......@@ -81,8 +83,6 @@ class CompilationStatistics final : public Malloced {
PhaseKindMap phase_kind_map_;
PhaseMap phase_map_;
base::Mutex record_mutex_;
DISALLOW_COPY_AND_ASSIGN(CompilationStatistics);
};
std::ostream& operator<<(std::ostream& os, const AsPrintableStatistics& s);
......
......@@ -72,6 +72,8 @@ class V8_EXPORT_PRIVATE EhFrameConstants final
class V8_EXPORT_PRIVATE EhFrameWriter {
public:
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
// compiled with libunwind support when processing DWARF-based call graphs.
......@@ -206,8 +208,6 @@ class V8_EXPORT_PRIVATE EhFrameWriter {
Register base_register_;
int base_offset_;
ZoneVector<byte> eh_frame_buffer_;
DISALLOW_COPY_AND_ASSIGN(EhFrameWriter);
};
class V8_EXPORT_PRIVATE EhFrameIterator {
......@@ -290,6 +290,8 @@ class EhFrameDisassembler final {
: start_(start), end_(end) {
DCHECK_LT(start, end);
}
EhFrameDisassembler(const EhFrameDisassembler&) = delete;
EhFrameDisassembler& operator=(const EhFrameDisassembler&) = delete;
void DisassembleToStream(std::ostream& stream); // NOLINT
......@@ -301,8 +303,6 @@ class EhFrameDisassembler final {
const byte* start_;
const byte* end_;
DISALLOW_COPY_AND_ASSIGN(EhFrameDisassembler);
};
#endif
......
......@@ -52,6 +52,9 @@ class Decoder {
~Decoder() {}
Decoder(const Decoder&) = delete;
Decoder& operator=(const Decoder&) = delete;
// Writes one disassembled instruction into 'buffer' (0-terminated).
// Returns the length of the disassembled machine instruction in bytes.
int InstructionDecode(byte* instruction);
......@@ -150,8 +153,6 @@ class Decoder {
const disasm::NameConverter& converter_;
v8::internal::Vector<char> out_buffer_;
int out_buffer_pos_;
DISALLOW_COPY_AND_ASSIGN(Decoder);
};
// Support for assertions in the Decoder formatting functions.
......
......@@ -52,6 +52,9 @@ class Decoder {
~Decoder() {}
Decoder(const Decoder&) = delete;
Decoder& operator=(const Decoder&) = delete;
// Writes one disassembled instruction into 'buffer' (0-terminated).
// Returns the length of the disassembled machine instruction in bytes.
int InstructionDecode(byte* instruction);
......@@ -162,8 +165,6 @@ class Decoder {
const disasm::NameConverter& converter_;
v8::internal::Vector<char> out_buffer_;
int out_buffer_pos_;
DISALLOW_COPY_AND_ASSIGN(Decoder);
};
// Support for assertions in the Decoder formatting functions.
......
......@@ -52,6 +52,9 @@ class Decoder {
~Decoder() {}
Decoder(const Decoder&) = delete;
Decoder& operator=(const Decoder&) = delete;
// Writes one disassembled instruction into 'buffer' (0-terminated).
// Returns the length of the disassembled machine instruction in bytes.
int InstructionDecode(byte* instruction);
......@@ -85,8 +88,6 @@ class Decoder {
const disasm::NameConverter& converter_;
Vector<char> out_buffer_;
int out_buffer_pos_;
DISALLOW_COPY_AND_ASSIGN(Decoder);
};
// Support for assertions in the Decoder formatting functions.
......
......@@ -52,6 +52,9 @@ class Decoder {
~Decoder() {}
Decoder(const Decoder&) = delete;
Decoder& operator=(const Decoder&) = delete;
// Writes one disassembled instruction into 'buffer' (0-terminated).
// Returns the length of the disassembled machine instruction in bytes.
int InstructionDecode(byte* instruction);
......@@ -83,8 +86,6 @@ class Decoder {
const disasm::NameConverter& converter_;
Vector<char> out_buffer_;
int out_buffer_pos_;
DISALLOW_COPY_AND_ASSIGN(Decoder);
};
// 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