| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Change-Id: I2c9f95a27ee3881fc609e3e4f1468205c701215d
|
|
|
|
|
| |
Bug: 3045778
Change-Id: Iafb367f97d1fb169c6106adad0525cfcc0e10f25
|
|
|
|
|
|
|
| |
A last-minute bit of Java 6 work...
Bug: 3008411
Change-Id: Ic197de8ddc92afcaa661875a2c99c8352237642a
|
|
|
|
|
|
|
| |
One last little speedup for Formatter %f before I call it a day for now...
Bug: 2934304
Change-Id: I9edd02d1ba8dc40a2b28fea34d7bccf95eeb56ab
|
|
|
|
|
|
| |
We don't want anyone calling us unreformed C programmers...
Change-Id: I79b12245b206495ca747b4027b2bca423c27aec0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After being burned by an incorrect C-style cast that cast away const, I've been
keen to remove them all and turn on -Wold-style-cast. This patch doesn't get us
that far, but it does kill the majority of our C-style casts. In turn, the
majority of the casts that it removes are the ones from our tables of native
methods to be registered.
The new NATIVE_METHOD macro also _enforces_ our convention of using the
"Class_nativeMethod" style of naming. Mostly this works out fine. In some
cases (most notably ExpatParser and ExpatAttributes) I've had to un-overload
a few functions, but I don't like overloading anyway, and in the particular
case of a native method, where the stack trace doesn't show a line number,
overloading makes it one step harder to work out which native method you're
actually in. So good riddance to that. The only unfortunate case is
Math.copySign, where there are two overloads corresponding to copysign(3)
and copysignf(3). I had to add an extra layer of indirection there. In my
defense, we've never shipped these functions before, they're unlikely to
become anyone's hotspot, and the right fix is to be doing such trivial work
on the Java side anyway, with intrinsics making the conversion between
float/double and int/long cheap.
This patch also replaces other C-style casts, primarily in
"OSNetworkSystem.cpp".
This patch also removes unnecessary uses of the "struct" keyword.
This patch also fixes a "may be used uninitialized" warning (now error) in
the sim build for "ICU.cpp".
The remaining C-style casts are in the hairy float-parsing code. That stuff --
and turning on -Wold-style-cast -- will have to wait for another day.
Change-Id: I9b3ee14aefd4676f980f6a7ca757595d78d80e6a
|
|
|
|
| |
Change-Id: I08d7915e22faf091489171240d2f9bf8b3acecca
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This style worked well for ScopedUtfChars. It moves null-pointer checking
inside the class, thereby encouraging us to remember to check for the
unlikely out-of-memory failures too.
I've also broken up some tests that were trying to check multiple scoped
arrays at once. This idiom was broken because as soon as there's a pending
exception, it's a JNI error to even attempt to set up the next scoped
primitive array. In the absence of C++ exceptions, we have to check these
one by one.
Change-Id: I2f4b397ae2873597e309d86fcc5912f3fcf0f304
|
|
|
|
|
|
|
|
|
|
| |
Also fix unused variable warnings in "ExpatParser.cpp".
This fixes one actual bug in the regular expression code where we weren't
returning after throwing an exception from JNI, in a case where executing
the remaining code in the native method would cause a crash.
Change-Id: Ib5ce7ea9a3b6476cf47bda2384d5ba43579c785a
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Initially, I was just fixing a threading bug in NativeDecimalFormat.cpp where
we were bypassing GCC's built-in static initializer thread safety. This led me
to the question of how expensive FindClass is, which led me to creating a new
canonical cache of jclasses.
Here's the motivating benchmark, showing the cost of calling an empty regular
(non-native) method, an empty native method, a native method that calls
FindClass, a native method that calls FindClass and GetFieldID, and a native
method that calls FindClass and GetMethodID:
benchmark ns logarithmic runtime
NoArgsRegular 74 ||||||||||||||
NoArgsNative 428 XX|||||||||||||||||||
FindClass 3064 XXXXXXXXXXXXXXXX|||||||||||
FindClassGetField 3654 XXXXXXXXXXXXXXXXXXX|||||||||
FindClassGetMethod 5634 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Change-Id: I41ab2b347895f043a7e21d8fa19e4541e198c3fc
|
|
|
|
|
|
| |
Also factor it out rather than keep duplicating it.
Change-Id: I6349668f4676f1e0a7dd6fdc101dd1784c5465fb
|
|
|
|
|
|
|
|
|
|
| |
1. Replaced the temp Android patch for BigDecimal support
with ICU APIs.
2. Changed ICU.cpp for resource re-structure in ICU4.4 release.
3. Fixed the test data for NumberFormat test caused by the locale
data changes.
Change-Id: I307e798f1a135a5024a693d23363733d020ed22f
|
|
|
|
| |
Change-Id: Ied76662c470ba878cec61189acf29f5cbbd4ccd4
|
|
Merge xml except xmlpull and kxml into luni
|