Chromium Code Reviews| 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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 274 bool IsQuadStackSlot() const { | 274 bool IsQuadStackSlot() const { |
| 275 return kind() == kQuadStackSlot; | 275 return kind() == kQuadStackSlot; |
| 276 } | 276 } |
| 277 | 277 |
| 278 intptr_t stack_index() const { | 278 intptr_t stack_index() const { |
| 279 ASSERT(IsStackSlot() || IsDoubleStackSlot() || IsQuadStackSlot()); | 279 ASSERT(IsStackSlot() || IsDoubleStackSlot() || IsQuadStackSlot()); |
| 280 // Decode stack index manually to preserve sign. | 280 // Decode stack index manually to preserve sign. |
| 281 return payload() - kStackIndexBias; | 281 return payload() - kStackIndexBias; |
| 282 } | 282 } |
| 283 | 283 |
| 284 // Return a memory operand for stack slot locations. | 284 // Returns the offset from the frame pointer for stack slot locations. |
| 285 Address ToStackSlotAddress() const; | 285 intptr_t ToStackSlotOffset() const; |
|
regis
2013/07/17 16:35:19
You could add this new function, while leaving ToS
| |
| 286 | 286 |
| 287 // Constants. | 287 // Constants. |
| 288 static Location RegisterOrConstant(Value* value); | 288 static Location RegisterOrConstant(Value* value); |
| 289 static Location RegisterOrSmiConstant(Value* value); | 289 static Location RegisterOrSmiConstant(Value* value); |
| 290 static Location FixedRegisterOrConstant(Value* value, Register reg); | 290 static Location FixedRegisterOrConstant(Value* value, Register reg); |
| 291 static Location FixedRegisterOrSmiConstant(Value* value, Register reg); | 291 static Location FixedRegisterOrSmiConstant(Value* value, Register reg); |
| 292 static Location AnyOrConstant(Value* value); | 292 static Location AnyOrConstant(Value* value); |
| 293 | 293 |
| 294 const char* Name() const; | 294 const char* Name() const; |
| 295 void PrintTo(BufferFormatter* f) const; | 295 void PrintTo(BufferFormatter* f) const; |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 479 BitmapBuilder* stack_bitmap_; | 479 BitmapBuilder* stack_bitmap_; |
| 480 | 480 |
| 481 const ContainsCall contains_call_; | 481 const ContainsCall contains_call_; |
| 482 RegisterSet live_registers_; | 482 RegisterSet live_registers_; |
| 483 }; | 483 }; |
| 484 | 484 |
| 485 | 485 |
| 486 } // namespace dart | 486 } // namespace dart |
| 487 | 487 |
| 488 #endif // VM_LOCATIONS_H_ | 488 #endif // VM_LOCATIONS_H_ |
| OLD | NEW |