Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 57d983744d8291b14fccd688f04669011fe80254
https://github.com/WebKit/WebKit/commit/57d983744d8291b14fccd688f04669011fe80254
Author: Yusuke Suzuki <[email protected]>
Date: 2026-08-27 (Thu, 27 Aug 2026)
Changed paths:
M Source/JavaScriptCore/bytecode/InternalFunctionAllocationProfile.h
M Source/JavaScriptCore/runtime/StructureCache.cpp
M Source/JavaScriptCore/runtime/StructureCache.h
Log Message:
-----------
[JSC] Skip the global StructureCache when the prototype has never been a
prototype
https://bugs.webkit.org/show_bug.cgi?id=322703
rdar://185969611
Reviewed by Keith Miller.
We optimize StructureCache lookup cases.
1. When inserting a new entry, we set mayBePrototype bit and then insert
it into the Map. This means that, if your prototype is not having
mayBePrototype bit, it must not exist in the Map. So we can skip
looking up.
2. emptyStructureForPrototypeFromBaseStructure caller is caching the
result in InternalFunction::createSubclassStructure by storing the
result into
targetFunction->ensureRareData()->internalFunctionAllocationProfile().
We skip using a cache when it is cached in a different way.
* Source/JavaScriptCore/bytecode/InternalFunctionAllocationProfile.h:
(JSC::InternalFunctionAllocationProfile::createAllocationStructureFromBase):
* Source/JavaScriptCore/runtime/StructureCache.cpp:
(JSC::StructureCache::createEmptyStructure):
(JSC::StructureCache::emptyStructureForPrototypeFromBaseStructure):
(JSC::StructureCache::emptyObjectStructureForPrototype):
* Source/JavaScriptCore/runtime/StructureCache.h:
Canonical link: https://commits.webkit.org/319984@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications