You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
The fast paths follow the pattern that we established for fast ARC: Framework base classes can opt in by implementing a `+_TrivialAllocInit` method. This opt-in behaviour is inherited and is removed implicitly in any subclass that implements alloc or init methods (alloc and init are treated independently). Compilers can emit calls to `objc_alloc(cls)` instead of `[cls alloc]`, `objc_allocWithZone(cls)` instead of `[cls allocWithZone: NULL]`, and `objc_alloc_init` instead of `[[cls alloc] init]`. Direct methods don't require very much support in the runtime. Apple reuses their fast path for `-self` (which is supported only in the Apple fork of clang, not the upstream version) for a fast init. Given that the first few fields of the runtime's class structure have been stable for around 30 years, I'm happy moving the flags word (and the initialised bit, in particular) into the public ABI. This lets us do a fast-path check for whether a class is initialised in class methods and call `objc_send_initialize` if it isn't. This function is now exposed as part of the public ABI, it was there already and does the relevant checks without invoking any of the message-sending machinery. Fixes #165 #169 |
2 years ago | |
|---|---|---|
| .. | ||
| Availability.h | 8 years ago | |
| Object.h | 13 years ago | |
| Protocol.h | 13 years ago | |
| blocks_private.h | 13 years ago | |
| blocks_runtime.h | 7 years ago | |
| capabilities.h | 7 years ago | |
| developer.h | 13 years ago | |
| encoding.h | 5 years ago | |
| hooks.h | 2 years ago | |
| message.h | 2 years ago | |
| objc-api.h | 13 years ago | |
| objc-arc.h | 7 years ago | |
| objc-auto.h | 13 years ago | |
| objc-class.h | 9 years ago | |
| objc-exception.h | 2 years ago | |
| objc-runtime.h | 9 years ago | |
| objc-visibility.h | 7 years ago | |
| objc.h | 16 years ago | |
| runtime-deprecated.h | 2 years ago | |
| runtime.h | 2 years ago | |
| slot.h | 7 years ago | |
| toydispatch.h | 15 years ago | |