Files
ladybird/Tests/LibJS/Bytecode/expected/object-rest-computed-key.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

23 lines
804 B
Plaintext

$28c626df object-rest-computed-key.js:1:1
Registers: 8
Blocks: 1
Constants:
[0] = String("foo")
[1] = Int32(1)
[2] = Int32(2)
[3] = Undefined
block0:
[ 0] SetGlobal `a`, src:String("foo")
[ 18] NewObject dst:reg5
[ 28] InitObjectLiteralProperty object:reg5, `foo`, src:Int32(1), shape_cache_index:0, property_slot:0
[ 40] InitObjectLiteralProperty object:reg5, `bar`, src:Int32(2), shape_cache_index:0, property_slot:1
[ 58] CacheObjectShape object:reg5
[ 68] ThrowIfNullish src:reg5
[ 70] GetGlobal dst:reg7, `a`
[ 88] GetByValue dst:reg6, base:reg5, property:reg7
[ a0] SetGlobal `b`, src:reg6
[ b8] CopyObjectExcludingProperties dst:reg6, from_object:reg5, excluded_names:[reg7]
[ d8] SetGlobal `rest`, src:reg6
[ f0] End value:Undefined