| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_HEAP_HEAP_INL_H_ | 5 #ifndef V8_HEAP_HEAP_INL_H_ |
| 6 #define V8_HEAP_HEAP_INL_H_ | 6 #define V8_HEAP_HEAP_INL_H_ |
| 7 | 7 |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 | 9 |
| 10 #include "src/base/platform/platform.h" | 10 #include "src/base/platform/platform.h" |
| (...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 843 heap_->always_allocate_scope_count_.Increment(-1); | 843 heap_->always_allocate_scope_count_.Increment(-1); |
| 844 } | 844 } |
| 845 | 845 |
| 846 | 846 |
| 847 void VerifyPointersVisitor::VisitPointers(Object** start, Object** end) { | 847 void VerifyPointersVisitor::VisitPointers(Object** start, Object** end) { |
| 848 for (Object** current = start; current < end; current++) { | 848 for (Object** current = start; current < end; current++) { |
| 849 if ((*current)->IsHeapObject()) { | 849 if ((*current)->IsHeapObject()) { |
| 850 HeapObject* object = HeapObject::cast(*current); | 850 HeapObject* object = HeapObject::cast(*current); |
| 851 CHECK(object->GetIsolate()->heap()->Contains(object)); | 851 CHECK(object->GetIsolate()->heap()->Contains(object)); |
| 852 CHECK(object->map()->IsMap()); | 852 CHECK(object->map()->IsMap()); |
| 853 } else { |
| 854 CHECK((*current)->IsSmi()); |
| 853 } | 855 } |
| 854 } | 856 } |
| 855 } | 857 } |
| 856 | 858 |
| 857 | 859 |
| 858 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) { | 860 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) { |
| 859 for (Object** current = start; current < end; current++) { | 861 for (Object** current = start; current < end; current++) { |
| 860 CHECK((*current)->IsSmi()); | 862 CHECK((*current)->IsSmi()); |
| 861 } | 863 } |
| 862 } | 864 } |
| 863 } // namespace internal | 865 } // namespace internal |
| 864 } // namespace v8 | 866 } // namespace v8 |
| 865 | 867 |
| 866 #endif // V8_HEAP_HEAP_INL_H_ | 868 #endif // V8_HEAP_HEAP_INL_H_ |
| OLD | NEW |