Files
ladybird/Tests/LibJS/Bytecode/expected/destructuring-param-no-param-expressions.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

33 lines
1.1 KiB
Plaintext

$34849cbe destructuring-param-no-param-expressions.js:10:1
Registers: 8
Blocks: 1
Constants:
[0] = Undefined
[1] = Int32(1)
[2] = Int32(2)
block0:
[ 0] GetGlobal dst:reg6, `f`
[ 18] NewObject dst:reg7
[ 28] InitObjectLiteralProperty object:reg7, `captured`, src:Int32(1), shape_cache_index:0, property_slot:0
[ 40] InitObjectLiteralProperty object:reg7, `local`, src:Int32(2), shape_cache_index:0, property_slot:1
[ 58] CacheObjectShape object:reg7
[ 68] Call dst:reg5, callee:reg6, this_value:Undefined, f, arguments:[reg7]
[ 90] End value:reg5
f$84013cfc destructuring-param-no-param-expressions.js:7:5
Registers: 6
Blocks: 1
Locals: local~0
block0:
[ 0] CreateVariable `captured`, is_immutable:false, is_global:false, is_strict:false
[ 10] ThrowIfNullish src:arg0
[ 18] GetById dst:reg5, base:arg0, `captured`
[ 38] InitializeLexicalBinding `captured`, src:reg5
[ 50] GetById dst:reg5, base:arg0, `local`
[ 70] Mov dst:local~0, src:reg5
[ 80] NewFunction dst:reg5, shared_function_data_index:0
[ 98] Return value:reg5