4464a3efcf8dcddfb00d7db0c3add9a7acb6642e |
|
04-Mar-2016 |
Andreas Gampe <agampe@google.com> |
ART: Fix UTF test and monitor pool old chunks Zero-initialize buffers in utf_test. UTF conversion does not append a zero terminator, but the test uses strlen to check the byte count. Move to unique_ptr for storing old monitor-pool chunk data to fix a leak. Bug: 27156726 Change-Id: I14424c6f98cf47beab6243f83a335bd6a682c638
|
91d65e024846717fce3572106cffe9b957b8902c |
|
19-Jan-2016 |
Roland Levillain <rpl@google.com> |
Fix various typos in ART's comments and string literals. Change-Id: I85d628055b1a61647a77fef730c9631c234e22a2
|
e3bbc3f5ca5dc0fd6e03cacf98f3c9ac802063c1 |
|
25-Nov-2015 |
Vladimir Marko <vmarko@google.com> |
ART: Improve utf_test for unpaired surrogates. This is a follow-up to https://android-review.googlesource.com/180986 Change-Id: I8982a63c0ec48bf3b3198c278a96be7b5dfc2152
|
1646d7a22e43a1fb25452ead47a4073e63d7f391 |
|
28-Oct-2015 |
Bruce Hoult <b.hoult@samsung.com> |
Optimize some commonly used utf8 functions by: - using counted loops instead of searching for terminating null. In the important cases the caller already knows the length: change the API to pass it in. Keep the old API version as well to avoid extensive changes to non-critical debug and test code. - ensure the common cases are at the start of if/then/else chains. Usually 99+% of characters are ASCII even in mixed strings. - for the "convert" functions, when both utf8 and utf16 lengths are passed, and are equal, it means the entire string is ASCII, and a specialized loop can be used. The compiler might then unroll or even vectorize this. The functions improved are (tested on Nexus 5 with a 44 character ASCII string): CountModifiedUtf8Chars : 20% faster ConvertUtf16ToModifiedUtf8: 80% faster ConvertModifiedUtf8ToUtf16: 200% faster Also for completeness CountUtf8Bytes has been cleaned up a little, but the speed is unchanged. Unlike CountModifiedUtf8Chars, it was already passed the length, rather than searching for null. Change-Id: I1c9b7dea3eda869fc9f5f6b4dd6be8cdd5bc3ac0
|
e16dad1d6388b0305f13e2171308a77f42e7c682 |
|
13-Feb-2015 |
Narayan Kamath <narayan@google.com> |
Emit 4 byte UTF-sequences in place of encoded surrogate pairs. Symmetric with a5afcfc73141e5e378d79a326d0 which converts 4 byte UTF-8 sequences to surrogate pairs. bug: 18848397 Change-Id: I42adc275b7e0df0cbbd9d8a799e8b0447d8f5cae
|
a5afcfc73141e5e378d79a326d02c5c2039fb025 |
|
29-Jan-2015 |
Narayan Kamath <narayan@google.com> |
Be more lenient with 4 byte UTF-8 sequences. Accept 4 byte sequences and convert them into surrogate pairs instead of expecting 2 separate 3 byte sequences each encoding one half of a surrogate pair. Note that in addition to supporting 4 byte sequences in strings from JNI, we also tolerate them in dex files. This is mainly for consistency, and there's no need to claim any sort of official support. bug: 18848397 bug: https://code.google.com/p/android/issues/detail?id=81341 Change-Id: Ibc98d29e59d98803e640f2489ea4c56912a59b29
|