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

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

Issue 1376753002: [heap] Remove NewSpace::set_top and the corresponding hack (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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/incremental-marking.cc ('k') | src/objects.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_H_ 5 #ifndef V8_HEAP_SPACES_H_
6 #define V8_HEAP_SPACES_H_ 6 #define V8_HEAP_SPACES_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/atomic-utils.h" 9 #include "src/atomic-utils.h"
10 #include "src/base/atomicops.h" 10 #include "src/base/atomicops.h"
(...skipping 2532 matching lines...) Expand 10 before | Expand all | Expand 10 after
2543 from_space_.InitialTotalCapacity()); 2543 from_space_.InitialTotalCapacity());
2544 return to_space_.InitialTotalCapacity(); 2544 return to_space_.InitialTotalCapacity();
2545 } 2545 }
2546 2546
2547 // Return the address of the allocation pointer in the active semispace. 2547 // Return the address of the allocation pointer in the active semispace.
2548 Address top() { 2548 Address top() {
2549 DCHECK(to_space_.current_page()->ContainsLimit(allocation_info_.top())); 2549 DCHECK(to_space_.current_page()->ContainsLimit(allocation_info_.top()));
2550 return allocation_info_.top(); 2550 return allocation_info_.top();
2551 } 2551 }
2552 2552
2553 void set_top(Address top) {
2554 DCHECK(to_space_.current_page()->ContainsLimit(top));
2555 allocation_info_.set_top(top);
2556 }
2557
2558 // Return the address of the allocation pointer limit in the active semispace. 2553 // Return the address of the allocation pointer limit in the active semispace.
2559 Address limit() { 2554 Address limit() {
2560 DCHECK(to_space_.current_page()->ContainsLimit(allocation_info_.limit())); 2555 DCHECK(to_space_.current_page()->ContainsLimit(allocation_info_.limit()));
2561 return allocation_info_.limit(); 2556 return allocation_info_.limit();
2562 } 2557 }
2563 2558
2564 // Return the address of the first object in the active semispace. 2559 // Return the address of the first object in the active semispace.
2565 Address bottom() { return to_space_.space_start(); } 2560 Address bottom() { return to_space_.space_start(); }
2566 2561
2567 // Get the age mark of the inactive semispace. 2562 // Get the age mark of the inactive semispace.
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
2975 count = 0; 2970 count = 0;
2976 } 2971 }
2977 // Must be small, since an iteration is used for lookup. 2972 // Must be small, since an iteration is used for lookup.
2978 static const int kMaxComments = 64; 2973 static const int kMaxComments = 64;
2979 }; 2974 };
2980 #endif 2975 #endif
2981 } 2976 }
2982 } // namespace v8::internal 2977 } // namespace v8::internal
2983 2978
2984 #endif // V8_HEAP_SPACES_H_ 2979 #endif // V8_HEAP_SPACES_H_
OLDNEW
« no previous file with comments | « src/heap/incremental-marking.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698