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

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

Issue 1281903002: [heap] Remove unused support for heap iterator size function. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_cleanup-mark-compact-3
Patch Set: Created 5 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
« no previous file with comments | « src/heap/spaces.cc ('k') | src/heap/store-buffer.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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_SPACES_INL_H_ 5 #ifndef V8_HEAP_SPACES_INL_H_
6 #define V8_HEAP_SPACES_INL_H_ 6 #define V8_HEAP_SPACES_INL_H_
7 7
8 #include "src/heap/spaces.h" 8 #include "src/heap/spaces.h"
9 #include "src/heap-profiler.h" 9 #include "src/heap-profiler.h"
10 #include "src/isolate.h" 10 #include "src/isolate.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 81
82 // ----------------------------------------------------------------------------- 82 // -----------------------------------------------------------------------------
83 // HeapObjectIterator 83 // HeapObjectIterator
84 HeapObject* HeapObjectIterator::FromCurrentPage() { 84 HeapObject* HeapObjectIterator::FromCurrentPage() {
85 while (cur_addr_ != cur_end_) { 85 while (cur_addr_ != cur_end_) {
86 if (cur_addr_ == space_->top() && cur_addr_ != space_->limit()) { 86 if (cur_addr_ == space_->top() && cur_addr_ != space_->limit()) {
87 cur_addr_ = space_->limit(); 87 cur_addr_ = space_->limit();
88 continue; 88 continue;
89 } 89 }
90 HeapObject* obj = HeapObject::FromAddress(cur_addr_); 90 HeapObject* obj = HeapObject::FromAddress(cur_addr_);
91 int obj_size = (size_func_ == NULL) ? obj->Size() : size_func_(obj); 91 int obj_size = obj->Size();
92 cur_addr_ += obj_size; 92 cur_addr_ += obj_size;
93 DCHECK(cur_addr_ <= cur_end_); 93 DCHECK(cur_addr_ <= cur_end_);
94 // TODO(hpayer): Remove the debugging code. 94 // TODO(hpayer): Remove the debugging code.
95 if (cur_addr_ > cur_end_) { 95 if (cur_addr_ > cur_end_) {
96 space_->heap()->isolate()->PushStackTraceAndDie(0xaaaaaaaa, obj, NULL, 96 space_->heap()->isolate()->PushStackTraceAndDie(0xaaaaaaaa, obj, NULL,
97 obj_size); 97 obj_size);
98 } 98 }
99 99
100 if (!obj->IsFiller()) { 100 if (!obj->IsFiller()) {
101 DCHECK_OBJECT_SIZE(obj_size); 101 DCHECK_OBJECT_SIZE(obj_size);
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 414
415 415
416 intptr_t LargeObjectSpace::Available() { 416 intptr_t LargeObjectSpace::Available() {
417 return ObjectSizeFor(heap()->isolate()->memory_allocator()->Available()); 417 return ObjectSizeFor(heap()->isolate()->memory_allocator()->Available());
418 } 418 }
419 419
420 } 420 }
421 } // namespace v8::internal 421 } // namespace v8::internal
422 422
423 #endif // V8_HEAP_SPACES_INL_H_ 423 #endif // V8_HEAP_SPACES_INL_H_
OLDNEW
« no previous file with comments | « src/heap/spaces.cc ('k') | src/heap/store-buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698