summaryrefslogtreecommitdiffstats
path: root/compiler
diff options
context:
space:
mode:
authorHiroshi Yamauchi <yamauchi@google.com>2014-02-26 19:15:04 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-02-26 19:15:05 +0000
commit930f7b843ddc6e6530439d3fdb0e2133a6292f1e (patch)
tree19aab2c810b069df6c7ece3fe341dcde222c9a5b /compiler
parentd5846e4b9d654c2a31e4affa3c22c835d2f5e2d6 (diff)
parent9d04a20bde1b1855cefc64aebc1a44e253b1a13b (diff)
downloadart-930f7b843ddc6e6530439d3fdb0e2133a6292f1e.zip
art-930f7b843ddc6e6530439d3fdb0e2133a6292f1e.tar.gz
art-930f7b843ddc6e6530439d3fdb0e2133a6292f1e.tar.bz2
Merge "(Experimental) Add Brooks pointers."
Diffstat (limited to 'compiler')
-rw-r--r--compiler/image_writer.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/image_writer.cc b/compiler/image_writer.cc
index c8447be..aa16885 100644
--- a/compiler/image_writer.cc
+++ b/compiler/image_writer.cc
@@ -583,6 +583,12 @@ void ImageWriter::FixupObject(Object* orig, Object* copy) {
DCHECK(orig != NULL);
DCHECK(copy != NULL);
copy->SetClass<kVerifyNone>(down_cast<Class*>(GetImageAddress(orig->GetClass())));
+ if (kUseBrooksPointer) {
+ orig->AssertSelfBrooksPointer();
+ // Note the address 'copy' isn't the same as the image address of 'orig'.
+ copy->SetBrooksPointer(GetImageAddress(orig));
+ DCHECK(copy->GetBrooksPointer() == GetImageAddress(orig));
+ }
// TODO: special case init of pointers to malloc data (or removal of these pointers)
if (orig->IsClass<kVerifyNone>()) {
FixupClass(orig->AsClass<kVerifyNone>(), down_cast<Class*>(copy));