|
| 1 | +2016-10-17 Yusuke Suzuki <utatane.tea@gmail.com> |
| 2 | + |
| 3 | + [DOMJIT] Use DOMJIT::Patchpoint in IC |
| 4 | + https://bugs.webkit.org/show_bug.cgi?id=163223 |
| 5 | + |
| 6 | + Reviewed by Saam Barati. |
| 7 | + |
| 8 | + This patch uses DOMJIT::Patchpoint to inline DOM accesses even in IC! |
| 9 | + It is useful for Baseline JIT cases and GetById cases in DFG and FTL. |
| 10 | + In AccessCase, we construct the environment that allows DOMJIT::Patchpoint |
| 11 | + to emit code and make DOMJIT accessors inlined in IC. |
| 12 | + |
| 13 | + To allow DOMJIT::Patchpoint to emit code, we create a mechanism to emit calls |
| 14 | + required in DOMJIT::Patchpoint. This system is useful when we create the super- |
| 15 | + polymorphic support[1] later. And inlining mechanism is useful even after |
| 16 | + introducing super-polymorphic support since it can work even after we fire the |
| 17 | + watchpoint for super-polymorphic handling. |
| 18 | + |
| 19 | + This patch improves Dromaeo dom-traverse 8% (263.95 runs/s v.s. 244.07 runs/s). |
| 20 | + |
| 21 | + [1]: https://bugs.webkit.org/show_bug.cgi?id=163226 |
| 22 | + |
| 23 | + * CMakeLists.txt: |
| 24 | + * JavaScriptCore.xcodeproj/project.pbxproj: |
| 25 | + * bytecode/DOMJITAccessCasePatchpointParams.cpp: Added. |
| 26 | + (JSC::SlowPathCallGeneratorWithArguments::SlowPathCallGeneratorWithArguments): |
| 27 | + (JSC::SlowPathCallGeneratorWithArguments::generateImpl): |
| 28 | + (JSC::DOMJITAccessCasePatchpointParams::emitSlowPathCalls): |
| 29 | + * bytecode/DOMJITAccessCasePatchpointParams.h: Copied from Source/JavaScriptCore/ftl/FTLDOMJITPatchpointParams.h. |
| 30 | + (JSC::DOMJITAccessCasePatchpointParams::DOMJITAccessCasePatchpointParams): |
| 31 | + (JSC::DOMJITAccessCasePatchpointParams::SlowPathCallGenerator::~SlowPathCallGenerator): |
| 32 | + * bytecode/PolymorphicAccess.cpp: |
| 33 | + (JSC::AccessGenerationState::liveRegistersForCall): |
| 34 | + (JSC::AccessGenerationState::liveRegistersToPreserveAtExceptionHandlingCallSite): |
| 35 | + (JSC::calleeSaveRegisters): |
| 36 | + (JSC::AccessGenerationState::calculateLiveRegistersForCallAndExceptionHandling): |
| 37 | + (JSC::AccessGenerationState::restoreLiveRegistersFromStackForCallWithThrownException): |
| 38 | + (JSC::AccessGenerationState::restoreLiveRegistersFromStackForCall): |
| 39 | + (JSC::AccessGenerationState::callSiteIndexForExceptionHandlingOrOriginal): |
| 40 | + (JSC::AccessGenerationState::originalExceptionHandler): |
| 41 | + (JSC::AccessCase::generateImpl): |
| 42 | + (JSC::AccessCase::emitDOMJITGetter): |
| 43 | + (JSC::PolymorphicAccess::regenerate): |
| 44 | + (JSC::AccessGenerationState::preserveLiveRegistersToStackForCall): Deleted. |
| 45 | + * bytecode/PolymorphicAccess.h: |
| 46 | + (JSC::AccessGenerationState::SpillState::isEmpty): |
| 47 | + (JSC::AccessGenerationState::setSpillStateForJSGetterSetter): |
| 48 | + (JSC::AccessGenerationState::spillStateForJSGetterSetter): |
| 49 | + (JSC::AccessGenerationState::liveRegistersForCall): Deleted. |
| 50 | + (JSC::AccessGenerationState::numberOfStackBytesUsedForRegisterPreservation): Deleted. |
| 51 | + (JSC::AccessGenerationState::liveRegistersToPreserveAtExceptionHandlingCallSite): Deleted. |
| 52 | + * dfg/DFGDOMJITPatchpointParams.cpp: |
| 53 | + * dfg/DFGDOMJITPatchpointParams.h: |
| 54 | + * domjit/DOMJITPatchpoint.h: |
| 55 | + * domjit/DOMJITPatchpointParams.h: |
| 56 | + (JSC::DOMJIT::PatchpointParams::addSlowPathCall): |
| 57 | + * ftl/FTLDOMJITPatchpointParams.cpp: |
| 58 | + * ftl/FTLDOMJITPatchpointParams.h: |
| 59 | + * jsc.cpp: |
| 60 | + (WTF::DOMJITNode::checkDOMJITNode): |
| 61 | + (WTF::DOMJITGetterComplex::DOMJITGetterComplex): |
| 62 | + (WTF::DOMJITGetterComplex::createStructure): |
| 63 | + (WTF::DOMJITGetterComplex::create): |
| 64 | + (WTF::DOMJITGetterComplex::DOMJITNodeDOMJIT::DOMJITNodeDOMJIT): |
| 65 | + (WTF::DOMJITGetterComplex::domJITNodeGetterSetter): |
| 66 | + (WTF::DOMJITGetterComplex::finishCreation): |
| 67 | + (WTF::DOMJITGetterComplex::functionEnableException): |
| 68 | + (WTF::DOMJITGetterComplex::customGetter): |
| 69 | + (GlobalObject::finishCreation): |
| 70 | + (functionCreateDOMJITGetterComplexObject): |
| 71 | + |
1 | 72 | 2016-10-17 Saam Barati <sbarati@apple.com> |
2 | 73 |
|
3 | 74 | Build fix for HasOwnPropertyCache::Entry caused slowdown by introducing a constructor that doesn't use move semantics for the RefPtr<UniquedStringImpl> parameter |
|
0 commit comments