| OLD | NEW |
| 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 821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 832 // All the interior pointers should be contained in the heap. | 832 // All the interior pointers should be contained in the heap. |
| 833 int size = object->Size(); | 833 int size = object->Size(); |
| 834 object->IterateBody(map->instance_type(), size, visitor); | 834 object->IterateBody(map->instance_type(), size, visitor); |
| 835 if (Marking::IsBlack(Marking::MarkBitFrom(object))) { | 835 if (Marking::IsBlack(Marking::MarkBitFrom(object))) { |
| 836 black_size += size; | 836 black_size += size; |
| 837 } | 837 } |
| 838 | 838 |
| 839 ASSERT(object->address() + size <= top); | 839 ASSERT(object->address() + size <= top); |
| 840 end_of_previous_object = object->address() + size; | 840 end_of_previous_object = object->address() + size; |
| 841 } | 841 } |
| 842 ASSERT_LE(black_size, page->LiveBytes()); | 842 // TODO(1672): Remove the non-zero part of this. |
| 843 ASSERT(page->LiveBytes() != 0 || black_size <= page->LiveBytes()); |
| 843 } | 844 } |
| 844 ASSERT(allocation_pointer_found_in_space); | 845 ASSERT(allocation_pointer_found_in_space); |
| 845 } | 846 } |
| 846 #endif | 847 #endif |
| 847 | 848 |
| 848 | 849 |
| 849 // ----------------------------------------------------------------------------- | 850 // ----------------------------------------------------------------------------- |
| 850 // NewSpace implementation | 851 // NewSpace implementation |
| 851 | 852 |
| 852 | 853 |
| (...skipping 1665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2518 object->ShortPrint(); | 2519 object->ShortPrint(); |
| 2519 PrintF("\n"); | 2520 PrintF("\n"); |
| 2520 } | 2521 } |
| 2521 printf(" --------------------------------------\n"); | 2522 printf(" --------------------------------------\n"); |
| 2522 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); | 2523 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); |
| 2523 } | 2524 } |
| 2524 | 2525 |
| 2525 #endif // DEBUG | 2526 #endif // DEBUG |
| 2526 | 2527 |
| 2527 } } // namespace v8::internal | 2528 } } // namespace v8::internal |
| OLD | NEW |