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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 ASSERT(transition_number == kSimpleTransitionIndex); | 155 ASSERT(transition_number == kSimpleTransitionIndex); |
156 return set(kSimpleTransitionTarget, value); | 156 return set(kSimpleTransitionTarget, value); |
157 } | 157 } |
158 ASSERT(transition_number < number_of_transitions()); | 158 ASSERT(transition_number < number_of_transitions()); |
159 set(ToTargetIndex(transition_number), value); | 159 set(ToTargetIndex(transition_number), value); |
160 } | 160 } |
161 | 161 |
162 | 162 |
163 PropertyDetails TransitionArray::GetTargetDetails(int transition_number) { | 163 PropertyDetails TransitionArray::GetTargetDetails(int transition_number) { |
164 Map* map = GetTarget(transition_number); | 164 Map* map = GetTarget(transition_number); |
165 DescriptorArray* descriptors = map->instance_descriptors(); | 165 return map->GetLastDescriptorDetails(); |
166 int descriptor = map->LastAdded(); | |
167 return descriptors->GetDetails(descriptor); | |
168 } | 166 } |
169 | 167 |
170 | 168 |
171 int TransitionArray::Search(Name* name) { | 169 int TransitionArray::Search(Name* name) { |
172 if (IsSimpleTransition()) { | 170 if (IsSimpleTransition()) { |
173 Name* key = GetKey(kSimpleTransitionIndex); | 171 Name* key = GetKey(kSimpleTransitionIndex); |
174 if (key->Equals(name)) return kSimpleTransitionIndex; | 172 if (key->Equals(name)) return kSimpleTransitionIndex; |
175 return kNotFound; | 173 return kNotFound; |
176 } | 174 } |
177 return internal::Search<ALL_ENTRIES>(this, name); | 175 return internal::Search<ALL_ENTRIES>(this, name); |
(...skipping 11 matching lines...) Expand all Loading... |
189 | 187 |
190 | 188 |
191 #undef FIELD_ADDR | 189 #undef FIELD_ADDR |
192 #undef WRITE_FIELD | 190 #undef WRITE_FIELD |
193 #undef CONDITIONAL_WRITE_BARRIER | 191 #undef CONDITIONAL_WRITE_BARRIER |
194 | 192 |
195 | 193 |
196 } } // namespace v8::internal | 194 } } // namespace v8::internal |
197 | 195 |
198 #endif // V8_TRANSITIONS_INL_H_ | 196 #endif // V8_TRANSITIONS_INL_H_ |
OLD | NEW |