| 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 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 605 } | 605 } |
| 606 | 606 |
| 607 | 607 |
| 608 // Verify() is inline to avoid ifdef-s around its calls in release | 608 // Verify() is inline to avoid ifdef-s around its calls in release |
| 609 // mode. | 609 // mode. |
| 610 void Heap::ExternalStringTable::Verify() { | 610 void Heap::ExternalStringTable::Verify() { |
| 611 #ifdef DEBUG | 611 #ifdef DEBUG |
| 612 for (int i = 0; i < new_space_strings_.length(); ++i) { | 612 for (int i = 0; i < new_space_strings_.length(); ++i) { |
| 613 Object* obj = Object::cast(new_space_strings_[i]); | 613 Object* obj = Object::cast(new_space_strings_[i]); |
| 614 DCHECK(heap_->InNewSpace(obj)); | 614 DCHECK(heap_->InNewSpace(obj)); |
| 615 DCHECK(obj != heap_->the_hole_value()); | 615 DCHECK(!obj->IsTheHole(heap_->isolate())); |
| 616 } | 616 } |
| 617 for (int i = 0; i < old_space_strings_.length(); ++i) { | 617 for (int i = 0; i < old_space_strings_.length(); ++i) { |
| 618 Object* obj = Object::cast(old_space_strings_[i]); | 618 Object* obj = Object::cast(old_space_strings_[i]); |
| 619 DCHECK(!heap_->InNewSpace(obj)); | 619 DCHECK(!heap_->InNewSpace(obj)); |
| 620 DCHECK(obj != heap_->the_hole_value()); | 620 DCHECK(!obj->IsTheHole(heap_->isolate())); |
| 621 } | 621 } |
| 622 #endif | 622 #endif |
| 623 } | 623 } |
| 624 | 624 |
| 625 | 625 |
| 626 void Heap::ExternalStringTable::AddOldString(String* string) { | 626 void Heap::ExternalStringTable::AddOldString(String* string) { |
| 627 DCHECK(string->IsExternalString()); | 627 DCHECK(string->IsExternalString()); |
| 628 DCHECK(!heap_->InNewSpace(string)); | 628 DCHECK(!heap_->InNewSpace(string)); |
| 629 old_space_strings_.Add(string); | 629 old_space_strings_.Add(string); |
| 630 } | 630 } |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 750 | 750 |
| 751 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) { | 751 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) { |
| 752 for (Object** current = start; current < end; current++) { | 752 for (Object** current = start; current < end; current++) { |
| 753 CHECK((*current)->IsSmi()); | 753 CHECK((*current)->IsSmi()); |
| 754 } | 754 } |
| 755 } | 755 } |
| 756 } // namespace internal | 756 } // namespace internal |
| 757 } // namespace v8 | 757 } // namespace v8 |
| 758 | 758 |
| 759 #endif // V8_HEAP_HEAP_INL_H_ | 759 #endif // V8_HEAP_HEAP_INL_H_ |
| OLD | NEW |