OSDN Git Service

Add inline version of String.indexOf().
authorAndy McFadden <fadden@android.com>
Thu, 3 Sep 2009 01:07:23 +0000 (18:07 -0700)
committerAndy McFadden <fadden@android.com>
Thu, 3 Sep 2009 19:22:51 +0000 (12:22 -0700)
commit59a434629ba06d4decf7bc88a62ae370a1935f0e
tree3b53b83996a3f8057f75716d84c74cb7acd23d67
parent06f4a19f3c6d6503e936d252fb80d6ca57b29392
Add inline version of String.indexOf().

This provides an inline-native version of String.indexOf(int) and
String.indexOf(int, int), i.e. the functions that work like strchr().
Has a fairly solid impact on specific benchmarks.  Might give a boost to
an app somewhere.

Added some indexOf tests to 020-string.

Added hard-coded field offsets for String.  These are verified during
startup.  Improves some of our String micro-benchmarks by ~10%.
tests/020-string/expected.txt
tests/020-string/src/Main.java
vm/DalvikVersion.h
vm/InlineNative.c
vm/UtfString.c
vm/UtfString.h