mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-11 09:27:00 +02:00
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.
39 lines
994 B
Plaintext
39 lines
994 B
Plaintext
$6cc1cfb5 captured-variables.js:12:1
|
|
Registers: 7
|
|
Blocks: 1
|
|
Constants:
|
|
[0] = Undefined
|
|
|
|
block0:
|
|
[ 0] GetGlobal dst:reg6, `outer`
|
|
[ 18] Call dst:reg5, callee:reg6, this_value:Undefined, outer
|
|
[ 38] End value:reg5
|
|
|
|
|
|
outer$0300a3f9 captured-variables.js:5:5
|
|
Registers: 7
|
|
Blocks: 1
|
|
Locals: inner~0
|
|
Constants:
|
|
[0] = Undefined
|
|
[1] = Int32(1)
|
|
|
|
block0:
|
|
[ 0] GetLexicalEnvironment dst:reg4
|
|
[ 8] Mov dst:inner~0, src:Undefined
|
|
[ 18] CreateLexicalEnvironment dst:reg5, parent:reg4, capacity:1
|
|
[ 28] CreateVariable `captured`, is_immutable:false, is_global:false, is_strict:false
|
|
[ 38] NewFunction dst:inner~0, shared_function_data_index:0
|
|
[ 50] InitializeLexicalBinding `captured`, src:Int32(1)
|
|
[ 68] Call dst:reg6, callee:inner~0, this_value:Undefined, inner
|
|
[ 88] Return value:reg6
|
|
|
|
|
|
inner$f798183e captured-variables.js:7:9
|
|
Registers: 6
|
|
Blocks: 1
|
|
|
|
block0:
|
|
[ 0] GetBinding dst:reg5, `captured`
|
|
[ 18] Return value:reg5
|