ladybird/Tests/LibJS
Andreas Kling eb9432fcb8 LibJS: Preserve source positions in bytecode source maps
Carry full source positions through the Rust bytecode source map so
stack traces and other bytecode-backed source lookups can use them
directly.

This keeps exception-heavy paths from reconstructing line and column
information through SourceCode::range_from_offsets(), which can spend a
lot of time building SourceCode's position cache on first use.

We're trading some space for time here, but I believe it's worth it at
this tag, as this saves ~250ms of main thread time while loading
https://x.com/ on my Linux machine. :^)

Reading the stored Position out of the source map directly also exposed
two things masked by the old range_from_offsets() path: a latent
off-by-one in Lexer::new_at_offset() (its consume() bumped line_column
past the character at offset; only synthesize_binding_pattern() hit it),
and a (1,1) fallback in range_from_offsets() that fired whenever the
queried range reached EOF. Fix the lexer, then rebaseline both the
bytecode dump tests (no more spurious "1:1") and the destructuring AST
tests (binding-pattern identifiers now report their real columns).
2026-04-22 22:34:54 +02:00
..
AST LibJS: Preserve source positions in bytecode source maps 2026-04-22 22:34:54 +02:00
Bytecode LibJS: Preserve source positions in bytecode source maps 2026-04-22 22:34:54 +02:00
Runtime LibJS: Check TDZ state in asm environment calls 2026-04-20 11:23:34 +02:00
CMakeLists.txt LibJS: Add deferred PrimitiveString substrings 2026-04-11 00:35:36 +02:00
test-js-ast.py LibJS: Support .mjs files in test-js-ast and test-js-bytecode 2026-02-19 12:02:50 +01:00
test-js-bytecode.py LibJS: Support .mjs files in test-js-ast and test-js-bytecode 2026-02-19 12:02:50 +01:00
test-js.cpp LibJS: Split inline frames from execution context stack 2026-04-13 18:29:43 +02:00
test-primitive-string.cpp LibJS: Reuse cached ASCII strings for substrings 2026-04-12 19:15:50 +02:00
test-value-js.cpp LibJS: Make Value() default-construct the undefined value 2025-04-05 11:20:26 +02:00