| 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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 | 141 |
| 142 bool IsInvalid() const { | 142 bool IsInvalid() const { |
| 143 return value_ == kInvalidLocation; | 143 return value_ == kInvalidLocation; |
| 144 } | 144 } |
| 145 | 145 |
| 146 // Constants. | 146 // Constants. |
| 147 bool IsConstant() const { | 147 bool IsConstant() const { |
| 148 return (value_ & kLocationTagMask) == kConstantTag; | 148 return (value_ & kLocationTagMask) == kConstantTag; |
| 149 } | 149 } |
| 150 | 150 |
| 151 static Location Constant(ConstantInstr* obj) { | 151 static Location Constant(const ConstantInstr* obj) { |
| 152 Location loc(reinterpret_cast<uword>(obj) | kConstantTag); | 152 Location loc(reinterpret_cast<uword>(obj) | kConstantTag); |
| 153 ASSERT(obj == loc.constant_instruction()); | 153 ASSERT(obj == loc.constant_instruction()); |
| 154 return loc; | 154 return loc; |
| 155 } | 155 } |
| 156 | 156 |
| 157 ConstantInstr* constant_instruction() const { | 157 ConstantInstr* constant_instruction() const { |
| 158 ASSERT(IsConstant()); | 158 ASSERT(IsConstant()); |
| 159 return reinterpret_cast<ConstantInstr*>(value_ & ~kLocationTagMask); | 159 return reinterpret_cast<ConstantInstr*>(value_ & ~kLocationTagMask); |
| 160 } | 160 } |
| 161 | 161 |
| (...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 709 | 709 |
| 710 #if defined(DEBUG) | 710 #if defined(DEBUG) |
| 711 intptr_t writable_inputs_; | 711 intptr_t writable_inputs_; |
| 712 #endif | 712 #endif |
| 713 }; | 713 }; |
| 714 | 714 |
| 715 | 715 |
| 716 } // namespace dart | 716 } // namespace dart |
| 717 | 717 |
| 718 #endif // VM_LOCATIONS_H_ | 718 #endif // VM_LOCATIONS_H_ |
| OLD | NEW |