aboutsummaryrefslogtreecommitdiff
path: root/src/checker.hpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2022-08-11 13:32:45 +0100
committergingerBill <bill@gingerbill.org>2022-08-11 13:32:45 +0100
commita054c2934eb0caa027a1663cca839cb422621558 (patch)
treef742e44cf522e3e4338c5a4b555f0865878b3953 /src/checker.hpp
parent38102f14c19f83ef1e0c13a824448bab4e80877e (diff)
Cache #load data and hashes
Diffstat (limited to 'src/checker.hpp')
-rw-r--r--src/checker.hpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/checker.hpp b/src/checker.hpp
index f11a00532..badcd93d5 100644
--- a/src/checker.hpp
+++ b/src/checker.hpp
@@ -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 {