aboutsummaryrefslogtreecommitdiff
path: root/lib/std/array_hash_map.zig
AgeCommit message (Collapse)Author
2025-06-01Legalize: implement scalarization of `@shuffle`Jacob Young
2025-04-13std: eradicate u29 and embrace std.mem.AlignmentAndrew Kelley
2025-03-27std.meta.FieldType -> @FieldTypeАндрей Краевский
2025-02-22fix ArrayHashMap setKey when store_hash=trueAndrew Kelley
2025-02-12std.ArrayHashMap: base linear_scan_max on cache line sizeAndrew Kelley
2025-02-11std.ArrayHashMap: introduce setKeyAndrew Kelley
Only available in the "unmanaged" variant since the other one is deprecated.
2025-02-07std.ArrayHashMap: popOrNul() -> pop()Meghan Denny
2025-01-15std.ArrayHashMap: allow passing empty values arrayAndrew Kelley
in which case the values array is set to undefined
2024-12-11std.ArrayHashMap fix `eql` documentationNico Elbers
In cf88cf2657d721c68055a284e8c498a18639f74c the eql function provided in The context of ArrayHashMap was changed to also include the key index, but this wasn't properly updated in the documentation. Since a flat `usize` is unintuitive, I've tried to explain the function of the parameter as best I can based on the original commit. Finally, I didn't do an extensive search if this eql definition is incorrectly stated anywhere outside of these 2 spots. But I somewhat doubt an file outside of `array_hash_map` would
2024-11-27std.ArrayHashMap: update to the "gpa"/"arena" conventionAndrew Kelley
for Allocator names
2024-11-27prepare to remove the "Managed" variant of std.ArrayHashMapAndrew Kelley
2024-11-27std.ArrayHashMap: explicit error setsAndrew Kelley
2024-11-27introduce std.ArrayHashMap.reinitAndrew Kelley
2024-09-12Replace deprecated default initializations with decl literalsLinus Groh
2024-09-01std: deprecate some incorrect default initializationsmlugg
In favour of newly-added decls, which can be used via decl literals.
2024-08-28std: update `std.builtin.Type` fields to follow naming conventionsmlugg
The compiler actually doesn't need any functional changes for this: Sema does reification based on the tag indices of `std.builtin.Type` already! So, no zig1.wasm update is necessary. This change is necessary to disallow name clashes between fields and decls on a type, which is a prerequisite of #9938.
2024-07-26docs: ArrayHashMap: warn against the shrink footgunAndrew Kelley
2024-07-07std.ArrayHashMap: unmanaged holds the pointer stability lockKrzysztof Wolicki
2024-03-21std.array_hash_map: remove meta context verificationAndrew Kelley
The zig way is to let the compiler provide errors, rather than trying to implement the compiler in the standard library. I played around with this and found the compile errors to be easier to comprehend without this logic.
2024-03-21std.array_hash_map: enhance doc commentsAndrew Kelley
- more readable in markdown - remove confusing stuff - linkification - rewording - move parameter documentation to parameter documentation
2024-03-16std: introduce pointer stability locks to hash maps (#17719)Andrew Kelley
This adds std.debug.SafetyLock and uses it in std.HashMapUnmanaged by adding lockPointers() and unlockPointers(). This provides a way to detect when an illegal modification has happened and panic rather than invoke undefined behavior.
2023-11-22std: remove meta.traitAndrew Kelley
In general, I don't like the idea of std.meta.trait, and so I am providing some guidance by deleting the entire namespace from the standard library and compiler codebase. My main criticism is that it's overcomplicated machinery that bloats compile times and is ultimately unnecessary given the existence of Zig's strong type system and reference traces. Users who want this can create a third party package that provides this functionality. closes #18051
2023-11-19lib: correct unnecessary uses of 'var'mlugg
2023-11-04std.ArrayHashMap: add init functionAndrew Kelley
for when you have keys and values array
2023-10-26x86_64: fix behavior of `getValue`Jacob Young
Old behavior renamed to `getValueIfFree`.
2023-10-23x86_64: implement enough to pass unicode testsJacob Young
* implement vector comparison * implement reduce for bool vectors * fix `@memcpy` bug * enable passing std tests
2023-10-22Revert "Revert "Merge pull request #17637 from jacobly0/x86_64-test-std""Jacob Young
This reverts commit 6f0198cadbe29294f2bf3153a27beebd64377566.
2023-10-22Revert "Merge pull request #17637 from jacobly0/x86_64-test-std"Andrew Kelley
This reverts commit 0c99ba1eab63865592bb084feb271cd4e4b0357e, reversing changes made to 5f92b070bf284f1493b1b5d433dd3adde2f46727. This caused a CI failure when it landed in master branch due to a 128-bit `@byteSwap` in std.mem.
2023-10-21x86_64: disable failing tests, enable test-std testingJacob Young
2023-10-08std: add unstable sorting to array hash mapsAndrew Kelley
closes #17426
2023-09-24std.MultiArrayList: add test coverage for 0-bit structsAndrew Kelley
closes #10618 solved by #17172
2023-09-02std.ArrayHashMap.reIndex also recomputes hashes (#17054)Josh Wolfe
2023-07-18compiler: rework inferred error setsAndrew Kelley
* move inferred error sets into InternPool. - they are now represented by pointing directly at the corresponding function body value. * inferred error set working memory is now in Sema and expires after the Sema for the function corresponding to the inferred error set is finished having its body analyzed. * error sets use a InternPool.Index.Slice rather than an actual slice to avoid lifetime issues.
2023-07-16std: reword some commentsAndrew Kelley
2023-06-26Change capacity to take a non-pointer parameterJobat
I don't believe there's a requirement for this to take a pointer, as the underlying function doesn't.
2023-06-24all: migrate code to new cast builtin syntaxmlugg
Most of this migration was performed automatically with `zig fmt`. There were a few exceptions which I had to manually fix: * `@alignCast` and `@addrSpaceCast` cannot be automatically rewritten * `@truncate`'s fixup is incorrect for vectors * Test cases are not formatted, and their error locations change
2023-06-19all: zig fmt and rename "@XToY" to "@YFromX"Eric Joldasov
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
2023-06-16migration: std.math.{min, min3, max, max3} -> `@min` & `@max`r00ster91
2023-04-28update codebase to use `@memset` and `@memcpy`Andrew Kelley
2023-04-25change semantics of `@memcpy` and `@memset`Andrew Kelley
Now they use slices or array pointers with any element type instead of requiring byte pointers. This is a breaking enhancement to the language. The safety check for overlapping pointers will be implemented in a future commit. closes #14040
2023-04-22doc: fix minor grammar issues-k
2023-02-18update std lib and compiler sources to new for loop syntaxAndrew Kelley
2023-02-03use build.zig.zon instead of build.zig.ini for the manifest fileAndrew Kelley
* improve error message when build manifest file is missing * update std.zig.Ast to support ZON * Compilation.AllErrors.Message: make the notes field a const slice * move build manifest parsing logic into src/Manifest.zig and add more checks, and make the checks integrate into the standard error reporting code so that reported errors look sexy closes #14290
2022-12-17std.builtin: rename Type.UnionField and Type.StructField's field_type to typer00ster91
2022-12-04std: add move() functions to hash mapsAndrew Kelley
2022-11-29std.mem.Allocator: allow shrink to failAndrew Kelley
closes #13535
2022-10-03std: fix memory leak in ArrayHashMap (#13001)GethDW
2022-09-16std: remove deprecated API for the upcoming releaseAndrew Kelley
See #3811
2022-05-06Sema: solve a false positive "depends on itself"Andrew Kelley
This improves the ABI alignment resolution code. This commit fully enables the MachO linker code in stage3. Note, however, that there are still miscompilations in stage3.
2022-04-20std: fix missing hash map safetyAndrew Kelley
There was a missing compile error for calling ensureUnusedCapacity without a Context in the case that the Context is non-void.