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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 ASSERT(length <= string->length()); | 325 ASSERT(length <= string->length()); |
326 ASSERT(string->IsSeqString()); | 326 ASSERT(string->IsSeqString()); |
327 ASSERT(string->address() + StringType::SizeFor(string->length()) == | 327 ASSERT(string->address() + StringType::SizeFor(string->length()) == |
328 allocation_info_.top); | 328 allocation_info_.top); |
329 Address old_top = allocation_info_.top; | 329 Address old_top = allocation_info_.top; |
330 allocation_info_.top = | 330 allocation_info_.top = |
331 string->address() + StringType::SizeFor(length); | 331 string->address() + StringType::SizeFor(length); |
332 string->set_length(length); | 332 string->set_length(length); |
333 if (Marking::IsBlack(Marking::MarkBitFrom(string))) { | 333 if (Marking::IsBlack(Marking::MarkBitFrom(string))) { |
334 int delta = static_cast<int>(old_top - allocation_info_.top); | 334 int delta = static_cast<int>(old_top - allocation_info_.top); |
335 MemoryChunk::IncrementLiveBytes(string->address(), -delta); | 335 MemoryChunk::IncrementLiveBytesFromMutator(string->address(), -delta); |
336 } | 336 } |
337 } | 337 } |
338 | 338 |
339 | 339 |
340 bool FreeListNode::IsFreeListNode(HeapObject* object) { | 340 bool FreeListNode::IsFreeListNode(HeapObject* object) { |
341 Map* map = object->map(); | 341 Map* map = object->map(); |
342 Heap* heap = object->GetHeap(); | 342 Heap* heap = object->GetHeap(); |
343 return map == heap->raw_unchecked_free_space_map() | 343 return map == heap->raw_unchecked_free_space_map() |
344 || map == heap->raw_unchecked_one_pointer_filler_map() | 344 || map == heap->raw_unchecked_one_pointer_filler_map() |
345 || map == heap->raw_unchecked_two_pointer_filler_map(); | 345 || map == heap->raw_unchecked_two_pointer_filler_map(); |
346 } | 346 } |
347 | 347 |
348 } } // namespace v8::internal | 348 } } // namespace v8::internal |
349 | 349 |
350 #endif // V8_SPACES_INL_H_ | 350 #endif // V8_SPACES_INL_H_ |
OLD | NEW |