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

Side by Side Diff: src/spaces.cc

Issue 11035053: Rollback trunk to bleeding_edge revision 12525 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 8 years, 2 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.h ('k') | src/transitions.h » ('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 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 440
441 chunk->heap_ = heap; 441 chunk->heap_ = heap;
442 chunk->size_ = size; 442 chunk->size_ = size;
443 chunk->area_start_ = area_start; 443 chunk->area_start_ = area_start;
444 chunk->area_end_ = area_end; 444 chunk->area_end_ = area_end;
445 chunk->flags_ = 0; 445 chunk->flags_ = 0;
446 chunk->set_owner(owner); 446 chunk->set_owner(owner);
447 chunk->InitializeReservedMemory(); 447 chunk->InitializeReservedMemory();
448 chunk->slots_buffer_ = NULL; 448 chunk->slots_buffer_ = NULL;
449 chunk->skip_list_ = NULL; 449 chunk->skip_list_ = NULL;
450 chunk->write_barrier_counter_ = kWriteBarrierCounterGranularity;
451 chunk->ResetLiveBytes(); 450 chunk->ResetLiveBytes();
452 Bitmap::Clear(chunk); 451 Bitmap::Clear(chunk);
453 chunk->initialize_scan_on_scavenge(false); 452 chunk->initialize_scan_on_scavenge(false);
454 chunk->SetFlag(WAS_SWEPT_PRECISELY); 453 chunk->SetFlag(WAS_SWEPT_PRECISELY);
455 454
456 ASSERT(OFFSET_OF(MemoryChunk, flags_) == kFlagsOffset); 455 ASSERT(OFFSET_OF(MemoryChunk, flags_) == kFlagsOffset);
457 ASSERT(OFFSET_OF(MemoryChunk, live_byte_count_) == kLiveBytesOffset); 456 ASSERT(OFFSET_OF(MemoryChunk, live_byte_count_) == kLiveBytesOffset);
458 457
459 if (executable == EXECUTABLE) { 458 if (executable == EXECUTABLE) {
460 chunk->SetFlag(IS_EXECUTABLE); 459 chunk->SetFlag(IS_EXECUTABLE);
(...skipping 2211 matching lines...) Expand 10 before | Expand all | Expand 10 after
2672 for (uintptr_t key = base; key <= limit; key++) { 2671 for (uintptr_t key = base; key <= limit; key++) {
2673 HashMap::Entry* entry = chunk_map_.Lookup(reinterpret_cast<void*>(key), 2672 HashMap::Entry* entry = chunk_map_.Lookup(reinterpret_cast<void*>(key),
2674 static_cast<uint32_t>(key), 2673 static_cast<uint32_t>(key),
2675 true); 2674 true);
2676 ASSERT(entry != NULL); 2675 ASSERT(entry != NULL);
2677 entry->value = page; 2676 entry->value = page;
2678 } 2677 }
2679 2678
2680 HeapObject* object = page->GetObject(); 2679 HeapObject* object = page->GetObject();
2681 2680
2682 // Make the object consistent so the large object space can be traversed. 2681 #ifdef DEBUG
2682 // Make the object consistent so the heap can be vefified in OldSpaceStep.
2683 reinterpret_cast<Object**>(object->address())[0] = 2683 reinterpret_cast<Object**>(object->address())[0] =
2684 heap()->fixed_array_map(); 2684 heap()->fixed_array_map();
2685 reinterpret_cast<Object**>(object->address())[1] = Smi::FromInt(0); 2685 reinterpret_cast<Object**>(object->address())[1] = Smi::FromInt(0);
2686 #endif
2686 2687
2687 heap()->incremental_marking()->OldSpaceStep(object_size); 2688 heap()->incremental_marking()->OldSpaceStep(object_size);
2688 return object; 2689 return object;
2689 } 2690 }
2690 2691
2691 2692
2692 // GC support 2693 // GC support
2693 MaybeObject* LargeObjectSpace::FindObject(Address a) { 2694 MaybeObject* LargeObjectSpace::FindObject(Address a) {
2694 LargePage* page = FindPage(a); 2695 LargePage* page = FindPage(a);
2695 if (page != NULL) { 2696 if (page != NULL) {
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
2886 object->ShortPrint(); 2887 object->ShortPrint();
2887 PrintF("\n"); 2888 PrintF("\n");
2888 } 2889 }
2889 printf(" --------------------------------------\n"); 2890 printf(" --------------------------------------\n");
2890 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); 2891 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes());
2891 } 2892 }
2892 2893
2893 #endif // DEBUG 2894 #endif // DEBUG
2894 2895
2895 } } // namespace v8::internal 2896 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/spaces.h ('k') | src/transitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698