Commit 1fcddc44 authored by verwaest@chromium.org's avatar verwaest@chromium.org

While allocating code objects, perform the incremental marking step before...

While allocating code objects, perform the incremental marking step before NULLing the new object. Otherwise the code cache cannot iterate the code space anymore, which is required to clear ICs.

Review URL: https://chromiumcodereview.appspot.com/10834408

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12345 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent f7ed521f
......@@ -2027,15 +2027,16 @@ HeapObject* FreeList::Allocate(int size_in_bytes) {
// if it is big enough.
owner_->Free(owner_->top(), old_linear_size);
owner_->heap()->incremental_marking()->OldSpaceStep(
size_in_bytes - old_linear_size);
#ifdef DEBUG
for (int i = 0; i < size_in_bytes / kPointerSize; i++) {
reinterpret_cast<Object**>(new_node->address())[i] = Smi::FromInt(0);
reinterpret_cast<Object**>(new_node->address())[i] =
Smi::FromInt(kCodeZapValue);
}
#endif
owner_->heap()->incremental_marking()->OldSpaceStep(
size_in_bytes - old_linear_size);
// The old-space-step might have finished sweeping and restarted marking.
// Verify that it did not turn the page of the new node into an evacuation
// candidate.
......
......@@ -94,6 +94,7 @@ const uint32_t kDebugZapValue = 0xbadbaddb;
const uint32_t kFreeListZapValue = 0xfeed1eaf;
#endif
const int kCodeZapValue = 0xbadc0de;
// Number of bits to represent the page size for paged spaces. The value of 20
// gives 1Mb bytes per page.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment