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

Side by Side Diff: runtime/vm/locations.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, 9 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/intermediate_language.h ('k') | runtime/vm/parser.cc » ('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_LOCATIONS_H_ 5 #ifndef VM_LOCATIONS_H_
6 #define VM_LOCATIONS_H_ 6 #define VM_LOCATIONS_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/bitfield.h" 10 #include "vm/bitfield.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 65
66 // FpuRegister location represents a fixed fpu register. Payload contains 66 // FpuRegister location represents a fixed fpu register. Payload contains
67 // its code. 67 // its code.
68 kFpuRegister = 7, 68 kFpuRegister = 7,
69 }; 69 };
70 70
71 Location() : value_(kInvalidLocation) { 71 Location() : value_(kInvalidLocation) {
72 ASSERT(IsInvalid()); 72 ASSERT(IsInvalid());
73 } 73 }
74 74
75 Location(const Location& other) : ValueObject(), value_(other.value_) { }
76
77 Location& operator=(const Location& other) {
78 value_ = other.value_;
79 return *this;
80 }
81
82 bool IsInvalid() const { 75 bool IsInvalid() const {
83 return value_ == kInvalidLocation; 76 return value_ == kInvalidLocation;
84 } 77 }
85 78
86 // Constants. 79 // Constants.
87 bool IsConstant() const { 80 bool IsConstant() const {
88 ASSERT((kConstant & kConstantMask) == kConstant); 81 ASSERT((kConstant & kConstantMask) == kConstant);
89 return (value_ & kConstantMask) == kConstant; 82 return (value_ & kConstantMask) == kConstant;
90 } 83 }
91 84
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 BitmapBuilder* stack_bitmap_; 478 BitmapBuilder* stack_bitmap_;
486 479
487 const ContainsCall contains_call_; 480 const ContainsCall contains_call_;
488 RegisterSet live_registers_; 481 RegisterSet live_registers_;
489 }; 482 };
490 483
491 484
492 } // namespace dart 485 } // namespace dart
493 486
494 #endif // VM_LOCATIONS_H_ 487 #endif // VM_LOCATIONS_H_
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698