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

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

Issue 8968028: Ensure large Smi-only arrays don't transition to FAST_DOUBLE_ARRAY (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: review feedback Created 8 years, 11 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') | test/mjsunit/regress/regress-1849.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 1201 matching lines...) Expand 10 before | Expand all | Expand 10 after
1212 // are filler pointers in the array. 1212 // are filler pointers in the array.
1213 FixedArray* fixed_array = 1213 FixedArray* fixed_array =
1214 reinterpret_cast<FixedArray*>(READ_FIELD(this, kElementsOffset)); 1214 reinterpret_cast<FixedArray*>(READ_FIELD(this, kElementsOffset));
1215 Map* map = fixed_array->map(); 1215 Map* map = fixed_array->map();
1216 // Arrays that have been shifted in place can't be verified. 1216 // Arrays that have been shifted in place can't be verified.
1217 if (map != heap->raw_unchecked_one_pointer_filler_map() && 1217 if (map != heap->raw_unchecked_one_pointer_filler_map() &&
1218 map != heap->raw_unchecked_two_pointer_filler_map() && 1218 map != heap->raw_unchecked_two_pointer_filler_map() &&
1219 map != heap->free_space_map()) { 1219 map != heap->free_space_map()) {
1220 for (int i = 0; i < fixed_array->length(); i++) { 1220 for (int i = 0; i < fixed_array->length(); i++) {
1221 Object* current = fixed_array->get(i); 1221 Object* current = fixed_array->get(i);
1222 ASSERT(current->IsSmi() || current == heap->the_hole_value()); 1222 ASSERT(current->IsSmi() || current->IsTheHole());
1223 } 1223 }
1224 } 1224 }
1225 } 1225 }
1226 #endif 1226 #endif
1227 } 1227 }
1228 1228
1229 1229
1230 MaybeObject* JSObject::EnsureCanContainHeapObjectElements() { 1230 MaybeObject* JSObject::EnsureCanContainHeapObjectElements() {
1231 #if DEBUG 1231 #if DEBUG
1232 ValidateSmiOnlyElements(); 1232 ValidateSmiOnlyElements();
(...skipping 3518 matching lines...) Expand 10 before | Expand all | Expand 10 after
4751 #undef WRITE_INT_FIELD 4751 #undef WRITE_INT_FIELD
4752 #undef READ_SHORT_FIELD 4752 #undef READ_SHORT_FIELD
4753 #undef WRITE_SHORT_FIELD 4753 #undef WRITE_SHORT_FIELD
4754 #undef READ_BYTE_FIELD 4754 #undef READ_BYTE_FIELD
4755 #undef WRITE_BYTE_FIELD 4755 #undef WRITE_BYTE_FIELD
4756 4756
4757 4757
4758 } } // namespace v8::internal 4758 } } // namespace v8::internal
4759 4759
4760 #endif // V8_OBJECTS_INL_H_ 4760 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | test/mjsunit/regress/regress-1849.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698