| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/base/atomicops.h" | 7 #include "src/base/atomicops.h" |
| 8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/compilation-cache.h" | 10 #include "src/compilation-cache.h" |
| (...skipping 3225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3236 freed_bytes = Free<parallelism>(space, free_list, free_start, size); | 3236 freed_bytes = Free<parallelism>(space, free_list, free_start, size); |
| 3237 max_freed_bytes = Max(freed_bytes, max_freed_bytes); | 3237 max_freed_bytes = Max(freed_bytes, max_freed_bytes); |
| 3238 #ifdef ENABLE_GDB_JIT_INTERFACE | 3238 #ifdef ENABLE_GDB_JIT_INTERFACE |
| 3239 if (FLAG_gdbjit && space->identity() == CODE_SPACE) { | 3239 if (FLAG_gdbjit && space->identity() == CODE_SPACE) { |
| 3240 GDBJITInterface::RemoveCodeRange(free_start, free_end); | 3240 GDBJITInterface::RemoveCodeRange(free_start, free_end); |
| 3241 } | 3241 } |
| 3242 #endif | 3242 #endif |
| 3243 } | 3243 } |
| 3244 HeapObject* live_object = HeapObject::FromAddress(free_end); | 3244 HeapObject* live_object = HeapObject::FromAddress(free_end); |
| 3245 DCHECK(Marking::IsBlack(Marking::MarkBitFrom(live_object))); | 3245 DCHECK(Marking::IsBlack(Marking::MarkBitFrom(live_object))); |
| 3246 Map* map = live_object->map(); | 3246 Map* map = live_object->synchronized_map(); |
| 3247 int size = live_object->SizeFromMap(map); | 3247 int size = live_object->SizeFromMap(map); |
| 3248 if (sweeping_mode == SWEEP_AND_VISIT_LIVE_OBJECTS) { | 3248 if (sweeping_mode == SWEEP_AND_VISIT_LIVE_OBJECTS) { |
| 3249 live_object->IterateBody(map->instance_type(), size, v); | 3249 live_object->IterateBody(map->instance_type(), size, v); |
| 3250 } | 3250 } |
| 3251 if ((skip_list_mode == REBUILD_SKIP_LIST) && skip_list != NULL) { | 3251 if ((skip_list_mode == REBUILD_SKIP_LIST) && skip_list != NULL) { |
| 3252 int new_region_start = SkipList::RegionNumber(free_end); | 3252 int new_region_start = SkipList::RegionNumber(free_end); |
| 3253 int new_region_end = | 3253 int new_region_end = |
| 3254 SkipList::RegionNumber(free_end + size - kPointerSize); | 3254 SkipList::RegionNumber(free_end + size - kPointerSize); |
| 3255 if (new_region_start != curr_region || new_region_end != curr_region) { | 3255 if (new_region_start != curr_region || new_region_end != curr_region) { |
| 3256 skip_list->AddObject(free_end, size); | 3256 skip_list->AddObject(free_end, size); |
| (...skipping 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4440 SlotsBuffer* buffer = *buffer_address; | 4440 SlotsBuffer* buffer = *buffer_address; |
| 4441 while (buffer != NULL) { | 4441 while (buffer != NULL) { |
| 4442 SlotsBuffer* next_buffer = buffer->next(); | 4442 SlotsBuffer* next_buffer = buffer->next(); |
| 4443 DeallocateBuffer(buffer); | 4443 DeallocateBuffer(buffer); |
| 4444 buffer = next_buffer; | 4444 buffer = next_buffer; |
| 4445 } | 4445 } |
| 4446 *buffer_address = NULL; | 4446 *buffer_address = NULL; |
| 4447 } | 4447 } |
| 4448 } | 4448 } |
| 4449 } // namespace v8::internal | 4449 } // namespace v8::internal |
| OLD | NEW |