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

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

Issue 1108013003: Introduce --zap-cpp-pointers (off by default) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fixes Created 3 years, 7 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/frames.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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 DCHECK(AllowHandleAllocation::IsAllowed()); 298 DCHECK(AllowHandleAllocation::IsAllowed());
299 DCHECK(AllowHeapAllocation::IsAllowed()); 299 DCHECK(AllowHeapAllocation::IsAllowed());
300 DCHECK(gc_state_ == NOT_IN_GC); 300 DCHECK(gc_state_ == NOT_IN_GC);
301 #ifdef DEBUG 301 #ifdef DEBUG
302 if (FLAG_gc_interval >= 0 && !always_allocate() && 302 if (FLAG_gc_interval >= 0 && !always_allocate() &&
303 Heap::allocation_timeout_-- <= 0) { 303 Heap::allocation_timeout_-- <= 0) {
304 return AllocationResult::Retry(space); 304 return AllocationResult::Retry(space);
305 } 305 }
306 isolate_->counters()->objs_since_last_full()->Increment(); 306 isolate_->counters()->objs_since_last_full()->Increment();
307 isolate_->counters()->objs_since_last_young()->Increment(); 307 isolate_->counters()->objs_since_last_young()->Increment();
308
309 // TODO(jkummerow): Handlify more of heap.cc to maintain the rule that
310 // "there are no raw pointers anywhere on the stack when an allocation
311 // is happening", and then remove the ZapHeapPointersInCppFrames() call
312 // from CALL_HEAP_FUNCTION and instead enable it here.
313
314 // if (FLAG_zap_cpp_pointers) ZapHeapPointersInCppFrames(isolate_);
308 #endif 315 #endif
309 316
310 bool large_object = size_in_bytes > kMaxRegularHeapObjectSize; 317 bool large_object = size_in_bytes > kMaxRegularHeapObjectSize;
311 HeapObject* object = nullptr; 318 HeapObject* object = nullptr;
312 AllocationResult allocation; 319 AllocationResult allocation;
313 if (NEW_SPACE == space) { 320 if (NEW_SPACE == space) {
314 if (large_object) { 321 if (large_object) {
315 space = LO_SPACE; 322 space = LO_SPACE;
316 } else { 323 } else {
317 allocation = new_space_->AllocateRaw(size_in_bytes, alignment); 324 allocation = new_space_->AllocateRaw(size_in_bytes, alignment);
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 void VerifySmisVisitor::VisitRootPointers(Root root, Object** start, 884 void VerifySmisVisitor::VisitRootPointers(Root root, Object** start,
878 Object** end) { 885 Object** end) {
879 for (Object** current = start; current < end; current++) { 886 for (Object** current = start; current < end; current++) {
880 CHECK((*current)->IsSmi()); 887 CHECK((*current)->IsSmi());
881 } 888 }
882 } 889 }
883 } // namespace internal 890 } // namespace internal
884 } // namespace v8 891 } // namespace v8
885 892
886 #endif // V8_HEAP_HEAP_INL_H_ 893 #endif // V8_HEAP_HEAP_INL_H_
OLDNEW
« no previous file with comments | « src/frames.cc ('k') | src/heap/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698