| Index: src/spaces-inl.h
|
| ===================================================================
|
| --- src/spaces-inl.h (revision 5937)
|
| +++ src/spaces-inl.h (working copy)
|
| @@ -481,7 +481,7 @@
|
| }
|
|
|
| // -----------------------------------------------------------------------------
|
| -// LargeObjectSpace
|
| +// NewSpace
|
|
|
| MaybeObject* NewSpace::AllocateRawInternal(int size_in_bytes,
|
| AllocationInfo* alloc_info) {
|
| @@ -501,6 +501,18 @@
|
| }
|
|
|
|
|
| +template <typename StringType>
|
| +void NewSpace::ShrinkStringAtAllocationBoundary(String* string, int length) {
|
| + ASSERT(length <= string->length());
|
| + ASSERT(string->IsSeqString());
|
| + ASSERT(string->address() + StringType::SizeFor(string->length()) ==
|
| + allocation_info_.top);
|
| + allocation_info_.top =
|
| + string->address() + StringType::SizeFor(length);
|
| + string->set_length(length);
|
| +}
|
| +
|
| +
|
| bool FreeListNode::IsFreeListNode(HeapObject* object) {
|
| return object->map() == Heap::raw_unchecked_byte_array_map()
|
| || object->map() == Heap::raw_unchecked_one_pointer_filler_map()
|
|
|