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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 void TransitionArray::set_elements_transition(Map* transition_map, | 77 void TransitionArray::set_elements_transition(Map* transition_map, |
78 WriteBarrierMode mode) { | 78 WriteBarrierMode mode) { |
79 ASSERT(IsFullTransitionArray()); | 79 ASSERT(IsFullTransitionArray()); |
80 Heap* heap = GetHeap(); | 80 Heap* heap = GetHeap(); |
81 WRITE_FIELD(this, kElementsTransitionOffset, transition_map); | 81 WRITE_FIELD(this, kElementsTransitionOffset, transition_map); |
82 CONDITIONAL_WRITE_BARRIER( | 82 CONDITIONAL_WRITE_BARRIER( |
83 heap, this, kElementsTransitionOffset, transition_map, mode); | 83 heap, this, kElementsTransitionOffset, transition_map, mode); |
84 } | 84 } |
85 | 85 |
86 | 86 |
87 Object** TransitionArray::GetDescriptorsSlot() { | |
88 return HeapObject::RawField(reinterpret_cast<HeapObject*>(this), | |
89 kDescriptorsOffset); | |
90 } | |
91 | |
92 | |
93 DescriptorArray* TransitionArray::descriptors() { | |
94 return DescriptorArray::cast(get(kDescriptorsIndex)); | |
95 } | |
96 | |
97 | |
98 void TransitionArray::set_descriptors(DescriptorArray* descriptors) { | |
99 ASSERT(descriptors->IsDescriptorArray()); | |
100 set(kDescriptorsIndex, descriptors); | |
101 } | |
102 | |
103 | |
104 Object* TransitionArray::back_pointer_storage() { | 87 Object* TransitionArray::back_pointer_storage() { |
105 return get(kBackPointerStorageIndex); | 88 return get(kBackPointerStorageIndex); |
106 } | 89 } |
107 | 90 |
108 | 91 |
109 void TransitionArray::set_back_pointer_storage(Object* back_pointer, | 92 void TransitionArray::set_back_pointer_storage(Object* back_pointer, |
110 WriteBarrierMode mode) { | 93 WriteBarrierMode mode) { |
111 Heap* heap = GetHeap(); | 94 Heap* heap = GetHeap(); |
112 WRITE_FIELD(this, kBackPointerStorageOffset, back_pointer); | 95 WRITE_FIELD(this, kBackPointerStorageOffset, back_pointer); |
113 CONDITIONAL_WRITE_BARRIER( | 96 CONDITIONAL_WRITE_BARRIER( |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 | 206 |
224 | 207 |
225 #undef FIELD_ADDR | 208 #undef FIELD_ADDR |
226 #undef WRITE_FIELD | 209 #undef WRITE_FIELD |
227 #undef CONDITIONAL_WRITE_BARRIER | 210 #undef CONDITIONAL_WRITE_BARRIER |
228 | 211 |
229 | 212 |
230 } } // namespace v8::internal | 213 } } // namespace v8::internal |
231 | 214 |
232 #endif // V8_TRANSITIONS_INL_H_ | 215 #endif // V8_TRANSITIONS_INL_H_ |
OLD | NEW |