summaryrefslogtreecommitdiff
path: root/lang/c/pseudoobjc.cpp
AgeCommit message (Collapse)Author
2025-06-25Remove implicit conversions from Confidence to underlying type, these can ↵Rusty Wagner
cause bugs and also issues with C++20
2025-06-18[ObjC] Improve how [super ...] calls are displayedMark Rowe
1. Skip displaying the declaration and initialization of the objc_super struct since that's an artifact of how objc_msgSendSuper is called. 2. Display the message receiver as `super` rather than `&super`
2025-06-18[ObjC] Prefer displaying id rather than objc_object*Mark Rowe
2025-06-18[ObjC] Rewrite a couple of additional runtime callsMark Rowe
objc_opt_self -> [... self], objc_opt_isKindOfClass -> [... isKindOfClass:...], objc_opt_respondsToSelector -> [... respondsToSelector:...]
2025-06-18[ObjC] Display selectors as @selector(...)Mark Rowe
2025-05-29Light unused variable cleanup in Psuedo C/Obj-C Pluginkat
2025-05-29[PseudoObjC] Handle named type references to types that don't existMark Rowe
2025-05-29Detect calls that the Objective-C workflow has rewritten directly to an ↵Mark Rowe
implementation These are detected by their function names having the characteristic `-[ClassName methodName:]` format. Calls to functions with this naming pattern that accept a selector as a second argument are assumed to be `objc_msgSend` calls that the Objective-C workflow rewrote. These calls are formatted identically to other `objc_msgSend` calls with the exception that the selector tokens reference the address of the call target rather than the selector string, so double-clicking on them takes you to the fixed destination of the rewritten call.
2025-05-29Implement a Pseudo Objective-C language representationMark Rowe
This is implemented in the Pseudo C plug-in as it shares 99% of the logic. The Objective-C support is implemented in a subclass of `PseudoCFunction`. The handling of instruction types that the Objective-C representation needs to customize is extracted into virtual functions that the Objective-C subclass overrides. This currently supports: * Rewriting `objc_msgSend` / `objc_msgSendSuper2` with constant selectors to `[receiver message]` notation. * Rewriting calls to `objc_alloc` / `objc_alloc_init` / `objc_new` to the equivalent message send notation. * Rewriting `objc_retain` / `objc_release` and friends to the equivalent message send notation. * Displaying Objective-C class references as their class names rather than `_OBJC_CLASS_$_` symbol names. * Displaying Objective-C string literals as `@"..."`. This works best when used in conjunction with https://github.com/bdash/bn-objc-extras as the reference counting runtime calls add so much clutter.