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

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

Issue 5745005: Provide baseline GC version. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 10 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 mc_first_forwarded = allocation_watermark; 107 mc_first_forwarded = allocation_watermark;
108 } 108 }
109 109
110 110
111 Address Page::CachedAllocationWatermark() { 111 Address Page::CachedAllocationWatermark() {
112 return mc_first_forwarded; 112 return mc_first_forwarded;
113 } 113 }
114 114
115 115
116 uint32_t Page::GetRegionMarks() { 116 uint32_t Page::GetRegionMarks() {
117 #ifndef BASELINE_GC
117 return dirty_regions_; 118 return dirty_regions_;
119 #else
120 return kAllRegionsDirtyMarks;
121 #endif
118 } 122 }
119 123
120 124
121 void Page::SetRegionMarks(uint32_t marks) { 125 void Page::SetRegionMarks(uint32_t marks) {
126 #ifndef BASELINE_GC
122 dirty_regions_ = marks; 127 dirty_regions_ = marks;
128 #endif
123 } 129 }
124 130
125 131
126 int Page::GetRegionNumberForAddress(Address addr) { 132 int Page::GetRegionNumberForAddress(Address addr) {
127 // Each page is divided into 256 byte regions. Each region has a corresponding 133 // Each page is divided into 256 byte regions. Each region has a corresponding
128 // dirty mark bit in the page header. Region can contain intergenerational 134 // dirty mark bit in the page header. Region can contain intergenerational
129 // references iff its dirty mark is set. 135 // references iff its dirty mark is set.
130 // A normal 8K page contains exactly 32 regions so all region marks fit 136 // A normal 8K page contains exactly 32 regions so all region marks fit
131 // into 32-bit integer field. To calculate a region number we just divide 137 // into 32-bit integer field. To calculate a region number we just divide
132 // offset inside page by region size. 138 // offset inside page by region size.
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 521
516 bool FreeListNode::IsFreeListNode(HeapObject* object) { 522 bool FreeListNode::IsFreeListNode(HeapObject* object) {
517 return object->map() == Heap::raw_unchecked_byte_array_map() 523 return object->map() == Heap::raw_unchecked_byte_array_map()
518 || object->map() == Heap::raw_unchecked_one_pointer_filler_map() 524 || object->map() == Heap::raw_unchecked_one_pointer_filler_map()
519 || object->map() == Heap::raw_unchecked_two_pointer_filler_map(); 525 || object->map() == Heap::raw_unchecked_two_pointer_filler_map();
520 } 526 }
521 527
522 } } // namespace v8::internal 528 } } // namespace v8::internal
523 529
524 #endif // V8_SPACES_INL_H_ 530 #endif // V8_SPACES_INL_H_
OLDNEW
« src/ia32/codegen-ia32.cc ('K') | « src/spaces.cc ('k') | test/cctest/test-mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698