On 5 Sep 2018, at 15:45, Jeroen Demeyer <J.Demeyer@UGent.be> wrote:
On 2018-09-05 15:19, Hugh Fisher wrote:
And this happens to be exactly what Apple did when they added tagged pointers to Objective-C. They told programmers not to access objectptr->isa directly, instead to use OBJECT_GETCLASS(objectptr). Then later they started implementing some objects as tagged pointers, and only code that hadn't been updated broke. OBJECT_GETCLASS was the "stable ABI"
This is a stable API, but I would guess not a stable ABI. Victor Stinner wants a stable ABI.
object_getClass is stable API on macOS.
The modern ObjC runtime on macOS (x86_64) and iOS (all architectures) was carefully designed to allow for changes like this, the older API exposed low-level implementation details that amongst others make it impossible to implement tagged pointers.
Ronald