OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
774 HEAP->always_allocate_scope_depth_++; | 774 HEAP->always_allocate_scope_depth_++; |
775 } | 775 } |
776 | 776 |
777 | 777 |
778 AlwaysAllocateScope::~AlwaysAllocateScope() { | 778 AlwaysAllocateScope::~AlwaysAllocateScope() { |
779 HEAP->always_allocate_scope_depth_--; | 779 HEAP->always_allocate_scope_depth_--; |
780 ASSERT(HEAP->always_allocate_scope_depth_ == 0); | 780 ASSERT(HEAP->always_allocate_scope_depth_ == 0); |
781 } | 781 } |
782 | 782 |
783 | 783 |
| 784 #ifdef VERIFY_HEAP |
| 785 NoWeakEmbeddedMapsVerificationScope::NoWeakEmbeddedMapsVerificationScope() { |
| 786 HEAP->no_weak_embedded_maps_verification_scope_depth_++; |
| 787 } |
| 788 |
| 789 |
| 790 NoWeakEmbeddedMapsVerificationScope::~NoWeakEmbeddedMapsVerificationScope() { |
| 791 HEAP->no_weak_embedded_maps_verification_scope_depth_--; |
| 792 } |
| 793 #endif |
| 794 |
| 795 |
784 void VerifyPointersVisitor::VisitPointers(Object** start, Object** end) { | 796 void VerifyPointersVisitor::VisitPointers(Object** start, Object** end) { |
785 for (Object** current = start; current < end; current++) { | 797 for (Object** current = start; current < end; current++) { |
786 if ((*current)->IsHeapObject()) { | 798 if ((*current)->IsHeapObject()) { |
787 HeapObject* object = HeapObject::cast(*current); | 799 HeapObject* object = HeapObject::cast(*current); |
788 CHECK(HEAP->Contains(object)); | 800 CHECK(HEAP->Contains(object)); |
789 CHECK(object->map()->IsMap()); | 801 CHECK(object->map()->IsMap()); |
790 } | 802 } |
791 } | 803 } |
792 } | 804 } |
793 | 805 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
846 AssertNoAllocation::~AssertNoAllocation() { } | 858 AssertNoAllocation::~AssertNoAllocation() { } |
847 DisableAssertNoAllocation::DisableAssertNoAllocation() { } | 859 DisableAssertNoAllocation::DisableAssertNoAllocation() { } |
848 DisableAssertNoAllocation::~DisableAssertNoAllocation() { } | 860 DisableAssertNoAllocation::~DisableAssertNoAllocation() { } |
849 | 861 |
850 #endif | 862 #endif |
851 | 863 |
852 | 864 |
853 } } // namespace v8::internal | 865 } } // namespace v8::internal |
854 | 866 |
855 #endif // V8_HEAP_INL_H_ | 867 #endif // V8_HEAP_INL_H_ |
OLD | NEW |