compiler.cfg.debugger: alien-invoke insn nodes were printing double quotes in the dot file output. If you would pprint a string, instead print that string so the double quotes are not present in the output.

db4
Doug Coleman 2015-06-24 18:46:39 -07:00
parent b3f953c6b4
commit 09e4606791
1 changed files with 8 additions and 2 deletions

View File

@ -11,7 +11,7 @@ compiler.cfg.save-contexts
compiler.cfg.utilities compiler.tree.builder compiler.cfg.utilities compiler.tree.builder
compiler.tree.optimizer compiler.units fry hashtables io kernel math compiler.tree.optimizer compiler.units fry hashtables io kernel math
namespaces prettyprint prettyprint.backend prettyprint.custom namespaces prettyprint prettyprint.backend prettyprint.custom
prettyprint.sections quotations random sequences vectors words ; prettyprint.sections quotations random sequences vectors words strings ;
FROM: compiler.cfg.linearization => number-blocks ; FROM: compiler.cfg.linearization => number-blocks ;
IN: compiler.cfg.debugger IN: compiler.cfg.debugger
@ -50,7 +50,13 @@ M: ##phi insn.
clone [ [ [ number>> ] dip ] assoc-map ] change-inputs clone [ [ [ number>> ] dip ] assoc-map ] change-inputs
call-next-method ; call-next-method ;
M: insn insn. tuple>array but-last [ bl ] [ pprint ] interleave nl ; ! XXX: pprint on a string prints the double quotes.
! This will cause graphviz to choke, so print without quotes.
M: insn insn. tuple>array but-last [
bl
] [
dup string? [ print ] [ pprint ] if
] interleave nl ;
: block. ( bb -- ) : block. ( bb -- )
"=== Basic block #" write dup block-number . nl "=== Basic block #" write dup block-number . nl