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

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

Issue 7800038: Merge r9145 from the bleeding_edge to the 3.3 branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/3.3/
Patch Set: '' Created 9 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/version.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 2006-2010 the V8 project authors. All rights reserved. 1 // Copyright 2006-2010 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 } 148 }
149 149
150 150
151 uint32_t Page::GetRegionMaskForAddress(Address addr) { 151 uint32_t Page::GetRegionMaskForAddress(Address addr) {
152 return 1 << GetRegionNumberForAddress(addr); 152 return 1 << GetRegionNumberForAddress(addr);
153 } 153 }
154 154
155 155
156 uint32_t Page::GetRegionMaskForSpan(Address start, int length_in_bytes) { 156 uint32_t Page::GetRegionMaskForSpan(Address start, int length_in_bytes) {
157 uint32_t result = 0; 157 uint32_t result = 0;
158 if (length_in_bytes >= kPageSize) { 158 static const intptr_t kRegionMask = (1 << kRegionSizeLog2) - 1;
159 if (length_in_bytes + (OffsetFrom(start) & kRegionMask) >= kPageSize) {
159 result = kAllRegionsDirtyMarks; 160 result = kAllRegionsDirtyMarks;
160 } else if (length_in_bytes > 0) { 161 } else if (length_in_bytes > 0) {
161 int start_region = GetRegionNumberForAddress(start); 162 int start_region = GetRegionNumberForAddress(start);
162 int end_region = 163 int end_region =
163 GetRegionNumberForAddress(start + length_in_bytes - kPointerSize); 164 GetRegionNumberForAddress(start + length_in_bytes - kPointerSize);
164 uint32_t start_mask = (~0) << start_region; 165 uint32_t start_mask = (~0) << start_region;
165 uint32_t end_mask = ~((~1) << end_region); 166 uint32_t end_mask = ~((~1) << end_region);
166 result = start_mask & end_mask; 167 result = start_mask & end_mask;
167 // if end_region < start_region, the mask is ored. 168 // if end_region < start_region, the mask is ored.
168 if (result == 0) result = start_mask | end_mask; 169 if (result == 0) result = start_mask | end_mask;
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 521
521 bool FreeListNode::IsFreeListNode(HeapObject* object) { 522 bool FreeListNode::IsFreeListNode(HeapObject* object) {
522 return object->map() == HEAP->raw_unchecked_byte_array_map() 523 return object->map() == HEAP->raw_unchecked_byte_array_map()
523 || object->map() == HEAP->raw_unchecked_one_pointer_filler_map() 524 || object->map() == HEAP->raw_unchecked_one_pointer_filler_map()
524 || object->map() == HEAP->raw_unchecked_two_pointer_filler_map(); 525 || object->map() == HEAP->raw_unchecked_two_pointer_filler_map();
525 } 526 }
526 527
527 } } // namespace v8::internal 528 } } // namespace v8::internal
528 529
529 #endif // V8_SPACES_INL_H_ 530 #endif // V8_SPACES_INL_H_
OLDNEW
« no previous file with comments | « no previous file | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698