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

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

Issue 866723002: Treat pointers in optimized code as strong before all weak dependencies are registered. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix check Created 5 years, 11 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/ia32/lithium-codegen-ia32.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 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 heap_->always_allocate_scope_depth_++; 722 heap_->always_allocate_scope_depth_++;
723 } 723 }
724 724
725 725
726 AlwaysAllocateScope::~AlwaysAllocateScope() { 726 AlwaysAllocateScope::~AlwaysAllocateScope() {
727 heap_->always_allocate_scope_depth_--; 727 heap_->always_allocate_scope_depth_--;
728 DCHECK(heap_->always_allocate_scope_depth_ == 0); 728 DCHECK(heap_->always_allocate_scope_depth_ == 0);
729 } 729 }
730 730
731 731
732 #ifdef VERIFY_HEAP
733 NoWeakObjectVerificationScope::NoWeakObjectVerificationScope() {
734 Isolate* isolate = Isolate::Current();
735 isolate->heap()->no_weak_object_verification_scope_depth_++;
736 }
737
738
739 NoWeakObjectVerificationScope::~NoWeakObjectVerificationScope() {
740 Isolate* isolate = Isolate::Current();
741 isolate->heap()->no_weak_object_verification_scope_depth_--;
742 }
743 #endif
744
745
746 GCCallbacksScope::GCCallbacksScope(Heap* heap) : heap_(heap) { 732 GCCallbacksScope::GCCallbacksScope(Heap* heap) : heap_(heap) {
747 heap_->gc_callbacks_depth_++; 733 heap_->gc_callbacks_depth_++;
748 } 734 }
749 735
750 736
751 GCCallbacksScope::~GCCallbacksScope() { heap_->gc_callbacks_depth_--; } 737 GCCallbacksScope::~GCCallbacksScope() { heap_->gc_callbacks_depth_--; }
752 738
753 739
754 bool GCCallbacksScope::CheckReenter() { 740 bool GCCallbacksScope::CheckReenter() {
755 return heap_->gc_callbacks_depth_ == 1; 741 return heap_->gc_callbacks_depth_ == 1;
(...skipping 13 matching lines...) Expand all
769 755
770 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) { 756 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) {
771 for (Object** current = start; current < end; current++) { 757 for (Object** current = start; current < end; current++) {
772 CHECK((*current)->IsSmi()); 758 CHECK((*current)->IsSmi());
773 } 759 }
774 } 760 }
775 } 761 }
776 } // namespace v8::internal 762 } // namespace v8::internal
777 763
778 #endif // V8_HEAP_HEAP_INL_H_ 764 #endif // V8_HEAP_HEAP_INL_H_
OLDNEW
« no previous file with comments | « src/heap/heap.h ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698