Mercurial > hg > truffle
comparison src/share/vm/oops/oop.inline.hpp @ 12873:4e7f99b70d9d
Merge
author | adlertz |
---|---|
date | Wed, 09 Oct 2013 05:03:34 -0700 |
parents | 190899198332 |
children | cefad50507d8 3205e78d8193 |
comparison
equal
deleted
inserted
replaced
12872:98692a2d36d7 | 12873:4e7f99b70d9d |
---|---|
181 // Algorithm for encoding and decoding oops from 64 bit pointers to 32 bit | 181 // Algorithm for encoding and decoding oops from 64 bit pointers to 32 bit |
182 // offset from the heap base. Saving the check for null can save instructions | 182 // offset from the heap base. Saving the check for null can save instructions |
183 // in inner GC loops so these are separated. | 183 // in inner GC loops so these are separated. |
184 | 184 |
185 inline bool check_obj_alignment(oop obj) { | 185 inline bool check_obj_alignment(oop obj) { |
186 return (intptr_t)obj % MinObjAlignmentInBytes == 0; | 186 return cast_from_oop<intptr_t>(obj) % MinObjAlignmentInBytes == 0; |
187 } | 187 } |
188 | 188 |
189 inline narrowOop oopDesc::encode_heap_oop_not_null(oop v) { | 189 inline narrowOop oopDesc::encode_heap_oop_not_null(oop v) { |
190 assert(!is_null(v), "oop value can never be zero"); | 190 assert(!is_null(v), "oop value can never be zero"); |
191 assert(check_obj_alignment(v), "Address not aligned"); | 191 assert(check_obj_alignment(v), "Address not aligned"); |