[webkit-changes] [WebKit/WebKit] 624b44: [JSC] Use Identifier::from in IdentifierArena::mak...

Yusuke Suzuki noreply at github.com
Wed Aug 9 15:41:36 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 624b442e3c4f0643a0e89dbd4593a32fa4601f44
      https://github.com/WebKit/WebKit/commit/624b442e3c4f0643a0e89dbd4593a32fa4601f44
  Author: Yusuke Suzuki <ysuzuki at apple.com>
  Date:   2023-08-09 (Wed, 09 Aug 2023)

  Changed paths:
    M Source/JavaScriptCore/parser/ParserArena.h

  Log Message:
  -----------
  [JSC] Use Identifier::from in IdentifierArena::makeNumericIdentifier
https://bugs.webkit.org/show_bug.cgi?id=259959
rdar://113598301

Reviewed by Keith Miller.

We should just use Identifier::from from IdentifierArena::makeNumericIdentifier, which can have some optimization additionally via per-VM string cache.
Also, we can use `canBeInt32` to check wether we can stringify it as int32_t instead of double, which is much faster.

* Source/JavaScriptCore/parser/ParserArena.h:
(JSC::IdentifierArena::makeNumericIdentifier):

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




More information about the webkit-changes mailing list