OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 const char* typeName); | 388 const char* typeName); |
389 template <typename T> | 389 template <typename T> |
390 static Address allocate(size_t, bool eagerlySweep = false); | 390 static Address allocate(size_t, bool eagerlySweep = false); |
391 template <typename T> | 391 template <typename T> |
392 static Address reallocate(void* previous, size_t); | 392 static Address reallocate(void* previous, size_t); |
393 | 393 |
394 void processMarkingStack(Visitor*); | 394 void processMarkingStack(Visitor*); |
395 void postMarkingProcessing(Visitor*); | 395 void postMarkingProcessing(Visitor*); |
396 void weakProcessing(Visitor*); | 396 void weakProcessing(Visitor*); |
397 | 397 |
398 void preGC(); | |
399 void postGC(BlinkGC::GCType); | |
400 void preSweep(BlinkGC::GCType); | |
401 | |
402 // Conservatively checks whether an address is a pointer in any of the | 398 // Conservatively checks whether an address is a pointer in any of the |
403 // thread heaps. If so marks the object pointed to as live. | 399 // thread heaps. If so marks the object pointed to as live. |
404 Address checkAndMarkPointer(Visitor*, Address); | 400 Address checkAndMarkPointer(Visitor*, Address); |
405 #if DCHECK_IS_ON() | 401 #if DCHECK_IS_ON() |
406 Address checkAndMarkPointer(Visitor*, | 402 Address checkAndMarkPointer(Visitor*, |
407 Address, | 403 Address, |
408 MarkedPointerCallbackForTesting); | 404 MarkedPointerCallbackForTesting); |
409 #endif | 405 #endif |
410 | 406 |
411 size_t objectPayloadSizeForTesting(); | 407 size_t objectPayloadSizeForTesting(); |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
665 T** cell = reinterpret_cast<T**>(object); | 661 T** cell = reinterpret_cast<T**>(object); |
666 if (*cell && !ObjectAliveTrait<T>::isHeapObjectAlive(*cell)) | 662 if (*cell && !ObjectAliveTrait<T>::isHeapObjectAlive(*cell)) |
667 *cell = nullptr; | 663 *cell = nullptr; |
668 } | 664 } |
669 | 665 |
670 } // namespace blink | 666 } // namespace blink |
671 | 667 |
672 #include "platform/heap/VisitorImpl.h" | 668 #include "platform/heap/VisitorImpl.h" |
673 | 669 |
674 #endif // Heap_h | 670 #endif // Heap_h |
OLD | NEW |