Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: a61a4512b4ede07e66e8ff6194cf5089f32f274c https://github.com/WebKit/WebKit/commit/a61a4512b4ede07e66e8ff6194cf5089f32f274c Author: Yusuke Suzuki <ysuz...@apple.com> Date: 2024-07-30 (Tue, 30 Jul 2024)
Changed paths: M Source/JavaScriptCore/bytecode/InlineAccess.cpp M Source/JavaScriptCore/bytecode/InlineCacheCompiler.cpp M Source/JavaScriptCore/bytecode/Repatch.cpp M Source/JavaScriptCore/bytecode/StructureStubInfo.cpp M Source/JavaScriptCore/bytecode/StructureStubInfo.h M Source/JavaScriptCore/dfg/DFGJITCompiler.cpp M Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp M Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h M Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp M Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp M Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp M Source/JavaScriptCore/jit/CCallHelpers.h M Source/JavaScriptCore/jit/JITCall.cpp M Source/JavaScriptCore/jit/JITInlineCacheGenerator.cpp M Source/JavaScriptCore/jit/JITInlineCacheGenerator.h M Source/JavaScriptCore/jit/JITOperations.cpp M Source/JavaScriptCore/jit/JITPropertyAccess.cpp Log Message: ----------- [JSC] Use Handler IC in DFG https://bugs.webkit.org/show_bug.cgi?id=276519 rdar://131549318 Reviewed by Keith Miller. This patch integrates Handler IC into DFG. The key of Handler IC is sharing generated codes, but DFG freely uses registers based on register allocator. So each IC sites need to do the followings. 1. Flush registers since IC can call functions 2. Set up values in appropriate registers before calling into IC We separate 32bit and 64bit DFG code using IC since they are now dramatically different. We cannot share the code anymore. We allocate StructureStubInfo in DFG::JITData and use this StructureStubInfo in DFG IC code. To alleviate some regressions, we also added some optimization supporting CacheType::ArrayLength in Data IC inline code. We will extend this to support different types further, like, CacheType::GetByIdProto for example to get further performace benefit. * Source/JavaScriptCore/bytecode/InlineAccess.cpp: (JSC::InlineAccess::generateSelfPropertyAccess): (JSC::InlineAccess::canGenerateSelfPropertyReplace): (JSC::InlineAccess::generateSelfPropertyReplace): (JSC::InlineAccess::isCacheableArrayLength): (JSC::InlineAccess::generateArrayLength): (JSC::InlineAccess::isCacheableStringLength): (JSC::InlineAccess::generateStringLength): (JSC::InlineAccess::generateSelfInAccess): * Source/JavaScriptCore/bytecode/InlineCacheCompiler.cpp: (JSC::InlineCacheCompiler::calculateLiveRegistersForCallAndExceptionHandling): (JSC::InlineCacheCompiler::generateWithGuard): (JSC::getByIdProxyObjectLoadHandler): * Source/JavaScriptCore/bytecode/Repatch.cpp: (JSC::tryCacheGetBy): * Source/JavaScriptCore/bytecode/StructureStubInfo.cpp: (JSC::StructureStubInfo::deref): (JSC::StructureStubInfo::aboutToDie): (JSC::StructureStubInfo::addAccessCase): (JSC::StructureStubInfo::visitAggregateImpl): (JSC::StructureStubInfo::visitWeakReferences): (JSC::StructureStubInfo::propagateTransitions): (JSC::StructureStubInfo::summary const): (JSC::StructureStubInfo::containsPC const): (JSC::StructureStubInfo::initializePredefinedRegisters): (JSC::StructureStubInfo::initializeFromUnlinkedStructureStubInfo): (JSC::StructureStubInfo::initializeFromDFGUnlinkedStructureStubInfo): * Source/JavaScriptCore/bytecode/StructureStubInfo.h: * Source/JavaScriptCore/dfg/DFGJITCompiler.cpp: (JSC::DFG::JITCompiler::link): (JSC::DFG::JITCompiler::addStructureStubInfo): * Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::compileGetByValOnString): (JSC::DFG::SpeculativeJIT::compileGetByValOnIntTypedArray): (JSC::DFG::SpeculativeJIT::compileGetById): Deleted. (JSC::DFG::SpeculativeJIT::compileGetByIdFlush): Deleted. (JSC::DFG::SpeculativeJIT::compileDeleteById): Deleted. (JSC::DFG::SpeculativeJIT::compileDeleteByVal): Deleted. (JSC::DFG::SpeculativeJIT::compileInById): Deleted. (JSC::DFG::SpeculativeJIT::compileInByVal): Deleted. (JSC::DFG::SpeculativeJIT::compileHasPrivate): Deleted. (JSC::DFG::SpeculativeJIT::compileHasPrivateName): Deleted. (JSC::DFG::SpeculativeJIT::compileHasPrivateBrand): Deleted. (JSC::DFG::SpeculativeJIT::compilePutByVal): Deleted. * Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h: * Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp: (JSC::DFG::SpeculativeJIT::cachedGetById): (JSC::DFG::SpeculativeJIT::compileGetByVal): (JSC::DFG::SpeculativeJIT::compile): (JSC::DFG::SpeculativeJIT::compileGetById): (JSC::DFG::SpeculativeJIT::compileGetByIdFlush): (JSC::DFG::SpeculativeJIT::compileDeleteById): (JSC::DFG::SpeculativeJIT::compileDeleteByVal): (JSC::DFG::SpeculativeJIT::compileInById): (JSC::DFG::SpeculativeJIT::compileInByVal): (JSC::DFG::SpeculativeJIT::compileHasPrivate): (JSC::DFG::SpeculativeJIT::compileHasPrivateName): (JSC::DFG::SpeculativeJIT::compileHasPrivateBrand): (JSC::DFG::SpeculativeJIT::compilePutByVal): (JSC::DFG::SpeculativeJIT::compileGetPrivateNameByVal): (JSC::DFG::SpeculativeJIT::compileGetPrivateNameById): (JSC::DFG::SpeculativeJIT::compilePutPrivateName): (JSC::DFG::SpeculativeJIT::compilePutPrivateNameById): (JSC::DFG::SpeculativeJIT::compileCheckPrivateBrand): (JSC::DFG::SpeculativeJIT::compileSetPrivateBrand): (JSC::DFG::SpeculativeJIT::compileInstanceOfForCells): (JSC::DFG::SpeculativeJIT::compileInstanceOf): (JSC::DFG::SpeculativeJIT::compilePutByIdFlush): (JSC::DFG::SpeculativeJIT::compilePutById): (JSC::DFG::SpeculativeJIT::compilePutByIdDirect): (JSC::DFG::SpeculativeJIT::cachedPutById): * Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp: (JSC::DFG::SpeculativeJIT::cachedGetById): (JSC::DFG::SpeculativeJIT::cachedGetByIdWithThis): (JSC::DFG::SpeculativeJIT::compileGetByVal): (JSC::DFG::SpeculativeJIT::compile): (JSC::DFG::SpeculativeJIT::compileGetByValWithThis): (JSC::DFG::SpeculativeJIT::compileGetById): (JSC::DFG::SpeculativeJIT::compileDeleteById): (JSC::DFG::SpeculativeJIT::compileDeleteByVal): (JSC::DFG::SpeculativeJIT::compileInById): (JSC::DFG::SpeculativeJIT::compileInByVal): (JSC::DFG::SpeculativeJIT::compileHasPrivate): (JSC::DFG::SpeculativeJIT::compileHasPrivateName): (JSC::DFG::SpeculativeJIT::compileHasPrivateBrand): (JSC::DFG::SpeculativeJIT::compilePutByVal): (JSC::DFG::SpeculativeJIT::compileGetPrivateNameByVal): (JSC::DFG::SpeculativeJIT::compileGetPrivateNameById): (JSC::DFG::SpeculativeJIT::compilePutPrivateName): (JSC::DFG::SpeculativeJIT::compileCheckPrivateBrand): (JSC::DFG::SpeculativeJIT::compileSetPrivateBrand): (JSC::DFG::SpeculativeJIT::compileInstanceOf): (JSC::DFG::SpeculativeJIT::cachedPutById): (JSC::DFG::SpeculativeJIT::compilePutPrivateNameById): (JSC::DFG::SpeculativeJIT::compilePutById): (JSC::DFG::SpeculativeJIT::compilePutByIdDirect): (JSC::DFG::SpeculativeJIT::compileGetByIdMegamorphic): (JSC::DFG::SpeculativeJIT::compileGetByIdWithThisMegamorphic): (JSC::DFG::SpeculativeJIT::compileGetByValMegamorphic): (JSC::DFG::SpeculativeJIT::compileGetByValWithThisMegamorphic): (JSC::DFG::SpeculativeJIT::compileInByIdMegamorphic): (JSC::DFG::SpeculativeJIT::compileInByValMegamorphic): (JSC::DFG::SpeculativeJIT::compileEnumeratorPutByVal): * Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq): * Source/JavaScriptCore/jit/CCallHelpers.h: (JSC::CCallHelpers::shuffleRegisters): (JSC::CCallHelpers::setupArgumentsImpl): * Source/JavaScriptCore/jit/JITCall.cpp: (JSC::JIT::emit_op_iterator_open): (JSC::JIT::emit_op_iterator_next): * Source/JavaScriptCore/jit/JITInlineCacheGenerator.cpp: (JSC::JITGetByIdGenerator::JITGetByIdGenerator): (JSC::generateGetByIdInlineAccessBaselineDataIC): (JSC::JITGetByIdGenerator::generateBaselineDataICFastPath): (JSC::JITGetByIdGenerator::generateDFGDataICFastPath): (JSC::JITGetByIdWithThisGenerator::JITGetByIdWithThisGenerator): (JSC::JITGetByIdWithThisGenerator::generateBaselineDataICFastPath): (JSC::JITGetByIdWithThisGenerator::generateDFGDataICFastPath): (JSC::JITPutByIdGenerator::JITPutByIdGenerator): (JSC::JITPutByIdGenerator::generateDFGDataICFastPath): (JSC::JITDelByValGenerator::JITDelByValGenerator): (JSC::JITDelByIdGenerator::JITDelByIdGenerator): (JSC::JITInByValGenerator::JITInByValGenerator): (JSC::JITInByIdGenerator::JITInByIdGenerator): (JSC::JITInByIdGenerator::generateDFGDataICFastPath): (JSC::JITInstanceOfGenerator::JITInstanceOfGenerator): (JSC::JITGetByValGenerator::JITGetByValGenerator): (JSC::JITGetByValWithThisGenerator::JITGetByValWithThisGenerator): (JSC::JITPutByValGenerator::JITPutByValGenerator): (JSC::JITPrivateBrandAccessGenerator::JITPrivateBrandAccessGenerator): (JSC::generateGetByIdInlineAccessDFGDataIC): Deleted. * Source/JavaScriptCore/jit/JITInlineCacheGenerator.h: (JSC::JITInlineCacheGenerator::setUpStubInfoImpl): (JSC::JITByIdGenerator::setUpStubInfoImpl): (JSC::JITInByValGenerator::setUpStubInfo): * Source/JavaScriptCore/jit/JITOperations.cpp: (JSC::JSC_DEFINE_JIT_OPERATION): * Source/JavaScriptCore/jit/JITPropertyAccess.cpp: (JSC::JIT::emit_op_try_get_by_id): (JSC::JIT::emit_op_get_by_id_direct): (JSC::JIT::emit_op_get_by_id): (JSC::JIT::emit_op_get_length): Canonical link: https://commits.webkit.org/281584@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes