| OLD | NEW |
| 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 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 } | 407 } |
| 408 if (chunk->owner() == heap_->lo_space()) { | 408 if (chunk->owner() == heap_->lo_space()) { |
| 409 LargePage* large_page = reinterpret_cast<LargePage*>(chunk); | 409 LargePage* large_page = reinterpret_cast<LargePage*>(chunk); |
| 410 HeapObject* array = large_page->GetObject(); | 410 HeapObject* array = large_page->GetObject(); |
| 411 ASSERT(array->IsFixedArray()); | 411 ASSERT(array->IsFixedArray()); |
| 412 Address start = array->address(); | 412 Address start = array->address(); |
| 413 Address object_end = start + array->Size(); | 413 Address object_end = start + array->Size(); |
| 414 heap_->IteratePointersToNewSpace(heap_, start, object_end, callback); | 414 heap_->IteratePointersToNewSpace(heap_, start, object_end, callback); |
| 415 } else { | 415 } else { |
| 416 Page* page = reinterpret_cast<Page*>(chunk); | 416 Page* page = reinterpret_cast<Page*>(chunk); |
| 417 PagedSpace* owner = reinterpret_cast<PagedSpace*>(page->owner()); |
| 417 heap_->IteratePointersOnPage( | 418 heap_->IteratePointersOnPage( |
| 418 reinterpret_cast<PagedSpace*>(page->owner()), | 419 owner, |
| 419 &Heap::IteratePointersToNewSpace, | 420 (owner == heap_->map_space() ? |
| 421 &Heap::IteratePointersFromMapsToNewSpace : |
| 422 &Heap::IteratePointersToNewSpace), |
| 420 callback, | 423 callback, |
| 421 page); | 424 page); |
| 422 } | 425 } |
| 423 } | 426 } |
| 424 } | 427 } |
| 425 (*callback_)(heap_, NULL, kStoreBufferScanningPageEvent); | 428 (*callback_)(heap_, NULL, kStoreBufferScanningPageEvent); |
| 426 } | 429 } |
| 427 } | 430 } |
| 428 | 431 |
| 429 | 432 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 } | 481 } |
| 479 | 482 |
| 480 | 483 |
| 481 void StoreBuffer::CheckForFullBuffer() { | 484 void StoreBuffer::CheckForFullBuffer() { |
| 482 if (old_limit_ - old_top_ < kStoreBufferSize * 2) { | 485 if (old_limit_ - old_top_ < kStoreBufferSize * 2) { |
| 483 HandleFullness(); | 486 HandleFullness(); |
| 484 } | 487 } |
| 485 } | 488 } |
| 486 | 489 |
| 487 } } // namespace v8::internal | 490 } } // namespace v8::internal |
| OLD | NEW |