OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 | 257 |
258 | 258 |
259 intptr_t stack_index() const { | 259 intptr_t stack_index() const { |
260 ASSERT(IsStackSlot() || IsDoubleStackSlot()); | 260 ASSERT(IsStackSlot() || IsDoubleStackSlot()); |
261 // Decode stack index manually to preserve sign. | 261 // Decode stack index manually to preserve sign. |
262 return IndexField::decode(payload()) - kStackIndexBias; | 262 return IndexField::decode(payload()) - kStackIndexBias; |
263 } | 263 } |
264 | 264 |
265 // Constants. | 265 // Constants. |
266 static Location RegisterOrConstant(Value* value); | 266 static Location RegisterOrConstant(Value* value); |
| 267 static Location RegisterOrSmiConstant(Value* value); |
267 static Location FixedRegisterOrConstant(Value* value, Register reg); | 268 static Location FixedRegisterOrConstant(Value* value, Register reg); |
| 269 static Location FixedRegisterOrSmiConstant(Value* value, Register reg); |
268 | 270 |
269 const char* Name() const; | 271 const char* Name() const; |
270 void PrintTo(BufferFormatter* f) const; | 272 void PrintTo(BufferFormatter* f) const; |
271 void Print() const; | 273 void Print() const; |
272 | 274 |
273 // Compare two locations. | 275 // Compare two locations. |
274 bool Equals(Location other) const { | 276 bool Equals(Location other) const { |
275 return value_ == other.value_; | 277 return value_ == other.value_; |
276 } | 278 } |
277 | 279 |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 BitmapBuilder* stack_bitmap_; | 469 BitmapBuilder* stack_bitmap_; |
468 | 470 |
469 const ContainsCall contains_call_; | 471 const ContainsCall contains_call_; |
470 RegisterSet live_registers_; | 472 RegisterSet live_registers_; |
471 }; | 473 }; |
472 | 474 |
473 | 475 |
474 } // namespace dart | 476 } // namespace dart |
475 | 477 |
476 #endif // VM_LOCATIONS_H_ | 478 #endif // VM_LOCATIONS_H_ |
OLD | NEW |