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 4883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4894 return is_crankshafted() && kind() != OPTIMIZED_FUNCTION; | 4894 return is_crankshafted() && kind() != OPTIMIZED_FUNCTION; |
4895 } | 4895 } |
4896 | 4896 |
4897 | 4897 |
4898 inline bool Code::is_interpreter_entry_trampoline() { | 4898 inline bool Code::is_interpreter_entry_trampoline() { |
4899 Handle<Code> interpreter_entry = | 4899 Handle<Code> interpreter_entry = |
4900 GetIsolate()->builtins()->InterpreterEntryTrampoline(); | 4900 GetIsolate()->builtins()->InterpreterEntryTrampoline(); |
4901 return interpreter_entry.location() != nullptr && *interpreter_entry == this; | 4901 return interpreter_entry.location() != nullptr && *interpreter_entry == this; |
4902 } | 4902 } |
4903 | 4903 |
| 4904 inline bool Code::is_interpreter_enter_bytecode_dispatch() { |
| 4905 Handle<Code> interpreter_handler = |
| 4906 GetIsolate()->builtins()->InterpreterEnterBytecodeDispatch(); |
| 4907 return interpreter_handler.location() != nullptr && |
| 4908 *interpreter_handler == this; |
| 4909 } |
| 4910 |
4904 inline void Code::set_is_crankshafted(bool value) { | 4911 inline void Code::set_is_crankshafted(bool value) { |
4905 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset); | 4912 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset); |
4906 int updated = IsCrankshaftedField::update(previous, value); | 4913 int updated = IsCrankshaftedField::update(previous, value); |
4907 WRITE_UINT32_FIELD(this, kKindSpecificFlags2Offset, updated); | 4914 WRITE_UINT32_FIELD(this, kKindSpecificFlags2Offset, updated); |
4908 } | 4915 } |
4909 | 4916 |
4910 | 4917 |
4911 inline bool Code::is_turbofanned() { | 4918 inline bool Code::is_turbofanned() { |
4912 return IsTurbofannedField::decode( | 4919 return IsTurbofannedField::decode( |
4913 READ_UINT32_FIELD(this, kKindSpecificFlags1Offset)); | 4920 READ_UINT32_FIELD(this, kKindSpecificFlags1Offset)); |
(...skipping 2898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7812 #undef WRITE_INT64_FIELD | 7819 #undef WRITE_INT64_FIELD |
7813 #undef READ_BYTE_FIELD | 7820 #undef READ_BYTE_FIELD |
7814 #undef WRITE_BYTE_FIELD | 7821 #undef WRITE_BYTE_FIELD |
7815 #undef NOBARRIER_READ_BYTE_FIELD | 7822 #undef NOBARRIER_READ_BYTE_FIELD |
7816 #undef NOBARRIER_WRITE_BYTE_FIELD | 7823 #undef NOBARRIER_WRITE_BYTE_FIELD |
7817 | 7824 |
7818 } // namespace internal | 7825 } // namespace internal |
7819 } // namespace v8 | 7826 } // namespace v8 |
7820 | 7827 |
7821 #endif // V8_OBJECTS_INL_H_ | 7828 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |