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

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

Issue 7864: Incorporate patches by Paolo Giarrusso to allow profiling... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 2 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.cc ('k') | tools/linux-tick-processor.py » ('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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after
1155 1155
1156 void DescriptorArray::Swap(int first, int second) { 1156 void DescriptorArray::Swap(int first, int second) {
1157 fast_swap(this, ToKeyIndex(first), ToKeyIndex(second)); 1157 fast_swap(this, ToKeyIndex(first), ToKeyIndex(second));
1158 FixedArray* content_array = GetContentArray(); 1158 FixedArray* content_array = GetContentArray();
1159 fast_swap(content_array, ToValueIndex(first), ToValueIndex(second)); 1159 fast_swap(content_array, ToValueIndex(first), ToValueIndex(second));
1160 fast_swap(content_array, ToDetailsIndex(first), ToDetailsIndex(second)); 1160 fast_swap(content_array, ToDetailsIndex(first), ToDetailsIndex(second));
1161 } 1161 }
1162 1162
1163 1163
1164 bool Dictionary::requires_slow_elements() { 1164 bool Dictionary::requires_slow_elements() {
1165 Object* max_index_object = get(kPrefixStartIndex); 1165 Object* max_index_object = get(kMaxNumberKeyIndex);
1166 if (!max_index_object->IsSmi()) return false; 1166 if (!max_index_object->IsSmi()) return false;
1167 return 0 != 1167 return 0 !=
1168 (Smi::cast(max_index_object)->value() & kRequiresSlowElementsMask); 1168 (Smi::cast(max_index_object)->value() & kRequiresSlowElementsMask);
1169 } 1169 }
1170 1170
1171 1171
1172 uint32_t Dictionary::max_number_key() { 1172 uint32_t Dictionary::max_number_key() {
1173 ASSERT(!requires_slow_elements()); 1173 ASSERT(!requires_slow_elements());
1174 Object* max_index_object = get(kPrefixStartIndex); 1174 Object* max_index_object = get(kMaxNumberKeyIndex);
1175 if (!max_index_object->IsSmi()) return 0; 1175 if (!max_index_object->IsSmi()) return 0;
1176 uint32_t value = static_cast<uint32_t>(Smi::cast(max_index_object)->value()); 1176 uint32_t value = static_cast<uint32_t>(Smi::cast(max_index_object)->value());
1177 return value >> kRequiresSlowElementsTagSize; 1177 return value >> kRequiresSlowElementsTagSize;
1178 } 1178 }
1179 1179
1180 1180
1181 // ------------------------------------ 1181 // ------------------------------------
1182 // Cast operations 1182 // Cast operations
1183 1183
1184 1184
(...skipping 1149 matching lines...) Expand 10 before | Expand all | Expand 10 after
2334 #undef WRITE_INT_FIELD 2334 #undef WRITE_INT_FIELD
2335 #undef READ_SHORT_FIELD 2335 #undef READ_SHORT_FIELD
2336 #undef WRITE_SHORT_FIELD 2336 #undef WRITE_SHORT_FIELD
2337 #undef READ_BYTE_FIELD 2337 #undef READ_BYTE_FIELD
2338 #undef WRITE_BYTE_FIELD 2338 #undef WRITE_BYTE_FIELD
2339 2339
2340 2340
2341 } } // namespace v8::internal 2341 } } // namespace v8::internal
2342 2342
2343 #endif // V8_OBJECTS_INL_H_ 2343 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | tools/linux-tick-processor.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698