Changeset 273217 in webkit
- Timestamp:
- Feb 21, 2021 4:35:49 AM (3 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r273203 r273217 1 2021-02-21 Yusuke Suzuki <ysuzuki@apple.com> 2 3 [JSC] Remove vm.topCallFrame storing in Baseline JIT 4 https://bugs.webkit.org/show_bug.cgi?id=222162 5 6 Reviewed by Mark Lam. 7 8 This patch removes vm.topCallFrame storing in the Baseline JIT for ports that can USE(BUILTIN_FRAME_ADDRESS). 9 Also refactored some CommonSlowPath functions so that they can start using __builtin_frame_address later 10 instead of requiring that CallFrame be passed in. 11 12 * jit/JITInlines.h: 13 (JSC::JIT::updateTopCallFrame): 14 * runtime/CommonSlowPaths.cpp: 15 (JSC::iteratorOpenTryFastImpl): 16 (JSC::JSC_DEFINE_COMMON_SLOW_PATH): 17 (JSC::iteratorNextTryFastImpl): 18 1 19 2021-02-19 Yusuke Suzuki <ysuzuki@apple.com> 2 20 -
trunk/Source/JavaScriptCore/jit/JITInlines.h
r270711 r273217 110 110 uint32_t locationBits = CallSiteIndex(m_bytecodeIndex.offset()).bits(); 111 111 store32(TrustedImm32(locationBits), tagFor(CallFrameSlot::argumentCountIncludingThis)); 112 113 // FIXME: It's not clear that this is needed. JITOperations tend to update the top call frame on 114 // the C++ side. 115 // https://bugs.webkit.org/show_bug.cgi?id=155693 116 storePtr(callFrameRegister, &m_vm->topCallFrame); 112 prepareCallOperation(*m_vm); 117 113 } 118 114 -
trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp
r272638 r273217 853 853 854 854 template<OpcodeSize width> 855 ALWAYS_INLINE SlowPathReturnType iteratorOpenTryFastImpl(CallFrame* callFrame, const Instruction* pc) 856 { 857 // Don't set PC; we can't throw and it's relatively slow. 858 BEGIN_NO_SET_PC(); 859 855 ALWAYS_INLINE SlowPathReturnType iteratorOpenTryFastImpl(VM& vm, JSGlobalObject* globalObject, CodeBlock* codeBlock, CallFrame* callFrame, const Instruction* pc) 856 { 860 857 auto bytecode = pc->asKnownWidth<OpIteratorOpen, width>(); 861 858 auto& metadata = bytecode.metadata(codeBlock); … … 882 879 JSC_DEFINE_COMMON_SLOW_PATH(iterator_open_try_fast_narrow) 883 880 { 884 return iteratorOpenTryFastImpl<Narrow>(callFrame, pc); 881 // Don't set PC; we can't throw and it's relatively slow. 882 BEGIN_NO_SET_PC(); 883 return iteratorOpenTryFastImpl<Narrow>(vm, globalObject, codeBlock, callFrame, pc); 885 884 } 886 885 887 886 JSC_DEFINE_COMMON_SLOW_PATH(iterator_open_try_fast_wide16) 888 887 { 889 return iteratorOpenTryFastImpl<Wide16>(callFrame, pc); 888 // Don't set PC; we can't throw and it's relatively slow. 889 BEGIN_NO_SET_PC(); 890 return iteratorOpenTryFastImpl<Wide16>(vm, globalObject, codeBlock, callFrame, pc); 890 891 } 891 892 892 893 JSC_DEFINE_COMMON_SLOW_PATH(iterator_open_try_fast_wide32) 893 894 { 894 return iteratorOpenTryFastImpl<Wide32>(callFrame, pc); 895 // Don't set PC; we can't throw and it's relatively slow. 896 BEGIN_NO_SET_PC(); 897 return iteratorOpenTryFastImpl<Wide32>(vm, globalObject, codeBlock, callFrame, pc); 895 898 } 896 899 897 900 template<OpcodeSize width> 898 ALWAYS_INLINE SlowPathReturnType iteratorNextTryFastImpl(CallFrame* callFrame, const Instruction* pc) 899 { 900 BEGIN(); 901 901 ALWAYS_INLINE SlowPathReturnType iteratorNextTryFastImpl(VM& vm, JSGlobalObject* globalObject, CodeBlock* codeBlock, CallFrame* callFrame, ThrowScope& throwScope, const Instruction* pc) 902 { 902 903 auto bytecode = pc->asKnownWidth<OpIteratorNext, width>(); 903 904 auto& metadata = bytecode.metadata(codeBlock); … … 939 940 JSC_DEFINE_COMMON_SLOW_PATH(iterator_next_try_fast_narrow) 940 941 { 941 return iteratorNextTryFastImpl<Narrow>(callFrame, pc); 942 BEGIN(); 943 return iteratorNextTryFastImpl<Narrow>(vm, globalObject, codeBlock, callFrame, throwScope, pc); 942 944 } 943 945 944 946 JSC_DEFINE_COMMON_SLOW_PATH(iterator_next_try_fast_wide16) 945 947 { 946 return iteratorNextTryFastImpl<Wide16>(callFrame, pc); 948 BEGIN(); 949 return iteratorNextTryFastImpl<Wide16>(vm, globalObject, codeBlock, callFrame, throwScope, pc); 947 950 } 948 951 949 952 JSC_DEFINE_COMMON_SLOW_PATH(iterator_next_try_fast_wide32) 950 953 { 951 return iteratorNextTryFastImpl<Wide32>(callFrame, pc); 954 BEGIN(); 955 return iteratorNextTryFastImpl<Wide32>(vm, globalObject, codeBlock, callFrame, throwScope, pc); 952 956 } 953 957
Note: See TracChangeset
for help on using the changeset viewer.