| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 if (chunk->Contains(addr)) { | 209 if (chunk->Contains(addr)) { |
| 210 return chunk; | 210 return chunk; |
| 211 } | 211 } |
| 212 } | 212 } |
| 213 } | 213 } |
| 214 UNREACHABLE(); | 214 UNREACHABLE(); |
| 215 return NULL; | 215 return NULL; |
| 216 } | 216 } |
| 217 | 217 |
| 218 | 218 |
| 219 // TODO(gc) ISOLATESMERGE HEAP | 219 PointerChunkIterator::PointerChunkIterator(Heap* heap) |
| 220 PointerChunkIterator::PointerChunkIterator() | |
| 221 : state_(kOldPointerState), | 220 : state_(kOldPointerState), |
| 222 old_pointer_iterator_(HEAP->old_pointer_space()), | 221 old_pointer_iterator_(heap->old_pointer_space()), |
| 223 map_iterator_(HEAP->map_space()), | 222 map_iterator_(heap->map_space()), |
| 224 lo_iterator_(HEAP->lo_space()) { } | 223 lo_iterator_(heap->lo_space()) { } |
| 225 | 224 |
| 226 | 225 |
| 227 Page* Page::next_page() { | 226 Page* Page::next_page() { |
| 228 ASSERT(next_chunk()->owner() == owner()); | 227 ASSERT(next_chunk()->owner() == owner()); |
| 229 return static_cast<Page*>(next_chunk()); | 228 return static_cast<Page*>(next_chunk()); |
| 230 } | 229 } |
| 231 | 230 |
| 232 | 231 |
| 233 Page* Page::prev_page() { | 232 Page* Page::prev_page() { |
| 234 ASSERT(prev_chunk()->owner() == owner()); | 233 ASSERT(prev_chunk()->owner() == owner()); |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 string->address() + StringType::SizeFor(length); | 346 string->address() + StringType::SizeFor(length); |
| 348 string->set_length(length); | 347 string->set_length(length); |
| 349 if (Marking::IsBlack(Marking::MarkBitFrom(string))) { | 348 if (Marking::IsBlack(Marking::MarkBitFrom(string))) { |
| 350 int delta = static_cast<int>(old_top - allocation_info_.top); | 349 int delta = static_cast<int>(old_top - allocation_info_.top); |
| 351 MemoryChunk::IncrementLiveBytes(string->address(), -delta); | 350 MemoryChunk::IncrementLiveBytes(string->address(), -delta); |
| 352 } | 351 } |
| 353 } | 352 } |
| 354 | 353 |
| 355 | 354 |
| 356 bool FreeListNode::IsFreeListNode(HeapObject* object) { | 355 bool FreeListNode::IsFreeListNode(HeapObject* object) { |
| 357 // TODO(gc) ISOLATES MERGE | 356 Map* map = object->map(); |
| 358 return object->map() == HEAP->raw_unchecked_free_space_map() | 357 Heap* heap = object->GetHeap(); |
| 359 || object->map() == HEAP->raw_unchecked_one_pointer_filler_map() | 358 return map == heap->raw_unchecked_free_space_map() |
| 360 || object->map() == HEAP->raw_unchecked_two_pointer_filler_map(); | 359 || map == heap->raw_unchecked_one_pointer_filler_map() |
| 360 || map == heap->raw_unchecked_two_pointer_filler_map(); |
| 361 } | 361 } |
| 362 | 362 |
| 363 } } // namespace v8::internal | 363 } } // namespace v8::internal |
| 364 | 364 |
| 365 #endif // V8_SPACES_INL_H_ | 365 #endif // V8_SPACES_INL_H_ |
| OLD | NEW |