OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 public: | 198 public: |
199 enum Policy { | 199 enum Policy { |
200 NONE, | 200 NONE, |
201 ANY, | 201 ANY, |
202 FIXED_REGISTER, | 202 FIXED_REGISTER, |
203 FIXED_DOUBLE_REGISTER, | 203 FIXED_DOUBLE_REGISTER, |
204 FIXED_SLOT, | 204 FIXED_SLOT, |
205 MUST_HAVE_REGISTER, | 205 MUST_HAVE_REGISTER, |
206 WRITABLE_REGISTER, | 206 WRITABLE_REGISTER, |
207 SAME_AS_FIRST_INPUT, | 207 SAME_AS_FIRST_INPUT, |
208 SAME_AS_ANY_INPUT, | |
209 IGNORE | 208 IGNORE |
210 }; | 209 }; |
211 | 210 |
212 // Lifetime of operand inside the instruction. | 211 // Lifetime of operand inside the instruction. |
213 enum Lifetime { | 212 enum Lifetime { |
214 // USED_AT_START operand is guaranteed to be live only at | 213 // USED_AT_START operand is guaranteed to be live only at |
215 // instruction start. Register allocator is free to assign the same register | 214 // instruction start. Register allocator is free to assign the same register |
216 // to some other operand used inside instruction (i.e. temporary or | 215 // to some other operand used inside instruction (i.e. temporary or |
217 // output). | 216 // output). |
218 USED_AT_START, | 217 USED_AT_START, |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 } | 268 } |
270 bool HasFixedPolicy() const { | 269 bool HasFixedPolicy() const { |
271 return policy() == FIXED_REGISTER || | 270 return policy() == FIXED_REGISTER || |
272 policy() == FIXED_DOUBLE_REGISTER || | 271 policy() == FIXED_DOUBLE_REGISTER || |
273 policy() == FIXED_SLOT; | 272 policy() == FIXED_SLOT; |
274 } | 273 } |
275 bool HasRegisterPolicy() const { | 274 bool HasRegisterPolicy() const { |
276 return policy() == WRITABLE_REGISTER || policy() == MUST_HAVE_REGISTER; | 275 return policy() == WRITABLE_REGISTER || policy() == MUST_HAVE_REGISTER; |
277 } | 276 } |
278 bool HasSameAsInputPolicy() const { | 277 bool HasSameAsInputPolicy() const { |
279 return policy() == SAME_AS_FIRST_INPUT || policy() == SAME_AS_ANY_INPUT; | 278 return policy() == SAME_AS_FIRST_INPUT; |
280 } | 279 } |
281 Policy policy() const { return PolicyField::decode(value_); } | 280 Policy policy() const { return PolicyField::decode(value_); } |
282 void set_policy(Policy policy) { | 281 void set_policy(Policy policy) { |
283 value_ &= ~PolicyField::mask(); | 282 value_ &= ~PolicyField::mask(); |
284 value_ |= PolicyField::encode(policy); | 283 value_ |= PolicyField::encode(policy); |
285 } | 284 } |
286 int fixed_index() const { | 285 int fixed_index() const { |
287 return static_cast<int>(value_) >> kFixedIndexShift; | 286 return static_cast<int>(value_) >> kFixedIndexShift; |
288 } | 287 } |
289 | 288 |
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1018 | 1017 |
1019 bool has_osr_entry_; | 1018 bool has_osr_entry_; |
1020 | 1019 |
1021 DISALLOW_COPY_AND_ASSIGN(LAllocator); | 1020 DISALLOW_COPY_AND_ASSIGN(LAllocator); |
1022 }; | 1021 }; |
1023 | 1022 |
1024 | 1023 |
1025 } } // namespace v8::internal | 1024 } } // namespace v8::internal |
1026 | 1025 |
1027 #endif // V8_LITHIUM_ALLOCATOR_H_ | 1026 #endif // V8_LITHIUM_ALLOCATOR_H_ |
OLD | NEW |