ladybird/Userland/Libraries/LibJS/Bytecode
Andreas Kling 4699c81fc1 LibJS: Stop converting between Object <-> IteratorRecord all the time
This patch makes IteratorRecord an Object. Although it's not exposed to
author code, this does allow us to store it in a VM register.

Now that we can store it in a VM register, we don't need to convert it
back and forth between IteratorRecord and Object when accessing it from
bytecode.

The big win here is avoiding 3 [[Get]] accesses on every iteration step
of for..of loops. There are also a bunch of smaller efficiencies gained.

20% speed-up on this microbenchmark:

    function go(a) {
        for (const p of a) {
        }
    }
    const a = [];
    a.length = 1_000_000;
    go(a);
2023-12-07 14:06:34 +01:00
..
ASTCodegen.cpp LibJS: Stop converting between Object <-> IteratorRecord all the time 2023-12-07 14:06:34 +01:00
BasicBlock.cpp LibJS: Migrate DeprecatedString to String 2023-11-02 14:55:12 +01:00
BasicBlock.h LibJS: Migrate DeprecatedString to String 2023-11-02 14:55:12 +01:00
Builtins.cpp LibJS: Introduce Builtins 2023-11-17 19:06:25 +01:00
Builtins.h LibJS/JIT: Add builtin for Math.exp() 2023-11-24 12:49:15 +01:00
CodeGenerationError.cpp LibJS: Add to_string definitions to CodeGenerationError and ParserError 2023-02-17 09:14:23 -05:00
CodeGenerationError.h LibJS: Remove unused CodeGenerationError::to_deprecated_string 2023-02-17 09:14:23 -05:00
CommonImplementations.cpp LibJS: Stop converting between Object <-> IteratorRecord all the time 2023-12-07 14:06:34 +01:00
CommonImplementations.h LibJS: Stop converting between Object <-> IteratorRecord all the time 2023-12-07 14:06:34 +01:00
Executable.cpp LibJS: Make Bytecode::Executable GC-allocated 2023-11-29 09:48:18 +01:00
Executable.h LibJS: Make Bytecode::Executable GC-allocated 2023-11-29 09:48:18 +01:00
Generator.cpp LibJS: Make Bytecode::Executable GC-allocated 2023-11-29 09:48:18 +01:00
Generator.h LibJS: Make Bytecode::Executable GC-allocated 2023-11-29 09:48:18 +01:00
IdentifierTable.cpp LibJS: Don't worry about deduplicating bytecode string tables 2023-10-04 20:10:12 +02:00
IdentifierTable.h AK+Everywhere: Rename FlyString to DeprecatedFlyString 2023-01-09 23:00:24 +00:00
Instruction.cpp LibJS: Add file & line number to bytecode VM stack traces :^) 2023-09-02 15:37:53 +02:00
Instruction.h LibJS: Stop converting between Object <-> IteratorRecord all the time 2023-12-07 14:06:34 +01:00
Interpreter.cpp LibJS: Stop converting between Object <-> IteratorRecord all the time 2023-12-07 14:06:34 +01:00
Interpreter.h LibJS: Put Bytecode::CallFrame + register slots in a single allocation 2023-11-29 09:48:18 +01:00
Label.h Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
Op.h LibJS: Stop converting between Object <-> IteratorRecord all the time 2023-12-07 14:06:34 +01:00
RegexTable.cpp LibJS/Bytecode: Don't reparse regular expressions on instantiation 2023-07-13 13:30:49 +02:00
RegexTable.h LibJS/Bytecode: Don't reparse regular expressions on instantiation 2023-07-13 13:30:49 +02:00
Register.h LibJS: Stash thrown exception in a register before executing finalizer 2023-11-03 20:27:45 +01:00
StringTable.cpp LibJS: Don't worry about deduplicating bytecode string tables 2023-10-04 20:10:12 +02:00
StringTable.h AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00