7 Commits (4891eb9d5f1201ed833ec4d3dbf7fcac0f6e3cc6)

Author SHA1 Message Date
David Chisnall a9a2ed6b10 Refactor to use `objc_method` as the slot.
This change set incorporates a number of changes that all needed to
happen together:

 * The imp is now the first field of the `objc_method` structure.  This
   makes it possible to extend the structure without breaking anything
   that relies on being able to access the IMP.
 * There is no owner in the slot, so we must use other mechanisms for
   determining the owner of a method (e.g. whether the same method appears
   in the superclass)
 * Again, because there is no owner in the slot, we can't use this as a
   fast path for finding the C++ construct / destruct methods.  These are
   now cached in the class structure when they are found.
 * The version field is gone from the slot and now we provide a global
   version.  This is based on the observation that method replacements
   are relatively infrequent and the overhead of invalidating all method
   caches is cheaper than adding extra state for every (class, method)
   pair.
 * A number of the runtime functions are simplified because replacing
   the IMP in a `Method` now implicitly updates the dtable.
8 years ago
David Chisnall c3c81796ca Rework slot handling so that the fields that are used for dispatch are
at the start of the structure, making it easier to change the layout in
the future.

Also clean up the growth of various fields and consolidate some of the
metadata into a pointer to the `struct objc_method`.
10 years ago
theraven 12385fcb1e Tidy up low memory profile to use slots directly. 15 years ago
theraven 535ba87a8e Store the selector, not the type encoding, in slots. 15 years ago
theraven 62536ce247 Added more header comments. 15 years ago
theraven b1b9baf382 Finished rewrite of message sending. Deleted lots of legacy stuff. 16 years ago
theraven 0957cbe425 Factored out dtable stuff into dtable_legacy.c so that it can be replaced and so that we can do some profiling of the replacement to make sure it doesn't introduce performance regressions. 16 years ago