1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-10 18:10:56 +09:00
ladybird/Userland/Libraries/LibJS
Andreas Kling e23fe8cf87 LibJS: Make define_native_foo() take SafeFunctions
We were taking AK::Function and then passing them along to
NativeFunction, which takes a SafeFunction. This works, since
SafeFunction will transparently wrap AK::Function in a CallableWrapper
when assigned, but it was causing us to accumulate thousands of
pointless wrappers around direct function pointers.

By using SafeFunction at every step of the setup call chain, we no
longer create any CallableWrappers for the majority of native functions
in LibJS. Also, the number of heap-registered SafeFunctions in a new
realm goes down from ~5000 to 5. :^)
2022-10-20 15:16:23 +02:00
..
Bytecode LibJS: Support non-base-10 BigInt literals in bytecode VM 2022-10-19 19:58:15 +02:00
Contrib/Test262 LibJS: Implement $262.evalScript() according to the given algorithm 2022-08-30 12:00:04 +01:00
Heap LibJS: Remove unnecessary operator==() for ({Nonnull,}GCPtr<T>, T*) 2022-10-20 15:16:23 +02:00
Runtime LibJS: Make define_native_foo() take SafeFunctions 2022-10-20 15:16:23 +02:00
Tests LibTimeZone+LibJS: Update to TZDB version 2022e 2022-10-18 16:01:44 +02:00
AST.cpp LibJS: Implement RegExp legacy static properties 2022-10-17 17:08:33 +02:00
AST.h LibJS: Forward a string aproximation of the CallExpression to Call Ops 2022-10-17 01:36:41 +02:00
CMakeLists.txt LibJS: Implement RegExp legacy static properties 2022-10-17 17:08:33 +02:00
Console.cpp LibJS+js: Disable console debug messages outside Serenity only for js 2022-10-16 02:06:02 +03:30
Console.h LibJS+js: Disable console debug messages outside Serenity only for js 2022-10-16 02:06:02 +03:30
CyclicModule.cpp LibJS: Add [[HostDefined]] field to Modules 2022-10-06 16:41:36 +02:00
CyclicModule.h LibJS: Add accessor for requested modules to CyclicModule 2022-10-06 16:41:36 +02:00
Forward.h LibJS: Make PromiseCapability GC-allocated 2022-10-02 23:02:27 +01:00
Interpreter.cpp LibJS: Make Script and Module GC-allocated 2022-09-06 00:27:09 +02:00
Interpreter.h LibJS: Remove {Bytecode::,}Interpreter::global_object() 2022-08-23 13:58:30 +01:00
Lexer.cpp Everywhere: Use default StringView constructor over nullptr 2022-07-12 23:11:35 +02:00
Lexer.h Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
MarkupGenerator.cpp WebContent+LibWeb+LibJS: Report exceptions to the JS console 2022-10-15 01:25:12 +02:00
MarkupGenerator.h WebContent+LibWeb+LibJS: Report exceptions to the JS console 2022-10-15 01:25:12 +02:00
Module.cpp LibJS: Add [[HostDefined]] field to Modules 2022-10-06 16:41:36 +02:00
Module.h LibJS: Add [[HostDefined]] field to Modules 2022-10-06 16:41:36 +02:00
Parser.cpp LibJS: Allow anonymous functions as default exports 2022-09-02 02:07:37 +01:00
Parser.h LibJS: Allow anonymous functions as default exports 2022-09-02 02:07:37 +01:00
SafeFunction.h LibJS: Don't register SafeFunction-to-function-pointer with JS::Heap 2022-10-20 15:16:23 +02:00
Script.cpp LibJS: Make sure JS::Script visits its HostDefined object 2022-09-06 01:21:09 +02:00
Script.h LibJS: Mark [[HostDefined]] accessor on scripts as const 2022-10-06 16:41:36 +02:00
SourceRange.h LibJS: Add missing headers 2021-10-06 23:52:40 +01:00
SourceTextModule.cpp LibJS: Add [[HostDefined]] field to Modules 2022-10-06 16:41:36 +02:00
SourceTextModule.h LibJS: Add [[HostDefined]] field to Modules 2022-10-06 16:41:36 +02:00
SyntaxHighlighter.cpp LibJS: Remove a bunch of gratuitous JS namespace qualifiers 2022-04-03 15:19:33 +01:00
SyntaxHighlighter.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
SyntheticModule.cpp LibJS: Make Script and Module GC-allocated 2022-09-06 00:27:09 +02:00
SyntheticModule.h LibJS: Make Script and Module GC-allocated 2022-09-06 00:27:09 +02:00
Token.cpp Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
Token.h Everywhere: Explicitly specify the size in StringView constructors 2022-07-12 23:11:35 +02:00