Ignore:
Timestamp:
Feb 1, 2021, 7:22:18 PM (5 years ago)
Author:
[email protected]
Message:

[JSC] TypedArray#fill should be implemented in C++
https://bugs.webkit.org/show_bug.cgi?id=221182

Reviewed by Ross Kirsling.

JSTests:

  • stress/bigint-typed-array-fill.js: Added.

(shouldBe):

  • stress/typed-array-fill.js: Added.

(shouldBe):

Source/JavaScriptCore:

Since TypedArray#fill does not invoke callbacks, implementing it in C++ is better.
This removes several utility functions exposed in JS for TypedArray#fill implementation,
and makes TypedArray#fill simple.

  • builtins/BuiltinNames.h:
  • builtins/TypedArrayPrototype.js:

(globalPrivate.typedArrayClampArgumentToStartOrEnd): Deleted.
(fill): Deleted.

  • bytecode/LinkTimeConstant.h:
  • runtime/JSArrayBufferView.cpp:

(JSC::validateTypedArray):

  • runtime/JSGenericTypedArrayViewPrototypeFunctions.h:

(JSC::genericTypedArrayViewProtoFuncFill):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):

  • runtime/JSGlobalObjectFunctions.cpp:
  • runtime/JSGlobalObjectFunctions.h:
  • runtime/JSTypedArrayViewPrototype.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):
(JSC::JSTypedArrayViewPrototype::finishCreation):

  • runtime/JSTypedArrayViewPrototype.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
Note: See TracChangeset for help on using the changeset viewer.