summaryrefslogtreecommitdiff
path: root/src/object.h
diff options
context:
space:
mode:
author Ian Rogers <irogers@google.com> 2012-10-31 16:47:30 -0700
committer Android (Google) Code Review <android-gerrit@google.com> 2012-10-31 16:47:31 -0700
commit332f6827edf72f9b3d247a6c2fa79e4d520a409d (patch)
treef91c0c46526cbce22792940bf3408279f005608c /src/object.h
parent701f0e08b9233306efc6daf2206f80f5d8260149 (diff)
parente35517ad40e0713df8420aeb5d3540f146a59f62 (diff)
Merge "Remove disable card marks, fix SetPatchLocation." into dalvik-dev
Diffstat (limited to 'src/object.h')
-rw-r--r--src/object.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/object.h b/src/object.h
index 61fa3357dd..87f132e458 100644
--- a/src/object.h
+++ b/src/object.h
@@ -1142,6 +1142,10 @@ class MANAGED ObjectArray : public Array {
// circumstances, such as during boot image writing
void SetWithoutChecks(int32_t i, T* object) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+ // Set element without bound and element type checks, to be used in limited circumstances, such
+ // as during boot image writing. Does not do write barrier.
+ void SetPtrWithoutChecks(int32_t i, T* object) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+
T* GetWithoutChecks(int32_t i) const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
static void Copy(const ObjectArray<T>* src, int src_pos,
@@ -2262,6 +2266,13 @@ void ObjectArray<T>::SetWithoutChecks(int32_t i, T* object) {
}
template<class T>
+void ObjectArray<T>::SetPtrWithoutChecks(int32_t i, T* object) {
+ DCHECK(IsValidIndex(i));
+ MemberOffset data_offset(DataOffset(sizeof(Object*)).Int32Value() + i * sizeof(Object*));
+ SetFieldPtr(data_offset, object, false);
+}
+
+template<class T>
T* ObjectArray<T>::GetWithoutChecks(int32_t i) const {
DCHECK(IsValidIndex(i));
MemberOffset data_offset(DataOffset(sizeof(Object*)).Int32Value() + i * sizeof(Object*));