[jsc-dev] PFR: Add BinarySnippetTester for verifying binary snippet fast path results.
mark.lam at apple.com
Thu Dec 17 23:39:54 PST 2015
When implementing binary snippets for each operation, I have had to use such a test mechanism to catch and debug cases where the snippet was computing a faulty result. The mechanism was implemented quickly for ad-hoc testing at the time, but I recently found that I had to re-implement it again when I revised some snippet code to support more accurate type profiling for DFG type prediction. So, instead of having to re-invent this mechanism over and over again, I decided to formalize it and land it to facilitate on-going snippet work (starting with the type profiling work).
This code has been tested on x86_64 and x86. It is compile time disabled by default. It doesn’t make sense to run it always (even on a debug build) because it’s slow. It should only be enabled locally to run for manual testing when snippet code is modified. Because it is compile time disabled, it should have no perf impact at all when disabled.
Please take a look. Thanks.
More information about the jsc-dev