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

  Changed paths:
    A JSTests/stress/json-parse-escaped-string-runs.js
    A JSTests/stress/json-parse-long-key-matches-transition.js
    M Source/JavaScriptCore/runtime/LiteralParser.cpp
    M Source/JavaScriptCore/runtime/LiteralParser.h

  Log Message:
  -----------
  [JSC] JSON.parse should leverage SIMD scan more
https://bugs.webkit.org/show_bug.cgi?id=325319
rdar://188428638

Reviewed by Yijia Huang.

This patch leverages SIMD scan more for property keys.

1. We extract `findUnsafeStringCharacter` and leverage it in
   lexStringSlow as well. Even after encountering an escaped character,
   we should continue using SIMD scan.
2. Extend tryConsumeStringEqualTo to accept longer property key for
   sizeof(CharacterType) == 1 case as well. We added longer type version
   for sizeof(CharacterType) == 2, and let's apply this to
   sizeof(CharacterType) == 1 as well. But still let's keep super duper
   fast path for sizeof(CharacterType) == 1 case.

Tests: JSTests/stress/json-parse-escaped-string-runs.js
       JSTests/stress/json-parse-long-key-matches-transition.js

* JSTests/stress/json-parse-escaped-string-runs.js: Added.
(shouldBe):
(throw.new.Error):
* JSTests/stress/json-parse-long-key-matches-transition.js: Added.
(shouldBe):
(throw.new.Error):
* Source/JavaScriptCore/runtime/LiteralParser.cpp:
(JSC::reviverMode>::Lexer::tryConsumeStringEqualTo):
(JSC::reviverMode>::Lexer::findUnsafeStringCharacter const):
(JSC::reviverMode>::Lexer::lexString):
(JSC::reviverMode>::Lexer::lexStringSlow):
* Source/JavaScriptCore/runtime/LiteralParser.h:

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



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

Reply via email to