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

Side by Side Diff: src/spaces.cc

Issue 7971009: Add kHeaderSize constant to SeqString. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Lasse Reichstein. Created 9 years, 3 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/runtime.cc ('k') | test/mjsunit/mjsunit.status » ('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 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 chunk->set_owner(owner); 431 chunk->set_owner(owner);
432 chunk->InitializeReservedMemory(); 432 chunk->InitializeReservedMemory();
433 chunk->slots_buffer_ = NULL; 433 chunk->slots_buffer_ = NULL;
434 chunk->skip_list_ = NULL; 434 chunk->skip_list_ = NULL;
435 chunk->ResetLiveBytes(); 435 chunk->ResetLiveBytes();
436 Bitmap::Clear(chunk); 436 Bitmap::Clear(chunk);
437 chunk->initialize_scan_on_scavenge(false); 437 chunk->initialize_scan_on_scavenge(false);
438 chunk->SetFlag(WAS_SWEPT_PRECISELY); 438 chunk->SetFlag(WAS_SWEPT_PRECISELY);
439 439
440 ASSERT(OFFSET_OF(MemoryChunk, flags_) == kFlagsOffset); 440 ASSERT(OFFSET_OF(MemoryChunk, flags_) == kFlagsOffset);
441 ASSERT(OFFSET_OF(MemoryChunk, live_byte_count_) == kLiveBytesOffset);
441 442
442 if (executable == EXECUTABLE) chunk->SetFlag(IS_EXECUTABLE); 443 if (executable == EXECUTABLE) chunk->SetFlag(IS_EXECUTABLE);
443 444
444 if (owner == heap->old_data_space()) chunk->SetFlag(CONTAINS_ONLY_DATA); 445 if (owner == heap->old_data_space()) chunk->SetFlag(CONTAINS_ONLY_DATA);
445 446
446 return chunk; 447 return chunk;
447 } 448 }
448 449
449 450
450 void MemoryChunk::InsertAfter(MemoryChunk* other) { 451 void MemoryChunk::InsertAfter(MemoryChunk* other) {
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
816 // All the interior pointers should be contained in the heap. 817 // All the interior pointers should be contained in the heap.
817 int size = object->Size(); 818 int size = object->Size();
818 object->IterateBody(map->instance_type(), size, visitor); 819 object->IterateBody(map->instance_type(), size, visitor);
819 if (Marking::IsBlack(Marking::MarkBitFrom(object))) { 820 if (Marking::IsBlack(Marking::MarkBitFrom(object))) {
820 black_size += size; 821 black_size += size;
821 } 822 }
822 823
823 ASSERT(object->address() + size <= top); 824 ASSERT(object->address() + size <= top);
824 end_of_previous_object = object->address() + size; 825 end_of_previous_object = object->address() + size;
825 } 826 }
826
827 CHECK_LE(black_size, page->LiveBytes()); 827 CHECK_LE(black_size, page->LiveBytes());
828 } 828 }
829 ASSERT(allocation_pointer_found_in_space); 829 ASSERT(allocation_pointer_found_in_space);
830 } 830 }
831 #endif 831 #endif
832 832
833 833
834 // ----------------------------------------------------------------------------- 834 // -----------------------------------------------------------------------------
835 // NewSpace implementation 835 // NewSpace implementation
836 836
(...skipping 1683 matching lines...) Expand 10 before | Expand all | Expand 10 after
2520 object->ShortPrint(); 2520 object->ShortPrint();
2521 PrintF("\n"); 2521 PrintF("\n");
2522 } 2522 }
2523 printf(" --------------------------------------\n"); 2523 printf(" --------------------------------------\n");
2524 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); 2524 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes());
2525 } 2525 }
2526 2526
2527 #endif // DEBUG 2527 #endif // DEBUG
2528 2528
2529 } } // namespace v8::internal 2529 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698