ladybird/Libraries/LibJS/Bytecode
Andreas Kling 38e224cd9f
Some checks are pending
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
LibJS: Make overflowing arithmetic on 2x Int32 values faster
Instead of converting them to doubles and doing double math, just do the
arithmetic operation in i64 space instead.

This gives us a ~1.25x speed-up on this kind of micro-benchmark:

    (() => {
        let a = -2124299999;
        for (let i = 0; i < 100_000_000; ++i) {
            a + a;
        }
    })()

Same idea for Add, Sub, and Mul.

There's a fair bit of overflowing Int32 arithmetic in some of the
JetStream benchmarks, and this seems like an obvious improvement.
2025-10-07 18:28:26 +02:00
..
ASTCodegen.cpp LibJS: Add PutByNumericId and change PutById to be string key only 2025-09-13 20:02:28 +02:00
BasicBlock.cpp
BasicBlock.h Everywhere: Slap some [[clang::lifetimebound]] where appropriate 2025-09-01 11:11:38 +02:00
Builtins.cpp
Builtins.h LibJS: Do more comprehensive check if next() fast path is possible 2025-06-02 00:15:36 +02:00
CodeGenerationError.cpp
CodeGenerationError.h LibJS: Revert Enable EXPLICIT_SYMBOL_EXPORT 2025-07-22 11:51:29 -04:00
Executable.cpp LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
Executable.h LibJS: Add inline caching for adding new own properties to objects 2025-09-17 12:44:44 +02:00
Generator.cpp LibJS: Cache bytecode constant strings with their Utf16String as key 2025-10-05 21:44:06 +02:00
Generator.h LibJS: Cache bytecode constant strings with their Utf16String as key 2025-10-05 21:44:06 +02:00
IdentifierTable.cpp LibJS+LibWeb+WebContent: Port JS::PropertyKey to UTF-16 2025-08-05 07:07:15 -04:00
IdentifierTable.h LibJS+LibWeb+WebContent: Port JS::PropertyKey to UTF-16 2025-08-05 07:07:15 -04:00
Instruction.cpp LibJS: Remove unused InstructionStreamIterator::source_code getter 2025-04-16 10:41:44 -06:00
Instruction.h LibJS: Add PutByNumericId and change PutById to be string key only 2025-09-13 20:02:28 +02:00
Interpreter.cpp LibJS: Make overflowing arithmetic on 2x Int32 values faster 2025-10-07 18:28:26 +02:00
Interpreter.h LibJS: Allocate context up front in SuperCallWithArgumentArray 2025-08-31 15:24:37 +02:00
Label.cpp
Label.h LibJS: Revert Enable EXPLICIT_SYMBOL_EXPORT 2025-07-22 11:51:29 -04:00
Op.h LibJS: Add PutByNumericId and change PutById to be string key only 2025-09-13 20:02:28 +02:00
Operand.h LibJS: Revert Enable EXPLICIT_SYMBOL_EXPORT 2025-07-22 11:51:29 -04:00
RegexTable.cpp
RegexTable.h LibJS: Revert Enable EXPLICIT_SYMBOL_EXPORT 2025-07-22 11:51:29 -04:00
Register.h LibJS: Revert Enable EXPLICIT_SYMBOL_EXPORT 2025-07-22 11:51:29 -04:00
ScopedOperand.cpp
ScopedOperand.h LibJS: Revert Enable EXPLICIT_SYMBOL_EXPORT 2025-07-22 11:51:29 -04:00
StringTable.cpp LibJS+LibWeb: Port interned bytecode strings to UTF-16 2025-08-14 10:27:08 +02:00
StringTable.h LibJS+LibWeb: Port interned bytecode strings to UTF-16 2025-08-14 10:27:08 +02:00