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

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

Issue 1025643002: Respect old space allocation limit in PagedSpace::AllocateRaw. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Allow nested AlwaysAllocateScopes Created 5 years, 9 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.cc ('k') | src/heap/spaces.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 680 matching lines...) Expand 10 before | Expand all | Expand 10 after
691 691
692 692
693 void Heap::CompletelyClearInstanceofCache() { 693 void Heap::CompletelyClearInstanceofCache() {
694 set_instanceof_cache_map(Smi::FromInt(0)); 694 set_instanceof_cache_map(Smi::FromInt(0));
695 set_instanceof_cache_function(Smi::FromInt(0)); 695 set_instanceof_cache_function(Smi::FromInt(0));
696 } 696 }
697 697
698 698
699 AlwaysAllocateScope::AlwaysAllocateScope(Isolate* isolate) 699 AlwaysAllocateScope::AlwaysAllocateScope(Isolate* isolate)
700 : heap_(isolate->heap()), daf_(isolate) { 700 : heap_(isolate->heap()), daf_(isolate) {
701 // We shouldn't hit any nested scopes, because that requires
702 // non-handle code to call handle code. The code still works but
703 // performance will degrade, so we want to catch this situation
704 // in debug mode.
705 DCHECK(heap_->always_allocate_scope_depth_ == 0);
706 heap_->always_allocate_scope_depth_++; 701 heap_->always_allocate_scope_depth_++;
707 } 702 }
708 703
709 704
710 AlwaysAllocateScope::~AlwaysAllocateScope() { 705 AlwaysAllocateScope::~AlwaysAllocateScope() {
711 heap_->always_allocate_scope_depth_--; 706 heap_->always_allocate_scope_depth_--;
712 DCHECK(heap_->always_allocate_scope_depth_ == 0);
713 } 707 }
714 708
715 709
716 GCCallbacksScope::GCCallbacksScope(Heap* heap) : heap_(heap) { 710 GCCallbacksScope::GCCallbacksScope(Heap* heap) : heap_(heap) {
717 heap_->gc_callbacks_depth_++; 711 heap_->gc_callbacks_depth_++;
718 } 712 }
719 713
720 714
721 GCCallbacksScope::~GCCallbacksScope() { heap_->gc_callbacks_depth_--; } 715 GCCallbacksScope::~GCCallbacksScope() { heap_->gc_callbacks_depth_--; }
722 716
(...skipping 16 matching lines...) Expand all
739 733
740 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) { 734 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) {
741 for (Object** current = start; current < end; current++) { 735 for (Object** current = start; current < end; current++) {
742 CHECK((*current)->IsSmi()); 736 CHECK((*current)->IsSmi());
743 } 737 }
744 } 738 }
745 } 739 }
746 } // namespace v8::internal 740 } // namespace v8::internal
747 741
748 #endif // V8_HEAP_HEAP_INL_H_ 742 #endif // V8_HEAP_HEAP_INL_H_
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698