Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The extra
failCompilation
is no longer needed sinceTR_ASSERT_FATAL
terminates the process.This whole if statement can be simplified to
(The extra "ERROR" at the start of the message adds no value since an assert failure is obviously an error).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent point Leo. Further to that, let's think about what would happen if we hit this assert in the wild. Would there be any other information that we could print that would be helpful in this case? I'd imagine the first thing one may want to know when debugging such a problem is what is the value of
_numPostConditions
? It would be helpful to print that as part of the assert, along with any other information you may think would be useful.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides
_numPostConditions
and_addCursorForPost
, is there anything else that could be useful while debugging? I was just printing those two while debugging a bug ininlineVectorizedStringIndexOf
Could register name be helpful?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the virtual register pointer and name would be very useful, in addition to
_numPostConditions
.