summaryrefslogtreecommitdiff
path: root/runtime/mirror/string.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/mirror/string.h')
-rw-r--r--runtime/mirror/string.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/runtime/mirror/string.h b/runtime/mirror/string.h
index 30b8aa3c97..6c22b9b6af 100644
--- a/runtime/mirror/string.h
+++ b/runtime/mirror/string.h
@@ -69,8 +69,6 @@ class MANAGED String FINAL : public Object {
int32_t GetUtfLength() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
- uint16_t CharAt(int32_t index) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
-
String* Intern() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
static String* AllocFromUtf16(Thread* self,
@@ -86,9 +84,14 @@ class MANAGED String FINAL : public Object {
const char* utf8_data_in)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+ // TODO: This is only used in the interpreter to compare against
+ // entries from a dex files constant pool (ArtField names). Should
+ // we unify this with Equals(const StringPiece&); ?
bool Equals(const char* modified_utf8) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
- // TODO: do we need this overload? give it a more intention-revealing name.
+ // TODO: This is only used to compare DexCache.location with
+ // a dex_file's location (which is an std::string). Do we really
+ // need this in mirror::String just for that one usage ?
bool Equals(const StringPiece& modified_utf8)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
@@ -127,6 +130,9 @@ class MANAGED String FINAL : public Object {
static void VisitRoots(RootCallback* callback, void* arg)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+ // TODO: Make this private. It's only used on ObjectTest at the moment.
+ uint16_t UncheckedCharAt(int32_t index) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+
private:
void SetHashCode(int32_t new_hash_code) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
// Hash code is invariant so use non-transactional mode. Also disable check as we may run inside