| 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 4546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4557 | 4557 |
| 4558 | 4558 |
| 4559 void Code::mark_as_invalidated_weak_stub() { | 4559 void Code::mark_as_invalidated_weak_stub() { |
| 4560 ASSERT(is_inline_cache_stub()); | 4560 ASSERT(is_inline_cache_stub()); |
| 4561 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags1Offset); | 4561 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags1Offset); |
| 4562 int updated = InvalidatedWeakStubField::update(previous, true); | 4562 int updated = InvalidatedWeakStubField::update(previous, true); |
| 4563 WRITE_UINT32_FIELD(this, kKindSpecificFlags1Offset, updated); | 4563 WRITE_UINT32_FIELD(this, kKindSpecificFlags1Offset, updated); |
| 4564 } | 4564 } |
| 4565 | 4565 |
| 4566 | 4566 |
| 4567 bool Code::marked_for_instant_optimization() { |
| 4568 ASSERT(kind() == OPTIMIZED_FUNCTION); |
| 4569 return MarkedForInstantOptimizationField::decode( |
| 4570 READ_UINT32_FIELD(this, kKindSpecificFlags1Offset)); |
| 4571 } |
| 4572 |
| 4573 |
| 4574 void Code::set_marked_for_instant_optimization(bool flag) { |
| 4575 ASSERT(kind() == OPTIMIZED_FUNCTION); |
| 4576 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags1Offset); |
| 4577 int updated = MarkedForInstantOptimizationField::update(previous, flag); |
| 4578 WRITE_UINT32_FIELD(this, kKindSpecificFlags1Offset, updated); |
| 4579 } |
| 4580 |
| 4581 |
| 4567 bool Code::is_inline_cache_stub() { | 4582 bool Code::is_inline_cache_stub() { |
| 4568 Kind kind = this->kind(); | 4583 Kind kind = this->kind(); |
| 4569 switch (kind) { | 4584 switch (kind) { |
| 4570 #define CASE(name) case name: return true; | 4585 #define CASE(name) case name: return true; |
| 4571 IC_KIND_LIST(CASE) | 4586 IC_KIND_LIST(CASE) |
| 4572 #undef CASE | 4587 #undef CASE |
| 4573 default: return false; | 4588 default: return false; |
| 4574 } | 4589 } |
| 4575 } | 4590 } |
| 4576 | 4591 |
| (...skipping 2278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6855 #undef READ_SHORT_FIELD | 6870 #undef READ_SHORT_FIELD |
| 6856 #undef WRITE_SHORT_FIELD | 6871 #undef WRITE_SHORT_FIELD |
| 6857 #undef READ_BYTE_FIELD | 6872 #undef READ_BYTE_FIELD |
| 6858 #undef WRITE_BYTE_FIELD | 6873 #undef WRITE_BYTE_FIELD |
| 6859 #undef NOBARRIER_READ_BYTE_FIELD | 6874 #undef NOBARRIER_READ_BYTE_FIELD |
| 6860 #undef NOBARRIER_WRITE_BYTE_FIELD | 6875 #undef NOBARRIER_WRITE_BYTE_FIELD |
| 6861 | 6876 |
| 6862 } } // namespace v8::internal | 6877 } } // namespace v8::internal |
| 6863 | 6878 |
| 6864 #endif // V8_OBJECTS_INL_H_ | 6879 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |