Andrew Kelley
fc40d23723
Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgen
...
Conflicts:
* build.zig
* lib/std/array_list.zig
* lib/std/c/ast.zig
* lib/std/c/parse.zig
* lib/std/os/bits/linux.zig
2021-05-05 10:48:22 -07:00
Andrew Kelley
4f9c928e56
Merge pull request #8665 from LemonBoy/misc
...
Miscellaneous patches
2021-05-01 18:07:58 -04:00
LemonBoy
51f80deaf6
std: Fix stack overflow in SPARC clone() impl
...
Leave the minimum amount of stack space required by the ABI (16 * 8
bytes for the window contents plus 6 * 8 bytes for the input arguments)
on the new thread stack.
2021-05-01 11:02:04 +02:00
Andrew Kelley
dc28f5c3ec
Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgen
...
Conflicts:
lib/std/crypto/25519/field.zig
lib/std/crypto/poly1305.zig
I had resolved those by removing `comptime` but master branch decided to
make the parameters `comptime`.
This also pulls in the updated default `zig build` install directory.
2021-04-30 23:13:17 -07:00
Isaac Freund
2ed368fb92
std/build: add -p alias for --prefix
2021-04-29 14:25:58 +02:00
Andrew Kelley
e86cee258c
Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgen
...
In particular I wanted the change that makes `suspend;` illegal in the
parser.
2021-04-24 10:44:41 -07:00
Andrew Kelley
93d1c2d6d4
std: fix compile errors caught by stage2 AstGen
...
Follow-up from 507a8096d2f9624bafaf963c3e189a477ef6b7bf
2021-04-22 19:32:57 -07:00
LemonBoy
c5cc6b7082
compiler-rt: Export __extendhftf2 and __trunctfhf2
...
Even though LLVM12 doesn't make use of those intrinsics at the moment
let's export them anyway.
2021-04-21 19:02:13 +02:00
LemonBoy
e0d7cfce5f
compiler-rt: Don't re-define PPC builtins in test mode
...
Prevent linking errors when `zig test`-ing the compiler_rt module for
powerpc-linux triples.
2021-04-21 19:00:57 +02:00
Andrew Kelley
1e06a74348
Merge pull request #8542 from LemonBoy/floating-point-is-hard-my-dude
...
Floating point is hard my dude
2021-04-20 13:28:03 -04:00
LemonBoy
a5a3ad5e10
c: Minor cleanup
...
* Remove superfluous "test_" prefix in test names
* Use aliased isNan everywhere
2021-04-20 15:44:54 +02:00
LemonBoy
a4e2539b09
c: Implement fmax and fmaxf
2021-04-20 15:44:21 +02:00
LemonBoy
fcfe25710b
c: Implement fmin and fminf
2021-04-20 15:43:46 +02:00
LemonBoy
c7c77fb1b0
c: Add tests for generic_fmod implementation
2021-04-20 15:43:01 +02:00
Andrew Kelley
7818586a2b
fix new references to std.builtin that should have been std.Target
2021-04-15 19:14:54 -07:00
Andrew Kelley
429cd2b5dd
std: change @import("builtin") to std.builtin
2021-04-15 19:06:39 -07:00
LemonBoy
bd4421befe
compiler-rt: Don't pass f16 around as arguments
...
Fixes some failures on AArch64.
f16 was a mistake.
2021-04-15 21:52:08 +02:00
LemonBoy
5bc1dc59e6
compiler-rt: Implement __trunctfhf2
2021-04-15 18:23:09 +02:00
LemonBoy
b29677dd12
compiler-rt: Implement __extendhftf2
2021-04-15 18:21:58 +02:00
LemonBoy
8e0b2f0e52
compiler-rt: Fix typo in implementation of fp truncation ops
...
The problem went unnoticed for years, yay.
2021-04-15 18:14:25 +02:00
LemonBoy
ebf97627fd
build: Test the c.zig file too
...
* Add some more tests for the sqrt/sqrtf implementations.
The idea is to cross-check the software impl with the HW one whenever
possible.
* Fix a broken test, oops.
2021-04-14 17:53:26 +02:00
Andrew Kelley
c4c7cb252a
Merge pull request #8502 from xackus/std-docs
...
std docs: @This() in generic types
2021-04-12 11:37:00 -07:00
xackus
ab991cab84
std docs: @This() in generic types
2021-04-12 09:31:45 +02:00
Andrew Kelley
c5e662d860
Merge pull request #8497 from LemonBoy/some-ppc-fixes
...
Improve Improve PowerPC support
2021-04-11 18:59:31 -07:00
xackus
7857ad78db
std docs: update var to anytype
2021-04-11 22:59:30 +02:00
LemonBoy
44f8ce690d
std: Fix typo in sqrt implementation
...
The code initializes twice `t` instead of `t1`, leaving the latter
uninitialized. The problem manifested itself by corrupting the LSBs of
the result in unpredictable ways.
2021-04-11 21:27:39 +02:00
LemonBoy
8d94dc625b
compiler-rt: Introduce PowerPC-specific f128 helpers
...
For historical reasons IEEE f128 ops use `kf` instead of `tf` in their
names, there's no functional change.
2021-04-11 21:26:22 +02:00
Benjamin Feng
b409accc96
Copy over ppc clone from musl
2021-04-10 22:47:22 -05:00
xackus
c28d1fe173
std docs: fix layout broken by the banner
2021-04-09 00:36:59 +02:00
Hannu Hartikainen
c9ffb6f734
std docs: enhance search browser history UX
...
Before this change every keypress in the search field causes a browser
history entry, which makes navigating back annoying.
On first keypress in the search field, a new history entry is created.
On subsequent keypresses, the most recent history entry is replaced.
Therefore a typical history after searching and navigating to an entry
might look like
1. documentation root
2. search page "print"
3. docs for `std.debug.print`
Co-authored-by: Žiga Željko <ziga.zeljko@gmail.com>
2021-04-04 16:25:47 -07:00
Loris Cro
354c14d6a2
make visited links readable in the stdlib docs warning bar
2021-04-02 20:22:02 +02:00
Loris Cro
4fef1d2982
added warning banner to stdlib docs
2021-04-02 20:13:55 +02:00
Isaac Freund
3bf72f2b3a
std.build: make Builder.install_prefix non optional
...
This is useful for build.zig files to check in some cases, for example
to adhere to the convention of installing config to /etc instead of
/usr/etc on linux when using the /usr prefix. Perhaps std.build will
handle such common cases eventually, but that is not yet the case.
2021-03-24 12:29:50 +01:00
Meghan
9f722f43ac
std/special: init-exe,lib make import(std) its own decl ( #8160 )
...
std/special: init-exe,lib make import(std) its own decl
2021-03-05 19:13:05 -08:00
Andrew Kelley
5f35dc0c0d
zig fmt the std lib
2021-02-24 21:29:23 -07:00
LemonBoy
134f5fd3d6
std: Update test "" to test where it makes sense
2021-01-22 15:46:58 +01:00
Koakuma
1d67ab8823
Fix _Qp_cmp definition
2021-01-15 19:07:39 +07:00
Koakuma
bbb58b10f6
Add compiler-rt stub for SPARC CPUs
2021-01-15 19:07:38 +07:00
Sébastien Marie
d7aa7dbab2
implement emutls in compiler_rt
2021-01-12 05:39:46 +00:00
Jay Petacat
a9b505fa77
Reduce use of deprecated IO types
...
Related: #4917
2021-01-07 23:48:58 -08:00
Andrew Kelley
fc38b42521
Revert "Fix #7296:"
...
This broke build scripts that wanted to refer to `exe_dir` or
`install_path`.
There has also been some pushback and discussion on this breaking
change. I think it should be re-evaluated.
This reverts commit a1a1929cf4ff979bdaba17f858d4ce8647e87a65.
2021-01-04 13:49:17 -07:00
Andrew Kelley
683814190b
Merge pull request #7612 from g-w1/do-7296
...
Implement #7296
2021-01-02 22:05:31 -08:00
Andrew Kelley
974c008a0e
convert more {} to {d} and {s}
2021-01-02 19:03:14 -07:00
LemonBoy
4420afe64d
tests: Use {s} instead of {} when formatting strings
2021-01-02 17:12:57 -07:00
LemonBoy
dd973fb365
std: Use {s} instead of {} when printing strings
2021-01-02 17:12:57 -07:00
g-w1
a1a1929cf4
Fix #7296 :
...
* makes '$build_root/{install,debug}/' the default prefix. This makes it not '$pwd/zig-cache/'.
2020-12-31 20:02:07 -05:00
Frank Denis
6c2e0c2046
Year++
2020-12-31 15:45:24 -08:00
Andrew Kelley
7ca9f3bc7b
zig test: std.testing.zig_exe_path is now available
...
it will be set to the path of the zig executable which is running
`zig test`.
2020-12-28 20:00:34 -07:00
daurnimator
53a8e73205
Add sincosf function ( #7267 )
...
* Add sincosf function
* also add sincos
Co-authored-by: Veikka Tuominen <git@vexu.eu>
2020-12-23 11:18:15 +02:00
Andrew Kelley
aa6ef10cc6
std.Progress: make the API thread-safe
...
We generally get away with atomic primitives, however a lock is required
around the refresh function since it traverses the Node graph, and we
need to be sure no references to Nodes remain after end() is called.
2020-12-20 15:08:59 -07:00