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 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 if (heap_->InNewSpace(*slot)) { | 446 if (heap_->InNewSpace(*slot)) { |
447 EnterDirectlyIntoStoreBuffer(slot_address); | 447 EnterDirectlyIntoStoreBuffer(slot_address); |
448 } | 448 } |
449 } | 449 } |
450 } | 450 } |
451 } | 451 } |
452 | 452 |
453 | 453 |
454 // Compute start address of the first map following given addr. | 454 // Compute start address of the first map following given addr. |
455 static inline Address MapStartAlign(Address addr) { | 455 static inline Address MapStartAlign(Address addr) { |
456 Address page = Page::FromAddress(addr)->ObjectAreaStart(); | 456 Address page = Page::FromAddress(addr)->area_start(); |
457 return page + (((addr - page) + (Map::kSize - 1)) / Map::kSize * Map::kSize); | 457 return page + (((addr - page) + (Map::kSize - 1)) / Map::kSize * Map::kSize); |
458 } | 458 } |
459 | 459 |
460 | 460 |
461 // Compute end address of the first map preceding given addr. | 461 // Compute end address of the first map preceding given addr. |
462 static inline Address MapEndAlign(Address addr) { | 462 static inline Address MapEndAlign(Address addr) { |
463 Address page = Page::FromAllocationTop(addr)->ObjectAreaStart(); | 463 Address page = Page::FromAllocationTop(addr)->area_start(); |
464 return page + ((addr - page) / Map::kSize * Map::kSize); | 464 return page + ((addr - page) / Map::kSize * Map::kSize); |
465 } | 465 } |
466 | 466 |
467 | 467 |
468 void StoreBuffer::FindPointersToNewSpaceInMaps( | 468 void StoreBuffer::FindPointersToNewSpaceInMaps( |
469 Address start, | 469 Address start, |
470 Address end, | 470 Address end, |
471 ObjectSlotCallback slot_callback) { | 471 ObjectSlotCallback slot_callback) { |
472 ASSERT(MapStartAlign(start) == start); | 472 ASSERT(MapStartAlign(start) == start); |
473 ASSERT(MapEndAlign(end) == end); | 473 ASSERT(MapEndAlign(end) == end); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
516 // Normal objects like FixedArrays and JSObjects should not contain references | 516 // Normal objects like FixedArrays and JSObjects should not contain references |
517 // to these maps. The special garbage section (see comment in spaces.h) is | 517 // to these maps. The special garbage section (see comment in spaces.h) is |
518 // skipped since it can contain absolutely anything. Any objects that are | 518 // skipped since it can contain absolutely anything. Any objects that are |
519 // allocated during iteration may or may not be visited by the iteration, but | 519 // allocated during iteration may or may not be visited by the iteration, but |
520 // they will not be partially visited. | 520 // they will not be partially visited. |
521 void StoreBuffer::FindPointersToNewSpaceOnPage( | 521 void StoreBuffer::FindPointersToNewSpaceOnPage( |
522 PagedSpace* space, | 522 PagedSpace* space, |
523 Page* page, | 523 Page* page, |
524 RegionCallback region_callback, | 524 RegionCallback region_callback, |
525 ObjectSlotCallback slot_callback) { | 525 ObjectSlotCallback slot_callback) { |
526 Address visitable_start = page->ObjectAreaStart(); | 526 Address visitable_start = page->area_start(); |
527 Address end_of_page = page->ObjectAreaEnd(); | 527 Address end_of_page = page->area_end(); |
528 | 528 |
529 Address visitable_end = visitable_start; | 529 Address visitable_end = visitable_start; |
530 | 530 |
531 Object* free_space_map = heap_->free_space_map(); | 531 Object* free_space_map = heap_->free_space_map(); |
532 Object* two_pointer_filler_map = heap_->two_pointer_filler_map(); | 532 Object* two_pointer_filler_map = heap_->two_pointer_filler_map(); |
533 | 533 |
534 while (visitable_end < end_of_page) { | 534 while (visitable_end < end_of_page) { |
535 Object* o = *reinterpret_cast<Object**>(visitable_end); | 535 Object* o = *reinterpret_cast<Object**>(visitable_end); |
536 // Skip fillers but not things that look like fillers in the special | 536 // Skip fillers but not things that look like fillers in the special |
537 // garbage section which can contain anything. | 537 // garbage section which can contain anything. |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
710 heap_->isolate()->counters()->store_buffer_compactions()->Increment(); | 710 heap_->isolate()->counters()->store_buffer_compactions()->Increment(); |
711 CheckForFullBuffer(); | 711 CheckForFullBuffer(); |
712 } | 712 } |
713 | 713 |
714 | 714 |
715 void StoreBuffer::CheckForFullBuffer() { | 715 void StoreBuffer::CheckForFullBuffer() { |
716 EnsureSpace(kStoreBufferSize * 2); | 716 EnsureSpace(kStoreBufferSize * 2); |
717 } | 717 } |
718 | 718 |
719 } } // namespace v8::internal | 719 } } // namespace v8::internal |
OLD | NEW |