Cache #load data and hashes

This commit is contained in:
gingerBill
2022-08-11 13:32:45 +01:00
parent 38102f14c1
commit a054c2934e
3 changed files with 147 additions and 120 deletions
+9
View File
@@ -287,6 +287,12 @@ struct ObjcMsgData {
ObjcMsgKind kind;
Type *proc_type;
};
struct LoadFileCache {
String path;
gbFileError file_error;
String data;
StringMap<u64> hashes;
};
// CheckerInfo stores all the symbol information for a type-checked program
struct CheckerInfo {
@@ -363,6 +369,9 @@ struct CheckerInfo {
BlockingMutex objc_types_mutex;
PtrMap<Ast *, ObjcMsgData> objc_msgSend_types;
BlockingMutex load_file_mutex;
StringMap<LoadFileCache *> load_file_cache;
};
struct CheckerContext {