diff options
author | 2013-01-24 12:42:14 -0800 | |
---|---|---|
committer | 2013-01-30 16:48:31 -0800 | |
commit | 2dd0e2cea360bc9206eb88ecc40d259e796c239d (patch) | |
tree | 9d619dc9508cbe73e4793bf6f08cbc761abfb48a /src/heap_test.cc | |
parent | ac21b797b3a425975d656d6b84a7b24401d35f42 (diff) |
Directory restructuring of object.h
Break object.h into constituent files.
Reduce number of #includes in other GC header files.
Introduce -inl.h files to avoid mirror files #include-ing each other.
Check invariants of verifier RegTypes for all constructors.
Change-Id: Iecf1171c02910ac152d52947330ef456df4043bc
Diffstat (limited to 'src/heap_test.cc')
-rw-r--r-- | src/heap_test.cc | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/heap_test.cc b/src/heap_test.cc index 6db7416d06..79cc835471 100644 --- a/src/heap_test.cc +++ b/src/heap_test.cc @@ -15,6 +15,11 @@ */ #include "common_test.h" +#include "gc/card_table-inl.h" +#include "gc/space_bitmap-inl.h" +#include "mirror/class-inl.h" +#include "mirror/object-inl.h" +#include "mirror/object_array-inl.h" #include "sirt_ref.h" namespace art { @@ -37,12 +42,12 @@ TEST_F(HeapTest, GarbageCollectClassLinkerInit) { ScopedObjectAccess soa(Thread::Current()); // garbage is created during ClassLinker::Init - Class* c = class_linker_->FindSystemClass("[Ljava/lang/Object;"); + mirror::Class* c = class_linker_->FindSystemClass("[Ljava/lang/Object;"); for (size_t i = 0; i < 1024; ++i) { - SirtRef<ObjectArray<Object> > array(soa.Self(), - ObjectArray<Object>::Alloc(soa.Self(), c, 2048)); + SirtRef<mirror::ObjectArray<mirror::Object> > array(soa.Self(), + mirror::ObjectArray<mirror::Object>::Alloc(soa.Self(), c, 2048)); for (size_t j = 0; j < 2048; ++j) { - array->Set(j, String::AllocFromModifiedUtf8(soa.Self(), "hello, world!")); + array->Set(j, mirror::String::AllocFromModifiedUtf8(soa.Self(), "hello, world!")); } } } @@ -53,7 +58,7 @@ TEST_F(HeapTest, HeapBitmapCapacityTest) { byte* heap_begin = reinterpret_cast<byte*>(0x1000); const size_t heap_capacity = SpaceBitmap::kAlignment * (sizeof(intptr_t) * 8 + 1); UniquePtr<SpaceBitmap> bitmap(SpaceBitmap::Create("test-bitmap", heap_begin, heap_capacity)); - bitmap->Set(reinterpret_cast<const Object*>(&heap_begin[heap_capacity - SpaceBitmap::kAlignment])); + bitmap->Set(reinterpret_cast<const mirror::Object*>(&heap_begin[heap_capacity - SpaceBitmap::kAlignment])); } } // namespace art |