| 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 951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 962 #if ENABLE(ASSERT) | 962 #if ENABLE(ASSERT) |
| 963 static bool weakTableRegistered(const void*); | 963 static bool weakTableRegistered(const void*); |
| 964 #endif | 964 #endif |
| 965 | 965 |
| 966 template<typename T> static Address allocate(size_t); | 966 template<typename T> static Address allocate(size_t); |
| 967 template<typename T> static Address reallocate(void* previous, size_t); | 967 template<typename T> static Address reallocate(void* previous, size_t); |
| 968 | 968 |
| 969 static void collectGarbage(ThreadState::StackState); | 969 static void collectGarbage(ThreadState::StackState); |
| 970 static void collectGarbageForTerminatingThread(ThreadState*); | 970 static void collectGarbageForTerminatingThread(ThreadState*); |
| 971 static void collectAllGarbage(); | 971 static void collectAllGarbage(); |
| 972 template<CallbackInvocationMode Mode> static void traceRootsAndPerformGlobal
WeakProcessing(); | 972 template<CallbackInvocationMode Mode> static void processMarkingStack(); |
| 973 static void globalWeakProcessingAndCleanup(); |
| 973 static void setForcePreciseGCForTesting(); | 974 static void setForcePreciseGCForTesting(); |
| 974 | 975 |
| 975 static void prepareForGC(); | 976 static void prepareForGC(); |
| 976 | 977 |
| 977 // Conservatively checks whether an address is a pointer in any of the threa
d | 978 // Conservatively checks whether an address is a pointer in any of the threa
d |
| 978 // heaps. If so marks the object pointed to as live. | 979 // heaps. If so marks the object pointed to as live. |
| 979 static Address checkAndMarkPointer(Visitor*, Address); | 980 static Address checkAndMarkPointer(Visitor*, Address); |
| 980 | 981 |
| 981 #if ENABLE(GC_TRACING) | 982 #if ENABLE(GC_TRACING) |
| 982 // Dump the path to specified object on the next GC. This method is to be in
voked from GDB. | 983 // Dump the path to specified object on the next GC. This method is to be in
voked from GDB. |
| (...skipping 1392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2375 }; | 2376 }; |
| 2376 | 2377 |
| 2377 template<typename T> | 2378 template<typename T> |
| 2378 struct IfWeakMember<WeakMember<T> > { | 2379 struct IfWeakMember<WeakMember<T> > { |
| 2379 static bool isDead(Visitor* visitor, const WeakMember<T>& t) { return !visit
or->isAlive(t.get()); } | 2380 static bool isDead(Visitor* visitor, const WeakMember<T>& t) { return !visit
or->isAlive(t.get()); } |
| 2380 }; | 2381 }; |
| 2381 | 2382 |
| 2382 } | 2383 } |
| 2383 | 2384 |
| 2384 #endif // Heap_h | 2385 #endif // Heap_h |
| OLD | NEW |