aboutsummaryrefslogtreecommitdiff
path: root/lib/std/hash/wyhash.zig
AgeCommit message (Collapse)Author
2025-05-16std.hash.Wyhash: fix dangling stack pointerMarc Tiehuis
Closes #23895.
2024-07-09std: fix typos (#20560)Jora Troosh
2023-12-08AstGen: add error for using inline loops in comptime only scopesVeikka Tuominen
2023-10-31std.builtin.Endian: make the tags lower caseAndrew Kelley
Let's take this breaking change opportunity to fix the style of this enum.
2023-10-31mem: fix ub in writeIntJacob Young
Use inline to vastly simplify the exposed API. This allows a comptime-known endian parameter to be propogated, making extra functions for a specific endianness completely unnecessary.
2023-10-29x86_64: fix compiler rt test failuresJacob Young
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-09-02std/hash: perform iterative + smhasher tests at comptimeMarc Tiehuis
Need to confirm how these fare on CI as per previous comments left which stated OOM (on stage-1).
2023-09-02std/hash: add generic tests for idempotency/iterative apiMarc Tiehuis
2023-09-02std/hash: add smhasher verification testsMarc Tiehuis
Not all hashes are added just yet as these need to be generated manually from reference implementations as they are not included by default in smhasher.
2023-08-05wyhash: keep tail bytes on iterative updatenone
Update calls with input longer then one block must ensure that last sixteen bytes are available when final is called. Fixes #16695
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-17wyhash: support comptime usageMarc Tiehuis
Closes #16070.
2023-06-16migration: std.math.{min, min3, max, max3} -> `@min` & `@max`r00ster91
2023-06-07reimplement wyhash v4.1 (#15969)Marc Tiehuis
2023-05-20Zir: eliminate `field_call_bind` and `field_call_bind_named`mlugg
This commit removes the `field_call_bind` and `field_call_bind_named` ZIR instructions, replacing them with a `field_call` instruction which does the bind and call in one. `field_call_bind` is an unfortunate instruction. It's tied into one very specific usage pattern - its result can only be used as a callee. This means that it creates a value of a "pseudo-type" of sorts, `bound_fn` - this type used to exist in Zig, but now we just hide it from the user and have AstGen ensure it's only used in one way. This is quite silly - `Type` and `Value` should, as much as possible, reflect real Zig types and values. It makes sense to instead encode the `a.b()` syntax as its own ZIR instruction, so that's what we do here. This commit introduces a new instruction, `field_call`. It's like `call`, but rather than a callee ref, it contains a ref to the object pointer (`&a` in `a.b()`) and the string field name (`b`). This eliminates `bound_fn` from the language, and slightly decreases the size of generated ZIR - stats below. This commit does remove a few usages which used to be allowed: - `@field(a, "b")()` - `@call(.auto, a.b, .{})` - `@call(.auto, @field(a, "b"), .{})` These forms used to work just like `a.b()`, but are no longer allowed. I believe this is the correct choice for a few reasons: - `a.b()` is a purely *syntactic* form; for instance, `(a.b)()` is not valid. This means it is *not* inconsistent to not allow it in these cases; the special case here isn't "a field access as a callee", but rather this exact syntactic form. - The second argument to `@call` looks much more visually distinct from the callee in standard call syntax. To me, this makes it seem strange for that argument to not work like a normal expression in this context. - A more practical argument: it's confusing! `@field` and `@call` are used in very different contexts to standard function calls: the former normally hints at some comptime machinery, and the latter that you want more precise control over parts of a function call. In these contexts, you don't want implicit arguments adding extra confusion: you want to be very explicit about what you're doing. Lastly, some stats. I mentioned before that this change slightly reduces the size of ZIR - this is due to two instructions (`field_call_bind` then `call`) being replaced with one (`field_call`). Here are some numbers: +--------------+----------+----------+--------+ | File | Before | After | Change | +--------------+----------+----------+--------+ | Sema.zig | 4.72M | 4.53M | -4% | | AstGen.zig | 1.52M | 1.48M | -3% | | hash_map.zig | 283.9K | 276.2K | -3% | | math.zig | 312.6K | 305.3K | -2% | +--------------+----------+----------+--------+
2023-05-07convert s[start..start+len] to s[start..][0..len]dweiller
2023-04-28update codebase to use `@memset` and `@memcpy`Andrew Kelley
2023-02-18update std lib and compiler sources to new for loop syntaxAndrew Kelley
2022-12-13update usages of `@call`Veikka Tuominen
2021-08-24remove redundant license headers from zig standard libraryAndrew Kelley
We already have a LICENSE file that covers the Zig Standard Library. We no longer need to remind everyone that the license is MIT in every single file. Previously this was introduced to clarify the situation for a fork of Zig that made Zig's LICENSE file harder to find, and replaced it with their own license that required annual payments to their company. However that fork now appears to be dead. So there is no need to reinforce the copyright notice in every single file.
2021-06-21std, src, doc, test: remove unused variablesJacob G-W
2021-05-08std: update usage of std.testingVeikka Tuominen
2020-12-31Year++Frank Denis
2020-10-17Make std.meta.Int accept a signedness parameterJan Prudil
2020-08-20add license header to all std lib filesAndrew Kelley
add SPDX license identifier copyright ownership is zig contributors
2020-04-28std.meta.IntType -> std.meta.IntTadeo Kondrak
2020-03-19update std lib to take advantage of slicing with comptime indexesAndrew Kelley
2020-02-24remove uses of `@ArgType` and `@IntType`Vexu
2019-12-06remove `@inlineCall` from zigAndrew Kelley
2019-09-25mv std/ lib/Andrew Kelley
that's all this commit does. further commits will fix cli flags and such. see #2221