0
Fork 0
mirror of https://codeberg.org/ziglang/zig synced 2026-11-18 07:05:05 +00:00
zig/lib
Andrew Kelley a71d00a4d5 std.crypto.25519.field: avoid excessive inlining
This valid zig code produces reasonable LLVM IR, however, on the
wasm32-wasi target, when using the wasmtime runtime, the number of
locals of the `isSquare` function exceeds 50000, causing wasmtime
to refuse to execute the binary.

The `inline` keyword in Zig is intended to be used only where it is
semantically necessary; not as an optimization hint. Otherwise, this may
produce unwanted binary bloat for the -OReleaseSmall use case.

In the future, it is possible that we may end up with both `inline`
keyword, which operates as it does in status quo, and additionally
`callconv(.inline_hint)` which has no semantic impact, but may be
observed by optimization passes.

In this commit, I also cleaned up `isSquare` by eliminating an
unnecessary mutable variable, replacing it with several local constants.

Closes #11947.
History 2022-06-27 19:11:55 -07:00
..
compiler_rt compiler-rt: fix logic for choosing __gnu_{f2h,h2f}_ieee 2022-06-19 15:12:08 +02:00
docs flatten lib/std/special and improve "pkg inside another" logic 2022-05-06 22:41:00 -07:00
include update libcxx, libcxxabi, and C headers to release/13.x branch 2021-08-28 13:11:47 -07:00
init-exe init-exe: add note about log_level in ReleaseSmall and ReleaseFast build mode (#11626) 2022-05-14 12:56:58 +02:00
init-lib flatten lib/std/special and improve "pkg inside another" logic 2022-05-06 22:41:00 -07:00
libc Update the WASI libc 2022-06-14 23:20:39 +02:00
libcxx update libcxx, libcxxabi, and C headers to release/13.x branch 2021-08-28 13:11:47 -07:00
libcxxabi update libcxx, libcxxabi, and C headers to release/13.x branch 2021-08-28 13:11:47 -07:00
libunwind Import SPARCv9 libunwind 2022-02-13 17:16:22 +02:00
std std.crypto.25519.field: avoid excessive inlining 2022-06-27 19:11:55 -07:00
tsan update libcxx, libcxxabi, libunwind, and tsan to llvm 13 rc1 2021-08-16 23:32:13 -07:00
build_runner.zig flatten lib/std/special and improve "pkg inside another" logic 2022-05-06 22:41:00 -07:00
c.zig target: Rename sparcv9 -> sparc64 2022-05-13 16:43:59 -04:00
compiler_rt.zig Add missing adddf3 2022-06-22 14:32:52 +02:00
ssp.zig flatten lib/std/special and improve "pkg inside another" logic 2022-05-06 22:41:00 -07:00
test_runner.zig std.Progress.log: adjust API 2022-05-26 21:58:19 -07:00