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.
David Chisnall 377a81d237 Add support for fast-path alloc / init methods and direct methods.
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
..
RuntimeTest.xcodeproj libobjc2: add Xcode project for RuntimeTest 16 years ago
ARCTest_arc.m Fix weak ref handling during dealloc (#215) 4 years ago
AllocatePair.m Unregister classes when deleting them. 8 years ago
AssociatedObject.m Use const pointers for associated object keys. 7 years ago
AssociatedObject2.m Fix compiler warnings. 7 years ago
BlockImpTest.m Updated BlockImpTest asserts. Fixes #126 6 years ago
BlockTest_arc.m Fix a bug with blocks in ARC mode being incorrectly released. 13 years ago
BoxedForeignException.m More header cleanups in the tests. 13 years ago
CMakeLists.txt Add support for fast-path alloc / init methods and direct methods. 2 years ago
CXXException.cc Fix build failure in test. 7 years ago
CXXException.m Remove a broken assertion. 7 years ago
Category.m Refactor to use `objc_method` as the slot. 8 years ago
ConstantString.m Support new NSConstantString format and update tests. 8 years ago
DirectMethods.m Add support for fast-path alloc / init methods and direct methods. 2 years ago
ExceptionTest.m Fix compiler warnings. 7 years ago
FastARC.m Add test for checking whether a class supports fast ARC. 6 years ago
FastARCPool.m Fix autorelease pool emptying when new references are added (#218) 4 years ago
FastPathAlloc.m Add support for fast-path alloc / init methods and direct methods. 2 years ago
FastRefCount.m Strong retain calls should always return the instance pointer. 5 years ago
ForeignException.m Implemented the new exception ABI, and a load of tests for it. This is used by 13 years ago
Forward.m Make the forwarding test use the forward2 hook. 10 years ago
ForwardDeclareProtocol.m Fix test for clang 8. 7 years ago
ForwardDeclareProtocolAccess.m Fix test for clang 8. 7 years ago
GNUmakefile libobjc2: add a Test subdirectory with a preliminary test of the runtime API 16 years ago
IVarOverlap.m Remove another unused build-breaking header. 9 years ago
IVarSuperclassOverlap.m Fix compiler warnings. 7 years ago
ManyManySelectors.m Skip tests using objc_msgSend if not available (#263) 2 years ago
MethodArguments.m Don't use an obsolete header in a test. 10 years ago
NestedExceptions.m Initial pass at Windows support. 8 years ago
NilException.m Check other exception handlers that should/shouldn't catch nil. 10 years ago
ObjCXXEHInterop.m Rework C++ exception interop again. 6 years ago
ObjCXXEHInterop.mm Rework C++ exception interop again. 6 years ago
ObjCXXEHInteropTwice.mm tests: Test that we can throw and catch the same exception multiple times sequentially. (#188) 4 years ago
ObjCXXEHInterop_arc.m Add missing files. 6 years ago
ObjCXXEHInterop_arc.mm Add missing files. 6 years ago
PropertyAttributeTest.m Modernise CI 3 years ago
PropertyIntrospectionTest.m More header cleanups in the tests. 13 years ago
PropertyIntrospectionTest2_arc.m Fix upgrading legacy properties with qualifiers. 7 years ago
ProtocolCreation.m Fix compiler warnings. 7 years ago
ProtocolExtendedProperties.m Improve protocol method metadata. 8 years ago
ResurrectInDealloc_arc.m Allow ARC to correctly handle references to self from blocks within -dealloc. 12 years ago
RuntimeTest.m Fix building the runtime test on Windows. 8 years ago
SuperMethodMissing.m Fix invoking missing superclass methods. 6 years ago
Test.h Add support for fast-path alloc / init methods and direct methods. 2 years ago
Test.m Add support for fast-path alloc / init methods and direct methods. 2 years ago
UnexpectedException.m Use C++ exceptions unconditionally for Objective-C[++] on MinGW (#267) 2 years ago
WeakBlock_arc.m Fix ARC assignment of blocks. 10 years ago
WeakImportClass.m Add missing file. 8 years ago
WeakRefLoad.m Add test case for weak ref issue. 6 years ago
WeakReferences_arc.m Fix a bug in weak reference handling, where weak refers were being removed from 12 years ago
alias.m Add support for registering aliases. 8 years ago
alignTest.m Make alignTest pass on ARM. 7 years ago
category_properties.m fix test for class properties 6 years ago
exchange.m Add test for #32. 9 years ago
hash_table_delete.c Fix warnings in test. 8 years ago
hash_test.c Fix an off-by-one error in the hash table. 8 years ago
ivar_arc.m Fix a segfault on (s|g)etting ivars. 10 years ago
ivar_atomic.m Added test for atomic ivars. 7 years ago
minRep1.mm Delete a lot of redundant code. 8 years ago
msgInterpose.m Fix include to work with make. 13 years ago
objc_msgSend.m Skip tests using objc_msgSend if not available (#263) 2 years ago
setSuperclass.m Fix compiler warnings. 7 years ago
zeroSizedIVar.m Fix compiler warnings. 7 years ago