[webkit-changes] [WebKit/WebKit] 5d994a: [JSC] Handle String.fromCharCode(double) in DFG

Yusuke Suzuki noreply at github.com
Thu Jul 13 23:38:07 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5d994adeb6a33c8447c5c7f887a5f88571980fa3
      https://github.com/WebKit/WebKit/commit/5d994adeb6a33c8447c5c7f887a5f88571980fa3
  Author: Yusuke Suzuki <ysuzuki at apple.com>
  Date:   2023-07-13 (Thu, 13 Jul 2023)

  Changed paths:
    A JSTests/stress/string-from-char-code-double.js
    M Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h
    M Source/JavaScriptCore/dfg/DFGClobberize.h
    M Source/JavaScriptCore/dfg/DFGFixupPhase.cpp
    M Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp

  Log Message:
  -----------
  [JSC] Handle String.fromCharCode(double) in DFG
https://bugs.webkit.org/show_bug.cgi?id=259207
rdar://112245867

Reviewed by Mark Lam.

String.fromCharCode will perform toUInt32 onto the input. So we can just use existing mechanism (DFG's ValueToInt32)
to accept it even if the input is double.

* JSTests/stress/string-from-char-code-double.js: Added.
(shouldBe):
(test):
* Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* Source/JavaScriptCore/dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* Source/JavaScriptCore/dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileStringFromCharCode):

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




More information about the webkit-changes mailing list