| 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 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 static Address allocate(size_t, bool eagerlySweep = false); | 424 static Address allocate(size_t, bool eagerlySweep = false); |
| 425 template <typename T> | 425 template <typename T> |
| 426 static Address reallocate(void* previous, size_t); | 426 static Address reallocate(void* previous, size_t); |
| 427 | 427 |
| 428 void processMarkingStack(Visitor*); | 428 void processMarkingStack(Visitor*); |
| 429 void postMarkingProcessing(Visitor*); | 429 void postMarkingProcessing(Visitor*); |
| 430 void globalWeakProcessing(Visitor*); | 430 void globalWeakProcessing(Visitor*); |
| 431 | 431 |
| 432 void preGC(); | 432 void preGC(); |
| 433 void postGC(BlinkGC::GCType); | 433 void postGC(BlinkGC::GCType); |
| 434 void preSweep(BlinkGC::GCType); |
| 434 | 435 |
| 435 // Conservatively checks whether an address is a pointer in any of the | 436 // Conservatively checks whether an address is a pointer in any of the |
| 436 // thread heaps. If so marks the object pointed to as live. | 437 // thread heaps. If so marks the object pointed to as live. |
| 437 Address checkAndMarkPointer(Visitor*, Address); | 438 Address checkAndMarkPointer(Visitor*, Address); |
| 438 | 439 |
| 439 size_t objectPayloadSizeForTesting(); | 440 size_t objectPayloadSizeForTesting(); |
| 440 | 441 |
| 441 void flushHeapDoesNotContainCache(); | 442 void flushHeapDoesNotContainCache(); |
| 442 | 443 |
| 443 FreePagePool* getFreePagePool() { return m_freePagePool.get(); } | 444 FreePagePool* getFreePagePool() { return m_freePagePool.get(); } |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 696 template <typename T> | 697 template <typename T> |
| 697 void VisitorHelper<Derived>::handleWeakCell(Visitor* self, void* object) { | 698 void VisitorHelper<Derived>::handleWeakCell(Visitor* self, void* object) { |
| 698 T** cell = reinterpret_cast<T**>(object); | 699 T** cell = reinterpret_cast<T**>(object); |
| 699 if (*cell && !ObjectAliveTrait<T>::isHeapObjectAlive(*cell)) | 700 if (*cell && !ObjectAliveTrait<T>::isHeapObjectAlive(*cell)) |
| 700 *cell = nullptr; | 701 *cell = nullptr; |
| 701 } | 702 } |
| 702 | 703 |
| 703 } // namespace blink | 704 } // namespace blink |
| 704 | 705 |
| 705 #endif // Heap_h | 706 #endif // Heap_h |
| OLD | NEW |