| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |