| 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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 } | 170 } |
| 171 return Map::cast(accessors->setter()); | 171 return Map::cast(accessors->setter()); |
| 172 } | 172 } |
| 173 return Map::cast(value); | 173 return Map::cast(value); |
| 174 } | 174 } |
| 175 | 175 |
| 176 | 176 |
| 177 PropertyDetails TransitionArray::GetTargetDetails(int transition_number) { | 177 PropertyDetails TransitionArray::GetTargetDetails(int transition_number) { |
| 178 Map* map = GetTargetMap(transition_number); | 178 Map* map = GetTargetMap(transition_number); |
| 179 DescriptorArray* descriptors = map->instance_descriptors(); | 179 DescriptorArray* descriptors = map->instance_descriptors(); |
| 180 String* key = GetKey(transition_number); | 180 int descriptor = descriptors->LastAdded(); |
| 181 int descriptor = descriptors->SearchWithCache(key); | |
| 182 ASSERT(descriptor != DescriptorArray::kNotFound); | 181 ASSERT(descriptor != DescriptorArray::kNotFound); |
| 183 return descriptors->GetDetails(descriptor); | 182 return descriptors->GetDetails(descriptor); |
| 184 } | 183 } |
| 185 | 184 |
| 186 | 185 |
| 187 Object** TransitionArray::GetElementsTransitionSlot() { | 186 Object** TransitionArray::GetElementsTransitionSlot() { |
| 188 return HeapObject::RawField(reinterpret_cast<HeapObject*>(this), | 187 return HeapObject::RawField(reinterpret_cast<HeapObject*>(this), |
| 189 kElementsTransitionOffset); | 188 kElementsTransitionOffset); |
| 190 } | 189 } |
| 191 | 190 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 209 | 208 |
| 210 | 209 |
| 211 #undef FIELD_ADDR | 210 #undef FIELD_ADDR |
| 212 #undef WRITE_FIELD | 211 #undef WRITE_FIELD |
| 213 #undef CONDITIONAL_WRITE_BARRIER | 212 #undef CONDITIONAL_WRITE_BARRIER |
| 214 | 213 |
| 215 | 214 |
| 216 } } // namespace v8::internal | 215 } } // namespace v8::internal |
| 217 | 216 |
| 218 #endif // V8_TRANSITIONS_INL_H_ | 217 #endif // V8_TRANSITIONS_INL_H_ |
| OLD | NEW |