Files
ladybird/Tests/LibJS/Bytecode/expected/parameter-createvariable-order.txt
Andreas Kling c301a21960 LibJS: Skip preserving zero-argument call callees
The callee and this-value preservation copies only matter while later
argument expressions are still being evaluated. For zero-argument calls
there is nothing left to clobber them, so we can keep the original
operand and let the interpreter load it directly.

This removes the hot Mov arg0->reg pattern from zero-argument local
calls and reduces register pressure.
2026-04-13 18:29:43 +02:00

48 lines
1.4 KiB
Plaintext

$6ef6ff9a parameter-createvariable-order.js:7:1
Registers: 7
Blocks: 1
Constants:
[0] = Undefined
[1] = Int32(1)
[2] = Int32(2)
[3] = Int32(3)
block0:
[ 0] GetGlobal dst:reg6, `f`
[ 18] Call dst:reg5, callee:reg6, this_value:Undefined, f, arguments:[Int32(1), Int32(2), Int32(3)]
[ 48] End value:reg5
f$40c96172 parameter-createvariable-order.js:2:5
Registers: 6
Blocks: 1
Locals: inner~0
Constants:
[0] = Undefined
block0:
[ 0] CreateVariable `a`, is_immutable:false, is_global:false, is_strict:false
[ 10] CreateVariable `b`, is_immutable:false, is_global:false, is_strict:false
[ 20] CreateVariable `c`, is_immutable:false, is_global:false, is_strict:false
[ 30] InitializeLexicalBinding `a`, src:arg0
[ 48] InitializeLexicalBinding `b`, src:arg1
[ 60] InitializeLexicalBinding `c`, src:arg2
[ 78] Mov dst:inner~0, src:Undefined
[ 88] NewFunction dst:reg5, shared_function_data_index:0 (inner)
[ a0] Mov dst:inner~0, src:reg5
[ b0] Call dst:reg5, callee:inner~0, this_value:Undefined, inner
[ d0] Return value:reg5
inner$350d7dbe parameter-createvariable-order.js:3:9
Registers: 8
Blocks: 1
block0:
[ 0] GetBinding dst:reg5, `a`
[ 18] GetBinding dst:reg6, `b`
[ 30] Add dst:reg7, lhs:reg5, rhs:reg6
[ 40] GetBinding dst:reg5, `c`
[ 58] Add dst:reg6, lhs:reg7, rhs:reg5
[ 68] Return value:reg6