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.
28 lines
615 B
Plaintext
28 lines
615 B
Plaintext
$52070826 baseline.js:5:1
|
|
Registers: 10
|
|
Blocks: 1
|
|
Constants:
|
|
[0] = Undefined
|
|
[1] = Int32(1)
|
|
[2] = Int32(2)
|
|
|
|
block0:
|
|
[ 0] GetGlobal dst:reg6, `console`
|
|
[ 18] GetById dst:reg7, base:reg6, `log` (console.log)
|
|
[ 38] GetGlobal dst:reg9, `add`
|
|
[ 50] Call dst:reg8, callee:reg9, this_value:Undefined, add, arguments:[Int32(1), Int32(2)]
|
|
[ 78] Call dst:reg5, callee:reg7, this_value:reg6, console.log, arguments:[reg8]
|
|
[ a0] End value:reg5
|
|
|
|
|
|
add$782c0096 baseline.js:2:5
|
|
Registers: 6
|
|
Blocks: 1
|
|
|
|
block0:
|
|
[ 0] Add dst:reg5, lhs:arg0, rhs:arg1
|
|
[ 10] Return value:reg5
|
|
|
|
|
|
3
|