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

Side by Side Diff: src/serialize.cc

Issue 2983001: Revert revisions 5041 and 5042 introducing virtual scavenge... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 5 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/objects-inl.h ('k') | no next file » | 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 655 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 Object** write_back) { 666 Object** write_back) {
667 int size = source_->GetInt() << kObjectAlignmentBits; 667 int size = source_->GetInt() << kObjectAlignmentBits;
668 Address address = Allocate(space_number, space, size); 668 Address address = Allocate(space_number, space, size);
669 *write_back = HeapObject::FromAddress(address); 669 *write_back = HeapObject::FromAddress(address);
670 Object** current = reinterpret_cast<Object**>(address); 670 Object** current = reinterpret_cast<Object**>(address);
671 Object** limit = current + (size >> kPointerSizeLog2); 671 Object** limit = current + (size >> kPointerSizeLog2);
672 if (FLAG_log_snapshot_positions) { 672 if (FLAG_log_snapshot_positions) {
673 LOG(SnapshotPositionEvent(address, source_->position())); 673 LOG(SnapshotPositionEvent(address, source_->position()));
674 } 674 }
675 ReadChunk(current, limit, space_number, address); 675 ReadChunk(current, limit, space_number, address);
676
677 if (space == Heap::map_space()) {
678 ASSERT(size == Map::kSize);
679 HeapObject* obj = HeapObject::FromAddress(address);
680 Map* map = reinterpret_cast<Map*>(obj);
681 map->set_scavenger(Heap::GetScavenger(map->instance_type(),
682 map->instance_size()));
683 }
684 } 676 }
685 677
686 678
687 // This macro is always used with a constant argument so it should all fold 679 // This macro is always used with a constant argument so it should all fold
688 // away to almost nothing in the generated code. It might be nicer to do this 680 // away to almost nothing in the generated code. It might be nicer to do this
689 // with the ternary operator but there are type issues with that. 681 // with the ternary operator but there are type issues with that.
690 #define ASSIGN_DEST_SPACE(space_number) \ 682 #define ASSIGN_DEST_SPACE(space_number) \
691 Space* dest_space; \ 683 Space* dest_space; \
692 if (space_number == NEW_SPACE) { \ 684 if (space_number == NEW_SPACE) { \
693 dest_space = Heap::new_space(); \ 685 dest_space = Heap::new_space(); \
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after
1450 fullness_[space] = RoundUp(fullness_[space], Page::kPageSize); 1442 fullness_[space] = RoundUp(fullness_[space], Page::kPageSize);
1451 } 1443 }
1452 } 1444 }
1453 int allocation_address = fullness_[space]; 1445 int allocation_address = fullness_[space];
1454 fullness_[space] = allocation_address + size; 1446 fullness_[space] = allocation_address + size;
1455 return allocation_address; 1447 return allocation_address;
1456 } 1448 }
1457 1449
1458 1450
1459 } } // namespace v8::internal 1451 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698