12012-07-08 Filip Pizlo <fpizlo@apple.com>
2
3 It should be possible to jettison JIT stub routines even if they are currently running
4 https://bugs.webkit.org/show_bug.cgi?id=90731
5
6 Reviewed by NOBODY (OOPS!).
7
8 This gives the GC awareness of all JIT-generated stubs for inline caches. That
9 means that if you want to delete a JIT-generated stub, you don't have to worry
10 about whether or not it is currently running: if there is a chance that it might
11 be, the GC will kindly defer deletion until non-running-ness is proved.
12
13 * CMakeLists.txt:
14 * GNUmakefile.list.am:
15 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
16 * JavaScriptCore.xcodeproj/project.pbxproj:
17 * Target.pri:
18 * bytecode/Instruction.h:
19 (JSC):
20 (PolymorphicStubInfo):
21 (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set):
22 (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList):
23 * bytecode/PolymorphicPutByIdList.cpp:
24 (JSC::PutByIdAccess::fromStructureStubInfo):
25 * bytecode/PolymorphicPutByIdList.h:
26 (JSC::PutByIdAccess::transition):
27 (JSC::PutByIdAccess::replace):
28 (JSC::PutByIdAccess::stubRoutine):
29 (PutByIdAccess):
30 (JSC::PolymorphicPutByIdList::currentSlowPathTarget):
31 * bytecode/StructureStubInfo.h:
32 (JSC::StructureStubInfo::reset):
33 * dfg/DFGRepatch.cpp:
34 (JSC::DFG::generateProtoChainAccessStub):
35 (JSC::DFG::tryCacheGetByID):
36 (JSC::DFG::tryBuildGetByIDList):
37 (JSC::DFG::tryBuildGetByIDProtoList):
38 (JSC::DFG::emitPutReplaceStub):
39 (JSC::DFG::emitPutTransitionStub):
40 (JSC::DFG::tryCachePutByID):
41 (JSC::DFG::tryBuildPutByIdList):
42 * heap/ConservativeRoots.cpp:
43 (JSC):
44 (DummyMarkHook):
45 (JSC::DummyMarkHook::mark):
46 (JSC::ConservativeRoots::add):
47 (CompositeMarkHook):
48 (JSC::CompositeMarkHook::CompositeMarkHook):
49 (JSC::CompositeMarkHook::mark):
50 * heap/ConservativeRoots.h:
51 (JSC):
52 (ConservativeRoots):
53 * heap/Heap.cpp:
54 (JSC::Heap::markRoots):
55 * heap/Heap.h:
56 (JSC):
57 (Heap):
58 * heap/JITStubRoutineSet.cpp: Added.
59 (JSC):
60 (JSC::JITStubRoutineSet::JITStubRoutineSet):
61 (JSC::JITStubRoutineSet::~JITStubRoutineSet):
62 (JSC::JITStubRoutineSet::add):
63 (JSC::JITStubRoutineSet::clearMarks):
64 (JSC::JITStubRoutineSet::markSlow):
65 (JSC::JITStubRoutineSet::deleteUnmarkedJettisonedStubRoutines):
66 (JSC::JITStubRoutineSet::traceMarkedStubRoutines):
67 * heap/JITStubRoutineSet.h: Added.
68 (JSC):
69 (JITStubRoutineSet):
70 (JSC::JITStubRoutineSet::mark):
71 * heap/MachineStackMarker.h:
72 (JSC):
73 * interpreter/RegisterFile.cpp:
74 (JSC::RegisterFile::gatherConservativeRoots):
75 * interpreter/RegisterFile.h:
76 (JSC):
77 * jit/ExecutableAllocator.cpp:
78 (JSC::DemandExecutableAllocator::DemandExecutableAllocator):
79 * jit/ExecutableAllocator.h:
80 (JSC):
81 * jit/ExecutableAllocatorFixedVMPool.cpp:
82 (JSC):
83 (JSC::FixedVMPoolExecutableAllocator::FixedVMPoolExecutableAllocator):
84 * jit/GCAwareJITStubRoutine.cpp: Added.
85 (JSC):
86 (JSC::GCAwareJITStubRoutine::GCAwareJITStubRoutine):
87 (JSC::GCAwareJITStubRoutine::~GCAwareJITStubRoutine):
88 (JSC::GCAwareJITStubRoutine::observeZeroRefCount):
89 (JSC::GCAwareJITStubRoutine::deleteFromGC):
90 (JSC::GCAwareJITStubRoutine::markRequiredObjectsInternal):
91 (JSC::MarkingGCAwareJITStubRoutineWithOneObject::MarkingGCAwareJITStubRoutineWithOneObject):
92 (JSC::MarkingGCAwareJITStubRoutineWithOneObject::~MarkingGCAwareJITStubRoutineWithOneObject):
93 (JSC::MarkingGCAwareJITStubRoutineWithOneObject::markRequiredObjectsInternal):
94 (JSC::createJITStubRoutine):
95 * jit/GCAwareJITStubRoutine.h: Added.
96 (JSC):
97 (GCAwareJITStubRoutine):
98 (JSC::GCAwareJITStubRoutine::markRequiredObjects):
99 (MarkingGCAwareJITStubRoutineWithOneObject):
100 * jit/JITPropertyAccess.cpp:
101 (JSC::JIT::privateCompilePutByIdTransition):
102 (JSC::JIT::privateCompilePatchGetArrayLength):
103 (JSC::JIT::privateCompileGetByIdProto):
104 (JSC::JIT::privateCompileGetByIdSelfList):
105 (JSC::JIT::privateCompileGetByIdProtoList):
106 (JSC::JIT::privateCompileGetByIdChainList):
107 (JSC::JIT::privateCompileGetByIdChain):
108 * jit/JITPropertyAccess32_64.cpp:
109 (JSC::JIT::privateCompilePutByIdTransition):
110 (JSC::JIT::privateCompilePatchGetArrayLength):
111 (JSC::JIT::privateCompileGetByIdProto):
112 (JSC::JIT::privateCompileGetByIdSelfList):
113 (JSC::JIT::privateCompileGetByIdProtoList):
114 (JSC::JIT::privateCompileGetByIdChainList):
115 (JSC::JIT::privateCompileGetByIdChain):
116 * jit/JITStubRoutine.cpp: Added.
117 (JSC):
118 (JSC::JITStubRoutine::~JITStubRoutine):
119 (JSC::JITStubRoutine::observeZeroRefCount):
120 * jit/JITStubRoutine.h: Added.
121 (JSC):
122 (JITStubRoutine):
123 (JSC::JITStubRoutine::JITStubRoutine):
124 (JSC::JITStubRoutine::createSelfManagedRoutine):
125 (JSC::JITStubRoutine::code):
126 (JSC::JITStubRoutine::asCodePtr):
127 (JSC::JITStubRoutine::ref):
128 (JSC::JITStubRoutine::deref):
129 (JSC::JITStubRoutine::startAddress):
130 (JSC::JITStubRoutine::endAddress):
131 (JSC::JITStubRoutine::addressStep):
132 (JSC::JITStubRoutine::canPerformRangeFilter):
133 (JSC::JITStubRoutine::filteringStartAddress):
134 (JSC::JITStubRoutine::filteringExtentSize):
135 (JSC::JITStubRoutine::passesFilter):
136 * jit/JITStubs.cpp:
137 (JSC::DEFINE_STUB_FUNCTION):
138 (JSC::getPolymorphicAccessStructureListSlot):
139