Make consistent use of core_jni_helpers for registration.
Translate some #ifdefs into const bools.
Change-Id: I37639aa053dd50f003a552cbd8550dddecc811c5
C++11 defines a real char16_t, which is not implicitly convertible to
uint16_t (and by extension jchar). Add casts as needed.
Bug: 18300613
Change-Id: I00752002ef2e938bdb57f70947e8fd53ec103293
Broken by
https://android-review.googlesource.com/#/c/115446/
This change fixes it by correctly putting the zygote in Dalvik Heap
instead of Dalvik Other.
Bug: 18447855
(cherry picked from commit 7fc9176c8a2102fb5be3668404bd15feb6878c89)
Change-Id: I9293e5d3f55ccfb2c93c6aacbf6abc164eacb10b
Do not use LOG_FATAL_IF in JNI setup. This is one-time on startup
and important enough to always check.
Add a header with common helper definitions. Move to inlined functions
instead of macros to clean up the code.
Change-Id: Ib12d0eed61b110c45d748e80ec36c563e9dec7e5
Let AndroidRuntime check for /system/etc/compiled-classes and push
it to the runtime for boot image creation.
Bug: 18410571
(cherry picked from commit ca775941f3b7981aabf3a6a3b84d6c94f4f76aff)
Change-Id: I2510316381f2661166af24d7e14b013f4e045556
Use standard initializers rather than GNU extension initializers to
prevent clang from spewing warnings about nonstandard code.
BUG: 18193625
Change-Id: I19bf7fe9c401534af82d5a08e68fbd486bec8351
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
Since != has priority over &, the "if ((mode&PROC_QUOTES != 0))" check
is the same as "if (mode & (PROC_QUOTES!=0))" - not what the code
intends.
Change-Id: I14840a887f26c28f2bd0aee8704c79cf353164ad
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
Change AndroidRuntime::startVM to give the new standalone
preloaded-classes file to the runtime for compilation of images.
Bug: 18305157
(cherry picked from commit 995c62d6abd4b7080e52a60d1bffa32ae4a798a3)
Change-Id: I32a13357893222b25fbce60bf2367c23fb36ab22
Turn on -Wall -Werror in core/jni. Fix warnings.
Clang TODO: For GCC we need to turn off Wunused-but-set-variable in
the GL bindings. However, Clang doesn't have that warning and thus
complains about an unknown pragma. It is necessary to make the
pragma #ifdef-ed on the compiler being GCC.
Change-Id: I14cab48d45c2771eef0432082356c47ed44a3d7f
On modern versions of Android running in AOT mode
FloatMath is slower than Math. Calls to Math.sqrt(),
etc. are replaced by intrinsics which can be as small
as a single CPU opcode.
When running in interpreted mode the new
implementation is unfortunately slower, but I'm
judging this acceptable and likely to be improved
over time. This change saves a small amount of native
code.
Example timings:
Mako AOSP AOT:
Method: Original / New / Direct call to Math
ceil: 596ns / 146.ns / 111ns
sqrt: 694ns / 56ns / 25ns
Mako AOSP interpreted:
Method: Original / New / Direct call to Math
ceil: 1900ns / 2307ns / 1485ns
sqrt: 1998ns / 2603ns / 1788ns
Other calls Mako AOT:
Method: Original / New
cos: 635ns / 270ns
exp: 566ns / 324ns
floor: 604ns / 150ns
hypot: 631ns / 232ns
pow: 936ns / 643ns
sin: 641ns / 299ns
The advice to use Math directly, in preference to
FloatMath, is still good. FloatMath will be deprecated
separately.
Bug: https://code.google.com/p/android/issues/detail?id=36199
Change-Id: If07fcbd78543d13bc6d75f9743f999860e8d58d7