ladybird/Libraries/LibJS
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
..
Bytecode LibJS: Make overflowing arithmetic on 2x Int32 values faster 2025-10-07 18:28:26 +02:00
Contrib/Test262 LibJS+LibWeb+WebContent: Port JS::PropertyKey to UTF-16 2025-08-05 07:07:15 -04:00
Heap LibJS: Enable EXPLICIT_SYMBOL_EXPORT and annotate minimum symbol set 2025-07-22 11:51:29 -04:00
Runtime LibJS: Make overflowing arithmetic on 2x Int32 values faster 2025-10-07 18:28:26 +02:00
Tests LibJS: Fill all available space when TA.copyWithin shrinks the array 2025-10-03 09:03:40 +02:00
AST.cpp LibJS: Make internal_define_own_property() save added property offset 2025-09-17 12:44:44 +02:00
AST.h LibJS: Export symbols causing linker errors in various consumers 2025-08-23 16:04:36 -06:00
CMakeLists.txt Tests/LibJS: Enable test-js on Windows 2025-08-24 12:58:27 -06:00
Console.cpp LibJS: Implement console.dirxml 2025-08-17 07:28:56 -04:00
Console.h LibJS: Implement console.dirxml 2025-08-17 07:28:56 -04:00
CyclicModule.cpp LibJS: Update spec steps / links for the import-assertions proposal 2025-04-29 07:33:08 -04:00
CyclicModule.h LibJS: Enable EXPLICIT_SYMBOL_EXPORT and annotate minimum symbol set 2025-07-22 11:51:29 -04:00
Forward.h LibJS: Revert Enable EXPLICIT_SYMBOL_EXPORT 2025-07-22 11:51:29 -04:00
Lexer.cpp LibJS: Correct line ending detection in debug output 2025-09-28 11:23:41 -04:00
Lexer.h LibJS: Port the JS lexer and parser to UTF-16 2025-08-13 09:56:13 -04:00
LocalVariable.h LibJS: Port the Identifier AST (and related) nodes to UTF-16 2025-08-13 09:56:13 -04:00
Module.cpp LibJS: Port the Identifier AST (and related) nodes to UTF-16 2025-08-13 09:56:13 -04:00
Module.h Everywhere: Slap some [[clang::lifetimebound]] where appropriate 2025-09-01 11:11:38 +02:00
ModuleLoading.h
Parser.cpp LibJS: Port RegExp flags and patterns to UTF-16 2025-08-13 09:56:13 -04:00
Parser.h LibJS: Port the Identifier AST (and related) nodes to UTF-16 2025-08-13 09:56:13 -04:00
ParserError.cpp LibJS: Port the JS lexer and parser to UTF-16 2025-08-13 09:56:13 -04:00
ParserError.h LibJS: Port the JS lexer and parser to UTF-16 2025-08-13 09:56:13 -04:00
Position.h
Print.cpp LibJS+LibWeb: Replace JS::Utf16String with AK::Utf16String 2025-07-18 12:45:38 -04:00
Print.h LibJS: Enable EXPLICIT_SYMBOL_EXPORT and annotate minimum symbol set 2025-07-22 11:51:29 -04:00
Script.cpp
Script.h Everywhere: Slap some [[clang::lifetimebound]] where appropriate 2025-09-01 11:11:38 +02:00
SourceCode.cpp LibJS: Port the JS lexer and parser to UTF-16 2025-08-13 09:56:13 -04:00
SourceCode.h LibJS: Port the JS lexer and parser to UTF-16 2025-08-13 09:56:13 -04:00
SourceRange.h LibJS: Enable EXPLICIT_SYMBOL_EXPORT and annotate minimum symbol set 2025-07-22 11:51:29 -04:00
SourceTextModule.cpp LibJS: Port the Identifier AST (and related) nodes to UTF-16 2025-08-13 09:56:13 -04:00
SourceTextModule.h LibJS+LibWeb+WebContent: Port JS::PropertyKey to UTF-16 2025-08-05 07:07:15 -04:00
SyntaxHighlighter.cpp LibJS: Port the JS lexer and parser to UTF-16 2025-08-13 09:56:13 -04:00
SyntaxHighlighter.h LibJS: Enable EXPLICIT_SYMBOL_EXPORT and annotate minimum symbol set 2025-07-22 11:51:29 -04:00
SyntheticModule.cpp LibJS+LibWeb+WebContent: Port JS::PropertyKey to UTF-16 2025-08-05 07:07:15 -04:00
SyntheticModule.h LibJS+LibWeb+WebContent: Port JS::PropertyKey to UTF-16 2025-08-05 07:07:15 -04:00
Token.cpp LibJS: Port the JS lexer and parser to UTF-16 2025-08-13 09:56:13 -04:00
Token.h LibWebView: Enable in Windows CI 2025-08-23 16:04:36 -06:00