| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 int index() const { return static_cast<int>(value_) >> kKindFieldWidth; } | 54 int index() const { return static_cast<int>(value_) >> kKindFieldWidth; } |
| 55 bool IsConstantOperand() const { return kind() == CONSTANT_OPERAND; } | 55 bool IsConstantOperand() const { return kind() == CONSTANT_OPERAND; } |
| 56 bool IsStackSlot() const { return kind() == STACK_SLOT; } | 56 bool IsStackSlot() const { return kind() == STACK_SLOT; } |
| 57 bool IsDoubleStackSlot() const { return kind() == DOUBLE_STACK_SLOT; } | 57 bool IsDoubleStackSlot() const { return kind() == DOUBLE_STACK_SLOT; } |
| 58 bool IsRegister() const { return kind() == REGISTER; } | 58 bool IsRegister() const { return kind() == REGISTER; } |
| 59 bool IsDoubleRegister() const { return kind() == DOUBLE_REGISTER; } | 59 bool IsDoubleRegister() const { return kind() == DOUBLE_REGISTER; } |
| 60 bool IsArgument() const { return kind() == ARGUMENT; } | 60 bool IsArgument() const { return kind() == ARGUMENT; } |
| 61 bool IsUnallocated() const { return kind() == UNALLOCATED; } | 61 bool IsUnallocated() const { return kind() == UNALLOCATED; } |
| 62 bool IsIgnored() const { return kind() == INVALID; } | 62 bool IsIgnored() const { return kind() == INVALID; } |
| 63 bool Equals(LOperand* other) const { return value_ == other->value_; } | 63 bool Equals(LOperand* other) const { return value_ == other->value_; } |
| 64 int VirtualRegister(); | |
| 65 | 64 |
| 66 void PrintTo(StringStream* stream); | 65 void PrintTo(StringStream* stream); |
| 67 void ConvertTo(Kind kind, int index) { | 66 void ConvertTo(Kind kind, int index) { |
| 68 value_ = KindField::encode(kind); | 67 value_ = KindField::encode(kind); |
| 69 value_ |= index << kKindFieldWidth; | 68 value_ |= index << kKindFieldWidth; |
| 70 ASSERT(this->index() == index); | 69 ASSERT(this->index() == index); |
| 71 } | 70 } |
| 72 | 71 |
| 73 protected: | 72 protected: |
| 74 static const int kKindFieldWidth = 3; | 73 static const int kKindFieldWidth = 3; |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 return policy() == SAME_AS_FIRST_INPUT; | 161 return policy() == SAME_AS_FIRST_INPUT; |
| 163 } | 162 } |
| 164 Policy policy() const { return PolicyField::decode(value_); } | 163 Policy policy() const { return PolicyField::decode(value_); } |
| 165 void set_policy(Policy policy) { | 164 void set_policy(Policy policy) { |
| 166 value_ = PolicyField::update(value_, policy); | 165 value_ = PolicyField::update(value_, policy); |
| 167 } | 166 } |
| 168 int fixed_index() const { | 167 int fixed_index() const { |
| 169 return static_cast<int>(value_) >> kFixedIndexShift; | 168 return static_cast<int>(value_) >> kFixedIndexShift; |
| 170 } | 169 } |
| 171 | 170 |
| 172 unsigned virtual_register() const { | 171 int virtual_register() const { |
| 173 return VirtualRegisterField::decode(value_); | 172 return VirtualRegisterField::decode(value_); |
| 174 } | 173 } |
| 175 | 174 |
| 176 void set_virtual_register(unsigned id) { | 175 void set_virtual_register(unsigned id) { |
| 177 value_ = VirtualRegisterField::update(value_, id); | 176 value_ = VirtualRegisterField::update(value_, id); |
| 178 } | 177 } |
| 179 | 178 |
| 180 LUnallocated* CopyUnconstrained() { | 179 LUnallocated* CopyUnconstrained() { |
| 181 LUnallocated* result = new LUnallocated(ANY); | 180 LUnallocated* result = new LUnallocated(ANY); |
| 182 result->set_virtual_register(virtual_register()); | 181 result->set_virtual_register(virtual_register()); |
| (...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 600 ShallowIterator current_iterator_; | 599 ShallowIterator current_iterator_; |
| 601 }; | 600 }; |
| 602 | 601 |
| 603 | 602 |
| 604 int ElementsKindToShiftSize(ElementsKind elements_kind); | 603 int ElementsKindToShiftSize(ElementsKind elements_kind); |
| 605 | 604 |
| 606 | 605 |
| 607 } } // namespace v8::internal | 606 } } // namespace v8::internal |
| 608 | 607 |
| 609 #endif // V8_LITHIUM_H_ | 608 #endif // V8_LITHIUM_H_ |
| OLD | NEW |