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 5925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5936 return OptCountBits::decode(opt_count_and_bailout_reason()); | 5936 return OptCountBits::decode(opt_count_and_bailout_reason()); |
5937 } | 5937 } |
5938 | 5938 |
5939 | 5939 |
5940 void SharedFunctionInfo::set_opt_count(int opt_count) { | 5940 void SharedFunctionInfo::set_opt_count(int opt_count) { |
5941 set_opt_count_and_bailout_reason( | 5941 set_opt_count_and_bailout_reason( |
5942 OptCountBits::update(opt_count_and_bailout_reason(), opt_count)); | 5942 OptCountBits::update(opt_count_and_bailout_reason(), opt_count)); |
5943 } | 5943 } |
5944 | 5944 |
5945 | 5945 |
5946 BailoutReason SharedFunctionInfo::DisableOptimizationReason() { | 5946 BailoutReason SharedFunctionInfo::disable_optimization_reason() { |
5947 BailoutReason reason = static_cast<BailoutReason>( | 5947 return static_cast<BailoutReason>( |
5948 DisabledOptimizationReasonBits::decode(opt_count_and_bailout_reason())); | 5948 DisabledOptimizationReasonBits::decode(opt_count_and_bailout_reason())); |
5949 return reason; | |
5950 } | 5949 } |
5951 | 5950 |
5952 | 5951 |
5953 bool SharedFunctionInfo::has_deoptimization_support() { | 5952 bool SharedFunctionInfo::has_deoptimization_support() { |
5954 Code* code = this->code(); | 5953 Code* code = this->code(); |
5955 return code->kind() == Code::FUNCTION && code->has_deoptimization_support(); | 5954 return code->kind() == Code::FUNCTION && code->has_deoptimization_support(); |
5956 } | 5955 } |
5957 | 5956 |
5958 | 5957 |
5959 void SharedFunctionInfo::TryReenableOptimization() { | 5958 void SharedFunctionInfo::TryReenableOptimization() { |
(...skipping 1514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7474 #undef READ_SHORT_FIELD | 7473 #undef READ_SHORT_FIELD |
7475 #undef WRITE_SHORT_FIELD | 7474 #undef WRITE_SHORT_FIELD |
7476 #undef READ_BYTE_FIELD | 7475 #undef READ_BYTE_FIELD |
7477 #undef WRITE_BYTE_FIELD | 7476 #undef WRITE_BYTE_FIELD |
7478 #undef NOBARRIER_READ_BYTE_FIELD | 7477 #undef NOBARRIER_READ_BYTE_FIELD |
7479 #undef NOBARRIER_WRITE_BYTE_FIELD | 7478 #undef NOBARRIER_WRITE_BYTE_FIELD |
7480 | 7479 |
7481 } } // namespace v8::internal | 7480 } } // namespace v8::internal |
7482 | 7481 |
7483 #endif // V8_OBJECTS_INL_H_ | 7482 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |