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 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
734 HEAP->always_allocate_scope_depth_++; | 734 HEAP->always_allocate_scope_depth_++; |
735 } | 735 } |
736 | 736 |
737 | 737 |
738 AlwaysAllocateScope::~AlwaysAllocateScope() { | 738 AlwaysAllocateScope::~AlwaysAllocateScope() { |
739 HEAP->always_allocate_scope_depth_--; | 739 HEAP->always_allocate_scope_depth_--; |
740 ASSERT(HEAP->always_allocate_scope_depth_ == 0); | 740 ASSERT(HEAP->always_allocate_scope_depth_ == 0); |
741 } | 741 } |
742 | 742 |
743 | 743 |
744 #ifdef DEBUG | |
745 void VerifyPointersVisitor::VisitPointers(Object** start, Object** end) { | 744 void VerifyPointersVisitor::VisitPointers(Object** start, Object** end) { |
746 for (Object** current = start; current < end; current++) { | 745 for (Object** current = start; current < end; current++) { |
747 if ((*current)->IsHeapObject()) { | 746 if ((*current)->IsHeapObject()) { |
748 HeapObject* object = HeapObject::cast(*current); | 747 HeapObject* object = HeapObject::cast(*current); |
749 ASSERT(HEAP->Contains(object)); | 748 CHECK(HEAP->Contains(object)); |
750 ASSERT(object->map()->IsMap()); | 749 CHECK(object->map()->IsMap()); |
751 } | 750 } |
752 } | 751 } |
753 } | 752 } |
754 #endif | |
755 | 753 |
756 | 754 |
757 double GCTracer::SizeOfHeapObjects() { | 755 double GCTracer::SizeOfHeapObjects() { |
758 return (static_cast<double>(HEAP->SizeOfObjects())) / MB; | 756 return (static_cast<double>(HEAP->SizeOfObjects())) / MB; |
759 } | 757 } |
760 | 758 |
761 | 759 |
762 DisallowAllocationFailure::DisallowAllocationFailure() { | 760 DisallowAllocationFailure::DisallowAllocationFailure() { |
763 #ifdef DEBUG | 761 #ifdef DEBUG |
764 old_state_ = HEAP->disallow_allocation_failure_; | 762 old_state_ = HEAP->disallow_allocation_failure_; |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
808 AssertNoAllocation::~AssertNoAllocation() { } | 806 AssertNoAllocation::~AssertNoAllocation() { } |
809 DisableAssertNoAllocation::DisableAssertNoAllocation() { } | 807 DisableAssertNoAllocation::DisableAssertNoAllocation() { } |
810 DisableAssertNoAllocation::~DisableAssertNoAllocation() { } | 808 DisableAssertNoAllocation::~DisableAssertNoAllocation() { } |
811 | 809 |
812 #endif | 810 #endif |
813 | 811 |
814 | 812 |
815 } } // namespace v8::internal | 813 } } // namespace v8::internal |
816 | 814 |
817 #endif // V8_HEAP_INL_H_ | 815 #endif // V8_HEAP_INL_H_ |
OLD | NEW |