ladybird/Tests/LibJS/Bytecode/expected/object-rest-computed-key.txt
Andreas Kling 0c6f86c80d LibJS: Evaluate object destructuring targets before GetV
Evaluate member targets in object destructuring before reading the
source property or copying rest properties. Convert computed source
property keys before evaluating the target reference so the generated
bytecode follows the spec ordering.

Cover plain, computed, defaulted, and rest object destructuring.
2026-05-22 01:56:57 +02:00

23 lines
860 B
Text

$fe0af08d 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")
[ 10] NewObject dst:reg5
[ 20] InitObjectLiteralProperty object:reg5, `foo`, src:Int32(1), shape_cache_index:0, property_slot:0
[ 38] InitObjectLiteralProperty object:reg5, `bar`, src:Int32(2), shape_cache_index:0, property_slot:1
[ 50] CacheObjectShape object:reg5
[ 60] ThrowIfNullish src:reg5
[ 68] GetGlobal dst:reg7, `a`
[ 78] ToPrimitiveWithStringHint dst:reg7, value:reg7
[ 88] GetByValue dst:reg6, base:reg5, property:reg7
[ a0] SetGlobal `b`, src:reg6
[ b0] CopyObjectExcludingProperties dst:reg6, from_object:reg5, excluded_names:[reg7]
[ d0] SetGlobal `rest`, src:reg6
[ e0] End value:Undefined