[webkit-changes] [WebKit/WebKit] c97a08: [WIP] Introduce BigInt Public C API in JavaScriptCore

Commit Queue noreply at github.com
Thu May 2 13:15:09 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c97a08d9e56ffc23e2f770be827909d2caa64a22
      https://github.com/WebKit/WebKit/commit/c97a08d9e56ffc23e2f770be827909d2caa64a22
  Author: Yijia Huang <yijia_huang at apple.com>
  Date:   2024-05-02 (Thu, 02 May 2024)

  Changed paths:
    M Source/JavaScriptCore/API/JSBase.h
    M Source/JavaScriptCore/API/JSValue.h
    M Source/JavaScriptCore/API/JSValue.mm
    M Source/JavaScriptCore/API/JSValueRef.cpp
    M Source/JavaScriptCore/API/JSValueRef.h
    M Source/JavaScriptCore/API/tests/testapi.cpp
    M Source/JavaScriptCore/API/tests/testapi.mm

  Log Message:
  -----------
  [WIP] Introduce BigInt Public C API in JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=250511
rdar://104194532

Reviewed by Keith Miller.

JavaScriptCore framework provides the ability to evaluate JavaScript programs
within applications developed using Swift and Object-C. While JavaScriptCore
APIs support all JavaScript primitive types except for BigInt type. This patch
introduces BigInt public C APIs for type verification, type access, value
creation, value conversion, and value comparison.

* Source/JavaScriptCore/API/APICast.h:
(toRef):
(toBigIntRef):
* Source/JavaScriptCore/API/JSBase.h:
* Source/JavaScriptCore/API/JSBigIntRef.cpp: Added.
(JSBigIntCreateWithNumber):
(JSBigIntCreateWithString):
(JSBigIntToString):
* Source/JavaScriptCore/API/JSBigIntRef.h: Added.
* Source/JavaScriptCore/API/JSValue.h:
* Source/JavaScriptCore/API/JSValue.mm:
(-[JSValue isBigInt]):
* Source/JavaScriptCore/API/JSValueRef.cpp:
(JSValueGetType):
(JSValueIsBigInt):
(JSValueMakeBigInt):
(JSValueToBigInt):
* Source/JavaScriptCore/API/JSValueRef.h:
* Source/JavaScriptCore/API/JavaScript.h:
* Source/JavaScriptCore/API/tests/testapi.cpp:
(TestAPI::checkIsBigIntType):
(TestAPI::testBigInt):
(testCAPIViaCpp):
* Source/JavaScriptCore/CMakeLists.txt:
* Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj:
* Source/JavaScriptCore/Sources.txt:
* Source/JavaScriptCore/runtime/JSBigInt.cpp:
(JSC::JSBigInt::stringToBigInt):
* Source/JavaScriptCore/runtime/JSBigInt.h:
* Source/JavaScriptCore/runtime/JSCJSValue.h:
* Source/JavaScriptCore/runtime/JSCJSValueInlines.h:
(JSC::JSValue::asBigInt const):

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



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


More information about the webkit-changes mailing list