mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-21 13:55:45 +00:00
Rewrite objc SEL/Class register handling code
This commit is contained in:
+11
-10
@@ -143,11 +143,6 @@ struct lbPadType {
|
||||
LLVMTypeRef type;
|
||||
};
|
||||
|
||||
struct lbObjcRef {
|
||||
Entity * entity;
|
||||
lbAddr local_module_addr;
|
||||
};
|
||||
|
||||
struct lbModule {
|
||||
LLVMModuleRef mod;
|
||||
LLVMContextRef ctx;
|
||||
@@ -199,11 +194,8 @@ struct lbModule {
|
||||
PtrMap<void *, LLVMMetadataRef> debug_values;
|
||||
|
||||
|
||||
RecursiveMutex objc_classes_mutex;
|
||||
RecursiveMutex objc_selectors_mutex;
|
||||
|
||||
StringMap<lbObjcRef> objc_classes;
|
||||
StringMap<lbObjcRef> objc_selectors;
|
||||
StringMap<lbAddr> objc_classes;
|
||||
StringMap<lbAddr> objc_selectors;
|
||||
|
||||
PtrMap<u64/*type hash*/, lbAddr> map_cell_info_map; // address of runtime.Map_Info
|
||||
PtrMap<u64/*type hash*/, lbAddr> map_info_map; // address of runtime.Map_Cell_Info
|
||||
@@ -222,6 +214,13 @@ struct lbEntityCorrection {
|
||||
char const *cname;
|
||||
};
|
||||
|
||||
struct lbObjCGlobal {
|
||||
lbModule *module;
|
||||
gbString global_name;
|
||||
String name;
|
||||
Type * type;
|
||||
};
|
||||
|
||||
struct lbGenerator : LinkerData {
|
||||
CheckerInfo *info;
|
||||
|
||||
@@ -239,6 +238,8 @@ struct lbGenerator : LinkerData {
|
||||
lbProcedure *objc_names;
|
||||
|
||||
MPSCQueue<lbEntityCorrection> entities_to_correct_linkage;
|
||||
MPSCQueue<lbObjCGlobal> objc_selectors;
|
||||
MPSCQueue<lbObjCGlobal> objc_classes;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user