diff options
author | Ian Rogers <irogers@google.com> | 2014-01-06 12:55:46 -0800 |
---|---|---|
committer | Ian Rogers <irogers@google.com> | 2014-02-06 23:20:27 -0800 |
commit | ef7d42fca18c16fbaf103822ad16f23246e2905d (patch) | |
tree | c67eea52a349c2ea7f2c3bdda8e73933c05531a8 /runtime/stack_indirect_reference_table.h | |
parent | 822115a225185d2896607eb08d70ce5c7099adef (diff) | |
download | art-ef7d42fca18c16fbaf103822ad16f23246e2905d.zip art-ef7d42fca18c16fbaf103822ad16f23246e2905d.tar.gz art-ef7d42fca18c16fbaf103822ad16f23246e2905d.tar.bz2 |
Object model changes to support 64bit.
Modify mirror objects so that references between them use an ObjectReference
value type rather than an Object* so that functionality to compress larger
references can be captured in the ObjectRefererence implementation.
ObjectReferences are 32bit and all other aspects of object layout remain as
they are currently.
Expand fields in objects holding pointers so they can hold 64bit pointers. Its
expected the size of these will come down by improving where we hold compiler
meta-data.
Stub out x86_64 architecture specific runtime implementation.
Modify OutputStream so that reads and writes are of unsigned quantities.
Make the use of portable or quick code more explicit.
Templatize AtomicInteger to support more than just int32_t as a type.
Add missing, and fix issues relating to, missing annotalysis information on the
mutator lock.
Refactor and share implementations for array copy between System and uses
elsewhere in the runtime.
Fix numerous 64bit build issues.
Change-Id: I1a5694c251a42c9eff71084dfdd4b51fff716822
Diffstat (limited to 'runtime/stack_indirect_reference_table.h')
-rw-r--r-- | runtime/stack_indirect_reference_table.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/runtime/stack_indirect_reference_table.h b/runtime/stack_indirect_reference_table.h index 4c9b038..d22650b 100644 --- a/runtime/stack_indirect_reference_table.h +++ b/runtime/stack_indirect_reference_table.h @@ -19,6 +19,7 @@ #include "base/logging.h" #include "base/macros.h" +#include "stack.h" namespace art { namespace mirror { @@ -33,7 +34,7 @@ class StackIndirectReferenceTable { public: explicit StackIndirectReferenceTable(mirror::Object* object) : number_of_references_(1), link_(NULL) { - references_[0] = object; + references_[0].Assign(object); } ~StackIndirectReferenceTable() {} @@ -53,17 +54,17 @@ class StackIndirectReferenceTable { link_ = sirt; } - mirror::Object* GetReference(size_t i) const { + mirror::Object* GetReference(size_t i) const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { DCHECK_LT(i, number_of_references_); - return references_[i]; + return references_[i].AsMirrorPtr(); } - void SetReference(size_t i, mirror::Object* object) { + void SetReference(size_t i, mirror::Object* object) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { DCHECK_LT(i, number_of_references_); - references_[i] = object; + references_[i].Assign(object); } - bool Contains(mirror::Object** sirt_entry) const { + bool Contains(StackReference<mirror::Object>* sirt_entry) const { // A SIRT should always contain something. One created by the // jni_compiler should have a jobject/jclass as a native method is // passed in a this pointer or a class @@ -89,7 +90,7 @@ class StackIndirectReferenceTable { StackIndirectReferenceTable* link_; // number_of_references_ are available if this is allocated and filled in by jni_compiler. - mirror::Object* references_[1]; + StackReference<mirror::Object> references_[1]; DISALLOW_COPY_AND_ASSIGN(StackIndirectReferenceTable); }; |