Move dvmFreeClassInnards responsibility.
The GC has been responsible for ensuring that the "innards" of a
class object are freed before the ClassObject itself is discarded.
Since we don't currently unload classes, this situation can only arise
if something went wrong during the loading of a class (e.g. memory
alloc failure part way through), or another thread loaded the same
class at the same time and won the race. It makes more sense to
have the cleanup occur at the point we decide that our class object
is not useful.
For the most part this was already being done, but there were a couple
of places where it wasn't.
This change
- adds the missing dvmFreeClassInnards calls
- changes the GC code to warn without taking action
- enables the GC code only when assertions are enabled
The code in MarkSweep.c looks like it merits further rearranging, but
I'll leave that to Team GC.
Also, "dalvik_assert" is now only printed on the VM features line when
assertions are enabled.
For bug
2751668.
Change-Id: I90e4455e830766f94f921c7f23b44b423bce3321