| 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 5154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5165 | 5165 |
| 5166 bool Code::back_edges_patched_for_osr() { | 5166 bool Code::back_edges_patched_for_osr() { |
| 5167 DCHECK_EQ(FUNCTION, kind()); | 5167 DCHECK_EQ(FUNCTION, kind()); |
| 5168 return allow_osr_at_loop_nesting_level() > 0; | 5168 return allow_osr_at_loop_nesting_level() > 0; |
| 5169 } | 5169 } |
| 5170 | 5170 |
| 5171 | 5171 |
| 5172 uint16_t Code::to_boolean_state() { return extra_ic_state(); } | 5172 uint16_t Code::to_boolean_state() { return extra_ic_state(); } |
| 5173 | 5173 |
| 5174 | 5174 |
| 5175 bool Code::has_function_cache() { | |
| 5176 DCHECK(kind() == STUB); | |
| 5177 return HasFunctionCacheField::decode( | |
| 5178 READ_UINT32_FIELD(this, kKindSpecificFlags1Offset)); | |
| 5179 } | |
| 5180 | |
| 5181 | |
| 5182 void Code::set_has_function_cache(bool flag) { | |
| 5183 DCHECK(kind() == STUB); | |
| 5184 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags1Offset); | |
| 5185 int updated = HasFunctionCacheField::update(previous, flag); | |
| 5186 WRITE_UINT32_FIELD(this, kKindSpecificFlags1Offset, updated); | |
| 5187 } | |
| 5188 | |
| 5189 | |
| 5190 bool Code::marked_for_deoptimization() { | 5175 bool Code::marked_for_deoptimization() { |
| 5191 DCHECK(kind() == OPTIMIZED_FUNCTION); | 5176 DCHECK(kind() == OPTIMIZED_FUNCTION); |
| 5192 return MarkedForDeoptimizationField::decode( | 5177 return MarkedForDeoptimizationField::decode( |
| 5193 READ_UINT32_FIELD(this, kKindSpecificFlags1Offset)); | 5178 READ_UINT32_FIELD(this, kKindSpecificFlags1Offset)); |
| 5194 } | 5179 } |
| 5195 | 5180 |
| 5196 | 5181 |
| 5197 void Code::set_marked_for_deoptimization(bool flag) { | 5182 void Code::set_marked_for_deoptimization(bool flag) { |
| 5198 DCHECK(kind() == OPTIMIZED_FUNCTION); | 5183 DCHECK(kind() == OPTIMIZED_FUNCTION); |
| 5199 DCHECK(!flag || AllowDeoptimization::IsAllowed(GetIsolate())); | 5184 DCHECK(!flag || AllowDeoptimization::IsAllowed(GetIsolate())); |
| (...skipping 2691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7891 #undef WRITE_INT64_FIELD | 7876 #undef WRITE_INT64_FIELD |
| 7892 #undef READ_BYTE_FIELD | 7877 #undef READ_BYTE_FIELD |
| 7893 #undef WRITE_BYTE_FIELD | 7878 #undef WRITE_BYTE_FIELD |
| 7894 #undef NOBARRIER_READ_BYTE_FIELD | 7879 #undef NOBARRIER_READ_BYTE_FIELD |
| 7895 #undef NOBARRIER_WRITE_BYTE_FIELD | 7880 #undef NOBARRIER_WRITE_BYTE_FIELD |
| 7896 | 7881 |
| 7897 } // namespace internal | 7882 } // namespace internal |
| 7898 } // namespace v8 | 7883 } // namespace v8 |
| 7899 | 7884 |
| 7900 #endif // V8_OBJECTS_INL_H_ | 7885 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |