Use BasicInfo.resetIds

Change-Id: I69770f2d4f2e24b25cbeff644747ef605e14d4b9
Reviewed-on: https://dart-review.googlesource.com/c/85167
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
This commit is contained in:
Johnni Winther 2018-11-23 08:51:52 +00:00 committed by commit-bot@chromium.org
parent 4a641a69fc
commit bb4e2388b8
2 changed files with 14 additions and 19 deletions

View file

@ -545,9 +545,7 @@ class DumpInfoTask extends CompilerTask implements InfoReporter {
OutputType.dumpInfo)
..add(jsonBuffer.toString())
..close();
// TODO(johnniwinther): Reenable this when package:dart2js_info have
// stable ids.
//BasicInfo.resetIds();
BasicInfo.resetIds();
});
}

View file

@ -73,22 +73,19 @@ runTest(
String newCode = newFileMap[fileName];
bool Function(int, List<String>, List<String>) filter;
if (outputType == OutputType.dumpInfo) {
return;
// TODO(johnniwinther): Reenable this when package:dart2js_info have
// stable ids.
//filter = (int index, List<String> lines1, List<String> lines2) {
// if (index <= lines1.length && index <= lines2.length) {
// String line1 = lines1[index];
// String line2 = lines2[index];
// for (String exception in dumpInfoExceptions) {
// if (line1.trim().startsWith(exception) &&
// line2.trim().startsWith(exception)) {
// return true;
// }
// }
// }
// return false;
//};
filter = (int index, List<String> lines1, List<String> lines2) {
if (index <= lines1.length && index <= lines2.length) {
String line1 = lines1[index];
String line2 = lines2[index];
for (String exception in dumpInfoExceptions) {
if (line1.trim().startsWith(exception) &&
line2.trim().startsWith(exception)) {
return true;
}
}
}
return false;
};
}
int failureLine =
checkEqualContentAndShowDiff(code, newCode, filter: filter);