| 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 // Review notes: | 5 // Review notes: |
| 6 // | 6 // |
| 7 // - The use of macros in these inline functions may seem superfluous | 7 // - The use of macros in these inline functions may seem superfluous |
| 8 // but it is absolutely needed to make sure gcc generates optimal | 8 // but it is absolutely needed to make sure gcc generates optimal |
| 9 // code. gcc is not happy when attempting to inline too deep. | 9 // code. gcc is not happy when attempting to inline too deep. |
| 10 // | 10 // |
| (...skipping 4609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4620 void Map::set_migration_target(bool value) { | 4620 void Map::set_migration_target(bool value) { |
| 4621 set_bit_field3(IsMigrationTarget::update(bit_field3(), value)); | 4621 set_bit_field3(IsMigrationTarget::update(bit_field3(), value)); |
| 4622 } | 4622 } |
| 4623 | 4623 |
| 4624 | 4624 |
| 4625 bool Map::is_migration_target() { | 4625 bool Map::is_migration_target() { |
| 4626 return IsMigrationTarget::decode(bit_field3()); | 4626 return IsMigrationTarget::decode(bit_field3()); |
| 4627 } | 4627 } |
| 4628 | 4628 |
| 4629 | 4629 |
| 4630 void Map::set_done_inobject_slack_tracking(bool value) { | 4630 void Map::set_counter(int value) { |
| 4631 set_bit_field3(DoneInobjectSlackTracking::update(bit_field3(), value)); | 4631 set_bit_field3(Counter::update(bit_field3(), value)); |
| 4632 } | 4632 } |
| 4633 | 4633 |
| 4634 | 4634 |
| 4635 bool Map::done_inobject_slack_tracking() { | 4635 int Map::counter() { return Counter::decode(bit_field3()); } |
| 4636 return DoneInobjectSlackTracking::decode(bit_field3()); | |
| 4637 } | |
| 4638 | |
| 4639 | |
| 4640 void Map::set_construction_count(int value) { | |
| 4641 set_bit_field3(ConstructionCount::update(bit_field3(), value)); | |
| 4642 } | |
| 4643 | |
| 4644 | |
| 4645 int Map::construction_count() { | |
| 4646 return ConstructionCount::decode(bit_field3()); | |
| 4647 } | |
| 4648 | 4636 |
| 4649 | 4637 |
| 4650 void Map::freeze() { | 4638 void Map::freeze() { |
| 4651 set_bit_field3(IsFrozen::update(bit_field3(), true)); | 4639 set_bit_field3(IsFrozen::update(bit_field3(), true)); |
| 4652 } | 4640 } |
| 4653 | 4641 |
| 4654 | 4642 |
| 4655 bool Map::is_frozen() { | 4643 bool Map::is_frozen() { |
| 4656 return IsFrozen::decode(bit_field3()); | 4644 return IsFrozen::decode(bit_field3()); |
| 4657 } | 4645 } |
| (...skipping 1386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6044 | 6032 |
| 6045 | 6033 |
| 6046 bool JSFunction::IsInOptimizationQueue() { | 6034 bool JSFunction::IsInOptimizationQueue() { |
| 6047 return code() == GetIsolate()->builtins()->builtin( | 6035 return code() == GetIsolate()->builtins()->builtin( |
| 6048 Builtins::kInOptimizationQueue); | 6036 Builtins::kInOptimizationQueue); |
| 6049 } | 6037 } |
| 6050 | 6038 |
| 6051 | 6039 |
| 6052 bool JSFunction::IsInobjectSlackTrackingInProgress() { | 6040 bool JSFunction::IsInobjectSlackTrackingInProgress() { |
| 6053 return has_initial_map() && | 6041 return has_initial_map() && |
| 6054 initial_map()->construction_count() != JSFunction::kNoSlackTracking; | 6042 initial_map()->counter() >= Map::kSlackTrackingCounterEnd; |
| 6055 } | 6043 } |
| 6056 | 6044 |
| 6057 | 6045 |
| 6058 Code* JSFunction::code() { | 6046 Code* JSFunction::code() { |
| 6059 return Code::cast( | 6047 return Code::cast( |
| 6060 Code::GetObjectFromEntryAddress(FIELD_ADDR(this, kCodeEntryOffset))); | 6048 Code::GetObjectFromEntryAddress(FIELD_ADDR(this, kCodeEntryOffset))); |
| 6061 } | 6049 } |
| 6062 | 6050 |
| 6063 | 6051 |
| 6064 void JSFunction::set_code(Code* value) { | 6052 void JSFunction::set_code(Code* value) { |
| (...skipping 1449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7514 #undef READ_SHORT_FIELD | 7502 #undef READ_SHORT_FIELD |
| 7515 #undef WRITE_SHORT_FIELD | 7503 #undef WRITE_SHORT_FIELD |
| 7516 #undef READ_BYTE_FIELD | 7504 #undef READ_BYTE_FIELD |
| 7517 #undef WRITE_BYTE_FIELD | 7505 #undef WRITE_BYTE_FIELD |
| 7518 #undef NOBARRIER_READ_BYTE_FIELD | 7506 #undef NOBARRIER_READ_BYTE_FIELD |
| 7519 #undef NOBARRIER_WRITE_BYTE_FIELD | 7507 #undef NOBARRIER_WRITE_BYTE_FIELD |
| 7520 | 7508 |
| 7521 } } // namespace v8::internal | 7509 } } // namespace v8::internal |
| 7522 | 7510 |
| 7523 #endif // V8_OBJECTS_INL_H_ | 7511 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |