| 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 | 184 |
| 185 PropertyDetails TransitionArray::GetTargetDetails(int transition_number) { | 185 PropertyDetails TransitionArray::GetTargetDetails(int transition_number) { |
| 186 Map* map = GetTarget(transition_number); | 186 Map* map = GetTarget(transition_number); |
| 187 DescriptorArray* descriptors = map->instance_descriptors(); | 187 DescriptorArray* descriptors = map->instance_descriptors(); |
| 188 int descriptor = map->LastAdded(); | 188 int descriptor = map->LastAdded(); |
| 189 return descriptors->GetDetails(descriptor); | 189 return descriptors->GetDetails(descriptor); |
| 190 } | 190 } |
| 191 | 191 |
| 192 | 192 |
| 193 int TransitionArray::Search(String* name) { | 193 int TransitionArray::Search(String* name) { |
| 194 if (IsSimpleTransition()) { |
| 195 String* key = GetKey(kSimpleTransitionIndex); |
| 196 if (key->Equals(name)) return kSimpleTransitionIndex; |
| 197 return kNotFound; |
| 198 } |
| 194 return internal::Search<ALL_ENTRIES>(this, name); | 199 return internal::Search<ALL_ENTRIES>(this, name); |
| 195 } | 200 } |
| 196 | 201 |
| 197 | 202 |
| 198 void TransitionArray::NoIncrementalWriteBarrierSet(int transition_number, | 203 void TransitionArray::NoIncrementalWriteBarrierSet(int transition_number, |
| 199 String* key, | 204 String* key, |
| 200 Map* target) { | 205 Map* target) { |
| 201 FixedArray::NoIncrementalWriteBarrierSet( | 206 FixedArray::NoIncrementalWriteBarrierSet( |
| 202 this, ToKeyIndex(transition_number), key); | 207 this, ToKeyIndex(transition_number), key); |
| 203 FixedArray::NoIncrementalWriteBarrierSet( | 208 FixedArray::NoIncrementalWriteBarrierSet( |
| 204 this, ToTargetIndex(transition_number), target); | 209 this, ToTargetIndex(transition_number), target); |
| 205 } | 210 } |
| 206 | 211 |
| 207 | 212 |
| 208 #undef FIELD_ADDR | 213 #undef FIELD_ADDR |
| 209 #undef WRITE_FIELD | 214 #undef WRITE_FIELD |
| 210 #undef CONDITIONAL_WRITE_BARRIER | 215 #undef CONDITIONAL_WRITE_BARRIER |
| 211 | 216 |
| 212 | 217 |
| 213 } } // namespace v8::internal | 218 } } // namespace v8::internal |
| 214 | 219 |
| 215 #endif // V8_TRANSITIONS_INL_H_ | 220 #endif // V8_TRANSITIONS_INL_H_ |
| OLD | NEW |