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

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: reducing old cmpare patterns 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
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 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 } 589 }
590 590
591 591
592 // Verify() is inline to avoid ifdef-s around its calls in release 592 // Verify() is inline to avoid ifdef-s around its calls in release
593 // mode. 593 // mode.
594 void Heap::ExternalStringTable::Verify() { 594 void Heap::ExternalStringTable::Verify() {
595 #ifdef DEBUG 595 #ifdef DEBUG
596 for (int i = 0; i < new_space_strings_.length(); ++i) { 596 for (int i = 0; i < new_space_strings_.length(); ++i) {
597 Object* obj = Object::cast(new_space_strings_[i]); 597 Object* obj = Object::cast(new_space_strings_[i]);
598 DCHECK(heap_->InNewSpace(obj)); 598 DCHECK(heap_->InNewSpace(obj));
599 DCHECK(obj != heap_->the_hole_value()); 599 DCHECK(!obj->IsTheHole(heap_->isolate()));
600 } 600 }
601 for (int i = 0; i < old_space_strings_.length(); ++i) { 601 for (int i = 0; i < old_space_strings_.length(); ++i) {
602 Object* obj = Object::cast(old_space_strings_[i]); 602 Object* obj = Object::cast(old_space_strings_[i]);
603 DCHECK(!heap_->InNewSpace(obj)); 603 DCHECK(!heap_->InNewSpace(obj));
604 DCHECK(obj != heap_->the_hole_value()); 604 DCHECK(!obj->IsTheHole(heap_->isolate()));
605 } 605 }
606 #endif 606 #endif
607 } 607 }
608 608
609 609
610 void Heap::ExternalStringTable::AddOldString(String* string) { 610 void Heap::ExternalStringTable::AddOldString(String* string) {
611 DCHECK(string->IsExternalString()); 611 DCHECK(string->IsExternalString());
612 DCHECK(!heap_->InNewSpace(string)); 612 DCHECK(!heap_->InNewSpace(string));
613 old_space_strings_.Add(string); 613 old_space_strings_.Add(string);
614 } 614 }
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 734
735 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) { 735 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) {
736 for (Object** current = start; current < end; current++) { 736 for (Object** current = start; current < end; current++) {
737 CHECK((*current)->IsSmi()); 737 CHECK((*current)->IsSmi());
738 } 738 }
739 } 739 }
740 } // namespace internal 740 } // namespace internal
741 } // namespace v8 741 } // namespace v8
742 742
743 #endif // V8_HEAP_HEAP_INL_H_ 743 #endif // V8_HEAP_HEAP_INL_H_
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/incremental-marking.cc » ('j') | src/objects.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698