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

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

Issue 170343003: Directly store the transition target on LookupResult in TransitionResult. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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.cc ('k') | test/mjsunit/regress/regress-lookup-transition.js » ('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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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_
OLDNEW
« no previous file with comments | « src/property.cc ('k') | test/mjsunit/regress/regress-lookup-transition.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698