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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 | 154 |
155 void TransitionArray::SetTarget(int transition_number, Map* value) { | 155 void TransitionArray::SetTarget(int transition_number, Map* value) { |
156 ASSERT(transition_number < number_of_transitions()); | 156 ASSERT(transition_number < number_of_transitions()); |
157 set(ToTargetIndex(transition_number), value); | 157 set(ToTargetIndex(transition_number), value); |
158 } | 158 } |
159 | 159 |
160 | 160 |
161 PropertyDetails TransitionArray::GetTargetDetails(int transition_number) { | 161 PropertyDetails TransitionArray::GetTargetDetails(int transition_number) { |
162 Map* map = GetTarget(transition_number); | 162 Map* map = GetTarget(transition_number); |
163 DescriptorArray* descriptors = map->instance_descriptors(); | 163 DescriptorArray* descriptors = map->instance_descriptors(); |
164 int descriptor = descriptors->LastAdded(); | 164 int descriptor = map->LastAdded(); |
165 ASSERT(descriptor != DescriptorArray::kNotFound); | 165 ASSERT(descriptor != Map::kNoneAdded); |
166 return descriptors->GetDetails(descriptor); | 166 return descriptors->GetDetails(descriptor); |
167 } | 167 } |
168 | 168 |
169 | 169 |
170 Object** TransitionArray::GetElementsTransitionSlot() { | 170 Object** TransitionArray::GetElementsTransitionSlot() { |
171 return HeapObject::RawField(reinterpret_cast<HeapObject*>(this), | 171 return HeapObject::RawField(reinterpret_cast<HeapObject*>(this), |
172 kElementsTransitionOffset); | 172 kElementsTransitionOffset); |
173 } | 173 } |
174 | 174 |
175 | 175 |
(...skipping 16 matching lines...) Expand all Loading... |
192 | 192 |
193 | 193 |
194 #undef FIELD_ADDR | 194 #undef FIELD_ADDR |
195 #undef WRITE_FIELD | 195 #undef WRITE_FIELD |
196 #undef CONDITIONAL_WRITE_BARRIER | 196 #undef CONDITIONAL_WRITE_BARRIER |
197 | 197 |
198 | 198 |
199 } } // namespace v8::internal | 199 } } // namespace v8::internal |
200 | 200 |
201 #endif // V8_TRANSITIONS_INL_H_ | 201 #endif // V8_TRANSITIONS_INL_H_ |
OLD | NEW |