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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 ASSERT(transition_number == kSimpleTransitionIndex); | 153 ASSERT(transition_number == kSimpleTransitionIndex); |
154 return set(kSimpleTransitionTarget, value); | 154 return set(kSimpleTransitionTarget, value); |
155 } | 155 } |
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 return map->GetLastDescriptorDetails(); |
164 int descriptor = map->LastAdded(); | |
165 return descriptors->GetDetails(descriptor); | |
166 } | 164 } |
167 | 165 |
168 | 166 |
169 int TransitionArray::Search(Name* name) { | 167 int TransitionArray::Search(Name* name) { |
170 if (IsSimpleTransition()) { | 168 if (IsSimpleTransition()) { |
171 Name* key = GetKey(kSimpleTransitionIndex); | 169 Name* key = GetKey(kSimpleTransitionIndex); |
172 if (key->Equals(name)) return kSimpleTransitionIndex; | 170 if (key->Equals(name)) return kSimpleTransitionIndex; |
173 return kNotFound; | 171 return kNotFound; |
174 } | 172 } |
175 return internal::Search<ALL_ENTRIES>(this, name); | 173 return internal::Search<ALL_ENTRIES>(this, name); |
(...skipping 11 matching lines...) Expand all Loading... |
187 | 185 |
188 | 186 |
189 #undef FIELD_ADDR | 187 #undef FIELD_ADDR |
190 #undef WRITE_FIELD | 188 #undef WRITE_FIELD |
191 #undef CONDITIONAL_WRITE_BARRIER | 189 #undef CONDITIONAL_WRITE_BARRIER |
192 | 190 |
193 | 191 |
194 } } // namespace v8::internal | 192 } } // namespace v8::internal |
195 | 193 |
196 #endif // V8_TRANSITIONS_INL_H_ | 194 #endif // V8_TRANSITIONS_INL_H_ |
OLD | NEW |