mirror of
https://github.com/odin-lang/Odin.git
synced 2026-10-05 20:32:03 -04:00
Type caching
This commit is contained in:
1 parent
991479fbf9
commit
2e1e1e6034
4 files changed
+114
-18
No files matched your search
+2
-2
@@ -22,7 +22,7 @@ enum HashKeyKind {
|
||||
|
||||
struct PtrAndId {
|
||||
void *ptr;
|
||||
u32 id;
|
||||
u64 id;
|
||||
};
|
||||
|
||||
struct HashKey {
|
||||
@@ -58,7 +58,7 @@ gb_inline HashKey hash_pointer(void *ptr) {
|
||||
h.ptr = ptr;
|
||||
return h;
|
||||
}
|
||||
gb_inline HashKey hash_ptr_and_id(void *ptr, u32 id) {
|
||||
gb_inline HashKey hash_ptr_and_id(void *ptr, u64 id) {
|
||||
HashKey h = {HashKey_PtrAndId};
|
||||
h.key = cast(u64)cast(uintptr)ptr;
|
||||
h.ptr_and_id.ptr = ptr;
|
||||
|
||||
Reference in new issue
Block a user