cli: add safe owning general-key hash maps
Use explicit static hash/equality functions, dense complete key/value entries and Copy probe indices. Preserve returned ownership and allocation failure state without unsafe code or new runtime instructions. Add normative contracts, API/reference budgets, 33 conformance cases, independent Copy/owner dict traces and 55 CLI/package/profile checks. Full corpus: 947 passing. Collection-every-step scheduler stress remains in progress, recorded in RFC/plan.
This commit is contained in:
1 parent
f02f4bd55b
commit
7bb5bd7931
52 files changed
+7736
-11
No files matched your search
@@ -119,3 +119,5 @@ RFC 0027 explicit error values (cl100k, relative to hashes): Quick Reference 7,8
|
||||
RFC 0028 numeric-key owning map (cl100k, relative to error_values; includes the separate integer-pattern clarification): Quick Reference stays 7,863, other source docs 48,061 → 50,079, full source excluding AIR 55,924 → 57,942 (+3.6%). The on-demand library page is 14,167 tokens. AIR remains 179,282 bytes / 51 sections. No map-specific instruction, source form, verifier state or diagnostic is added; general keys remain Q-037. Cumulative source growth is +70.5%, with review justification in the RFC and no claimed MCC benefit.
|
||||
|
||||
RFC 0029 static function parameters (cl100k, relative to numeric maps): Quick Reference 7,863 → 8,051 (+2.4%); other source docs 50,079 → 51,002 (+1.8%); full source excluding AIR 57,942 → 59,053 (+1.9%). language/generics.md is 2,194 tokens; AIR remains 179,282 bytes / 51 sections. One explicit operation-selection concept adds two source forms and bounded frontend state, with no runtime/verifier state or new AIR construct/diagnostic. Cumulative growth is +73.8%; the RFC justifies the general hash/equality/order prerequisite, keeps general collections open and makes no empirical MCC claim.
|
||||
|
||||
RFC 0030 general owning HashMap (cl100k, relative to static operations): Quick Reference 8,051 → 8,124 (+0.9%), other source docs 51,002 → 53,363 (+4.6%), full source excluding AIR 59,053 → 61,487 (+4.1%). library/std.md is 16,504 tokens; AIR remains 179,282 bytes / 51 sections. Ten safe source functions use explicit static policies and complete key/value transfer, with no new language form, verifier/runtime state or diagnostic. Cumulative source growth is +80.9%, justified in the RFC without an empirical MCC claim; full policies/failure/dense-index invariants stay on demand.
|
||||
@@ -363,6 +363,8 @@ The usual enum rules apply: missing arm `E7004`, wrong enum/payload `E7005`, unk
|
||||
|
||||
`std.fmt.write_u64/i64/usize/isize` write decimal integers into supplied output slices; `WriteResult::ok(count)` / `short_output` expose capacity, with unchanged output on failure. Composition and signatures are in `/docs/library/std.md`.
|
||||
|
||||
`std.hashmap.HashMap<K,V,fn hash,fn equal>` supports general owning keys/values through explicit pure ref-key operations (§12). Insert returns replaced/full key/value pairs; remove/pop move both out, get requires only V: Copy, growth is explicit and free returns nonempty maps. Full contracts are in `/docs/library/std.md`.
|
||||
|
||||
`std.hash.fnv1a64` and `crc32c` hash byte slices without allocation; their `_extend` forms continue from a previous result. Hashes do not establish key equality or authentication. Exact algorithms and chunk/byte-order conventions are in `/docs/library/std.md`.
|
||||
|
||||
## 11. Package modules
|
||||
|
||||
@@ -8,7 +8,7 @@ The other files in `/docs` hold the full rules. Open one only when this page is
|
||||
|
||||
| Need | Read |
|
||||
|---|---|
|
||||
| built-in bytes/math/text/formatting/hash, option/result, owning Vec and Deque, signatures and failure contracts | `/docs/library/std.md` |
|
||||
| built-in bytes/math/text/formatting/hash, option/result, owning Vec/Deque and numeric/general maps, signatures and failure contracts | `/docs/library/std.md` |
|
||||
| initialized buffer storage, explicit growth/drain and child views | `/docs/language/buffers.md` |
|
||||
| whole-value linear aggregates, unpack, exchange and allocation failure | `/docs/language/linear-aggregates.md` |
|
||||
| generic declarations/applications, property constraints, static function contracts and specialization limits | `/docs/language/generics.md` |
|
||||
|
||||
Reference in new issue
Block a user