1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Make jumps dashed and falls solid

This commit is contained in:
Aaron Patterson 2021-06-22 14:33:46 -07:00 committed by Alan Wu
parent 089ad6dc78
commit b63fcafbc9

View file

@ -74,6 +74,7 @@ module YJIT
# Subgraph contains disassembly
buff << " subgraph disasm {\n"
buff << " node [shape=record fontname=\"courier\"];\n"
buff << " edge [fontname=\"courier\" penwidth=3];\n"
blocks.each do |block|
disasm = disasm_block(cs, block, highlight)
@ -87,9 +88,9 @@ module YJIT
buff << block.outgoing_ids.map { |id|
next_block = blocks.bsearch { |nb| id <=> nb.id }
if next_block.address == (block.address + block.code.length)
"b#{block.id} -> b#{id}[color=\"green\"];"
"b#{block.id} -> b#{id}[label=\"Fall\"];"
else
"b#{block.id} -> b#{id};"
"b#{block.id} -> b#{id}[label=\"Jump\" style=dashed];"
end
}.join("\n")
buff << "\n"