From a63be62240a5063933cdaf2879b586c6443c269b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Isalski?= Date: Sun, 13 Sep 2026 14:50:47 +0200 Subject: [PATCH] Added hashset declaration --- src/hashset.asm | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/hashset.asm diff --git a/src/hashset.asm b/src/hashset.asm new file mode 100644 index 0000000..e1f206b --- /dev/null +++ b/src/hashset.asm @@ -0,0 +1,23 @@ +; struct Allocator { +; alloc: (U32) -> ptr +; realloc: (ptr, U32) -> ptr +; free: (ptr) -> () +; } +; + +; Creates a hashset for the specified allocator, hash function and equality function +; Arguments: +; r1 - The pointer to the allocator +; r2 - The hash function +; r3 - The equality function +; r4 - The hash function context +; r5 - The equality function context +; Result: +; r1 - The pointer to the hashset structure +; Info: +; The hash function should follow the stdlib calling convention +; The hash function receives one argument (the value of the item) and should return an integer which remains the same for the lifetime of the value. +; The equality function should follow the stdlib calling convention +; The equality function receives two arguments (the value of the two items) and should return either a zero (when the items are not equal) or any other value (if they are equal). +pub new_hashset: + \ No newline at end of file