Some changes added to compile and run with Java 6 and Java 7.

* correction of errors with Javac 6:
- target 1.5 and source empty.

Change-Id: I10dce12261b96a421923d775bea9f2eeac8638cf
Remove possilbe leaks in dalvik.

Add missing free() calls.

Change-Id: Id602b84ba8f15fef1851f37e3d5aac214ac67de1
Remove dead code.

Change-Id: I56c27c510c8fc0ba2d8e691c788b433dce250f7a
Possible leak in dvmAllocRegion

In error case mmapped ptr 'base' is not munmapped.

Change-Id: I9e43841371fee6b7c092fe9a8922ae82e78805ed
Fix dalvik's use of readdir_r(3).

Change-Id: Ic2c9b88b2b3204b4c02f4838766dc4d9ebad06a2
Don't cache failures in the interface cache.

If we try to reuse a failure, we'll be holding a NULL Method* without
the current thread having the appropriate exception pending, which will
lead to a SIGSEGV.

I've added a corresponding vm-test to cts/.

Bug: http://code.google.com/p/android/issues/detail?id=29358
Change-Id: I044e438c46fce256c8eff2dac5d86778734d5614
dalvik: Fix compile failures with -DNDEBUG and gcc >= 4.6

With -DNDEBUG and -DLOG_NDEBUG, assert() and friends are defined to
nothing - causing variables that are used only in the context of assert
or logging to be defined, but not used, resulting in a build failure
if -Werror is enabled.

Change-Id: I3a8edba2aaf0a821e49f6719f966607557900b7c
Remove dvmFindInterfaceMethodInCache2.

We can just use dvmFindInterfaceMethodInCache directly.

Change-Id: I32f6afc0762751c616a999fc46aab5ba9c7e08b7
dalvik/libdex: Don't reduce optimization level to -O2

Don't reduce optimization level to -O2: It's sufficient to disable
function inlining

Change-Id: I2b89ddf279631b3c6ebe89b578c48b0013d16ca2
ExceptionInInitializerError should wrap only non Error exceptions.

Backport from dalvik-dev, due to customer demand.

Bug: http://code.google.com/p/android/issues/detail?id=41196
Change-Id: I53ef57e54983f2173546463ac78e265ff5dd3284
Fix handling of annotations whose classes are missing at runtime.

Bug: http://code.google.com/p/android/issues/detail?id=39854
Change-Id: I3089b693ff3084b093f991f991ac9273dea7356d
Use ALOGE rather than SLOGE for mountEmulatedStorage failures.

Otherwise the actual failure isn't in logcat, and all you see there
is the rather confusing:

  E dalvikvm: cannot mountExternalStorage(): Success

Change-Id: I10c96748b5ff5b6c3877312e7bdb2641026b4489
Merge branch 'jb-dev' into jbdev