Files
ladybird/Tests/LibJS/Bytecode/expected/block-scoped-function-no-tdz.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

41 lines
1004 B
Plaintext

$d99dc022 block-scoped-function-no-tdz.js:10:1
Registers: 7
Blocks: 1
Constants:
[0] = String("use strict")
[1] = Undefined
block0:
[ 0] GetGlobal dst:reg6, `test`
[ 18] Call dst:reg5, callee:reg6, this_value:Undefined, test
[ 38] End value:reg5
test$8f4c6018 block-scoped-function-no-tdz.js:3:5
Registers: 7
Blocks: 1
Locals: foo~0, result~1
Constants:
[0] = Undefined
block0:
[ 0] GetLexicalEnvironment dst:reg4
[ 8] Mov dst:result~1, src:Undefined
[ 18] CreateLexicalEnvironment dst:reg5, parent:reg4, capacity:0
[ 28] NewFunction dst:reg6, shared_function_data_index:0
[ 40] Mov dst:foo~0, src:reg6
[ 50] Call dst:reg6, callee:foo~0, this_value:Undefined, foo
[ 70] Mov dst:result~1, src:reg6
[ 80] SetLexicalEnvironment environment:reg4
[ 88] Return value:result~1
foo$48752efa block-scoped-function-no-tdz.js:5:26
Registers: 5
Blocks: 1
Constants:
[0] = Int32(42)
block0:
[ 0] Return value:Int32(42)