Skip to content

Hashmap#107

Merged
mdbergmann merged 6 commits into
masterfrom
hashmap
Feb 24, 2026
Merged

Hashmap#107
mdbergmann merged 6 commits into
masterfrom
hashmap

Conversation

@mdbergmann
Copy link
Copy Markdown
Owner

No description provided.

mdbergmann and others added 6 commits February 24, 2026 18:28
CLASS-based string-keyed hashmap with open addressing, linear probing,
DJB2 hash, power-of-2 capacity, 70% max load factor, and tombstone
deletion. API: HmMake/HmFree/HmClear, HmPut$/HmGet$/HmHas/HmDel,
HmCount/HmCapacity. 49 tests passing on emulator.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Phase 2: HmPut&/!/PutRef/PutBool/PutNull, HmGet&/!/GetRef, HmType
for multi-type storage (string, long, single, bool, null, ref).
54 tests pass.

Phase 3: Insertion-order iteration via order array tracking.
HmIterReset/Next/Key$/Val$/Val&/Val!/Type with tombstone-aware
skip and compaction. 70 tests pass.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Callback-based iteration using INVOKE/BIND pattern (proven from list
submodule). Callback receives ADDRESS for strings (use CSTR to access).
All 13 new tests pass, 70 existing iteration tests pass (regression OK).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add "Designed by Manfred Bergmann, copyright 2026" to README files
in list, httpclient, tcpclient, amissl, hashmap, and sagasound
submodules. Created new README.txt for amissl, hashmap, and
sagasound which didn't have one yet.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extract _HmFindKey, _HmPutProbe, _HmCommitNew to eliminate
duplicated linear-probe loops across 13 SUBs. Pure internal
refactoring — public API unchanged, all 216 tests pass.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Write comprehensive README covering usage, memory management
(DECLARE CLASS vs builder cleanup), iteration, error handling,
and full function reference. Remove incorrect EXTERNAL hashmap
from usage examples in all files. Update state file with Phase 3d
deduplication refactoring status.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mdbergmann mdbergmann merged commit fa0a3bb into master Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant