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

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

Issue 10802034: Moved lastadded from DescriptorArray to Map. Renamed kLastAdded to kEnumCache. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments. 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/objects-inl.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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 154
155 void TransitionArray::SetTarget(int transition_number, Map* value) { 155 void TransitionArray::SetTarget(int transition_number, Map* value) {
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 DescriptorArray* descriptors = map->instance_descriptors();
164 int descriptor = descriptors->LastAdded(); 164 int descriptor = map->LastAdded();
165 ASSERT(descriptor != DescriptorArray::kNotFound); 165 ASSERT(descriptor != Map::kNoneAdded);
166 return descriptors->GetDetails(descriptor); 166 return descriptors->GetDetails(descriptor);
167 } 167 }
168 168
169 169
170 Object** TransitionArray::GetElementsTransitionSlot() { 170 Object** TransitionArray::GetElementsTransitionSlot() {
171 return HeapObject::RawField(reinterpret_cast<HeapObject*>(this), 171 return HeapObject::RawField(reinterpret_cast<HeapObject*>(this),
172 kElementsTransitionOffset); 172 kElementsTransitionOffset);
173 } 173 }
174 174
175 175
(...skipping 16 matching lines...) Expand all
192 192
193 193
194 #undef FIELD_ADDR 194 #undef FIELD_ADDR
195 #undef WRITE_FIELD 195 #undef WRITE_FIELD
196 #undef CONDITIONAL_WRITE_BARRIER 196 #undef CONDITIONAL_WRITE_BARRIER
197 197
198 198
199 } } // namespace v8::internal 199 } } // namespace v8::internal
200 200
201 #endif // V8_TRANSITIONS_INL_H_ 201 #endif // V8_TRANSITIONS_INL_H_
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698