-
Notifications
You must be signed in to change notification settings - Fork 80
ObjectReference should be opaque #686
Description
ObjectReference is supposed to be an opaque type defined by the VM.
However, it has not been consistently implemented this way, with some points in the code assuming that it is an address.
This is a case of abstraction leakage. The way the runtime encodes an object reference should be opaque to MMTk. This has been the design intention since the original MMTk. This opacity should not come at any cost due to MMTk's design. In the case of a VM for which an ObjectReference encoded as the address of the start of the object, then the conversion will cost nothing. For other VMs (such as JikesRVM) which have a constant offset, then the conversion will cost an addition. For VMs that use an indirection (ie a handle) the conversion will cost an indirection.