ladybird/Userland/Libraries/LibJS
Andreas Kling f47a14b9d6 LibJS: Use a premade shape when creating iterator result objects
Instead of going through the steps of creating an empty new object,
and adding two properties ("value" and "done") to it, we can pre-bake
a shape object and cache the property offsets.

This makes creating iterator result objects in the runtime much faster.

47% speedup on this microbenchmark:

    function go(a) {
        for (const p of a) {
        }
    }
    const a = [];
    a.length = 1_000_000;
    go(a);
2023-12-08 00:54:05 +01:00
..
Bytecode LibJS: Remove dedicated iterator result instructions in favor of GetById 2023-12-07 18:12:24 +01:00
Contrib/Test262 LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
Heap Userland: Make bit-fields compatible with MSVC C++ ABI 2023-12-07 10:28:19 -07:00
JIT LibJS/JIT: Make generating GDB images opt-in 2023-12-07 15:34:38 -07:00
Runtime LibJS: Use a premade shape when creating iterator result objects 2023-12-08 00:54:05 +01:00
Tests LibJS: Add basic support for module code with top-level await 2023-12-06 12:58:04 +01:00
AST.cpp LibJS+LibWeb: Another round of bringing module loading closer to spec 2023-12-03 20:46:55 +01:00
AST.h LibJS: Make Bytecode::Executable GC-allocated 2023-11-29 09:48:18 +01:00
CMakeLists.txt LibJS: Skip test262 tests with the CanBlockIsFalse flag 2023-11-30 09:51:46 -05:00
Console.cpp LibJS: Make ExecutionContext::function_name a GCPtr<PrimitiveString> 2023-11-29 09:48:18 +01:00
Console.h LibJS: Begin implementing console.dir 2023-06-22 06:46:27 +02:00
CyclicModule.cpp LibJS: Update CyclicModule to match current spec 2023-12-06 12:58:04 +01:00
CyclicModule.h LibJS: Update import referrer's [[LoadedModules]] in place 2023-12-03 20:46:55 +01:00
Forward.h LibJS: Stop converting between Object <-> IteratorRecord all the time 2023-12-07 14:06:34 +01:00
Lexer.cpp AK: Make "foo"_string infallible 2023-08-07 16:03:27 +02:00
Lexer.h Everywhere: Remove needless trailing semi-colons after functions 2023-07-08 10:32:56 +01:00
MarkupGenerator.cpp LibJS: Use OrderedHashMap for the Shape property table 2023-09-17 21:00:11 +02:00
MarkupGenerator.h LibJS: Fix redundancy-detection when printing raw values 2023-06-15 08:09:16 +02:00
Module.cpp LibJS: Update import referrer's [[LoadedModules]] in place 2023-12-03 20:46:55 +01:00
Module.h LibJS: Support LoadRequestedModule AO on SyntheticModule records 2023-12-03 20:46:55 +01:00
ModuleLoading.h LibJS+LibWeb: Another round of bringing module loading closer to spec 2023-12-03 20:46:55 +01:00
Parser.cpp LibJS+LibWeb: Another round of bringing module loading closer to spec 2023-12-03 20:46:55 +01:00
Parser.h LibJS+LibWeb: Another round of bringing module loading closer to spec 2023-12-03 20:46:55 +01:00
ParserError.cpp LibJS: Add to_string definitions to CodeGenerationError and ParserError 2023-02-17 09:14:23 -05:00
ParserError.h LibJS: Add to_string definitions to CodeGenerationError and ParserError 2023-02-17 09:14:23 -05:00
Position.h LibJS: Make line-and-column resolution fast for large minified JS 2023-09-12 17:21:42 +02:00
Print.cpp LibJS: Make Value::to_string_without_side_effects() infallible 2023-08-09 17:09:16 +02:00
Print.h Everywhere: Remove the AK:: qualifier from Stream usages 2023-02-13 00:50:07 +00:00
SafeFunction.h LibJS: Add GC graph dumper 2023-08-17 18:27:02 +02:00
Script.cpp LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
Script.h LibJS: Update import referrer's [[LoadedModules]] in place 2023-12-03 20:46:55 +01:00
SourceCode.cpp LibJS: Make line-and-column resolution fast for large minified JS 2023-09-12 17:21:42 +02:00
SourceCode.h LibJS: Make line-and-column resolution fast for large minified JS 2023-09-12 17:21:42 +02:00
SourceRange.h LibJS: Make line-and-column resolution fast for large minified JS 2023-09-12 17:21:42 +02:00
SourceTextModule.cpp LibJS: Add basic support for module code with top-level await 2023-12-06 12:58:04 +01:00
SourceTextModule.h LibJS: Always allocate ExecutionContext objects on the malloc heap 2023-11-29 09:48:18 +01:00
SyntaxHighlighter.cpp LibSyntax+Userland: Make LibSyntax not depend on LibGUI 2023-08-29 07:57:39 -04:00
SyntaxHighlighter.h LibSyntax: Teach each highlighter about it's comment syntax 2022-11-27 18:28:43 -07:00
SyntheticModule.cpp LibJS: Support LoadRequestedModule AO on SyntheticModule records 2023-12-03 20:46:55 +01:00
SyntheticModule.h LibJS: Support LoadRequestedModule AO on SyntheticModule records 2023-12-03 20:46:55 +01:00
Token.cpp AK+Everywhere: Remove the null state of DeprecatedString 2023-10-13 18:33:21 +03:30
Token.h LibJS: Remove DeprecatedString usage from Token 2023-01-26 20:25:25 +00:00