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

Side by Side Diff: src/serialize.cc

Issue 5985012: Rename write buffers to store buffers. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 9 years, 11 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') | src/store-buffer.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 37, 491 37,
492 "LDoubleConstant::negative_infinity"); 492 "LDoubleConstant::negative_infinity");
493 Add(ExternalReference::power_double_double_function().address(), 493 Add(ExternalReference::power_double_double_function().address(),
494 UNCLASSIFIED, 494 UNCLASSIFIED,
495 38, 495 38,
496 "power_double_double_function"); 496 "power_double_double_function");
497 Add(ExternalReference::power_double_int_function().address(), 497 Add(ExternalReference::power_double_int_function().address(),
498 UNCLASSIFIED, 498 UNCLASSIFIED,
499 39, 499 39,
500 "power_double_int_function"); 500 "power_double_int_function");
501 Add(ExternalReference::write_buffer_top().address(), 501 Add(ExternalReference::store_buffer_top().address(),
502 UNCLASSIFIED, 502 UNCLASSIFIED,
503 40, 503 40,
504 "write_buffer_top"); 504 "store_buffer_top");
505 } 505 }
506 506
507 507
508 ExternalReferenceEncoder::ExternalReferenceEncoder() 508 ExternalReferenceEncoder::ExternalReferenceEncoder()
509 : encodings_(Match) { 509 : encodings_(Match) {
510 ExternalReferenceTable* external_references = 510 ExternalReferenceTable* external_references =
511 ExternalReferenceTable::instance(); 511 ExternalReferenceTable::instance();
512 for (int i = 0; i < external_references->size(); ++i) { 512 for (int i = 0; i < external_references->size(); ++i) {
513 Put(external_references->address(i), i); 513 Put(external_references->address(i), i);
514 } 514 }
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 ASSERT(SpaceIsPaged(space)); 645 ASSERT(SpaceIsPaged(space));
646 int page_of_pointee = offset >> kPageSizeBits; 646 int page_of_pointee = offset >> kPageSizeBits;
647 Address object_address = pages_[space][page_of_pointee] + 647 Address object_address = pages_[space][page_of_pointee] +
648 (offset & Page::kPageAlignmentMask); 648 (offset & Page::kPageAlignmentMask);
649 return HeapObject::FromAddress(object_address); 649 return HeapObject::FromAddress(object_address);
650 } 650 }
651 651
652 652
653 void Deserializer::Deserialize() { 653 void Deserializer::Deserialize() {
654 // Don't GC while deserializing - just expand the heap. 654 // Don't GC while deserializing - just expand the heap.
655 Address* write_buffer_top = 655 Address* store_buffer_top =
656 reinterpret_cast<Address*>(Heap::write_buffer_top()); 656 reinterpret_cast<Address*>(Heap::store_buffer_top());
657 AlwaysAllocateScope always_allocate; 657 AlwaysAllocateScope always_allocate;
658 // Don't use the free lists while deserializing. 658 // Don't use the free lists while deserializing.
659 LinearAllocationScope allocate_linearly; 659 LinearAllocationScope allocate_linearly;
660 // No active threads. 660 // No active threads.
661 ASSERT_EQ(NULL, ThreadState::FirstInUse()); 661 ASSERT_EQ(NULL, ThreadState::FirstInUse());
662 // No active handles. 662 // No active handles.
663 ASSERT(HandleScopeImplementer::instance()->blocks()->is_empty()); 663 ASSERT(HandleScopeImplementer::instance()->blocks()->is_empty());
664 // Make sure the entire partial snapshot cache is traversed, filling it with 664 // Make sure the entire partial snapshot cache is traversed, filling it with
665 // valid object pointers. 665 // valid object pointers.
666 partial_snapshot_cache_length_ = kPartialSnapshotCacheCapacity; 666 partial_snapshot_cache_length_ = kPartialSnapshotCacheCapacity;
667 ASSERT_EQ(NULL, external_reference_decoder_); 667 ASSERT_EQ(NULL, external_reference_decoder_);
668 external_reference_decoder_ = new ExternalReferenceDecoder(); 668 external_reference_decoder_ = new ExternalReferenceDecoder();
669 Heap::IterateStrongRoots(this, VISIT_ONLY_STRONG); 669 Heap::IterateStrongRoots(this, VISIT_ONLY_STRONG);
670 Heap::IterateWeakRoots(this, VISIT_ALL); 670 Heap::IterateWeakRoots(this, VISIT_ALL);
671 671
672 Heap::set_global_contexts_list(Heap::undefined_value()); 672 Heap::set_global_contexts_list(Heap::undefined_value());
673 Heap::public_set_write_buffer_top(write_buffer_top); 673 Heap::public_set_store_buffer_top(store_buffer_top);
674 } 674 }
675 675
676 676
677 void Deserializer::DeserializePartial(Object** root) { 677 void Deserializer::DeserializePartial(Object** root) {
678 // Don't GC while deserializing - just expand the heap. 678 // Don't GC while deserializing - just expand the heap.
679 AlwaysAllocateScope always_allocate; 679 AlwaysAllocateScope always_allocate;
680 // Don't use the free lists while deserializing. 680 // Don't use the free lists while deserializing.
681 LinearAllocationScope allocate_linearly; 681 LinearAllocationScope allocate_linearly;
682 if (external_reference_decoder_ == NULL) { 682 if (external_reference_decoder_ == NULL) {
683 external_reference_decoder_ = new ExternalReferenceDecoder(); 683 external_reference_decoder_ = new ExternalReferenceDecoder();
(...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after
1525 fullness_[space] = RoundUp(fullness_[space], Page::kPageSize); 1525 fullness_[space] = RoundUp(fullness_[space], Page::kPageSize);
1526 } 1526 }
1527 } 1527 }
1528 int allocation_address = fullness_[space]; 1528 int allocation_address = fullness_[space];
1529 fullness_[space] = allocation_address + size; 1529 fullness_[space] = allocation_address + size;
1530 return allocation_address; 1530 return allocation_address;
1531 } 1531 }
1532 1532
1533 1533
1534 } } // namespace v8::internal 1534 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | src/store-buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698