Look up generic instantiations through their types, instead of attempting to
do resolution by full name.

--HG--
branch : CacheJuggernaut
Port to llvm 3.2

--HG--
branch : llvm-3.2
Handle the cyclicity problem in meta-data by creating a stub module before
getting dependencies.  The stub module produces associated stub defs that
we'll be able to convert to the actual defs in a fix-up pass.

--HG--
branch : CacheJuggernaut
Replace stubs with actual classes when we finish loading a module.

--HG--
branch : CacheJuggernaut
Restore the parents of an OverloadDef during deserialization.

--HG--
branch : CacheJuggernaut
Fix unit tests, marking modules as "finished".

--HG--
branch : CacheJuggernaut
Put the sort() machinery back in array (I had removed them just for debugging
purposes, and accidentally checked the change in)

--HG--
branch : CacheJuggernaut
extra : transplant_source : %0C%8A%D8%22%8F%8E%3A%09%12%C6%17M%EFW%A4%84%03%B0%3Bx
Replaced the cacheMap with a lazy-resolver.  Unfortunately it doesn't work,
but I think it's a good foundation to build upon.

--HG--
branch : CacheJuggernaut
Deal with cyclc resolution in LLVM by defering resolution of global values in
modules with dependencies on unresolved externals.  This requires that all of
the hidden functions (exception management, argv, etc) be registered.

--HG--
branch : CacheJuggernaut
Cache _Unwind_Resume the same way we do the exception personality func.

--HG--
branch : CacheJuggernaut
Check the resolver for unresolved externals prior to running the main script.
Note: this breaks some new cacher tests, but it's on the branch.  Will fix
these next.

--HG--
branch : CacheJuggernaut
Made the representation of an abstract function a null pointer, which saves us
from creating an unresolved external for them.

--HG--
branch : CacheJuggernaut
Tidied up the tracing a bit, moved output to cerr and wrapped long lines.

--HG--
branch : CacheJuggernaut
Defer vtable construction for a class if any ancestors are stubs.  Fix
generics loaded from a stub so that we don't create a bogus stub generic for a
class that exists.

--HG--
branch : CacheJuggernaut
Do type registration during struct resolution so no other types are reassigned
to the wrong values.

--HG--
branch : CacheJuggernaut
Added some very complicated code to deal with reference cycles by invoking the
linker on the set of modules participating in the cycle.

--HG--
branch : CacheJuggernaut
Added a spug::Tracer class to clean up the way we're doing module tracing.

--HG--
branch : CacheJuggernaut
Do not generate ephemeral modules for generics that are only accessible from
hidden scopes.  Hidden scopes are nested scopes within a module from which
symbols can not be accessed outside of the scope, for example: control
statement blocks and functions.  A generic instantiation is inaccessible if
either the generic is defined in a hidden scope or a parameter of the
instantiation is defined in a hidden scope.

This changes also fixes a reachability bug (types and functions in functions
were not reachable from nested functions) which was hidden by the existing
behavior.

Except for shared library imports, ALL CACHE TESTS NOW PASS!!

--HG--
branch : CacheJuggernaut
Refactored generic instantiation extraction.

--HG--
branch : CacheJuggernaut
Merging CacheJuggernaut branch.