Files
ladybird/Tests/LibJS/Bytecode/expected/delete-super-eval-order.txt
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

63 lines
1.5 KiB
Plaintext

$7867793e delete-super-eval-order.js:4:1
Registers: 10
Blocks: 4
Constants:
[0] = String("m")
[1] = Undefined
[2] = String("x")
block0:
[ 0] GetLexicalEnvironment dst:reg4
[ 8] CreateLexicalEnvironment dst:reg5, parent:reg4, capacity:0
[ 18] CreateVariable `A`, is_immutable:true, is_global:false, is_strict:false
[ 28] SetLexicalEnvironment environment:reg4
[ 30] NewClass dst:reg6, class_environment:reg5, class_blueprint_index:0, element_keys:[element_keys:String("m")]
[ 58] InitializeLexicalBinding `A`, src:reg6
[ 70] Jump target:block3
block1:
[ 78] Catch dst:reg6
[ 80] SetLexicalEnvironment environment:reg4
[ 88] Mov2 dst1:reg5, src1:Undefined, dst2:reg7, src2:reg5
block2:
[ a0] End value:reg5
block3:
[ a8] Mov dst:reg6, src:Undefined
[ b8] GetGlobal dst:reg9, `A`
[ d0] CallConstruct dst:reg8, callee:reg9, A
[ e8] GetById dst:reg9, base:reg8, `m`
[ 108] Call dst:reg5, callee:reg9, this_value:reg8, <object>.m, arguments:[String("x")]
[ 130] Mov2 dst1:reg6, src1:reg5, dst2:reg5, src2:reg6
[ 148] End value:reg5
Exception handlers:
[ a8 .. 150] => handler block1
A$811c9dc5
Registers: 5
Blocks: 1
Constants:
[0] = Undefined
block0:
[ 0] End value:Undefined
m$0f0a711c delete-super-eval-order.js:6:9
Registers: 7
Blocks: 2
Constants:
[0] = Undefined
block0:
[ 0] ResolveThisBinding
[ 8] ResolveSuperBase dst:reg5
[ 10] NewReferenceError dst:reg6, Can't delete a property on 'super'
[ 20] Throw src:reg6
block1:
[ 28] End value:Undefined