Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Unified Diff: runtime/vm/assembler_x64.h

Issue 12340050: Add DISALLOW_COPY_AND_ASSIGN to subclasses of ValueObject and make ValueObject copyable. Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/assembler_mips.h ('k') | runtime/vm/bit_vector.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_x64.h
===================================================================
--- runtime/vm/assembler_x64.h (revision 18957)
+++ runtime/vm/assembler_x64.h (working copy)
@@ -22,8 +22,6 @@
public:
explicit Immediate(int64_t value) : value_(value) { }
- Immediate(const Immediate& other) : ValueObject(), value_(other.value_) { }
-
int64_t value() const { return value_; }
bool is_int8() const { return Utils::IsInt(8, value_); }
@@ -34,9 +32,7 @@
private:
const int64_t value_;
- // TODO(5411081): Add DISALLOW_COPY_AND_ASSIGN(Immediate) once the mac
- // build issue is resolved.
- // And remove the unnecessary copy constructor.
+ DISALLOW_COPY_AND_ASSIGN(Immediate);
};
@@ -79,20 +75,9 @@
return bit_copy<int32_t>(encoding_[length_ - 4]);
}
- Operand(const Operand& other)
- : ValueObject(), length_(other.length_), rex_(other.rex_) {
- memmove(&encoding_[0], &other.encoding_[0], other.length_);
- }
-
- Operand& operator=(const Operand& other) {
- length_ = other.length_;
- rex_ = other.rex_;
- memmove(&encoding_[0], &other.encoding_[0], other.length_);
- return *this;
- }
-
protected:
- Operand() : length_(0), rex_(REX_NONE) { } // Needed by subclass Address.
+ // Needed by subclass Address.
+ Operand() : length_(0), rex_(REX_NONE), encoding_() { }
void SetModRM(int mod, Register rm) {
ASSERT((mod & ~3) == 0);
@@ -196,13 +181,6 @@
SetDisp32(disp);
}
}
-
- Address(const Address& other) : Operand(other) { }
-
- Address& operator=(const Address& other) {
- Operand::operator=(other);
- return *this;
- }
};
@@ -213,13 +191,6 @@
FieldAddress(Register base, Register index, ScaleFactor scale, int32_t disp)
: Address(base, index, scale, disp - kHeapObjectTag) { }
-
- FieldAddress(const FieldAddress& other) : Address(other) { }
-
- FieldAddress& operator=(const FieldAddress& other) {
- Address::operator=(other);
- return *this;
- }
};
@@ -770,7 +741,6 @@
void StoreIntoObjectFilter(Register object, Register value, Label* no_update);
- DISALLOW_ALLOCATION();
DISALLOW_COPY_AND_ASSIGN(Assembler);
};
« no previous file with comments | « runtime/vm/assembler_mips.h ('k') | runtime/vm/bit_vector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698