aboutsummaryrefslogtreecommitdiff
path: root/vm/UtfString.h
Commit message (Collapse)AuthorAgeFilesLines
* Make some of the StringObject functions member functions.Elliott Hughes2011-06-171-22/+1
| | | | Change-Id: I72ed13c16f0cb24498772c453ba268a0f65f208a
* Improve reference table dumping.Elliott Hughes2011-06-161-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Show the newest entry first; I always assume the top is the newest. 2. Use human-readable type names. 3. Improve the human-readable type name code to show _which_ Class (i.e. java.lang.Class<java.lang.String> rather than just java.lang.Class). 4. Make it clear when we're reporting the number of elements in an array. 5. Show the first few characters of a string. 6. Show the length of a string if we truncate it. (I've also removed some redundant casts and improved const-correctness.) Example: Last 10 entries in JNI local reference table: 16: 0x40f8ec70 java.lang.String "android.permissi... (41 chars) 15: 0x40f8d450 android.os.Parcel 14: 0x40f8eb90 java.lang.String "BlackSurface" 13: 0x408caca0 android.view.SurfaceSession 12: 0x40f8eb60 android.view.Surface 11: 0x406bc6f0 java.lang.Class<com.android.server.SystemServer> 10: 0x406c0278 java.lang.String "com/android/serv... (31 chars) 9: 0x4015d488 dalvik.system.PathClassLoader 8: 0x40148de8 java.lang.Class<java.lang.ClassLoader> 7: 0x406bc560 java.lang.String[] JNI local reference table summary (17 entries): 6 of java.lang.Class<com.android.server.SystemServer> (5 unique instances) 5 of java.lang.String (5 unique instances) 1 of java.lang.String[] 1 of java.lang.String[] (2 elements) 1 of dalvik.system.PathClassLoader 1 of android.os.Parcel 1 of android.view.SurfaceSession 1 of android.view.Surface Change-Id: I56494104cd0daada3ecc1e610f1c94df1e11c640
* Normalize the include guard style.Carl Shapiro2011-06-141-3/+3
| | | | | | | | | | An leading underscore followed by a capital letter is a reserved name space in C and C++. This change also moves any #include directives within the include guard in some of the compiler/codegen/arm header files. Change-Id: I9715e2c5301699d31886e61d0fe6e29483555a2a
* Use std::string rather than malloc/free for saneDirName.Elliott Hughes2011-06-071-2/+14
| | | | | | Also use std::vector instead of the cutils/array cruft. Change-Id: I273147335cafbac5d336955f53b0b29d015f0589
* Make interned strings non-movable.Carl Shapiro2011-05-051-2/+3
| | | | | | | | | | | | | | At present objects referenced from dex files must have stable reference values. With this change, only non-moving strings are interned. If a user interns a movable string a non-moving copy is made and the copy is added to the intern table. As part of this change, the internal string hash code access routine will update the hash code slot of a string object. In addition, StringObject has been made a subclass of Object eliminating various down-casts that would otherwise be explicitly required. Change-Id: I6b015b972aac44948470c0034ad17e5eef456aeb
* Get rid of uneeded extern, enum, typedef and struct qualifiers.Carl Shapiro2011-04-271-8/+0
| | | | Change-Id: I236c5a1553a51f82c9bc3eaaab042046c854d3b4
* Move the remaining non-compiler VM code into C++.Carl Shapiro2011-04-151-1/+1
| | | | Change-Id: Id8693208d2741c55a7b0474d1264f2112019d11f
* Convert the internal and in-line natives to C++.Carl Shapiro2011-04-121-1/+1
| | | | Change-Id: I2ece682bc3b4d3b55ab27c60fd84a0b3243d7ca6
* Compile the garbage collector and heap profiler as C++.Carl Shapiro2011-04-081-0/+8
| | | | Change-Id: I25d8fa821987a3dd6d7109d07fd42dbf2fe0e589
* Move more system propery handling into managed code.Elliott Hughes2011-02-101-0/+10
| | | | | Bug: 3413364 Change-Id: I044ed1b11e919bb1c589c626b613faf85157fb64
* Add const qualifier to the dvmComputeStringHash signature.Carl Shapiro2010-08-051-1/+1
| | | | Change-Id: Icc963f324ca738438c069e99f346826d7f301095
* Remove the "allocFlags" parameter from dvmCreateStringFromCstr andBarry Hayes2010-06-191-8/+4
| | | | | | | | dvmCreateStringFromCstrAndLength. The only valid argument would be ALLOC_DEFAULT, so drop the parameter. Change-Id: Idf469ef0ec12b0743792fc525e0c53fc7486eab6
* Add inline version of String.indexOf().Andy McFadden2009-09-031-0/+25
| | | | | | | | | | | | 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%.
* Progress toward indirect JNI references.Andy McFadden2009-08-201-0/+5
| | | | | | | | | | | Switch from simple typecasts to conversion functions for the objects passed in and out of JNI calls. No real change here; object references are still just pointers. Use explicit pin/unpin calls for primitive arrays. For GetStringChars we now pin the char[] rather than the String object. (Which doesn't make much difference in the grand scheme of things, since you need to keep the String to pass into the release function anyway.)
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+112
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-112/+0
|
* Initial ContributionThe Android Open Source Project2008-10-211-0/+112