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

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

Issue 9310117: Implement KeyedStoreICs to grow arrays on out-of-bound stores. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add missing WB stub Created 8 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/objects-debug.cc ('k') | src/profile-generator.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 1321 matching lines...) Expand 10 before | Expand all | Expand 10 after
1332 #endif 1332 #endif
1333 if (new_map != NULL) { 1333 if (new_map != NULL) {
1334 if (mode == UPDATE_WRITE_BARRIER) { 1334 if (mode == UPDATE_WRITE_BARRIER) {
1335 set_map(new_map); 1335 set_map(new_map);
1336 } else { 1336 } else {
1337 ASSERT(mode == SKIP_WRITE_BARRIER); 1337 ASSERT(mode == SKIP_WRITE_BARRIER);
1338 set_map_no_write_barrier(new_map); 1338 set_map_no_write_barrier(new_map);
1339 } 1339 }
1340 } 1340 }
1341 ASSERT((map()->has_fast_elements() || 1341 ASSERT((map()->has_fast_elements() ||
1342 map()->has_fast_smi_only_elements()) == 1342 map()->has_fast_smi_only_elements() ||
1343 (value == GetHeap()->empty_fixed_array())) ==
1343 (value->map() == GetHeap()->fixed_array_map() || 1344 (value->map() == GetHeap()->fixed_array_map() ||
1344 value->map() == GetHeap()->fixed_cow_array_map())); 1345 value->map() == GetHeap()->fixed_cow_array_map()));
1345 ASSERT(map()->has_fast_double_elements() == 1346 ASSERT((value == GetHeap()->empty_fixed_array()) ||
1346 value->IsFixedDoubleArray()); 1347 (map()->has_fast_double_elements() == value->IsFixedDoubleArray()));
1347 WRITE_FIELD(this, kElementsOffset, value); 1348 WRITE_FIELD(this, kElementsOffset, value);
1348 CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kElementsOffset, value, mode); 1349 CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kElementsOffset, value, mode);
1349 } 1350 }
1350 1351
1351 1352
1352 void JSObject::set_elements(FixedArrayBase* value, WriteBarrierMode mode) { 1353 void JSObject::set_elements(FixedArrayBase* value, WriteBarrierMode mode) {
1353 set_map_and_elements(NULL, value, mode); 1354 set_map_and_elements(NULL, value, mode);
1354 } 1355 }
1355 1356
1356 1357
(...skipping 3547 matching lines...) Expand 10 before | Expand all | Expand 10 after
4904 #undef WRITE_INT_FIELD 4905 #undef WRITE_INT_FIELD
4905 #undef READ_SHORT_FIELD 4906 #undef READ_SHORT_FIELD
4906 #undef WRITE_SHORT_FIELD 4907 #undef WRITE_SHORT_FIELD
4907 #undef READ_BYTE_FIELD 4908 #undef READ_BYTE_FIELD
4908 #undef WRITE_BYTE_FIELD 4909 #undef WRITE_BYTE_FIELD
4909 4910
4910 4911
4911 } } // namespace v8::internal 4912 } } // namespace v8::internal
4912 4913
4913 #endif // V8_OBJECTS_INL_H_ 4914 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects-debug.cc ('k') | src/profile-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698