use arrays rather than lists in testing code equivalence
Summary:
Semdiff used to represent function/method bodies as lists of instructions, using linear-time access to
each instruction and making the whole thing quadratic. This changes that to use arrays instead.
The biggest change is in the pattern-matching for special sequences of instructions. That used to drop the
head of the list up to the point we're looking at and then just using ordinary OCaml matching on lists. Now
there's a tiny combinator library for matching patterns in arrays (and pairs of arrays).
Reviewed By: hubyrod
Differential Revision:
D5190479
fbshipit-source-id:
2f569a3086c5629f809ac0f3252427267a12a08f