equal
deleted
inserted
replaced
60 DEBUG_ONLY(Universe::heap()->check_oop_location(v);) |
60 DEBUG_ONLY(Universe::heap()->check_oop_location(v);) |
61 uint64_t pd = (uint64_t)(pointer_delta((void*)v, (void*)base(), 1)); |
61 uint64_t pd = (uint64_t)(pointer_delta((void*)v, (void*)base(), 1)); |
62 assert(OopEncodingHeapMax > pd, "change encoding max if new encoding"); |
62 assert(OopEncodingHeapMax > pd, "change encoding max if new encoding"); |
63 uint64_t result = pd >> shift(); |
63 uint64_t result = pd >> shift(); |
64 assert((result & CONST64(0xffffffff00000000)) == 0, "narrow oop overflow"); |
64 assert((result & CONST64(0xffffffff00000000)) == 0, "narrow oop overflow"); |
65 assert(oopDesc::equals_raw(decode(result), v), "reversibility"); |
65 assert(decode(result) == v, "reversibility"); |
66 return (narrowOop)result; |
66 return (narrowOop)result; |
67 } |
67 } |
68 |
68 |
69 inline narrowOop CompressedOops::encode(oop v) { |
69 inline narrowOop CompressedOops::encode(oop v) { |
70 return is_null(v) ? (narrowOop)0 : encode_not_null(v); |
70 return is_null(v) ? (narrowOop)0 : encode_not_null(v); |