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:
parent
089ad6dc78
commit
b63fcafbc9
1 changed files with 3 additions and 2 deletions
5
yjit.rb
5
yjit.rb
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue