1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:58:12 +00:00
serenity/Userland/Libraries/LibWeb/WebAssembly
Timothy Flynn 7bd8fd000f LibWeb: Generate dedicated methods to create Web constructors/prototypes
Currently, for each exposed interface, we generate one massive function
to create every Web constructor and prototype. In an effort to lazily
create these instead, this first step is to extract the creation of each
of these into its own method.

First, this generates a forwarding header for all IDL types. This is to
allow callers to remain unchanged without forcing them to include the
(very heavy) generated IDL headers. This header is included by LibWeb's
forwarding header.

Next, this defines a base template method on Web::Bindings::Intrinsics
to create a prototype/constructor pair. Specializations of this template
are now generated in a new .cpp file, IntrinsicDefinitions.cpp. The base
Intrinsics class is updated to use this new method, and will continue to
cache the result.

Last, some WebAssembly classes are updated to use this new mechanism.
They were using some ad hoc cache keys that are now in line with the
generated specializations.

That one massive function is still used to invoke these specializations,
so they are not lazy as of this commit.
2023-01-10 16:08:14 +01:00
..
WebAssemblyInstanceConstructor.cpp LibWeb: Generate dedicated methods to create Web constructors/prototypes 2023-01-10 16:08:14 +01:00
WebAssemblyInstanceConstructor.h LibJS: Convert Object::construct() to NonnullGCPtr 2022-12-15 06:56:37 -05:00
WebAssemblyInstanceObject.cpp LibWeb: Generate dedicated methods to create Web constructors/prototypes 2023-01-10 16:08:14 +01:00
WebAssemblyInstanceObject.h LibJS+LibWeb: Replace GlobalObject with Realm in initialize() functions 2022-08-23 13:58:30 +01:00
WebAssemblyInstanceObjectPrototype.cpp LibJS: Pass Realm to define_native_{accessor,function}() 2022-08-23 13:58:30 +01:00
WebAssemblyInstanceObjectPrototype.h LibJS: Remove Object(Object& prototype) footgun 2022-12-14 15:11:57 +01:00
WebAssemblyMemoryConstructor.cpp LibWeb: Generate dedicated methods to create Web constructors/prototypes 2023-01-10 16:08:14 +01:00
WebAssemblyMemoryConstructor.h LibJS: Convert Object::construct() to NonnullGCPtr 2022-12-15 06:56:37 -05:00
WebAssemblyMemoryPrototype.cpp LibJS: Convert ArrayBuffer::create() to NonnullGCPtr 2022-12-14 09:59:45 +00:00
WebAssemblyMemoryPrototype.h LibJS: Remove Object(Object& prototype) footgun 2022-12-14 15:11:57 +01:00
WebAssemblyModuleConstructor.cpp LibWeb: Generate dedicated methods to create Web constructors/prototypes 2023-01-10 16:08:14 +01:00
WebAssemblyModuleConstructor.h LibJS: Convert Object::construct() to NonnullGCPtr 2022-12-15 06:56:37 -05:00
WebAssemblyModuleObject.cpp LibWeb: Generate dedicated methods to create Web constructors/prototypes 2023-01-10 16:08:14 +01:00
WebAssemblyModuleObject.h LibJS+LibWeb: Replace GlobalObject with Realm in object constructors 2022-08-23 13:58:30 +01:00
WebAssemblyModulePrototype.h LibJS: Remove Object(Object& prototype) footgun 2022-12-14 15:11:57 +01:00
WebAssemblyObject.cpp LibWeb: Generate dedicated methods to create Web constructors/prototypes 2023-01-10 16:08:14 +01:00
WebAssemblyObject.h AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
WebAssemblyTableConstructor.cpp LibWeb: Generate dedicated methods to create Web constructors/prototypes 2023-01-10 16:08:14 +01:00
WebAssemblyTableConstructor.h LibJS: Convert Object::construct() to NonnullGCPtr 2022-12-15 06:56:37 -05:00
WebAssemblyTableObject.cpp LibWeb: Generate dedicated methods to create Web constructors/prototypes 2023-01-10 16:08:14 +01:00
WebAssemblyTableObject.h LibJS+LibWeb: Replace GlobalObject with Realm in object constructors 2022-08-23 13:58:30 +01:00
WebAssemblyTablePrototype.cpp LibJS+LibWeb: Make Runtime/AbstractOperations.h not include AST.h 2022-11-23 16:05:59 +00:00
WebAssemblyTablePrototype.h LibJS: Remove Object(Object& prototype) footgun 2022-12-14 15:11:57 +01:00