mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 10:07:44 +00:00
LibJS: Partially implement resizable ArrayBuffer objects
This is (part of) a normative change in the ECMA-262 spec. See:
a9ae96e
This implements just support for resizing ArrayBuffer objects. This does
not implement the SharedArrayBuffer changes, as we do not have enough
support to do so.
This commit is contained in:
parent
a1e2f131c4
commit
29ac6e3689
13 changed files with 369 additions and 14 deletions
|
@ -32,6 +32,11 @@ namespace JS {
|
|||
class Identifier;
|
||||
struct BindingPattern;
|
||||
|
||||
enum class HandledByHost {
|
||||
Handled,
|
||||
Unhandled,
|
||||
};
|
||||
|
||||
class VM : public RefCounted<VM> {
|
||||
public:
|
||||
struct CustomData {
|
||||
|
@ -252,6 +257,7 @@ public:
|
|||
Function<JobCallback(FunctionObject&)> host_make_job_callback;
|
||||
Function<ThrowCompletionOr<void>(Realm&)> host_ensure_can_compile_strings;
|
||||
Function<ThrowCompletionOr<void>(Object&)> host_ensure_can_add_private_element;
|
||||
Function<ThrowCompletionOr<HandledByHost>(ArrayBuffer&, size_t)> host_resize_array_buffer;
|
||||
|
||||
// Execute a specific AST node either in AST or BC interpreter, depending on which one is enabled by default.
|
||||
// NOTE: This is meant as a temporary stopgap until everything is bytecode.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue