OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 2035 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2046 while (current_cell != 0) { | 2046 while (current_cell != 0) { |
2047 int trailing_zeros = CompilerIntrinsics::CountTrailingZeros(current_cell); | 2047 int trailing_zeros = CompilerIntrinsics::CountTrailingZeros(current_cell); |
2048 current_cell >>= trailing_zeros; | 2048 current_cell >>= trailing_zeros; |
2049 offset += trailing_zeros; | 2049 offset += trailing_zeros; |
2050 Address address = cell_base + offset * kPointerSize; | 2050 Address address = cell_base + offset * kPointerSize; |
2051 HeapObject* object = HeapObject::FromAddress(address); | 2051 HeapObject* object = HeapObject::FromAddress(address); |
2052 | 2052 |
2053 int size = object->Size(); | 2053 int size = object->Size(); |
2054 survivors_size += size; | 2054 survivors_size += size; |
2055 | 2055 |
2056 Heap::UpdateAllocationSiteFeedback(object); | 2056 Heap::UpdateAllocationSiteFeedback(object, Heap::RECORD_SCRATCHPAD_SLOT); |
2057 | 2057 |
2058 offset++; | 2058 offset++; |
2059 current_cell >>= 1; | 2059 current_cell >>= 1; |
2060 // Aggressively promote young survivors to the old space. | 2060 // Aggressively promote young survivors to the old space. |
2061 if (TryPromoteObject(object, size)) { | 2061 if (TryPromoteObject(object, size)) { |
2062 continue; | 2062 continue; |
2063 } | 2063 } |
2064 | 2064 |
2065 // Promotion failed. Just migrate object to another semispace. | 2065 // Promotion failed. Just migrate object to another semispace. |
2066 MaybeObject* allocation = new_space->AllocateRaw(size); | 2066 MaybeObject* allocation = new_space->AllocateRaw(size); |
(...skipping 2410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4477 while (buffer != NULL) { | 4477 while (buffer != NULL) { |
4478 SlotsBuffer* next_buffer = buffer->next(); | 4478 SlotsBuffer* next_buffer = buffer->next(); |
4479 DeallocateBuffer(buffer); | 4479 DeallocateBuffer(buffer); |
4480 buffer = next_buffer; | 4480 buffer = next_buffer; |
4481 } | 4481 } |
4482 *buffer_address = NULL; | 4482 *buffer_address = NULL; |
4483 } | 4483 } |
4484 | 4484 |
4485 | 4485 |
4486 } } // namespace v8::internal | 4486 } } // namespace v8::internal |
OLD | NEW |