mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
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.
23 lines
804 B
Plaintext
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
|