On 20/11/2019 11:07, Andreas Fink wrote:
is libobjc even supporting all these other platforms?
The GCC runtime is written in pure C and so should work everywhere that
there's a C compiler. The GNUstep runtime uses assembly to implement
two features that can't be implemented in pure C:
objc_msgSend
imp_implementationWithBlock
Both of these need to modify the call frame and then pass all of the
arguments unmodified, which C doesn't support.
In theory, you should be able to use the runtime without these features,
but I'm not sure if it actually builds (happy to take patches to fix that).
KVO is *significantly* simpler to implement with
imp_implementationWithBlock, so it would be nice if we could depend on
that. objc_msgSend is largely a performance optimisation (clang uses it
only on platforms where it's supported).
I'm happy to take contributions for the assembly paths for other
architectures. We currently have:
- x86-32
- x86-64
- AArch32
- AArch64
- MIPS (at least n64 works, I think o32 and n32 are there but untested).
I passionately hate PowerPC assembly, so will definitely not write that
myself, but anyone who wants to add it is very welcome to do so. I will
probably get around to adding RISC-V support at some point.
David