Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(589)

Side by Side Diff: src/transitions-inl.h

Issue 10695120: Ensure that all descriptors have a valid enumeration index, and replace NextEnumIndex with LastAdde… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comment. Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/property.h ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « src/property.h ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698