R2RDump fixes for dumping method instance entrypoint table (#20243)
authorTomáš Rylek <trylek@microsoft.com>
Thu, 4 Oct 2018 19:29:24 +0000 (21:29 +0200)
committerGitHub <noreply@github.com>
Thu, 4 Oct 2018 19:29:24 +0000 (21:29 +0200)
commit030e0af89bb897554acef575075c69aaf5176268
treeec5d48bdffa8b63e0d011f6b713bd027b235ceaa
parente43bc521df71513061c7194efc4af4c70a1b9b42
R2RDump fixes for dumping method instance entrypoint table (#20243)

R2RDump fixes for dumping method instance entrypoint table

While investigating Michal's unit test demonstrating a bug in the
CPAOT compiler I found out that R2RDump is broken in multiple
aspects w.r.t. instantiated methods. Parsing of the method
signatures in the instance entrypoint table was just broken
and the R2RMethod was duplicating parts of the signature decoding
and name formatting process.

I created a new flag "normalize" that requests normalization of various R2R
tables in the dump aimed at improving diff quality. I have also
noticed and fixed somewhat weird formatting of method signatures.
As a slight cleanup I have lumped the various dump flags into
a helper class DumpOptions. Last but not least I have renamed "Canon"
to "__Canon".

Thanks

Tomas
src/tools/r2rdump/R2RDump.cs
src/tools/r2rdump/R2RMethod.cs
src/tools/r2rdump/R2RReader.cs
src/tools/r2rdump/R2RSignature.cs
src/tools/r2rdump/TextDumper.cs
src/tools/r2rdump/XmlDumper.cs