| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 3804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3815 | 3815 |
| 3816 inline void Code::set_is_crankshafted(bool value) { | 3816 inline void Code::set_is_crankshafted(bool value) { |
| 3817 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset); | 3817 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset); |
| 3818 int updated = IsCrankshaftedField::update(previous, value); | 3818 int updated = IsCrankshaftedField::update(previous, value); |
| 3819 WRITE_UINT32_FIELD(this, kKindSpecificFlags2Offset, updated); | 3819 WRITE_UINT32_FIELD(this, kKindSpecificFlags2Offset, updated); |
| 3820 } | 3820 } |
| 3821 | 3821 |
| 3822 | 3822 |
| 3823 int Code::major_key() { | 3823 int Code::major_key() { |
| 3824 ASSERT(kind() == STUB || | 3824 ASSERT(kind() == STUB || |
| 3825 kind() == UNARY_OP_IC || | |
| 3826 kind() == BINARY_OP_IC || | 3825 kind() == BINARY_OP_IC || |
| 3827 kind() == COMPARE_IC || | 3826 kind() == COMPARE_IC || |
| 3828 kind() == COMPARE_NIL_IC || | 3827 kind() == COMPARE_NIL_IC || |
| 3829 kind() == STORE_IC || | 3828 kind() == STORE_IC || |
| 3830 kind() == LOAD_IC || | 3829 kind() == LOAD_IC || |
| 3831 kind() == KEYED_LOAD_IC || | 3830 kind() == KEYED_LOAD_IC || |
| 3832 kind() == TO_BOOLEAN_IC); | 3831 kind() == TO_BOOLEAN_IC); |
| 3833 return StubMajorKeyField::decode( | 3832 return StubMajorKeyField::decode( |
| 3834 READ_UINT32_FIELD(this, kKindSpecificFlags2Offset)); | 3833 READ_UINT32_FIELD(this, kKindSpecificFlags2Offset)); |
| 3835 } | 3834 } |
| 3836 | 3835 |
| 3837 | 3836 |
| 3838 void Code::set_major_key(int major) { | 3837 void Code::set_major_key(int major) { |
| 3839 ASSERT(kind() == STUB || | 3838 ASSERT(kind() == STUB || |
| 3840 kind() == UNARY_OP_IC || | |
| 3841 kind() == BINARY_OP_IC || | 3839 kind() == BINARY_OP_IC || |
| 3842 kind() == COMPARE_IC || | 3840 kind() == COMPARE_IC || |
| 3843 kind() == COMPARE_NIL_IC || | 3841 kind() == COMPARE_NIL_IC || |
| 3844 kind() == LOAD_IC || | 3842 kind() == LOAD_IC || |
| 3845 kind() == KEYED_LOAD_IC || | 3843 kind() == KEYED_LOAD_IC || |
| 3846 kind() == STORE_IC || | 3844 kind() == STORE_IC || |
| 3847 kind() == KEYED_STORE_IC || | 3845 kind() == KEYED_STORE_IC || |
| 3848 kind() == TO_BOOLEAN_IC); | 3846 kind() == TO_BOOLEAN_IC); |
| 3849 ASSERT(0 <= major && major < 256); | 3847 ASSERT(0 <= major && major < 256); |
| 3850 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset); | 3848 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset); |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4020 return static_cast<CheckType>(type); | 4018 return static_cast<CheckType>(type); |
| 4021 } | 4019 } |
| 4022 | 4020 |
| 4023 | 4021 |
| 4024 void Code::set_check_type(CheckType value) { | 4022 void Code::set_check_type(CheckType value) { |
| 4025 ASSERT(is_call_stub() || is_keyed_call_stub()); | 4023 ASSERT(is_call_stub() || is_keyed_call_stub()); |
| 4026 WRITE_BYTE_FIELD(this, kCheckTypeOffset, value); | 4024 WRITE_BYTE_FIELD(this, kCheckTypeOffset, value); |
| 4027 } | 4025 } |
| 4028 | 4026 |
| 4029 | 4027 |
| 4030 byte Code::unary_op_type() { | |
| 4031 ASSERT(is_unary_op_stub()); | |
| 4032 return UnaryOpTypeField::decode( | |
| 4033 READ_UINT32_FIELD(this, kKindSpecificFlags1Offset)); | |
| 4034 } | |
| 4035 | |
| 4036 | |
| 4037 void Code::set_unary_op_type(byte value) { | |
| 4038 ASSERT(is_unary_op_stub()); | |
| 4039 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags1Offset); | |
| 4040 int updated = UnaryOpTypeField::update(previous, value); | |
| 4041 WRITE_UINT32_FIELD(this, kKindSpecificFlags1Offset, updated); | |
| 4042 } | |
| 4043 | |
| 4044 | |
| 4045 byte Code::to_boolean_state() { | 4028 byte Code::to_boolean_state() { |
| 4046 return extended_extra_ic_state(); | 4029 return extended_extra_ic_state(); |
| 4047 } | 4030 } |
| 4048 | 4031 |
| 4049 | 4032 |
| 4050 bool Code::has_function_cache() { | 4033 bool Code::has_function_cache() { |
| 4051 ASSERT(kind() == STUB); | 4034 ASSERT(kind() == STUB); |
| 4052 return HasFunctionCacheField::decode( | 4035 return HasFunctionCacheField::decode( |
| 4053 READ_UINT32_FIELD(this, kKindSpecificFlags1Offset)); | 4036 READ_UINT32_FIELD(this, kKindSpecificFlags1Offset)); |
| 4054 } | 4037 } |
| (...skipping 2206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6261 #undef WRITE_UINT32_FIELD | 6244 #undef WRITE_UINT32_FIELD |
| 6262 #undef READ_SHORT_FIELD | 6245 #undef READ_SHORT_FIELD |
| 6263 #undef WRITE_SHORT_FIELD | 6246 #undef WRITE_SHORT_FIELD |
| 6264 #undef READ_BYTE_FIELD | 6247 #undef READ_BYTE_FIELD |
| 6265 #undef WRITE_BYTE_FIELD | 6248 #undef WRITE_BYTE_FIELD |
| 6266 | 6249 |
| 6267 | 6250 |
| 6268 } } // namespace v8::internal | 6251 } } // namespace v8::internal |
| 6269 | 6252 |
| 6270 #endif // V8_OBJECTS_INL_H_ | 6253 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |