Rewrite stackmap verification code.

The new version is more complicated but it gives much higher
confidence about the correctness of the stackmap encoding.

The old version was comparing the internal builder entries to the
decoded information, which verified the bit-level manipulations,
but it did not verify that we created the internal state correctly.

The new version directly compares the parameters passed to the
StackMapStream and the decoded values. This way, it really tests
the whole system. It uses lambda captures to record the parameters.

Test: test-art-host-gtest-stack_map_test
Change-Id: Ib92819cc35ce0d790128392d303f6feabd7d9c74
2 files changed