| 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 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 // Location either contains kind and payload fields or a tagged handle for | 372 // Location either contains kind and payload fields or a tagged handle for |
| 373 // a constant locations. Values of enumeration Kind are selected in such a | 373 // a constant locations. Values of enumeration Kind are selected in such a |
| 374 // way that none of them can be interpreted as a kConstant tag. | 374 // way that none of them can be interpreted as a kConstant tag. |
| 375 uword value_; | 375 uword value_; |
| 376 }; | 376 }; |
| 377 | 377 |
| 378 | 378 |
| 379 class RegisterSet : public ValueObject { | 379 class RegisterSet : public ValueObject { |
| 380 public: | 380 public: |
| 381 RegisterSet() : cpu_registers_(0), fpu_registers_(0) { | 381 RegisterSet() : cpu_registers_(0), fpu_registers_(0) { |
| 382 ASSERT(kNumberOfCpuRegisters < (kWordSize * kBitsPerByte)); | 382 ASSERT(kNumberOfCpuRegisters <= (kWordSize * kBitsPerByte)); |
| 383 ASSERT(kNumberOfFpuRegisters < (kWordSize * kBitsPerByte)); | 383 ASSERT(kNumberOfFpuRegisters <= (kWordSize * kBitsPerByte)); |
| 384 } | 384 } |
| 385 | 385 |
| 386 | 386 |
| 387 void Add(Location loc) { | 387 void Add(Location loc) { |
| 388 if (loc.IsRegister()) { | 388 if (loc.IsRegister()) { |
| 389 cpu_registers_ |= (1 << loc.reg()); | 389 cpu_registers_ |= (1 << loc.reg()); |
| 390 } else if (loc.IsFpuRegister()) { | 390 } else if (loc.IsFpuRegister()) { |
| 391 fpu_registers_ |= (1 << loc.fpu_reg()); | 391 fpu_registers_ |= (1 << loc.fpu_reg()); |
| 392 } | 392 } |
| 393 } | 393 } |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 BitmapBuilder* stack_bitmap_; | 522 BitmapBuilder* stack_bitmap_; |
| 523 | 523 |
| 524 const ContainsCall contains_call_; | 524 const ContainsCall contains_call_; |
| 525 RegisterSet live_registers_; | 525 RegisterSet live_registers_; |
| 526 }; | 526 }; |
| 527 | 527 |
| 528 | 528 |
| 529 } // namespace dart | 529 } // namespace dart |
| 530 | 530 |
| 531 #endif // VM_LOCATIONS_H_ | 531 #endif // VM_LOCATIONS_H_ |
| OLD | NEW |