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

Side by Side Diff: src/heap.cc

Issue 1265001: Pass the proper number of fields to update remembered set for. (Closed)
Patch Set: Created 10 years, 9 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
« no previous file with comments | « no previous file | 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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 2630 matching lines...) Expand 10 before | Expand all | Expand 10 after
2641 if (always_allocate()) { 2641 if (always_allocate()) {
2642 clone = AllocateRaw(object_size, NEW_SPACE, OLD_POINTER_SPACE); 2642 clone = AllocateRaw(object_size, NEW_SPACE, OLD_POINTER_SPACE);
2643 if (clone->IsFailure()) return clone; 2643 if (clone->IsFailure()) return clone;
2644 Address clone_address = HeapObject::cast(clone)->address(); 2644 Address clone_address = HeapObject::cast(clone)->address();
2645 CopyBlock(reinterpret_cast<Object**>(clone_address), 2645 CopyBlock(reinterpret_cast<Object**>(clone_address),
2646 reinterpret_cast<Object**>(source->address()), 2646 reinterpret_cast<Object**>(source->address()),
2647 object_size); 2647 object_size);
2648 // Update write barrier for all fields that lie beyond the header. 2648 // Update write barrier for all fields that lie beyond the header.
2649 RecordWrites(clone_address, 2649 RecordWrites(clone_address,
2650 JSObject::kHeaderSize, 2650 JSObject::kHeaderSize,
2651 object_size - JSObject::kHeaderSize); 2651 (object_size - JSObject::kHeaderSize) / kPointerSize);
2652 } else { 2652 } else {
2653 clone = new_space_.AllocateRaw(object_size); 2653 clone = new_space_.AllocateRaw(object_size);
2654 if (clone->IsFailure()) return clone; 2654 if (clone->IsFailure()) return clone;
2655 ASSERT(Heap::InNewSpace(clone)); 2655 ASSERT(Heap::InNewSpace(clone));
2656 // Since we know the clone is allocated in new space, we can copy 2656 // Since we know the clone is allocated in new space, we can copy
2657 // the contents without worrying about updating the write barrier. 2657 // the contents without worrying about updating the write barrier.
2658 CopyBlock(reinterpret_cast<Object**>(HeapObject::cast(clone)->address()), 2658 CopyBlock(reinterpret_cast<Object**>(HeapObject::cast(clone)->address()),
2659 reinterpret_cast<Object**>(source->address()), 2659 reinterpret_cast<Object**>(source->address()),
2660 object_size); 2660 object_size);
2661 } 2661 }
(...skipping 1704 matching lines...) Expand 10 before | Expand all | Expand 10 after
4366 void ExternalStringTable::TearDown() { 4366 void ExternalStringTable::TearDown() {
4367 new_space_strings_.Free(); 4367 new_space_strings_.Free();
4368 old_space_strings_.Free(); 4368 old_space_strings_.Free();
4369 } 4369 }
4370 4370
4371 4371
4372 List<Object*> ExternalStringTable::new_space_strings_; 4372 List<Object*> ExternalStringTable::new_space_strings_;
4373 List<Object*> ExternalStringTable::old_space_strings_; 4373 List<Object*> ExternalStringTable::old_space_strings_;
4374 4374
4375 } } // namespace v8::internal 4375 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698