Fix host-run-test-jar to be legal for /bin/sh

At least on my machine, /bin/sh complains about the [[ line.
Rewrite as a standard shell 'if'

Change-Id: I68efc4ceab8e2eb5636fa04ce8877883a4d76998
Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
Fix NewLocalRef, NewGlobalRef to handle cleared weak globals.

We were not checking for null after decoding the reference, this
meant that we incorrectly created null weak global references instead
of returning null.

Issue: 63929
Change-Id: I9159682e6edad8f415ef8144fc13b9aedd2cceb4
Add stale weak global unit test to jni_internal_test.

Prevents regressions related to:
https://code.google.com/p/android/issues/detail?id=63929

Change-Id: I4a3dbb2765523eac47e308fbdefa9558a38d346d
Add classes that fail verification early to rejected class list.

Change-Id: I5e06ec2dc3dfd061fcd6c099e10991482a1aaf65

Conflicts:
	runtime/verifier/method_verifier.cc
JNI: NewDirectByteBuffer should allow 0 length buffers.

This makes the implementation symmetric with direct
buffers allocated from java.

- GetDirectBufferAddress returns the address of the buffer
  passed in to NewDirectByteBuffer (and not NULL).
- GetDirectBufferCapaticy returns 0.

bug: https://code.google.com/p/android/issues/detail?id=63055
Change-Id: I55b24623ec4f7670972fed898ea097934c6c0b5f

Conflicts:
	test/JniTest/JniTest.java
	test/JniTest/jni_test.cc
Change safecast data from set to an ordered vector.

This saves memory and improves performance.

Bug: 12167380
Change-Id: Ica8d9291cdd515e8eab03814fb75a85d424eb629

Conflicts:
	compiler/dex/verified_methods_data.h
Avoid inliner spam wrt String.length.

Also, remove a use of std::map for our preferred SafeMap and be more explicit
with types.

Change-Id: I7b9a4bb1f73c22490fe416503e050671e7c99fe0

Conflicts:
	compiler/dex/quick/dex_file_method_inliner.cc
Remove duplicate/unnecessary code from ClassLinker.

Change-Id: I986c3aa36cb63ae5ea099680e8e4c42bdf891ef1

Conflicts:
	runtime/class_linker.cc
Add verification stress test.

This is more a benchmark than a real test. It highlights a pattern where Art's
verifier is currently slower than Dalvik's verifier.

Bug: 12126841
Change-Id: I1ed6466798696b0aa04b94edac2d2b9d0015c6a2
Fix run-test 303-verification-stress.

Bug: 12439831
Change-Id: I3d3fc0978543ae8c6fc76d88b9edece1e17bc7ce