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