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

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

Issue 181453002: Reset trunk to 3.24.35.4 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: 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/heap-snapshot-generator.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
830 double GCTracer::SizeOfHeapObjects() { 823 double GCTracer::SizeOfHeapObjects() {
831 return (static_cast<double>(heap_->SizeOfObjects())) / MB; 824 return (static_cast<double>(heap_->SizeOfObjects())) / MB;
832 } 825 }
833 826
834 827
835 DisallowAllocationFailure::DisallowAllocationFailure() { 828 DisallowAllocationFailure::DisallowAllocationFailure() {
836 #ifdef DEBUG 829 #ifdef DEBUG
837 Isolate* isolate = Isolate::Current(); 830 Isolate* isolate = Isolate::Current();
838 old_state_ = isolate->heap()->disallow_allocation_failure_; 831 old_state_ = isolate->heap()->disallow_allocation_failure_;
839 isolate->heap()->disallow_allocation_failure_ = true; 832 isolate->heap()->disallow_allocation_failure_ = true;
840 #endif 833 #endif
841 } 834 }
842 835
843 836
844 DisallowAllocationFailure::~DisallowAllocationFailure() { 837 DisallowAllocationFailure::~DisallowAllocationFailure() {
845 #ifdef DEBUG 838 #ifdef DEBUG
846 Isolate* isolate = Isolate::Current(); 839 Isolate* isolate = Isolate::Current();
847 isolate->heap()->disallow_allocation_failure_ = old_state_; 840 isolate->heap()->disallow_allocation_failure_ = old_state_;
848 #endif 841 #endif
849 } 842 }
850 843
851 844
852 } } // namespace v8::internal 845 } } // namespace v8::internal
853 846
854 #endif // V8_HEAP_INL_H_ 847 #endif // V8_HEAP_INL_H_
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/heap-snapshot-generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698