mraleph / irhydra

Tool for displaying IR used by V8 and Dart VM optimizing compilers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rules for source dump character escape changed in V8

mraleph opened this issue · comments

As a result unescaping code

try {
if (lines.length == 1) {
final String line = lines.first;
if (line.contains(r"\x0a")) {
lines = line.replaceAllMapped(new RegExp(r"\\(x[a-f0-9][a-f0-9]|u[a-f0-9][a-f0-9][a-f0-9][a-f0-9])"), (m) => new String.fromCharCode(int.parse(m.group(1).substring(1), radix: 16)))
.split('\n');
}
}
} catch (e) {
print(e);
}

no longer works. It is not obvious to me how to fix this because I don't see a backwards compatible way to detect whether escaping was applied or not.