| 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 1522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1533 } else if (size_in_bytes == 2 * kPointerSize) { | 1533 } else if (size_in_bytes == 2 * kPointerSize) { |
| 1534 set_map(Heap::raw_unchecked_two_pointer_filler_map()); | 1534 set_map(Heap::raw_unchecked_two_pointer_filler_map()); |
| 1535 } else { | 1535 } else { |
| 1536 UNREACHABLE(); | 1536 UNREACHABLE(); |
| 1537 } | 1537 } |
| 1538 ASSERT(Size() == size_in_bytes); | 1538 ASSERT(Size() == size_in_bytes); |
| 1539 } | 1539 } |
| 1540 | 1540 |
| 1541 | 1541 |
| 1542 Address FreeListNode::next() { | 1542 Address FreeListNode::next() { |
| 1543 ASSERT(map() == Heap::raw_unchecked_byte_array_map() || | 1543 ASSERT(IsFreeListNode(this)); |
| 1544 map() == Heap::raw_unchecked_two_pointer_filler_map()); | |
| 1545 if (map() == Heap::raw_unchecked_byte_array_map()) { | 1544 if (map() == Heap::raw_unchecked_byte_array_map()) { |
| 1546 ASSERT(Size() >= kNextOffset + kPointerSize); | 1545 ASSERT(Size() >= kNextOffset + kPointerSize); |
| 1547 return Memory::Address_at(address() + kNextOffset); | 1546 return Memory::Address_at(address() + kNextOffset); |
| 1548 } else { | 1547 } else { |
| 1549 return Memory::Address_at(address() + kPointerSize); | 1548 return Memory::Address_at(address() + kPointerSize); |
| 1550 } | 1549 } |
| 1551 } | 1550 } |
| 1552 | 1551 |
| 1553 | 1552 |
| 1554 void FreeListNode::set_next(Address next) { | 1553 void FreeListNode::set_next(Address next) { |
| 1555 ASSERT(map() == Heap::raw_unchecked_byte_array_map() || | 1554 ASSERT(IsFreeListNode(this)); |
| 1556 map() == Heap::raw_unchecked_two_pointer_filler_map()); | |
| 1557 if (map() == Heap::raw_unchecked_byte_array_map()) { | 1555 if (map() == Heap::raw_unchecked_byte_array_map()) { |
| 1558 ASSERT(Size() >= kNextOffset + kPointerSize); | 1556 ASSERT(Size() >= kNextOffset + kPointerSize); |
| 1559 Memory::Address_at(address() + kNextOffset) = next; | 1557 Memory::Address_at(address() + kNextOffset) = next; |
| 1560 } else { | 1558 } else { |
| 1561 Memory::Address_at(address() + kPointerSize) = next; | 1559 Memory::Address_at(address() + kPointerSize) = next; |
| 1562 } | 1560 } |
| 1563 } | 1561 } |
| 1564 | 1562 |
| 1565 | 1563 |
| 1566 OldSpaceFreeList::OldSpaceFreeList(AllocationSpace owner) : owner_(owner) { | 1564 OldSpaceFreeList::OldSpaceFreeList(AllocationSpace owner) : owner_(owner) { |
| (...skipping 1213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2780 reinterpret_cast<Object**>(object->address() | 2778 reinterpret_cast<Object**>(object->address() |
| 2781 + Page::kObjectAreaSize), | 2779 + Page::kObjectAreaSize), |
| 2782 allocation_top); | 2780 allocation_top); |
| 2783 PrintF("\n"); | 2781 PrintF("\n"); |
| 2784 } | 2782 } |
| 2785 } | 2783 } |
| 2786 } | 2784 } |
| 2787 #endif // DEBUG | 2785 #endif // DEBUG |
| 2788 | 2786 |
| 2789 } } // namespace v8::internal | 2787 } } // namespace v8::internal |
| OLD | NEW |