| OLD | NEW |
| 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 673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 684 Object** limit = current + (size >> kPointerSizeLog2); | 684 Object** limit = current + (size >> kPointerSizeLog2); |
| 685 if (FLAG_log_snapshot_positions) { | 685 if (FLAG_log_snapshot_positions) { |
| 686 LOG(SnapshotPositionEvent(address, source_->position())); | 686 LOG(SnapshotPositionEvent(address, source_->position())); |
| 687 } | 687 } |
| 688 ReadChunk(current, limit, space_number, address); | 688 ReadChunk(current, limit, space_number, address); |
| 689 | 689 |
| 690 if (space == HEAP->map_space()) { | 690 if (space == HEAP->map_space()) { |
| 691 ASSERT(size == Map::kSize); | 691 ASSERT(size == Map::kSize); |
| 692 HeapObject* obj = HeapObject::FromAddress(address); | 692 HeapObject* obj = HeapObject::FromAddress(address); |
| 693 Map* map = reinterpret_cast<Map*>(obj); | 693 Map* map = reinterpret_cast<Map*>(obj); |
| 694 map->set_scavenger(Heap::GetScavenger(map->instance_type(), | 694 if (map->instance_type() == MAP_TYPE) { |
| 695 map->instance_size())); | 695 // Meta map has Heap pointer instead of scavenger. |
| 696 ASSERT(map == map->map()); |
| 697 map->set_heap(HEAP); |
| 698 } else { |
| 699 map->set_scavenger(Heap::GetScavenger(map->instance_type(), |
| 700 map->instance_size())); |
| 701 } |
| 696 } | 702 } |
| 697 } | 703 } |
| 698 | 704 |
| 699 | 705 |
| 700 // This macro is always used with a constant argument so it should all fold | 706 // This macro is always used with a constant argument so it should all fold |
| 701 // away to almost nothing in the generated code. It might be nicer to do this | 707 // away to almost nothing in the generated code. It might be nicer to do this |
| 702 // with the ternary operator but there are type issues with that. | 708 // with the ternary operator but there are type issues with that. |
| 703 #define ASSIGN_DEST_SPACE(space_number) \ | 709 #define ASSIGN_DEST_SPACE(space_number) \ |
| 704 Space* dest_space; \ | 710 Space* dest_space; \ |
| 705 if (space_number == NEW_SPACE) { \ | 711 if (space_number == NEW_SPACE) { \ |
| (...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1477 fullness_[space] = RoundUp(fullness_[space], Page::kPageSize); | 1483 fullness_[space] = RoundUp(fullness_[space], Page::kPageSize); |
| 1478 } | 1484 } |
| 1479 } | 1485 } |
| 1480 int allocation_address = fullness_[space]; | 1486 int allocation_address = fullness_[space]; |
| 1481 fullness_[space] = allocation_address + size; | 1487 fullness_[space] = allocation_address + size; |
| 1482 return allocation_address; | 1488 return allocation_address; |
| 1483 } | 1489 } |
| 1484 | 1490 |
| 1485 | 1491 |
| 1486 } } // namespace v8::internal | 1492 } } // namespace v8::internal |
| OLD | NEW |