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

  Changed paths:
    A JSTests/stress/parse-int-rope-string.js
    M Source/JavaScriptCore/dfg/DFGOperations.cpp
    M Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp
    M Source/JavaScriptCore/runtime/ParseInt.h

  Log Message:
  -----------
  [JSC] Heuristically avoid resolving ropes for parseInt
https://bugs.webkit.org/show_bug.cgi?id=325765
rdar://188779741

Reviewed by Yijia Huang.

The key is that parseInt will accept very short string, this indirectly
means that probably resolved string for the input should be small enough
then we can just resolve into the local buffer would be faster. This
patch applies this heuristics.

Test: JSTests/stress/parse-int-rope-string.js

* JSTests/stress/parse-int-rope-string.js: Added.
(shouldBe):
(parseDecimal):
(parseNoRadix):
(parseHex):
(makeRope):
* Source/JavaScriptCore/dfg/DFGOperations.cpp:
(JSC::DFG::JSC_DEFINE_JIT_OPERATION):
(JSC::DFG::parseIntResult): Deleted.
* Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):
* Source/JavaScriptCore/runtime/ParseInt.h:
(JSC::parseIntString):

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



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

Reply via email to