From: Eliot M. <mo...@cs...> - 2011-09-15 23:08:14
|
Digging further into Sun's Unsafe: I would suggest that staticFieldBase simply always return the JTOC pointer. Then objectFieldOffset can return the offset of the static field's JTOC slot for a static field. But you still have to be careful to use the proper base (the staticFieldBase or the object) to go with an offset (for static or instance field, respectively). Hope this helps -- Regards -- EM |