Skip to content

Commit dab1af8

Browse files
rakudramaCommit Queue
authored andcommitted
[dart2js] Fix ssa tracer
Sometimes the instruction contains newlines (from constant values or abstract values) which leads to malformed .cfg files. Change-Id: I2d8a05c97065fae19c42fd914817ff2b75bc7bf3 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/446360 Commit-Queue: Nate Biggs <[email protected]> Reviewed-by: Nate Biggs <[email protected]> Auto-Submit: Stephen Adams <[email protected]>
1 parent bd691da commit dab1af8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pkg/compiler/lib/src/ssa/tracer.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ class HTracer extends HGraphVisitor with TracerUtil {
101101
addIndent();
102102
String temporaryId = stringifier.temporaryId(instruction);
103103
String instructionString = stringifier.visit(instruction);
104+
instructionString = instructionString.replaceAll('\n', r'\n');
104105
add("$bci $uses $temporaryId $instructionString $changes $depends <|@\n");
105106
}
106107
}

0 commit comments

Comments
 (0)