132 Commits (f392ff18708944a768d3eb19ef87863f7568ffb0)

Author SHA1 Message Date
David Chisnall d015f0160c Rename PUBLIC to OBJC_PUBLIC to avoid some namespace pollution. 7 years ago
David Chisnall 70a12d3612 Apparently PUBLIC doesn't mean what I think it means.
It probably should be renamed OBJC_PUBLIC anyway, because it's a bit
rude to leak an identifier like that into the global namespace.
7 years ago
David Chisnall 4a8d125b3f Fix linkage type for objc_method_cache_version.
This was accidentally common linkage, so ended up with copy relocations.
7 years ago
David Chisnall da5e411d24 Add two Apple-compatible block introspection functions. 7 years ago
David Chisnall a9acb9c5b6 Add missing file. 8 years ago
David Chisnall 934cd13a7a Initial pass at Windows support.
All tests now pass with the new ABI on x86-64, with the new ABI.  Some
of the code is ugly and other platforms are probably broken.
8 years ago
David Chisnall 4e9fd2ec8a Rename objc_slot and objc_slot_v1.
The objc_slot type was exposed via public interfaces and the renaming
broke things (including the GNUstep build).
8 years ago
David Chisnall 0c9ee8b920 Improve protocol tests and fix bugs.
Also add the new protocol_getProperties2 function.
8 years ago
David Chisnall b81df02b91 Merge branch 'master' into newabi
Simplify the setSubclass dtable updating mechanism.
8 years ago
David Chisnall 040114dff1 Remove some obsolete documentation. 8 years ago
David Chisnall 4891eb9d5f Document a bit more of class structure and of type encodings. 8 years ago
David Chisnall ab84589b5d Improve protocol method metadata.
Methods now include a selector and extended type encoding, rather than a
method name and lgacy type encoding.  Older ones are auto-upgraded.

Expose the extended type encoding via a function that JavaScriptCore
expects to exist.
8 years ago
David Chisnall 93b3f889a6 Update documentation. 8 years ago
David Chisnall a8752cd842 Clean up method / slot lookup interfaces. 8 years ago
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 3c036b3f4f Use nullptr for nil in C++11. 8 years ago
Dustin L. Howett 21ad183e3e Wrap some headers in extern C for C++ compat. 8 years ago
David Chisnall 76e7d4b07f Merge branch 'master' into newabi 8 years ago
David Chisnall 12b820cb99 Add refcount accessor function. 8 years ago
David Chisnall 458bd3c7a2 Add interfaces for better integration with Foundation. 8 years ago
David Chisnall af4e0719ff Checkpoint work on improving weak reference efficiency. 8 years ago
Zenny Chen 5f01917a49 Update blocks_runtime.h (#45)
Update blocks_runtime.h to be compatible with Apple / LLVM version.
8 years ago
David Chisnall a54272c1ab Merge origin/master into newabi (using imerge) 8 years ago
Daniel Ferreira 1593ac04af Add objc-class.h to objc headers
Some applications still include the old objc-class.h header expecting
to obtain the declarations contained in objc/message.h and
objc/runtime.h nowadays. This commit adds this header to achieve
out-of-the-box compatibility with these applications.
9 years ago
Daniel Ferreira a3e1a0d3ed Add objc-runtime.h to objc headers
Some applications still include the old objc-runtime.h header expecting
to obtain the declarations contained in objc/message.h and
objc/runtime.h nowadays. This commit adds this header to achieve
out-of-the-box compatibility with these applications.
9 years ago
David Chisnall 4a840374fe Fix typo in hooks.h. 10 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
David Chisnall b952a21abe Add objc_msgSend for AArch64.
An interesting feature of the AArch64 ABI simplifies this code relative to other platforms.  AArch64 reserves an extra register (x8) for the address of struct returns, giving the
10 years ago
theraven f50bc6cf33 Added support for tracing message sends to the runtime.
Currently x86-64 only.
13 years ago
theraven 93e297fd87 Unconditionally make message.h a system header to work around an old-clang bug. 13 years ago
theraven c73b7a2f0b Mark all libobjc2 headers as system headers when not compiling the runtime
itself.  This makes clang hide warnings.
13 years ago
theraven 7218882f7e Apparently clang 3.2 had the same bug as 3.1... 13 years ago
theraven 3fbdbe4d02 Work around a bug in clang 3.1 that declares objc_msgSend_stret as a builtin
with the wrong signature.
13 years ago
theraven eb234ea26a Fix the case where the number of selectors grows to more than 2^16 and we need
to fall back to 3-level dtables.  

Added a test case that registers far more selectors than a sane program
contains and tries to use them.
13 years ago
theraven ae3b44ac78 Fix clang's stupid warning to work around a bug in OS X headers... 13 years ago
theraven 6317b79a10 Implemented the new exception ABI, and a load of tests for it. This is used by
clang trunk if -fobjc-runtime-1.7 is specified and provides significantly
better interoperability with foreign exceptions.

Note: Most of the exception tests will not pass with gcc or clang < 3.3.  They
test things that are impossible to implement quite correctly with the
GCC-compatible exception ABI.

Also updated the release notes to reflect recent improvements.
13 years ago
theraven 6f1589a841 Some bug fixes to ARC autorelease pools. Now provides all of the support required for implementing GNUstep autorelease pools. 14 years ago
thebeing f845df37c1 Add objc/blocks_private.h header to expose some internals of the blocks runtime
that are accessed by libdispatch. Also rename the relevant structs to be
compatible with the BlocksRuntime from compiler-rt.
14 years ago
theraven f9f2e4e313 Added a function for getting the type encoding for a block returned by imp_implementationFromBlock(). 14 years ago
theraven 4796a41e4e Finished implementing the new runtime APIs. 14 years ago
theraven 43ee8b9819 Add initial support for imp_implementationWithBlock() and friends. Currently
only works on x86 and x86-64 and doesn't work with sret functions.
14 years ago
theraven f133fa7eb8 Better ObjC++ support in runtime.h 15 years ago
theraven 1d16930450 Fix missing semicolon.
Make Makefile.clang work

Patch by Charlie Sharpsteen.
15 years ago
theraven 5d3c047fa2 Finished implementing JavaScript-style prototypes. 15 years ago
theraven b54719abf1 Basic support for prototype-style object orientation (you can now add methods to an individual object). 15 years ago
theraven 908374672d Make OBJC_SMALL_OBJECT_SHIFT / OBJC_SMALL_OBJECT_MASK constants. 15 years ago
theraven 8e34dccda9 Deprecate access to the isa pointer. This will become a hard error in future. 15 years ago
theraven 22e5aaf7b0 Add OBJC_SMALL_OBJECT_SHIFT macro. 15 years ago
theraven 8af52846b7 Small object (hidden in a pointer) support. 15 years ago
theraven ffc661fe5c Export capabilities for associated references and GC. 15 years ago