Changeset 207222 in webkit
- Timestamp:
- Oct 12, 2016 9:56:34 AM (8 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 1 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r207213 r207222 1 2016-10-12 Filip Pizlo <fpizlo@apple.com> 2 3 Remove JITWriteBarrier.h 4 https://bugs.webkit.org/show_bug.cgi?id=163334 5 6 Reviewed by Mark Lam. 7 8 I guess that the idea of JITWriteBarrier was to make sure that if you slap some heap pointer 9 bits into machine code, then you better execute a barrier on the code block. But it's a 10 complicated piece of code, and I can never remember how it quite works. These days it looks 11 vestigial, particularly since only the CallLinkInfo patchable callee immediate uses it. It's 12 not really necessary to have something like this, since our convention is that any pointer 13 stored in machine code must always be shadowed in the GC heap. I think that convention has 14 won by overwhelming majority, so we should finally remove JITWriteBarrier. 15 16 A practical outcome of this change is that it makes it easier to implement DirectCall ICs, 17 which will have to store the callee in the CallLinkInfo but not in the machine code. 18 19 * JavaScriptCore.xcodeproj/project.pbxproj: 20 * assembler/AbstractMacroAssembler.h: 21 * bytecode/CallLinkInfo.cpp: 22 (JSC::CallLinkInfo::setCallee): 23 (JSC::CallLinkInfo::clearCallee): 24 * bytecode/CallLinkInfo.h: 25 (JSC::CallLinkInfo::setCallee): Deleted. 26 (JSC::CallLinkInfo::clearCallee): Deleted. 27 * heap/SlotVisitor.h: 28 * jit/JITWriteBarrier.h: Removed. 29 1 30 2016-10-12 Csaba Osztrogonác <ossy@webkit.org> 2 31 -
trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
r207179 r207222 1770 1770 A76C51761182748D00715B05 /* JSInterfaceJIT.h in Headers */ = {isa = PBXBuildFile; fileRef = A76C51741182748D00715B05 /* JSInterfaceJIT.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1771 1771 A76F279415F13C9600517D67 /* UnlinkedCodeBlock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A79E781E15EECBA80047C855 /* UnlinkedCodeBlock.cpp */; }; 1772 A76F54A313B28AAB00EF2BCE /* JITWriteBarrier.h in Headers */ = {isa = PBXBuildFile; fileRef = A76F54A213B28AAB00EF2BCE /* JITWriteBarrier.h */; settings = {ATTRIBUTES = (Private, ); }; };1773 1772 A77A423D17A0BBFD00A8DB81 /* DFGAbstractHeap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A77A423617A0BBFD00A8DB81 /* DFGAbstractHeap.cpp */; }; 1774 1773 A77A423E17A0BBFD00A8DB81 /* DFGAbstractHeap.h in Headers */ = {isa = PBXBuildFile; fileRef = A77A423717A0BBFD00A8DB81 /* DFGAbstractHeap.h */; }; … … 4078 4077 A767B5B417A0B9650063D940 /* DFGLoopPreHeaderCreationPhase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGLoopPreHeaderCreationPhase.h; path = dfg/DFGLoopPreHeaderCreationPhase.h; sourceTree = "<group>"; }; 4079 4078 A76C51741182748D00715B05 /* JSInterfaceJIT.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSInterfaceJIT.h; sourceTree = "<group>"; }; 4080 A76F54A213B28AAB00EF2BCE /* JITWriteBarrier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JITWriteBarrier.h; sourceTree = "<group>"; };4081 4079 A77A423617A0BBFD00A8DB81 /* DFGAbstractHeap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGAbstractHeap.cpp; path = dfg/DFGAbstractHeap.cpp; sourceTree = "<group>"; }; 4082 4080 A77A423717A0BBFD00A8DB81 /* DFGAbstractHeap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGAbstractHeap.h; path = dfg/DFGAbstractHeap.h; sourceTree = "<group>"; }; … … 5280 5278 DC0184171D10C1870057B053 /* JITWorklist.cpp */, 5281 5279 DC0184181D10C1870057B053 /* JITWorklist.h */, 5282 A76F54A213B28AAB00EF2BCE /* JITWriteBarrier.h */,5283 5280 A76C51741182748D00715B05 /* JSInterfaceJIT.h */, 5284 5281 792CB3471C4EED5C00D13AF3 /* PCToCodeOriginMap.cpp */, … … 7946 7943 0F5EF91F16878F7D003E5C25 /* JITThunks.h in Headers */, 7947 7944 0FC712E317CD8793008CC93C /* JITToDFGDeferredCompilationCallback.h in Headers */, 7948 A76F54A313B28AAB00EF2BCE /* JITWriteBarrier.h in Headers */,7949 7945 840480131021A1D9008E7F01 /* JSAPIValueWrapper.h in Headers */, 7950 7946 C2CF39C216E15A8100DD69BE /* JSAPIWrapperObject.h in Headers */, -
trunk/Source/JavaScriptCore/assembler/AbstractMacroAssembler.h
r206525 r207222 53 53 class AbstractMacroAssembler { 54 54 public: 55 friend class JITWriteBarrierBase;56 55 typedef AbstractMacroAssembler<AssemblerType, MacroAssemblerType> AbstractMacroAssemblerType; 57 56 typedef AssemblerType AssemblerType_T; -
trunk/Source/JavaScriptCore/bytecode/CallLinkInfo.cpp
r205462 r207222 1 1 /* 2 * Copyright (C) 2012 , 2013, 2014Apple Inc. All rights reserved.2 * Copyright (C) 2012-2014, 2016 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 31 31 #include "DFGThunks.h" 32 32 #include "JSCInlines.h" 33 #include "MacroAssembler.h" 33 34 #include "Opcode.h" 34 35 #include "Repatch.h" … … 98 99 } 99 100 101 void CallLinkInfo::setCallee(VM& vm, JSCell* owner, JSFunction* callee) 102 { 103 MacroAssembler::repatchPointer(m_hotPathBegin, callee); 104 m_callee.set(vm, owner, callee); 105 } 106 107 void CallLinkInfo::clearCallee() 108 { 109 MacroAssembler::repatchPointer(m_hotPathBegin, nullptr); 110 m_callee.clear(); 111 } 112 100 113 void CallLinkInfo::visitWeak(VM& vm) 101 114 { -
trunk/Source/JavaScriptCore/bytecode/CallLinkInfo.h
r206525 r207222 1 1 /* 2 * Copyright (C) 2012, 2014 , 2015Apple Inc. All rights reserved.2 * Copyright (C) 2012, 2014-2016 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 29 29 #include "CodeLocation.h" 30 30 #include "CodeSpecializationKind.h" 31 #include "JITWriteBarrier.h"32 31 #include "JSFunction.h" 33 32 #include "PolymorphicCallStubRoutine.h" … … 159 158 } 160 159 161 void setCallee(VM& vm, CodeLocationDataLabelPtr location, JSCell* owner, JSFunction* callee) 162 { 163 m_callee.set(vm, location, owner, callee); 164 } 165 166 void clearCallee() 167 { 168 m_callee.clear(); 169 } 160 void setCallee(VM&, JSCell*, JSFunction* callee); 161 162 void clearCallee(); 170 163 171 164 JSFunction* callee() … … 315 308 CodeLocationDataLabelPtr m_hotPathBegin; 316 309 CodeLocationNearCall m_hotPathOther; 317 JITWriteBarrier<JSFunction> m_callee;310 WriteBarrier<JSFunction> m_callee; 318 311 WriteBarrier<JSFunction> m_lastSeenCallee; 319 312 RefPtr<PolymorphicCallStubRoutine> m_stub; -
trunk/Source/JavaScriptCore/heap/SlotVisitor.h
r206525 r207222 38 38 class HeapCell; 39 39 class HeapSnapshotBuilder; 40 template<typename T> class JITWriteBarrier;41 40 class MarkedBlock; 42 41 class UnconditionalFinalizer; -
trunk/Source/JavaScriptCore/jit/Repatch.cpp
r206779 r207222 567 567 568 568 ASSERT(!callLinkInfo.isLinked()); 569 callLinkInfo.setCallee(exec->callerFrame()->vm(), call LinkInfo.hotPathBegin(), callerCodeBlock, callee);569 callLinkInfo.setCallee(exec->callerFrame()->vm(), callerCodeBlock, callee); 570 570 callLinkInfo.setLastSeenCallee(exec->callerFrame()->vm(), callerCodeBlock, callee); 571 571 if (shouldDumpDisassemblyFor(callerCodeBlock))
Note: See TracChangeset
for help on using the changeset viewer.