Since Objective-C is a superset of C, all Objective-C specific statements are converted to C statements during the compilation of the .m file (by the preprocessor, I think).
This was true in 1988. Although Objective-C could still be compiled this way, it was not for long.
The compiler parses Objective-C along with C and sometimes C ++ and emits an abstract syntax tree [AST], which is the result after processing. That AST includes various definitions of Objective-C is completely direct.
Note that the details of GCC compilation and LLVM compilation differ.
If you look at the compiled output, you will see that the mach-o file - the executable product - contains various sections in the file that contains Objective-C metadata, including class definitions, selector tables, ivar locations, etc. The compiler generates this metadata in a .o file, and then the linker combines everything together, eliminates duplicate information (this is not a duplicate of a character) and writes mach-o.
As mentioned in another question, you can use rewriting Objective-C to rewrite Objective-C to direct C, but the resulting code is inefficient and slightly different from the regulation compilation pipeline.
source share