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

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

Issue 1900423002: [heap] Merge NewSpacePage into Page (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments Created 4 years, 8 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 | « no previous file | src/heap/heap.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_H_ 5 #ifndef V8_HEAP_HEAP_H_
6 #define V8_HEAP_HEAP_H_ 6 #define V8_HEAP_HEAP_H_
7 7
8 #include <cmath> 8 #include <cmath>
9 #include <map> 9 #include <map>
10 10
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 316
317 void Initialize(); 317 void Initialize();
318 318
319 void Destroy() { 319 void Destroy() {
320 DCHECK(is_empty()); 320 DCHECK(is_empty());
321 delete emergency_stack_; 321 delete emergency_stack_;
322 emergency_stack_ = NULL; 322 emergency_stack_ = NULL;
323 } 323 }
324 324
325 Page* GetHeadPage() { 325 Page* GetHeadPage() {
326 return Page::FromAllocationTop(reinterpret_cast<Address>(rear_)); 326 return Page::FromAllocationAreaAddress(reinterpret_cast<Address>(rear_));
327 } 327 }
328 328
329 void SetNewLimit(Address limit) { 329 void SetNewLimit(Address limit) {
330 // If we are already using an emergency stack, we can ignore it. 330 // If we are already using an emergency stack, we can ignore it.
331 if (emergency_stack_) return; 331 if (emergency_stack_) return;
332 332
333 // If the limit is not on the same page, we can ignore it. 333 // If the limit is not on the same page, we can ignore it.
334 if (Page::FromAllocationTop(limit) != GetHeadPage()) return; 334 if (Page::FromAllocationAreaAddress(limit) != GetHeadPage()) return;
335 335
336 limit_ = reinterpret_cast<struct Entry*>(limit); 336 limit_ = reinterpret_cast<struct Entry*>(limit);
337 337
338 if (limit_ <= rear_) { 338 if (limit_ <= rear_) {
339 return; 339 return;
340 } 340 }
341 341
342 RelocateQueueHead(); 342 RelocateQueueHead();
343 } 343 }
344 344
(...skipping 2305 matching lines...) Expand 10 before | Expand all | Expand 10 after
2650 friend class LargeObjectSpace; 2650 friend class LargeObjectSpace;
2651 friend class NewSpace; 2651 friend class NewSpace;
2652 friend class PagedSpace; 2652 friend class PagedSpace;
2653 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); 2653 DISALLOW_COPY_AND_ASSIGN(AllocationObserver);
2654 }; 2654 };
2655 2655
2656 } // namespace internal 2656 } // namespace internal
2657 } // namespace v8 2657 } // namespace v8
2658 2658
2659 #endif // V8_HEAP_HEAP_H_ 2659 #endif // V8_HEAP_HEAP_H_
OLDNEW
« no previous file with comments | « no previous file | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698