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

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

Issue 10802048: Removed recording of Target Slot in transition arrays since they only contain maps. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comment. Created 8 years, 4 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/transitions.h ('k') | no next file » | 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 set(ToKeyIndex(transition_number), key); 137 set(ToKeyIndex(transition_number), key);
138 } 138 }
139 139
140 140
141 Map* TransitionArray::GetTarget(int transition_number) { 141 Map* TransitionArray::GetTarget(int transition_number) {
142 ASSERT(transition_number < number_of_transitions()); 142 ASSERT(transition_number < number_of_transitions());
143 return Map::cast(get(ToTargetIndex(transition_number))); 143 return Map::cast(get(ToTargetIndex(transition_number)));
144 } 144 }
145 145
146 146
147 Object** TransitionArray::GetTargetSlot(int transition_number) {
148 ASSERT(transition_number < number_of_transitions());
149 return HeapObject::RawField(
150 reinterpret_cast<HeapObject*>(this),
151 OffsetOfElementAt(ToTargetIndex(transition_number)));
152 }
153
154
155 void TransitionArray::SetTarget(int transition_number, Map* value) { 147 void TransitionArray::SetTarget(int transition_number, Map* value) {
156 ASSERT(transition_number < number_of_transitions()); 148 ASSERT(transition_number < number_of_transitions());
157 set(ToTargetIndex(transition_number), value); 149 set(ToTargetIndex(transition_number), value);
158 } 150 }
159 151
160 152
161 PropertyDetails TransitionArray::GetTargetDetails(int transition_number) { 153 PropertyDetails TransitionArray::GetTargetDetails(int transition_number) {
162 Map* map = GetTarget(transition_number); 154 Map* map = GetTarget(transition_number);
163 DescriptorArray* descriptors = map->instance_descriptors(); 155 DescriptorArray* descriptors = map->instance_descriptors();
164 int descriptor = map->LastAdded(); 156 int descriptor = map->LastAdded();
(...skipping 21 matching lines...) Expand all
186 178
187 179
188 #undef FIELD_ADDR 180 #undef FIELD_ADDR
189 #undef WRITE_FIELD 181 #undef WRITE_FIELD
190 #undef CONDITIONAL_WRITE_BARRIER 182 #undef CONDITIONAL_WRITE_BARRIER
191 183
192 184
193 } } // namespace v8::internal 185 } } // namespace v8::internal
194 186
195 #endif // V8_TRANSITIONS_INL_H_ 187 #endif // V8_TRANSITIONS_INL_H_
OLDNEW
« no previous file with comments | « src/transitions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698