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 processMarkingStack(); | 972 template<CallbackInvocationMode Mode> static void traceRootsAndPerformGlobal
WeakProcessing(); |
973 static void globalWeakProcessingAndCleanup(); | |
974 static void setForcePreciseGCForTesting(); | 973 static void setForcePreciseGCForTesting(); |
975 | 974 |
976 static void prepareForGC(); | 975 static void prepareForGC(); |
977 | 976 |
978 // Conservatively checks whether an address is a pointer in any of the threa
d | 977 // Conservatively checks whether an address is a pointer in any of the threa
d |
979 // heaps. If so marks the object pointed to as live. | 978 // heaps. If so marks the object pointed to as live. |
980 static Address checkAndMarkPointer(Visitor*, Address); | 979 static Address checkAndMarkPointer(Visitor*, Address); |
981 | 980 |
982 #if ENABLE(GC_TRACING) | 981 #if ENABLE(GC_TRACING) |
983 // Dump the path to specified object on the next GC. This method is to be in
voked from GDB. | 982 // 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... |
2376 }; | 2375 }; |
2377 | 2376 |
2378 template<typename T> | 2377 template<typename T> |
2379 struct IfWeakMember<WeakMember<T> > { | 2378 struct IfWeakMember<WeakMember<T> > { |
2380 static bool isDead(Visitor* visitor, const WeakMember<T>& t) { return !visit
or->isAlive(t.get()); } | 2379 static bool isDead(Visitor* visitor, const WeakMember<T>& t) { return !visit
or->isAlive(t.get()); } |
2381 }; | 2380 }; |
2382 | 2381 |
2383 } | 2382 } |
2384 | 2383 |
2385 #endif // Heap_h | 2384 #endif // Heap_h |
OLD | NEW |