| 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 3645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3656 int updated = IsCrankshaftedField::update(previous, value); | 3656 int updated = IsCrankshaftedField::update(previous, value); |
| 3657 WRITE_UINT32_FIELD(this, kKindSpecificFlags2Offset, updated); | 3657 WRITE_UINT32_FIELD(this, kKindSpecificFlags2Offset, updated); |
| 3658 } | 3658 } |
| 3659 | 3659 |
| 3660 | 3660 |
| 3661 int Code::major_key() { | 3661 int Code::major_key() { |
| 3662 ASSERT(kind() == STUB || | 3662 ASSERT(kind() == STUB || |
| 3663 kind() == UNARY_OP_IC || | 3663 kind() == UNARY_OP_IC || |
| 3664 kind() == BINARY_OP_IC || | 3664 kind() == BINARY_OP_IC || |
| 3665 kind() == COMPARE_IC || | 3665 kind() == COMPARE_IC || |
| 3666 kind() == COMPARE_NIL_IC || |
| 3666 kind() == LOAD_IC || | 3667 kind() == LOAD_IC || |
| 3667 kind() == KEYED_LOAD_IC || | 3668 kind() == KEYED_LOAD_IC || |
| 3668 kind() == TO_BOOLEAN_IC); | 3669 kind() == TO_BOOLEAN_IC); |
| 3669 return StubMajorKeyField::decode( | 3670 return StubMajorKeyField::decode( |
| 3670 READ_UINT32_FIELD(this, kKindSpecificFlags2Offset)); | 3671 READ_UINT32_FIELD(this, kKindSpecificFlags2Offset)); |
| 3671 } | 3672 } |
| 3672 | 3673 |
| 3673 | 3674 |
| 3674 void Code::set_major_key(int major) { | 3675 void Code::set_major_key(int major) { |
| 3675 ASSERT(kind() == STUB || | 3676 ASSERT(kind() == STUB || |
| 3676 kind() == UNARY_OP_IC || | 3677 kind() == UNARY_OP_IC || |
| 3677 kind() == BINARY_OP_IC || | 3678 kind() == BINARY_OP_IC || |
| 3678 kind() == COMPARE_IC || | 3679 kind() == COMPARE_IC || |
| 3680 kind() == COMPARE_NIL_IC || |
| 3679 kind() == LOAD_IC || | 3681 kind() == LOAD_IC || |
| 3680 kind() == KEYED_LOAD_IC || | 3682 kind() == KEYED_LOAD_IC || |
| 3681 kind() == STORE_IC || | 3683 kind() == STORE_IC || |
| 3682 kind() == KEYED_STORE_IC || | 3684 kind() == KEYED_STORE_IC || |
| 3683 kind() == TO_BOOLEAN_IC); | 3685 kind() == TO_BOOLEAN_IC); |
| 3684 ASSERT(0 <= major && major < 256); | 3686 ASSERT(0 <= major && major < 256); |
| 3685 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset); | 3687 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset); |
| 3686 int updated = StubMajorKeyField::update(previous, major); | 3688 int updated = StubMajorKeyField::update(previous, major); |
| 3687 WRITE_UINT32_FIELD(this, kKindSpecificFlags2Offset, updated); | 3689 WRITE_UINT32_FIELD(this, kKindSpecificFlags2Offset, updated); |
| 3688 } | 3690 } |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3885 | 3887 |
| 3886 | 3888 |
| 3887 void Code::set_to_boolean_state(byte value) { | 3889 void Code::set_to_boolean_state(byte value) { |
| 3888 ASSERT(is_to_boolean_ic_stub()); | 3890 ASSERT(is_to_boolean_ic_stub()); |
| 3889 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags1Offset); | 3891 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags1Offset); |
| 3890 int updated = ToBooleanStateField::update(previous, value); | 3892 int updated = ToBooleanStateField::update(previous, value); |
| 3891 WRITE_UINT32_FIELD(this, kKindSpecificFlags1Offset, updated); | 3893 WRITE_UINT32_FIELD(this, kKindSpecificFlags1Offset, updated); |
| 3892 } | 3894 } |
| 3893 | 3895 |
| 3894 | 3896 |
| 3897 byte Code::compare_nil_state() { |
| 3898 ASSERT(is_compare_nil_ic_stub()); |
| 3899 return extra_ic_state(); |
| 3900 } |
| 3901 |
| 3902 |
| 3895 bool Code::has_function_cache() { | 3903 bool Code::has_function_cache() { |
| 3896 ASSERT(kind() == STUB); | 3904 ASSERT(kind() == STUB); |
| 3897 return HasFunctionCacheField::decode( | 3905 return HasFunctionCacheField::decode( |
| 3898 READ_UINT32_FIELD(this, kKindSpecificFlags1Offset)); | 3906 READ_UINT32_FIELD(this, kKindSpecificFlags1Offset)); |
| 3899 } | 3907 } |
| 3900 | 3908 |
| 3901 | 3909 |
| 3902 void Code::set_has_function_cache(bool flag) { | 3910 void Code::set_has_function_cache(bool flag) { |
| 3903 ASSERT(kind() == STUB); | 3911 ASSERT(kind() == STUB); |
| 3904 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags1Offset); | 3912 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags1Offset); |
| (...skipping 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5117 | 5125 |
| 5118 void Code::set_type_feedback_info(Object* value, WriteBarrierMode mode) { | 5126 void Code::set_type_feedback_info(Object* value, WriteBarrierMode mode) { |
| 5119 ASSERT(kind() == FUNCTION); | 5127 ASSERT(kind() == FUNCTION); |
| 5120 WRITE_FIELD(this, kTypeFeedbackInfoOffset, value); | 5128 WRITE_FIELD(this, kTypeFeedbackInfoOffset, value); |
| 5121 CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kTypeFeedbackInfoOffset, | 5129 CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kTypeFeedbackInfoOffset, |
| 5122 value, mode); | 5130 value, mode); |
| 5123 } | 5131 } |
| 5124 | 5132 |
| 5125 | 5133 |
| 5126 int Code::stub_info() { | 5134 int Code::stub_info() { |
| 5127 ASSERT(kind() == COMPARE_IC || kind() == BINARY_OP_IC || kind() == LOAD_IC); | 5135 ASSERT(kind() == COMPARE_IC || kind() == COMPARE_NIL_IC || |
| 5136 kind() == BINARY_OP_IC || kind() == LOAD_IC); |
| 5128 Object* value = READ_FIELD(this, kTypeFeedbackInfoOffset); | 5137 Object* value = READ_FIELD(this, kTypeFeedbackInfoOffset); |
| 5129 return Smi::cast(value)->value(); | 5138 return Smi::cast(value)->value(); |
| 5130 } | 5139 } |
| 5131 | 5140 |
| 5132 | 5141 |
| 5133 void Code::set_stub_info(int value) { | 5142 void Code::set_stub_info(int value) { |
| 5134 ASSERT(kind() == COMPARE_IC || | 5143 ASSERT(kind() == COMPARE_IC || |
| 5144 kind() == COMPARE_NIL_IC || |
| 5135 kind() == BINARY_OP_IC || | 5145 kind() == BINARY_OP_IC || |
| 5136 kind() == STUB || | 5146 kind() == STUB || |
| 5137 kind() == LOAD_IC || | 5147 kind() == LOAD_IC || |
| 5138 kind() == KEYED_LOAD_IC || | 5148 kind() == KEYED_LOAD_IC || |
| 5139 kind() == STORE_IC || | 5149 kind() == STORE_IC || |
| 5140 kind() == KEYED_STORE_IC); | 5150 kind() == KEYED_STORE_IC); |
| 5141 WRITE_FIELD(this, kTypeFeedbackInfoOffset, Smi::FromInt(value)); | 5151 WRITE_FIELD(this, kTypeFeedbackInfoOffset, Smi::FromInt(value)); |
| 5142 } | 5152 } |
| 5143 | 5153 |
| 5144 | 5154 |
| (...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6119 #undef WRITE_UINT32_FIELD | 6129 #undef WRITE_UINT32_FIELD |
| 6120 #undef READ_SHORT_FIELD | 6130 #undef READ_SHORT_FIELD |
| 6121 #undef WRITE_SHORT_FIELD | 6131 #undef WRITE_SHORT_FIELD |
| 6122 #undef READ_BYTE_FIELD | 6132 #undef READ_BYTE_FIELD |
| 6123 #undef WRITE_BYTE_FIELD | 6133 #undef WRITE_BYTE_FIELD |
| 6124 | 6134 |
| 6125 | 6135 |
| 6126 } } // namespace v8::internal | 6136 } } // namespace v8::internal |
| 6127 | 6137 |
| 6128 #endif // V8_OBJECTS_INL_H_ | 6138 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |