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

Unified Diff: runtime/vm/assembler_ia32.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_arm.h ('k') | runtime/vm/assembler_mips.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_ia32.h
===================================================================
--- runtime/vm/assembler_ia32.h (revision 18957)
+++ runtime/vm/assembler_ia32.h (working copy)
@@ -22,8 +22,6 @@
public:
explicit Immediate(int32_t value) : value_(value) { }
- Immediate(const Immediate& other) : ValueObject(), value_(other.value_) { }
-
int32_t value() const { return value_; }
bool is_int8() const { return Utils::IsInt(8, value_); }
@@ -33,9 +31,7 @@
private:
const int32_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);
};
@@ -71,18 +67,8 @@
return bit_copy<int32_t>(encoding_[length_ - 4]);
}
- Operand(const Operand& other) : ValueObject(), length_(other.length_) {
- memmove(&encoding_[0], &other.encoding_[0], other.length_);
- }
-
- Operand& operator=(const Operand& other) {
- length_ = other.length_;
- memmove(&encoding_[0], &other.encoding_[0], other.length_);
- return *this;
- }
-
protected:
- Operand() : length_(0) { } // Needed by subclass Address.
+ Operand() : length_(0), encoding_() { } // Needed by subclass Address.
void SetModRM(int mod, Register rm) {
ASSERT((mod & ~3) == 0);
@@ -173,13 +159,6 @@
}
}
- Address(const Address& other) : Operand(other) { }
-
- Address& operator=(const Address& other) {
- Operand::operator=(other);
- return *this;
- }
-
static Address Absolute(const uword addr) {
Address result;
result.SetModRM(0, EBP);
@@ -199,13 +178,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;
- }
};
@@ -739,7 +711,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_arm.h ('k') | runtime/vm/assembler_mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698