1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2026-01-12 22:21:00 +00:00
serenity/Libraries
Linus Groh 7fb299fe46 LibJS: Clean up TypedArray constructors and prototypes
The current implementation is not entirely correct yet. Two classes have
been added:
- TypedArrayConstructor, which the various typed array constructors now
  inherit from. Calling or constructing this class (from JS, that is)
  directly is not possible, we might want to move this abstract class
  functionality to NativeFunction at a later point.
- TypedArrayPrototype, which the various typed array prototypes now have
  as their own prototype. This will be the place where most of the
  functionality is being shared.

Relevant parts from the spec:

22.2.1 The %TypedArray% Intrinsic Object
The %TypedArray% intrinsic object:
- is a constructor function object that all of the TypedArray
  constructor objects inherit from.
- along with its corresponding prototype object, provides common
  properties that are inherited by all TypedArray constructors and their
  instances.

22.2.2 Properties of the %TypedArray% Intrinsic Object
The %TypedArray% intrinsic object:
- has a [[Prototype]] internal slot whose value is %Function.prototype%.

22.2.2.3 %TypedArray%.prototype
The initial value of %TypedArray%.prototype is the %TypedArray%
prototype object.

22.2.6 Properties of the TypedArray Constructors
Each TypedArray constructor:
- has a [[Prototype]] internal slot whose value is %TypedArray%.

22.2.6.2 TypedArray.prototype
The initial value of TypedArray.prototype is the corresponding
TypedArray prototype intrinsic object (22.2.7).

22.2.7 Properties of the TypedArray Prototype Objects
Each TypedArray prototype object:
- has a [[Prototype]] internal slot whose value is %TypedArray.prototype%.

22.2.7.2 TypedArray.prototype.constructor
The initial value of a TypedArray.prototype.constructor is the
corresponding %TypedArray% intrinsic object.
2020-12-02 12:52:31 +01:00
..
LibAudio LibAudio: Use new format functions. 2020-10-17 23:20:31 +02:00
LibC LibC: Add flag SO_BROADCAST so we can at least build programs that use it 2020-12-02 10:45:38 +01:00
LibChess LibChess: Forbid King moving into check by a pawn on the home rank 2020-10-30 16:51:41 +01:00
LibCompress Everywhere: Fix typos 2020-10-02 16:03:17 +02:00
LibCore LibCore: Don't wait for negative amount of time 2020-11-30 13:17:02 +01:00
LibCpp LibCpp: Add library for working with c++ code 2020-09-30 21:46:59 +02:00
LibCrypt Everywhere: Port to String::copy_characters_to_buffer() 2020-08-30 17:35:27 +02:00
LibCrypto LibCrypto: Require intent parameter in CTR constructor 2020-11-29 20:22:56 +01:00
LibDebug LibDebug: Use FlyString for file paths 2020-11-16 09:10:49 +01:00
LibDesktop Meta+LibC through LibHTTP: Make clang-format-10 clean 2020-09-25 21:18:17 +02:00
LibDiff LibDiff: Add library for working with diffs 2020-09-15 21:43:29 +02:00
LibELF LibELF: Fix busted validation of section header location 2020-12-01 13:18:32 +01:00
LibGemini LibProtocol+LibGemini+LibHTTP: Provide root certificates to LibTLS 2020-10-30 23:42:03 +01:00
LibGfx LibGfx+BMP: Remove set_remaining, fix size check 2020-12-02 10:46:40 +01:00
LibGUI LibGUI: Add a ModelSelection::add_all(Vector) API 2020-11-30 12:07:45 +01:00
LibHTTP LibProtocol+LibGemini+LibHTTP: Provide root certificates to LibTLS 2020-10-30 23:42:03 +01:00
LibImageDecoderClient AK: Add trivial structure validation to SharedBuffer 2020-10-02 15:38:07 +02:00
LibIPC LibIPC: Fix 'unused private member' error when building with clang 2020-11-25 20:00:23 +01:00
LibJS LibJS: Clean up TypedArray constructors and prototypes 2020-12-02 12:52:31 +01:00
LibKeyboard Everywhere: Add missing <AK/ByteBuffer.h> includes 2020-11-15 13:11:21 +01:00
LibLine Shell+LibLine: Support HISTCONTROL environment variable 2020-10-26 11:27:54 +01:00
LibM LibM: Define some floating point classification macros 2020-11-17 09:57:06 +01:00
LibMarkdown LibMarkdown: Reduce debug spam from invalid characters in table headings 2020-11-30 11:35:45 +01:00
LibPCIDB LibPCIDB: Mark compilation-unit-only functions as static 2020-08-12 20:40:59 +02:00
LibProtocol AK: Make RefPtr, NonnullRefPtr, WeakPtr thread safe 2020-11-10 19:11:52 +01:00
LibPthread LibPthread: Fix broken EINVAL check in pthread_attr_setdetachstate() 2020-11-26 19:33:44 +01:00
LibRegex LibRegex: Don't try to consume the escaped character if at EOF 2020-11-30 17:45:05 +01:00
LibTar Userland: tar: support extracting gzipped files 2020-10-04 00:16:40 +02:00
LibTextCodec LibTextCodec: Add a function to convert encodings to standardized names 2020-11-14 10:14:03 +01:00
LibThread LibThread: Add API to join a thread 2020-11-24 21:36:28 +01:00
LibTLS LibTLS: Count the mac size towards the packet length in CBC mode 2020-11-16 13:21:18 +01:00
LibUnwind Everywhere: Fix typos 2020-10-02 16:03:17 +02:00
LibVT LibVT: Make terminal scrollback max size configurable 2020-11-29 20:32:45 +01:00
LibWeb LibWeb: Complete the URL in href_setter() before trying to load it 2020-12-02 10:08:29 +01:00
LibX86 LibX86: Pack the Instruction data structure 2020-11-17 17:09:49 +01:00
CMakeLists.txt LibRegex: Add a regular expression library 2020-11-27 21:32:41 +01:00