Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Side by Side Diff: src/heap/heap-inl.h

Issue 2028983002: Introduce IsUndefined(Isolate*) and IsTheHole(Isolate*) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase master Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/incremental-marking.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/incremental-marking.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698