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

Side by Side Diff: src/store-buffer.cc

Issue 9537011: Merge r10809 into 3.7 branch (Closed) Base URL: http://v8.googlecode.com/svn/branches/3.7/
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « src/spaces-inl.h ('k') | src/version.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 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 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 if (heap_->InNewSpace(*slot)) { 419 if (heap_->InNewSpace(*slot)) {
420 EnterDirectlyIntoStoreBuffer(slot_address); 420 EnterDirectlyIntoStoreBuffer(slot_address);
421 } 421 }
422 } 422 }
423 } 423 }
424 } 424 }
425 425
426 426
427 // Compute start address of the first map following given addr. 427 // Compute start address of the first map following given addr.
428 static inline Address MapStartAlign(Address addr) { 428 static inline Address MapStartAlign(Address addr) {
429 Address page = Page::FromAddress(addr)->ObjectAreaStart(); 429 Address page = Page::FromAddress(addr)->area_start();
430 return page + (((addr - page) + (Map::kSize - 1)) / Map::kSize * Map::kSize); 430 return page + (((addr - page) + (Map::kSize - 1)) / Map::kSize * Map::kSize);
431 } 431 }
432 432
433 433
434 // Compute end address of the first map preceding given addr. 434 // Compute end address of the first map preceding given addr.
435 static inline Address MapEndAlign(Address addr) { 435 static inline Address MapEndAlign(Address addr) {
436 Address page = Page::FromAllocationTop(addr)->ObjectAreaStart(); 436 Address page = Page::FromAllocationTop(addr)->area_start();
437 return page + ((addr - page) / Map::kSize * Map::kSize); 437 return page + ((addr - page) / Map::kSize * Map::kSize);
438 } 438 }
439 439
440 440
441 void StoreBuffer::FindPointersToNewSpaceInMaps( 441 void StoreBuffer::FindPointersToNewSpaceInMaps(
442 Address start, 442 Address start,
443 Address end, 443 Address end,
444 ObjectSlotCallback slot_callback) { 444 ObjectSlotCallback slot_callback) {
445 ASSERT(MapStartAlign(start) == start); 445 ASSERT(MapStartAlign(start) == start);
446 ASSERT(MapEndAlign(end) == end); 446 ASSERT(MapEndAlign(end) == end);
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 // Normal objects like FixedArrays and JSObjects should not contain references 489 // Normal objects like FixedArrays and JSObjects should not contain references
490 // to these maps. The special garbage section (see comment in spaces.h) is 490 // to these maps. The special garbage section (see comment in spaces.h) is
491 // skipped since it can contain absolutely anything. Any objects that are 491 // skipped since it can contain absolutely anything. Any objects that are
492 // allocated during iteration may or may not be visited by the iteration, but 492 // allocated during iteration may or may not be visited by the iteration, but
493 // they will not be partially visited. 493 // they will not be partially visited.
494 void StoreBuffer::FindPointersToNewSpaceOnPage( 494 void StoreBuffer::FindPointersToNewSpaceOnPage(
495 PagedSpace* space, 495 PagedSpace* space,
496 Page* page, 496 Page* page,
497 RegionCallback region_callback, 497 RegionCallback region_callback,
498 ObjectSlotCallback slot_callback) { 498 ObjectSlotCallback slot_callback) {
499 Address visitable_start = page->ObjectAreaStart(); 499 Address visitable_start = page->area_start();
500 Address end_of_page = page->ObjectAreaEnd(); 500 Address end_of_page = page->area_end();
501 501
502 Address visitable_end = visitable_start; 502 Address visitable_end = visitable_start;
503 503
504 Object* free_space_map = heap_->free_space_map(); 504 Object* free_space_map = heap_->free_space_map();
505 Object* two_pointer_filler_map = heap_->two_pointer_filler_map(); 505 Object* two_pointer_filler_map = heap_->two_pointer_filler_map();
506 506
507 while (visitable_end < end_of_page) { 507 while (visitable_end < end_of_page) {
508 Object* o = *reinterpret_cast<Object**>(visitable_end); 508 Object* o = *reinterpret_cast<Object**>(visitable_end);
509 // Skip fillers but not things that look like fillers in the special 509 // Skip fillers but not things that look like fillers in the special
510 // garbage section which can contain anything. 510 // garbage section which can contain anything.
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 } 687 }
688 688
689 689
690 void StoreBuffer::CheckForFullBuffer() { 690 void StoreBuffer::CheckForFullBuffer() {
691 if (old_limit_ - old_top_ < kStoreBufferSize * 2) { 691 if (old_limit_ - old_top_ < kStoreBufferSize * 2) {
692 HandleFullness(); 692 HandleFullness();
693 } 693 }
694 } 694 }
695 695
696 } } // namespace v8::internal 696 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/spaces-inl.h ('k') | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698