Files
ladybird/Tests/LibJS/Bytecode/expected/with-statement.txt
Andreas Kling 3a08f7b95f LibJS: Drop dead entry GetLexicalEnvironment loads
Teach the Rust bytecode generator to treat the synthetic entry
GetLexicalEnvironment as a removable prologue load.

We still model reg4 as the saved entry lexical environment during
codegen, but assemble() now deletes that load when no emitted
instruction refers to the saved environment register. This keeps the
semantics of unwinding and environment restoration intact while letting
empty functions and other simple bodies start at their first real
instruction.
2026-04-13 18:29:43 +02:00

36 lines
961 B
Plaintext

$d60f48d7 with-statement.js:7:1
Registers: 7
Blocks: 1
Constants:
[0] = Undefined
block0:
[ 0] GetGlobal dst:reg6, `withBlock`
[ 18] Call dst:reg5, callee:reg6, this_value:Undefined, withBlock
[ 38] End value:reg5
withBlock$86b35e99 with-statement.js:2:15
Registers: 10
Blocks: 1
Locals: obj~0
Constants:
[0] = Int32(42)
[1] = Undefined
block0:
[ 0] GetLexicalEnvironment dst:reg4
[ 8] NewObject dst:obj~0
[ 18] InitObjectLiteralProperty object:obj~0, `x`, src:Int32(42), shape_cache_index:0, property_slot:0
[ 30] CacheObjectShape object:obj~0
[ 40] EnterObjectEnvironment dst:reg5, object:obj~0
[ 50] GetBinding dst:reg7, `console`
[ 68] GetById dst:reg8, base:reg7, `log` (console.log)
[ 88] GetBinding dst:reg9, `x`
[ a0] Call dst:reg6, callee:reg8, this_value:reg7, console.log, arguments:[reg9]
[ c8] SetLexicalEnvironment environment:reg4
[ d0] End value:Undefined
42