[sgen] Fix bridge interop missing some xrefs due to improve registration.
authorRodrigo Kumpera <kumpera@gmail.com>
Tue, 23 Apr 2013 21:04:17 +0000 (17:04 -0400)
committerRodrigo Kumpera <kumpera@gmail.com>
Tue, 23 Apr 2013 21:08:08 +0000 (17:08 -0400)
commit9c0b418df94b3063bfebab38cb4c225ad2fe45ab
treef94af47e34af4af5faf2bb1d78e4bbf0b8239190
parent44f3d6379af3fec7837985344260ed6b76e74f90
[sgen] Fix bridge interop missing some xrefs due to improve registration.

* sgen-bridge.c: Split the registration and dfs1 steps so we avoid issues
where an earlier entry that points to a later one would not have a xref
created between them.

First we insert all bridges into the hash table and then we do dfs1.

It must be done in 2 steps since the bridge arrays doesn't come in reverse topological order,
which means that we can have entry N pointing to entry N + 1.

If we dfs1 entry N before N + 1 is registered we'll not consider N + 1 for this bridge
pass and not create the required xref between the two.
mono/metadata/sgen-bridge.c