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

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

Issue 1319153006: [heap] Remove obsolete DisallowAllocationFailure scope. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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.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 // 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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 } 191 }
192 192
193 193
194 AllocationResult Heap::AllocateRaw(int size_in_bytes, AllocationSpace space, 194 AllocationResult Heap::AllocateRaw(int size_in_bytes, AllocationSpace space,
195 AllocationSpace retry_space, 195 AllocationSpace retry_space,
196 AllocationAlignment alignment) { 196 AllocationAlignment alignment) {
197 DCHECK(AllowHandleAllocation::IsAllowed()); 197 DCHECK(AllowHandleAllocation::IsAllowed());
198 DCHECK(AllowHeapAllocation::IsAllowed()); 198 DCHECK(AllowHeapAllocation::IsAllowed());
199 DCHECK(gc_state_ == NOT_IN_GC); 199 DCHECK(gc_state_ == NOT_IN_GC);
200 #ifdef DEBUG 200 #ifdef DEBUG
201 if (FLAG_gc_interval >= 0 && AllowAllocationFailure::IsAllowed(isolate_) && 201 if (FLAG_gc_interval >= 0 && !always_allocate() &&
202 Heap::allocation_timeout_-- <= 0) { 202 Heap::allocation_timeout_-- <= 0) {
203 return AllocationResult::Retry(space); 203 return AllocationResult::Retry(space);
204 } 204 }
205 isolate_->counters()->objs_since_last_full()->Increment(); 205 isolate_->counters()->objs_since_last_full()->Increment();
206 isolate_->counters()->objs_since_last_young()->Increment(); 206 isolate_->counters()->objs_since_last_young()->Increment();
207 #endif 207 #endif
208 208
209 HeapObject* object; 209 HeapObject* object;
210 AllocationResult allocation; 210 AllocationResult allocation;
211 if (NEW_SPACE == space) { 211 if (NEW_SPACE == space) {
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 } 741 }
742 742
743 743
744 void Heap::SetSetterStubDeoptPCOffset(int pc_offset) { 744 void Heap::SetSetterStubDeoptPCOffset(int pc_offset) {
745 DCHECK(setter_stub_deopt_pc_offset() == Smi::FromInt(0)); 745 DCHECK(setter_stub_deopt_pc_offset() == Smi::FromInt(0));
746 set_setter_stub_deopt_pc_offset(Smi::FromInt(pc_offset)); 746 set_setter_stub_deopt_pc_offset(Smi::FromInt(pc_offset));
747 } 747 }
748 748
749 749
750 AlwaysAllocateScope::AlwaysAllocateScope(Isolate* isolate) 750 AlwaysAllocateScope::AlwaysAllocateScope(Isolate* isolate)
751 : heap_(isolate->heap()), daf_(isolate) { 751 : heap_(isolate->heap()) {
752 heap_->always_allocate_scope_count_.Increment(1); 752 heap_->always_allocate_scope_count_.Increment(1);
753 } 753 }
754 754
755 755
756 AlwaysAllocateScope::~AlwaysAllocateScope() { 756 AlwaysAllocateScope::~AlwaysAllocateScope() {
757 heap_->always_allocate_scope_count_.Increment(-1); 757 heap_->always_allocate_scope_count_.Increment(-1);
758 } 758 }
759 759
760 760
761 GCCallbacksScope::GCCallbacksScope(Heap* heap) : heap_(heap) { 761 GCCallbacksScope::GCCallbacksScope(Heap* heap) : heap_(heap) {
(...skipping 22 matching lines...) Expand all
784 784
785 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) { 785 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) {
786 for (Object** current = start; current < end; current++) { 786 for (Object** current = start; current < end; current++) {
787 CHECK((*current)->IsSmi()); 787 CHECK((*current)->IsSmi());
788 } 788 }
789 } 789 }
790 } 790 }
791 } // namespace v8::internal 791 } // namespace v8::internal
792 792
793 #endif // V8_HEAP_HEAP_INL_H_ 793 #endif // V8_HEAP_HEAP_INL_H_
OLDNEW
« no previous file with comments | « src/heap/heap.h ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698