| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_LITHIUM_H_ | 5 #ifndef V8_LITHIUM_H_ |
| 6 #define V8_LITHIUM_H_ | 6 #define V8_LITHIUM_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 } | 245 } |
| 246 void set_virtual_register(unsigned id) { | 246 void set_virtual_register(unsigned id) { |
| 247 value_ = VirtualRegisterField::update(value_, id); | 247 value_ = VirtualRegisterField::update(value_, id); |
| 248 } | 248 } |
| 249 | 249 |
| 250 // [lifetime]: Only for non-FIXED_SLOT. | 250 // [lifetime]: Only for non-FIXED_SLOT. |
| 251 bool IsUsedAtStart() { | 251 bool IsUsedAtStart() { |
| 252 DCHECK(basic_policy() == EXTENDED_POLICY); | 252 DCHECK(basic_policy() == EXTENDED_POLICY); |
| 253 return LifetimeField::decode(value_) == USED_AT_START; | 253 return LifetimeField::decode(value_) == USED_AT_START; |
| 254 } | 254 } |
| 255 |
| 256 static bool TooManyParameters(int num_parameters) { |
| 257 const int parameter_limit = -LUnallocated::kMinFixedSlotIndex; |
| 258 return num_parameters + 1 > parameter_limit; |
| 259 } |
| 260 |
| 261 static bool TooManyParametersOrStackSlots(int num_parameters, |
| 262 int num_stack_slots) { |
| 263 const int locals_limit = LUnallocated::kMaxFixedSlotIndex; |
| 264 return num_parameters + 1 + num_stack_slots > locals_limit; |
| 265 } |
| 255 }; | 266 }; |
| 256 | 267 |
| 257 | 268 |
| 258 class LMoveOperands final BASE_EMBEDDED { | 269 class LMoveOperands final BASE_EMBEDDED { |
| 259 public: | 270 public: |
| 260 LMoveOperands(LOperand* source, LOperand* destination) | 271 LMoveOperands(LOperand* source, LOperand* destination) |
| 261 : source_(source), destination_(destination) { | 272 : source_(source), destination_(destination) { |
| 262 } | 273 } |
| 263 | 274 |
| 264 LOperand* source() const { return source_; } | 275 LOperand* source() const { return source_; } |
| (...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 824 private: | 835 private: |
| 825 InputIterator input_iterator_; | 836 InputIterator input_iterator_; |
| 826 DeepIterator env_iterator_; | 837 DeepIterator env_iterator_; |
| 827 }; | 838 }; |
| 828 | 839 |
| 829 class LInstruction; | 840 class LInstruction; |
| 830 class LCodeGen; | 841 class LCodeGen; |
| 831 } } // namespace v8::internal | 842 } } // namespace v8::internal |
| 832 | 843 |
| 833 #endif // V8_LITHIUM_H_ | 844 #endif // V8_LITHIUM_H_ |
| OLD | NEW |