[JSC] Make DataIC inline code adaptive#32085
Merged
webkit-commit-queue merged 1 commit intoWebKit:mainfrom Aug 13, 2024
Merged
Conversation
Collaborator
|
EWS run on previous version of this PR (hash 633c291) Details |
633c291 to
e8601ba
Compare
Collaborator
|
EWS run on previous version of this PR (hash e8601ba) Details |
e8601ba to
02fc2ad
Compare
Collaborator
|
EWS run on previous version of this PR (hash 02fc2ad) Details |
02fc2ad to
89998d7
Compare
Collaborator
|
EWS run on previous version of this PR (hash 89998d7) Details |
89998d7 to
8faa42a
Compare
Collaborator
|
EWS run on previous version of this PR (hash 8faa42a) Details |
kmiller68
approved these changes
Aug 13, 2024
Contributor
There was a problem hiding this comment.
Nit: I would have these default to CacheType::Unset since it seems like a vast majority of callers pass that anyway.
Member
Author
There was a problem hiding this comment.
I changed finishCreation... one since it always pass CacheType to this function.
8faa42a to
353c03d
Compare
Collaborator
|
EWS run on current version of this PR (hash 353c03d) Details |
https://bugs.webkit.org/show_bug.cgi?id=277992 rdar://133724890 Reviewed by Keith Miller. This patch make inlined part of DataIC code adaptive by getting some information from lower tiers. In Baseline, we use LLInt's GetByIdMode's metadata and use GetByIdSelf or GetByIdPrototype. In DFG, we use GetByStatus' information and pick appropriate one for inline cache code. Instead of having very special cache for inlined code in DataIC, we use InlineCacheHandler. We hold this inlined case as m_inlinedHandler so that watchpoint etc. works well: when invariant gets broken, StructureStubInfo gets cleared. * Source/JavaScriptCore/bytecode/GetByStatus.cpp: (JSC::GetByStatus::preferredCacheType const): * Source/JavaScriptCore/bytecode/GetByStatus.h: * Source/JavaScriptCore/bytecode/InlineAccess.cpp: (JSC::InlineAccess::generateSelfPropertyAccess): (JSC::InlineAccess::canGenerateSelfPropertyReplace): (JSC::InlineAccess::generateSelfPropertyReplace): (JSC::InlineAccess::generateStringLength): (JSC::InlineAccess::generateSelfInAccess): * Source/JavaScriptCore/bytecode/InlineCacheCompiler.cpp: (JSC::InlineCacheHandler::InlineCacheHandler): (JSC::m_watchpoint): (JSC::InlineCacheHandler::create): (JSC::InlineCacheHandler::createPreCompiled): (JSC::InlineCacheCompiler::compileOneAccessCaseHandler): (JSC::m_next): Deleted. * Source/JavaScriptCore/bytecode/InlineCacheCompiler.h: * Source/JavaScriptCore/bytecode/StructureStubInfo.cpp: (JSC::StructureStubInfo::aboutToDie): (JSC::StructureStubInfo::addAccessCase): (JSC::StructureStubInfo::reset): (JSC::StructureStubInfo::visitWeakReferences): (JSC::StructureStubInfo::callLinkInfoAt): (JSC::StructureStubInfo::containsPC const): (JSC::StructureStubInfo::initializeFromUnlinkedStructureStubInfo): (JSC::StructureStubInfo::initializeFromDFGUnlinkedStructureStubInfo): (JSC::StructureStubInfo::setInlinedHandler): (JSC::StructureStubInfo::clearInlinedHandler): (JSC::StructureStubInfo::initializeWithUnitHandler): (JSC::StructureStubInfo::prependHandler): (JSC::StructureStubInfo::rewireStubAsJumpInAccess): (JSC::StructureStubInfo::resetStubAsJumpInAccess): (JSC::StructureStubInfo::replaceHandler): Deleted. * Source/JavaScriptCore/bytecode/StructureStubInfo.h: (JSC::StructureStubInfo::offsetOfInlineHolder): * Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::handleIntrinsicCall): (JSC::DFG::ByteCodeParser::handleGetById): (JSC::DFG::ByteCodeParser::handleGetPrivateNameById): (JSC::DFG::ByteCodeParser::handleDeleteById): (JSC::DFG::ByteCodeParser::parseBlock): * Source/JavaScriptCore/dfg/DFGFixupPhase.cpp: (JSC::DFG::FixupPhase::addStringReplacePrimordialChecks): * Source/JavaScriptCore/dfg/DFGGraph.h: * Source/JavaScriptCore/dfg/DFGNode.cpp: (JSC::DFG::Node::convertToGetByIdMaybeMegamorphic): * Source/JavaScriptCore/dfg/DFGNode.h: (JSC::DFG::Node::cacheableIdentifier): (JSC::DFG::Node::hasGetByIdData const): (JSC::DFG::Node::getByIdData): (JSC::DFG::Node::hasCacheType const): (JSC::DFG::Node::cacheType): * 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::compilePutByVal): (JSC::DFG::SpeculativeJIT::compileGetPrivateNameByVal): (JSC::DFG::SpeculativeJIT::compilePutPrivateName): (JSC::DFG::SpeculativeJIT::compileCheckPrivateBrand): (JSC::DFG::SpeculativeJIT::compileSetPrivateBrand): (JSC::DFG::SpeculativeJIT::compileInstanceOf): (JSC::DFG::SpeculativeJIT::cachedPutById): (JSC::DFG::SpeculativeJIT::compileEnumeratorPutByVal): * Source/JavaScriptCore/jit/BaselineJITRegisters.h: * Source/JavaScriptCore/jit/JITCall.cpp: (JSC::JIT::emit_op_iterator_open): (JSC::JIT::emit_op_iterator_next): * Source/JavaScriptCore/jit/JITInlineCacheGenerator.cpp: (JSC::JITInlineCacheGenerator::generateDataICFastPath): (JSC::generateGetByIdInlineAccessBaselineDataIC): (JSC::JITGetByIdGenerator::generateDataICFastPath): (JSC::JITGetByIdWithThisGenerator::generateDataICFastPath): (JSC::JITPutByIdGenerator::generateDataICFastPath): (JSC::JITDelByValGenerator::generateDataICFastPath): (JSC::JITDelByIdGenerator::generateDataICFastPath): (JSC::JITInByValGenerator::generateDataICFastPath): (JSC::JITInByIdGenerator::generateDataICFastPath): (JSC::JITInstanceOfGenerator::generateDataICFastPath): (JSC::JITGetByValGenerator::generateDataICFastPath): (JSC::JITGetByValWithThisGenerator::generateDataICFastPath): (JSC::JITPutByValGenerator::generateDataICFastPath): (JSC::JITPrivateBrandAccessGenerator::generateDataICFastPath): (JSC::JITInlineCacheGenerator::generateDFGDataICFastPath): Deleted. (JSC::JITInlineCacheGenerator::generateBaselineDataICFastPath): Deleted. (JSC::JITGetByIdGenerator::generateBaselineDataICFastPath): Deleted. (JSC::JITGetByIdGenerator::generateDFGDataICFastPath): Deleted. (JSC::JITGetByIdWithThisGenerator::generateBaselineDataICFastPath): Deleted. (JSC::JITGetByIdWithThisGenerator::generateDFGDataICFastPath): Deleted. (JSC::JITPutByIdGenerator::generateBaselineDataICFastPath): Deleted. (JSC::JITPutByIdGenerator::generateDFGDataICFastPath): Deleted. (JSC::JITDelByValGenerator::generateBaselineDataICFastPath): Deleted. (JSC::JITDelByIdGenerator::generateBaselineDataICFastPath): Deleted. (JSC::JITInByValGenerator::generateBaselineDataICFastPath): Deleted. (JSC::JITInByIdGenerator::generateBaselineDataICFastPath): Deleted. (JSC::JITInByIdGenerator::generateDFGDataICFastPath): Deleted. (JSC::JITInstanceOfGenerator::generateBaselineDataICFastPath): Deleted. (JSC::JITGetByValGenerator::generateBaselineDataICFastPath): Deleted. (JSC::JITGetByValWithThisGenerator::generateBaselineDataICFastPath): Deleted. (JSC::JITPutByValGenerator::generateBaselineDataICFastPath): Deleted. (JSC::JITPrivateBrandAccessGenerator::generateBaselineDataICFastPath): Deleted. * Source/JavaScriptCore/jit/JITInlineCacheGenerator.h: * Source/JavaScriptCore/jit/JITOpcodes.cpp: (JSC::JIT::emit_op_instanceof): * Source/JavaScriptCore/jit/JITPropertyAccess.cpp: (JSC::JIT::emit_op_get_by_val): (JSC::JIT::emit_op_get_private_name): (JSC::JIT::emit_op_set_private_brand): (JSC::JIT::emit_op_check_private_brand): (JSC::JIT::emit_op_put_by_val): (JSC::JIT::emit_op_put_private_name): (JSC::JIT::emit_op_del_by_id): (JSC::JIT::emit_op_del_by_val): (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): (JSC::JIT::emit_op_get_by_id_with_this): (JSC::JIT::emit_op_put_by_id): (JSC::JIT::emit_op_in_by_id): (JSC::JIT::emit_op_in_by_val): (JSC::JIT::emitHasPrivate): (JSC::JIT::emit_op_get_by_val_with_this): (JSC::JIT::emit_op_enumerator_get_by_val): (JSC::JIT::emit_op_enumerator_put_by_val): Canonical link: https://commits.webkit.org/282181@main
353c03d to
9fa6f1a
Compare
Collaborator
|
Committed 282181@main (9fa6f1a): https://commits.webkit.org/282181@main Reviewed commits have been landed. Closing PR #32085 and removing active labels. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
9fa6f1a
353c03d
🧪 wpe-wk2🧪 ios-wk2🧪 ios-wk2-wpt🛠 🧪 jsc🧪 mac-AS-debug-wk2🧪 gtk-wk2🧪 api-gtk🛠 tv🛠 tv-sim🛠 watch🛠 watch-sim