Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7fb452f1a4b3dcf0d45f45ec8b783457a479bf65
      
https://github.com/WebKit/WebKit/commit/7fb452f1a4b3dcf0d45f45ec8b783457a479bf65
  Author: Yusuke Suzuki <[email protected]>
  Date:   2026-09-25 (Fri, 25 Sep 2026)

  Changed paths:
    A JSTests/stress/json-parse-long-string-value-cache.js
    M Source/JavaScriptCore/runtime/JSONAtomStringCache.h
    M Source/JavaScriptCore/runtime/JSONAtomStringCacheInlines.h
    M Source/JavaScriptCore/runtime/JSONTransitionCacheInlines.h

  Log Message:
  -----------
  [JSC] Add long string cache for JSON
https://bugs.webkit.org/show_bug.cgi?id=325344
rdar://188447389

Reviewed by Vassili Bykov.

JSON frequently ends up including same long strings repeatedly, like
URL. So it is good to have a cache which dedups them. This patch extends
JSONAtomStringCache to hold long strings as well. Also we ensure that
JSONTransitionCache::transitionIfMatches is calling inline function for
equal check.

Test: JSTests/stress/json-parse-long-string-value-cache.js

* JSTests/stress/json-parse-long-string-value-cache.js: Added.
(shouldBe):
(roundTrip):
* Source/JavaScriptCore/runtime/JSONAtomStringCache.h:
(JSC::JSONAtomStringCache::clear):
(JSC::JSONAtomStringCache::clearJSStrings):
* Source/JavaScriptCore/runtime/JSONAtomStringCacheInlines.h:
(JSC::JSONAtomStringCache::makeJSString):
(JSC::JSONAtomStringCache::makeLongJSString):
* Source/JavaScriptCore/runtime/JSONTransitionCacheInlines.h:
(JSC::JSONTransitionCache::transitionIfMatches):

Canonical link: https://commits.webkit.org/321970@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to