diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2025-05-08 12:58:33 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-08 12:58:33 +0100 |
| commit | 92df892f25832b368e29b39dda094a7357c7f3e6 (patch) | |
| tree | 9f56732962285a117dc4fa6b602c89ed04ffbec8 /src/checker.hpp | |
| parent | 4a709086a49f97e6d22bcd441bac38169b1baa21 (diff) | |
| parent | 14e25c0f2a0dea725cb098dcf9939a8d4681e7d6 (diff) | |
Merge pull request #5064 from harold-b/hb/objc-classes
Add support for Objective-C class implementation
Diffstat (limited to 'src/checker.hpp')
| -rw-r--r-- | src/checker.hpp | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/src/checker.hpp b/src/checker.hpp index dd82d9bdd..0cdfd69ab 100644 --- a/src/checker.hpp +++ b/src/checker.hpp @@ -149,8 +149,14 @@ struct AttributeContext { String objc_class; String objc_name; - bool objc_is_class_method; + String objc_selector; Type * objc_type; + Type * objc_superclass; + Type * objc_ivar; + Entity *objc_context_provider; + bool objc_is_class_method; + bool objc_is_implementation; // This struct or proc provides a class/method implementation, not a binding to an existing type. + bool objc_is_disabled_implement; // This means the method explicitly set @objc_implement to false so it won't be inferred from the class' attribute. String require_target_feature; // required by the target micro-architecture String enable_target_feature; // will be enabled for the procedure only @@ -366,6 +372,11 @@ struct ObjcMsgData { Type *proc_type; }; +struct ObjcMethodData { + AttributeContext ac; + Entity *proc_entity; +}; + enum LoadFileTier { LoadFileTier_Invalid, LoadFileTier_Exists, @@ -477,9 +488,17 @@ struct CheckerInfo { MPSCQueue<Ast *> intrinsics_entry_point_usage; - BlockingMutex objc_types_mutex; + BlockingMutex objc_objc_msgSend_mutex; PtrMap<Ast *, ObjcMsgData> objc_msgSend_types; + BlockingMutex objc_class_name_mutex; + StringSet obcj_class_name_set; + MPSCQueue<Entity *> objc_class_implementations; + + BlockingMutex objc_method_mutex; + PtrMap<Type *, Array<ObjcMethodData>> objc_method_implementations; + + BlockingMutex load_file_mutex; StringMap<LoadFileCache *> load_file_cache; @@ -556,6 +575,7 @@ struct Checker { CheckerContext builtin_ctx; MPSCQueue<Entity *> procs_with_deferred_to_check; + MPSCQueue<Entity *> procs_with_objc_context_provider_to_check; Array<ProcInfo *> procs_to_check; BlockingMutex nested_proc_lits_mutex; |