Mercurial > hg > graal-compiler
changeset 13543:9cd47b39b0ef
improve quoting in c1 visualizer output
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Tue, 07 Jan 2014 16:32:58 -0800 |
parents | da9d9823628f |
children | c1b49fd59811 58ca96949f2e |
files | graal/com.oracle.graal.printer/src/com/oracle/graal/printer/HexCodeFile.java |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.printer/src/com/oracle/graal/printer/HexCodeFile.java Tue Jan 07 16:32:30 2014 -0800 +++ b/graal/com.oracle.graal.printer/src/com/oracle/graal/printer/HexCodeFile.java Tue Jan 07 16:32:58 2014 -0800 @@ -88,6 +88,7 @@ public static final String NEW_LINE = CodeUtil.NEW_LINE; public static final String SECTION_DELIM = " <||@"; + public static final String COLUMN_END = " <|@"; public static final Pattern SECTION = Pattern.compile("(\\S+)\\s+(.*)", Pattern.DOTALL); public static final Pattern COMMENT = Pattern.compile("(\\d+)\\s+(.*)", Pattern.DOTALL); public static final Pattern OPERAND_COMMENT = COMMENT; @@ -234,7 +235,8 @@ } /** - * Modifies a string to mangle any substrings matching {@link #SECTION_DELIM}. + * Modifies a string to mangle any substrings matching {@link #SECTION_DELIM} and + * {@link #COLUMN_END}. */ public static String encodeString(String input) { int index; @@ -242,6 +244,9 @@ while ((index = s.indexOf(SECTION_DELIM)) != -1) { s = s.substring(0, index) + " < |@" + s.substring(index + SECTION_DELIM.length()); } + while ((index = s.indexOf(COLUMN_END)) != -1) { + s = s.substring(0, index) + " < @" + s.substring(index + COLUMN_END.length()); + } return s; }