mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-09 08:33:28 +02:00
Add a metadata header showing register count, block count, local variable names, and the constants table. Resolve jump targets to block labels (e.g. "block1") instead of raw hex addresses, and add visual separation between basic blocks. Make identifier and property key formatting more concise by using backtick quoting and showing base_identifier as a trailing parenthetical hint that joins the base and property names. Generate a stable name for each executable by hashing the source text it covers (stable across codegen changes). Named functions show as "foo$9beb91ec", anonymous ones as "$43362f3f". Also show the source filename, line, and column.
47 lines
1.1 KiB
Plaintext
47 lines
1.1 KiB
Plaintext
$9814d5bc nested-for-loop-completion.js:1:1
|
|
Registers: 9
|
|
Blocks: 8
|
|
Constants:
|
|
[0] = Int32(4)
|
|
[1] = Undefined
|
|
[2] = Int32(7)
|
|
[3] = Int32(1)
|
|
[4] = Int32(0)
|
|
[5] = Int32(2)
|
|
|
|
block0:
|
|
[ 0] GetLexicalEnvironment dst:reg4
|
|
[ 8] SetGlobal `n`, src:Int32(4)
|
|
[ 20] Mov dst:reg5, src:Undefined
|
|
[ 30] Jump target:block3
|
|
|
|
block1:
|
|
[ 38] SetGlobal `depth`, src:Int32(0)
|
|
[ 50] Mov dst:reg6, src:Undefined
|
|
[ 60] Jump target:block6
|
|
|
|
block2:
|
|
[ 68] GetGlobal dst:reg6, `n`
|
|
[ 80] Add dst:reg7, lhs:reg6, rhs:Int32(1)
|
|
[ 90] SetGlobal `n`, src:reg7
|
|
|
|
block3:
|
|
[ a8] GetGlobal dst:reg6, `n`
|
|
[ c0] JumpLessThanEquals lhs:reg6, rhs:Int32(7), true_target:block1, false_target:block4
|
|
|
|
block4:
|
|
[ d8] End value:reg5
|
|
|
|
block5:
|
|
[ e0] GetGlobal dst:reg7, `depth`
|
|
[ f8] Add dst:reg8, lhs:reg7, rhs:Int32(2)
|
|
[ 108] SetGlobal `depth`, src:reg8
|
|
|
|
block6:
|
|
[ 120] GetGlobal dst:reg7, `depth`
|
|
[ 138] JumpLessThanEquals lhs:reg7, rhs:Int32(0), true_target:block5, false_target:block7
|
|
|
|
block7:
|
|
[ 150] Mov dst:reg5, src:reg6
|
|
[ 160] Jump target:block2
|