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

Side by Side Diff: runtime/vm/assembler_mips.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/assembler_ia32.h ('k') | runtime/vm/assembler_x64.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_ASSEMBLER_MIPS_H_ 5 #ifndef VM_ASSEMBLER_MIPS_H_
6 #define VM_ASSEMBLER_MIPS_H_ 6 #define VM_ASSEMBLER_MIPS_H_
7 7
8 #ifndef VM_ASSEMBLER_H_ 8 #ifndef VM_ASSEMBLER_H_
9 #error Do not include assembler_mips.h directly; use assembler.h instead. 9 #error Do not include assembler_mips.h directly; use assembler.h instead.
10 #endif 10 #endif
11 11
12 #include "platform/assert.h" 12 #include "platform/assert.h"
13 #include "vm/constants_mips.h" 13 #include "vm/constants_mips.h"
14 14
15 namespace dart { 15 namespace dart {
16 16
17 class Operand : public ValueObject { 17 class Operand : public ValueObject {
18 public:
19 Operand(const Operand& other) : ValueObject() {
20 UNIMPLEMENTED();
21 }
22
23 Operand& operator=(const Operand& other) {
24 UNIMPLEMENTED();
25 return *this;
26 }
27
28 protected: 18 protected:
29 Operand() { } // Needed by subclass Address. 19 Operand() { } // Needed by subclass Address.
30 }; 20 };
31 21
32 22
33 class Address : public Operand { 23 class Address : public Operand {
34 public: 24 public:
35 Address(Register base, int32_t disp) { 25 Address(Register base, int32_t disp) {
36 UNIMPLEMENTED(); 26 UNIMPLEMENTED();
37 } 27 }
38
39 Address(const Address& other) : Operand(other) { }
40
41 Address& operator=(const Address& other) {
42 Operand::operator=(other);
43 return *this;
44 }
45 }; 28 };
46 29
47 30
48 class FieldAddress : public Address { 31 class FieldAddress : public Address {
49 public: 32 public:
50 FieldAddress(Register base, int32_t disp) 33 FieldAddress(Register base, int32_t disp)
51 : Address(base, disp - kHeapObjectTag) { } 34 : Address(base, disp - kHeapObjectTag) { }
52
53 FieldAddress(const FieldAddress& other) : Address(other) { }
54
55 FieldAddress& operator=(const FieldAddress& other) {
56 Address::operator=(other);
57 return *this;
58 }
59 }; 35 };
60 36
61 37
62 class Label : public ValueObject { 38 class Label : public ValueObject {
63 public: 39 public:
64 Label() : position_(0) { } 40 Label() : position_(0) { }
65 41
66 ~Label() { 42 ~Label() {
67 // Assert if label is being destroyed with unresolved branches pending. 43 // Assert if label is being destroyed with unresolved branches pending.
68 ASSERT(!IsLinked()); 44 ASSERT(!IsLinked());
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 167
192 private: 168 private:
193 intptr_t pc_offset_; 169 intptr_t pc_offset_;
194 const String& comment_; 170 const String& comment_;
195 171
196 DISALLOW_COPY_AND_ASSIGN(CodeComment); 172 DISALLOW_COPY_AND_ASSIGN(CodeComment);
197 }; 173 };
198 174
199 GrowableArray<CodeComment*> comments_; 175 GrowableArray<CodeComment*> comments_;
200 176
201 DISALLOW_ALLOCATION();
202 DISALLOW_COPY_AND_ASSIGN(Assembler); 177 DISALLOW_COPY_AND_ASSIGN(Assembler);
203 }; 178 };
204 179
205 } // namespace dart 180 } // namespace dart
206 181
207 #endif // VM_ASSEMBLER_MIPS_H_ 182 #endif // VM_ASSEMBLER_MIPS_H_
OLDNEW
« no previous file with comments | « runtime/vm/assembler_ia32.h ('k') | runtime/vm/assembler_x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698