Other |
---|
tbdResolved |
Duplicate :
|
|
Relates :
|
For some ancient reason markOop inherits from oopDesc, while not being an oop at all. This is very confusing, and even misleading since you cannot actually call methods from oopDesc on a markOop because markOop is in essence nothing but an integer. Further, to avoid name clashes, naming to access the values encoded in this integer is somewhat unnatural or incomplete. I.e. it would be much better if for example it were possible to retrieve the forwarding pointer using a forwardee() method (instead of oop_decode_pointer() because forwardee() is already taken from oopDesc), or is_forwarded() instead of is_marked() because of the same reason. Remove this inheritance relation, and introduce nice method names to retrieve the components of the various fields and their overloads.