| 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 2834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2845 } | 2845 } |
| 2846 | 2846 |
| 2847 | 2847 |
| 2848 // ----------------------------------------------------------------------------- | 2848 // ----------------------------------------------------------------------------- |
| 2849 // MapSpace implementation | 2849 // MapSpace implementation |
| 2850 // TODO(mvstanton): this is weird...the compiler can't make a vtable unless | 2850 // TODO(mvstanton): this is weird...the compiler can't make a vtable unless |
| 2851 // there is at least one non-inlined virtual function. I would prefer to hide | 2851 // there is at least one non-inlined virtual function. I would prefer to hide |
| 2852 // the VerifyObject definition behind VERIFY_HEAP. | 2852 // the VerifyObject definition behind VERIFY_HEAP. |
| 2853 | 2853 |
| 2854 void MapSpace::VerifyObject(HeapObject* object) { | 2854 void MapSpace::VerifyObject(HeapObject* object) { |
| 2855 // The object should be a map or a free-list node. | 2855 CHECK(object->IsMap()); |
| 2856 CHECK(object->IsMap() || object->IsFreeSpace()); | |
| 2857 } | 2856 } |
| 2858 | 2857 |
| 2859 | 2858 |
| 2860 // ----------------------------------------------------------------------------- | 2859 // ----------------------------------------------------------------------------- |
| 2861 // CellSpace and PropertyCellSpace implementation | 2860 // CellSpace and PropertyCellSpace implementation |
| 2862 // TODO(mvstanton): this is weird...the compiler can't make a vtable unless | 2861 // TODO(mvstanton): this is weird...the compiler can't make a vtable unless |
| 2863 // there is at least one non-inlined virtual function. I would prefer to hide | 2862 // there is at least one non-inlined virtual function. I would prefer to hide |
| 2864 // the VerifyObject definition behind VERIFY_HEAP. | 2863 // the VerifyObject definition behind VERIFY_HEAP. |
| 2865 | 2864 |
| 2866 void CellSpace::VerifyObject(HeapObject* object) { | 2865 void CellSpace::VerifyObject(HeapObject* object) { |
| 2867 // The object should be a global object property cell or a free-list node. | 2866 CHECK(object->IsCell()); |
| 2868 CHECK(object->IsCell() || | |
| 2869 object->map() == heap()->two_pointer_filler_map()); | |
| 2870 } | 2867 } |
| 2871 | 2868 |
| 2872 | 2869 |
| 2873 void PropertyCellSpace::VerifyObject(HeapObject* object) { | 2870 void PropertyCellSpace::VerifyObject(HeapObject* object) { |
| 2874 // The object should be a global object property cell or a free-list node. | 2871 CHECK(object->IsPropertyCell()); |
| 2875 CHECK(object->IsPropertyCell() || | |
| 2876 object->map() == heap()->two_pointer_filler_map()); | |
| 2877 } | 2872 } |
| 2878 | 2873 |
| 2879 | 2874 |
| 2880 // ----------------------------------------------------------------------------- | 2875 // ----------------------------------------------------------------------------- |
| 2881 // LargeObjectIterator | 2876 // LargeObjectIterator |
| 2882 | 2877 |
| 2883 LargeObjectIterator::LargeObjectIterator(LargeObjectSpace* space) { | 2878 LargeObjectIterator::LargeObjectIterator(LargeObjectSpace* space) { |
| 2884 current_ = space->first_page_; | 2879 current_ = space->first_page_; |
| 2885 size_func_ = NULL; | 2880 size_func_ = NULL; |
| 2886 } | 2881 } |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3209 object->ShortPrint(); | 3204 object->ShortPrint(); |
| 3210 PrintF("\n"); | 3205 PrintF("\n"); |
| 3211 } | 3206 } |
| 3212 printf(" --------------------------------------\n"); | 3207 printf(" --------------------------------------\n"); |
| 3213 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); | 3208 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); |
| 3214 } | 3209 } |
| 3215 | 3210 |
| 3216 #endif // DEBUG | 3211 #endif // DEBUG |
| 3217 | 3212 |
| 3218 } } // namespace v8::internal | 3213 } } // namespace v8::internal |
| OLD | NEW |