Do swapping correctly.

Make names consistent with master.
Support testing and benchmarking dynamic regexps with a compiler directive.