Changeset 112624 in webkit for trunk/Source/JavaScriptCore/heap
- Timestamp:
- Mar 29, 2012, 5:36:37 PM (13 years ago)
- Location:
- trunk/Source/JavaScriptCore/heap
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/heap/Heap.cpp
r111877 r112624 766 766 } 767 767 768 void Heap::discardAllCompiledCode() 769 { 770 // If JavaScript is running, it's not safe to recompile, since we'll end 771 // up throwing away code that is live on the stack. 772 ASSERT(!m_globalData->dynamicGlobalObject); 773 774 for (FunctionExecutable* current = m_functions.head(); current; current = current->next()) 775 current->discardCode(); 776 } 777 768 778 void Heap::collectAllGarbage() 769 779 { … … 771 781 return; 772 782 if (!m_globalData->dynamicGlobalObject) 773 m_globalData->recompileAllJSFunctions();783 discardAllCompiledCode(); 774 784 775 785 collect(DoSweep); … … 926 936 } 927 937 938 void Heap::addFunctionExecutable(FunctionExecutable* executable) 939 { 940 m_functions.append(executable); 941 } 942 943 void Heap::removeFunctionExecutable(FunctionExecutable* executable) 944 { 945 m_functions.remove(executable); 946 } 947 928 948 } // namespace JSC -
trunk/Source/JavaScriptCore/heap/Heap.h
r111877 r112624 43 43 class CopiedSpace; 44 44 class CodeBlock; 45 class FunctionExecutable; 45 46 class GCActivityCallback; 46 47 class GlobalCodeBlock; … … 106 107 typedef void (*Finalizer)(JSCell*); 107 108 JS_EXPORT_PRIVATE void addFinalizer(JSCell*, Finalizer); 109 void addFunctionExecutable(FunctionExecutable*); 110 void removeFunctionExecutable(FunctionExecutable*); 108 111 109 112 void notifyIsSafeToCollect() { m_isSafeToCollect = true; } … … 140 143 141 144 double lastGCLength() { return m_lastGCLength; } 145 146 void discardAllCompiledCode(); 142 147 143 148 private: … … 241 246 JSGlobalData* m_globalData; 242 247 double m_lastGCLength; 248 249 DoublyLinkedList<FunctionExecutable> m_functions; 243 250 }; 244 251
Note:
See TracChangeset
for help on using the changeset viewer.