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 1940 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1951 Map* transition_map, WriteBarrierMode mode) { | 1951 Map* transition_map, WriteBarrierMode mode) { |
1952 ASSERT(this->length() > kTransitionsIndex); | 1952 ASSERT(this->length() > kTransitionsIndex); |
1953 Heap* heap = GetHeap(); | 1953 Heap* heap = GetHeap(); |
1954 WRITE_FIELD(this, kTransitionsOffset, transition_map); | 1954 WRITE_FIELD(this, kTransitionsOffset, transition_map); |
1955 CONDITIONAL_WRITE_BARRIER( | 1955 CONDITIONAL_WRITE_BARRIER( |
1956 heap, this, kTransitionsOffset, transition_map, mode); | 1956 heap, this, kTransitionsOffset, transition_map, mode); |
1957 ASSERT(DescriptorArray::cast(this)); | 1957 ASSERT(DescriptorArray::cast(this)); |
1958 } | 1958 } |
1959 | 1959 |
1960 | 1960 |
| 1961 void DescriptorArray::ClearElementsTransition() { |
| 1962 WRITE_FIELD(this, kTransitionsOffset, Smi::FromInt(0)); |
| 1963 } |
| 1964 |
| 1965 |
1961 Object** DescriptorArray::GetKeySlot(int descriptor_number) { | 1966 Object** DescriptorArray::GetKeySlot(int descriptor_number) { |
1962 ASSERT(descriptor_number < number_of_descriptors()); | 1967 ASSERT(descriptor_number < number_of_descriptors()); |
1963 return HeapObject::RawField( | 1968 return HeapObject::RawField( |
1964 reinterpret_cast<HeapObject*>(this), | 1969 reinterpret_cast<HeapObject*>(this), |
1965 OffsetOfElementAt(ToKeyIndex(descriptor_number))); | 1970 OffsetOfElementAt(ToKeyIndex(descriptor_number))); |
1966 } | 1971 } |
1967 | 1972 |
1968 | 1973 |
1969 String* DescriptorArray::GetKey(int descriptor_number) { | 1974 String* DescriptorArray::GetKey(int descriptor_number) { |
1970 ASSERT(descriptor_number < number_of_descriptors()); | 1975 ASSERT(descriptor_number < number_of_descriptors()); |
(...skipping 3206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5177 #undef WRITE_UINT32_FIELD | 5182 #undef WRITE_UINT32_FIELD |
5178 #undef READ_SHORT_FIELD | 5183 #undef READ_SHORT_FIELD |
5179 #undef WRITE_SHORT_FIELD | 5184 #undef WRITE_SHORT_FIELD |
5180 #undef READ_BYTE_FIELD | 5185 #undef READ_BYTE_FIELD |
5181 #undef WRITE_BYTE_FIELD | 5186 #undef WRITE_BYTE_FIELD |
5182 | 5187 |
5183 | 5188 |
5184 } } // namespace v8::internal | 5189 } } // namespace v8::internal |
5185 | 5190 |
5186 #endif // V8_OBJECTS_INL_H_ | 5191 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |