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

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

Issue 166023003: Do not visit smis in the root list during GC. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « src/heap.cc ('k') | src/objects.h » ('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 // 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 802 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 for (Object** current = start; current < end; current++) { 813 for (Object** current = start; current < end; current++) {
814 if ((*current)->IsHeapObject()) { 814 if ((*current)->IsHeapObject()) {
815 HeapObject* object = HeapObject::cast(*current); 815 HeapObject* object = HeapObject::cast(*current);
816 CHECK(object->GetIsolate()->heap()->Contains(object)); 816 CHECK(object->GetIsolate()->heap()->Contains(object));
817 CHECK(object->map()->IsMap()); 817 CHECK(object->map()->IsMap());
818 } 818 }
819 } 819 }
820 } 820 }
821 821
822 822
823 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) {
824 for (Object** current = start; current < end; current++) {
825 CHECK((*current)->IsSmi());
826 }
827 }
828
829
823 double GCTracer::SizeOfHeapObjects() { 830 double GCTracer::SizeOfHeapObjects() {
824 return (static_cast<double>(heap_->SizeOfObjects())) / MB; 831 return (static_cast<double>(heap_->SizeOfObjects())) / MB;
825 } 832 }
826 833
827 834
828 DisallowAllocationFailure::DisallowAllocationFailure() { 835 DisallowAllocationFailure::DisallowAllocationFailure() {
829 #ifdef DEBUG 836 #ifdef DEBUG
830 Isolate* isolate = Isolate::Current(); 837 Isolate* isolate = Isolate::Current();
831 old_state_ = isolate->heap()->disallow_allocation_failure_; 838 old_state_ = isolate->heap()->disallow_allocation_failure_;
832 isolate->heap()->disallow_allocation_failure_ = true; 839 isolate->heap()->disallow_allocation_failure_ = true;
833 #endif 840 #endif
834 } 841 }
835 842
836 843
837 DisallowAllocationFailure::~DisallowAllocationFailure() { 844 DisallowAllocationFailure::~DisallowAllocationFailure() {
838 #ifdef DEBUG 845 #ifdef DEBUG
839 Isolate* isolate = Isolate::Current(); 846 Isolate* isolate = Isolate::Current();
840 isolate->heap()->disallow_allocation_failure_ = old_state_; 847 isolate->heap()->disallow_allocation_failure_ = old_state_;
841 #endif 848 #endif
842 } 849 }
843 850
844 851
845 } } // namespace v8::internal 852 } } // namespace v8::internal
846 853
847 #endif // V8_HEAP_INL_H_ 854 #endif // V8_HEAP_INL_H_
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698