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

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

Issue 10829097: Make test-serialize resilient against --gc-interval. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Make compiler in release mode happy. Created 8 years, 4 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.h ('k') | src/isolate.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 // 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 739 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 } 750 }
751 } 751 }
752 #endif 752 #endif
753 753
754 754
755 double GCTracer::SizeOfHeapObjects() { 755 double GCTracer::SizeOfHeapObjects() {
756 return (static_cast<double>(HEAP->SizeOfObjects())) / MB; 756 return (static_cast<double>(HEAP->SizeOfObjects())) / MB;
757 } 757 }
758 758
759 759
760 DisallowAllocationFailure::DisallowAllocationFailure() {
761 #ifdef DEBUG
762 old_state_ = HEAP->disallow_allocation_failure_;
763 HEAP->disallow_allocation_failure_ = true;
764 #endif
765 }
766
767
768 DisallowAllocationFailure::~DisallowAllocationFailure() {
769 #ifdef DEBUG
770 HEAP->disallow_allocation_failure_ = old_state_;
771 #endif
772 }
773
774
760 #ifdef DEBUG 775 #ifdef DEBUG
761 DisallowAllocationFailure::DisallowAllocationFailure() {
762 old_state_ = HEAP->disallow_allocation_failure_;
763 HEAP->disallow_allocation_failure_ = true;
764 }
765
766
767 DisallowAllocationFailure::~DisallowAllocationFailure() {
768 HEAP->disallow_allocation_failure_ = old_state_;
769 }
770 #endif
771
772
773 #ifdef DEBUG
774 AssertNoAllocation::AssertNoAllocation() { 776 AssertNoAllocation::AssertNoAllocation() {
775 Isolate* isolate = ISOLATE; 777 Isolate* isolate = ISOLATE;
776 active_ = !isolate->optimizing_compiler_thread()->IsOptimizerThread(); 778 active_ = !isolate->optimizing_compiler_thread()->IsOptimizerThread();
777 if (active_) { 779 if (active_) {
778 old_state_ = isolate->heap()->allow_allocation(false); 780 old_state_ = isolate->heap()->allow_allocation(false);
779 } 781 }
780 } 782 }
781 783
782 784
783 AssertNoAllocation::~AssertNoAllocation() { 785 AssertNoAllocation::~AssertNoAllocation() {
(...skipping 20 matching lines...) Expand all
804 AssertNoAllocation::~AssertNoAllocation() { } 806 AssertNoAllocation::~AssertNoAllocation() { }
805 DisableAssertNoAllocation::DisableAssertNoAllocation() { } 807 DisableAssertNoAllocation::DisableAssertNoAllocation() { }
806 DisableAssertNoAllocation::~DisableAssertNoAllocation() { } 808 DisableAssertNoAllocation::~DisableAssertNoAllocation() { }
807 809
808 #endif 810 #endif
809 811
810 812
811 } } // namespace v8::internal 813 } } // namespace v8::internal
812 814
813 #endif // V8_HEAP_INL_H_ 815 #endif // V8_HEAP_INL_H_
OLDNEW
« no previous file with comments | « src/heap.h ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698