Andrew Kelley
5f3d59f0ac
Merge branch 'master' into llvm9
2019-08-20 19:09:52 -04:00
Andrew Kelley
9bf283c085
fixups
...
* getrandom libc prototypes had the wrong return type
* `total_read` local variable was unnecessary since the sub-slice
buffer has a length
* I was able to get rid of all the integer casts
* the err == 0 check can be a switch case
* add missing `return` statement
2019-08-20 15:25:30 -04:00
Euan Torano
79354243e3
fix os.getrandom logic to fill the entire buffer
2019-08-20 14:52:38 -04:00
Euan Torano
8c32c09807
Fix InStream.readNoEof
2019-08-20 14:52:10 -04:00
Andrew Kelley
c175e53564
add std.c.printf
2019-08-20 14:42:39 -04:00
Marc Tiehuis
e0447c6ddd
std/fmt: Make FormatOptions arguments non-comptime
...
No need and should help avoid exessive function monomorphizaton.
2019-08-19 22:28:13 +12:00
Marc Tiehuis
98859c885e
std/fmt.zig: Pass full options struct to all internal functions
...
The fill specifier is now handled in some cases. The default fill of '0'
is now ' ' for integers and non-byte sequences.
2019-08-19 22:15:15 +12:00
Marc Tiehuis
6844dafeca
std/fmt: Move pointer parsing out of main state machine
...
This allows us to format a pointer with alignment/padding as we would
with any other format specifier.
e.g. {*:5}
2019-08-18 11:06:54 +12:00
Andrew Kelley
456a244d62
fix event loop regression on macos
2019-08-17 11:40:48 -04:00
Andrew Kelley
e24cc2e77b
std.event.Loop: fix not waking up after file system I/O
...
for single threaded event loops
2019-08-16 23:19:13 -04:00
Andrew Kelley
3dce41b61a
improvements to std lib for event-based I/O
2019-08-16 21:29:29 -04:00
Andrew Kelley
6529658ad8
Merge remote-tracking branch 'origin/master' into llvm9
2019-08-16 16:43:56 -04:00
Andrew Kelley
13c584d325
add compile error for casting const frame to anyframe
...
See #3063
2019-08-16 11:38:41 -04:00
Andrew Kelley
7874d5a40b
zig fmt: add more test cases
2019-08-16 10:11:53 -04:00
Vexu
2151f84d59
implement new async syntax in self-hosted compiler
2019-08-16 06:17:28 -07:00
Andrew Kelley
7e75e1075e
zig fmt
2019-08-15 18:19:04 -04:00
Andrew Kelley
13b5a4bf8c
remove cancel
2019-08-15 14:05:12 -04:00
Andrew Kelley
5092634103
avoid the word "coroutine", they're "async functions"
2019-08-13 14:14:19 -04:00
Andrew Kelley
12ff91c1c9
alignment of structs no longer depends on LLVM
...
fixes async function tests in optimized builds
2019-08-13 12:44:30 -04:00
Andrew Kelley
8a9289996a
Merge remote-tracking branch 'origin/master' into rewrite-coroutines
2019-08-13 11:39:32 -04:00
Andrew Kelley
24d5ec0783
fix async function frames not aligned enough
2019-08-11 22:35:12 -04:00
Andrew Kelley
4d8d513e16
all tests passing
2019-08-11 19:53:10 -04:00
Andrew Kelley
1b83ee78a4
allow comptime_int to implicit cast to comptime_float
2019-08-11 12:01:02 -04:00
data-man
4bd4c5e06d
Fixed tiny typo in the math module (shr's description)
2019-08-11 08:15:42 -07:00
Andrew Kelley
0bf6796b76
fix regression in std.math.min
...
closes #3035
2019-08-09 10:22:02 -04:00
Andrew Kelley
da56959a9a
closer to std lib event stuff working
2019-08-08 16:41:38 -04:00
Andrew Kelley
93840f8610
fix var args call on non-generic function
2019-08-08 15:34:41 -04:00
Andrew Kelley
cfe84423c9
fix segfault with var args
2019-08-08 15:13:05 -04:00
Andrew Kelley
e6ef00233e
Merge pull request #3025 from euantorano/fix/3015-std-os-window-rtlgenrandom
...
Fix #3015 - fix RtlGenRandom function signature
2019-08-07 14:21:54 -07:00
Euan Torano
f2bef0447a
Remove unneeded casts.
2019-08-07 22:19:25 +01:00
Andrew Kelley
2cd5e55581
std.math.min: return a more restrictive type sometimes
2019-08-07 16:28:23 -04:00
Euan Torano
2d25348f63
Fix function signature and use a loop to ensure buffer is filled.
2019-08-06 19:32:22 +01:00
Euan Torano
7b8c96612f
Fix #2993 - use getrandom on freebsd
2019-08-05 09:31:38 -07:00
Euan T
8aa87ec441
Add misisng newline
2019-08-05 09:23:15 -07:00
Euan Torano
0157365872
Add missing S_IS* for NetBSD
2019-08-05 09:23:15 -07:00
Andrew Kelley
b7c94be688
Merge remote-tracking branch 'origin/master' into rewrite-coroutines
2019-08-04 19:10:36 -04:00
Sahnvour
8c99a51993
Merge pull request #2797 from Sahnvour/hashing
...
hash algorithm improvements
2019-08-04 21:02:00 +02:00
Sahnvour
54255ee32e
autohash: force inlining of integer hashing so that the optimizer can see the fast path based on key's size which is known at comptime
...
otherwise it will always outline the call to hasher.update, resulting in much worse performance
2019-08-04 12:34:37 +02:00
Sahnvour
3faf5d3857
wyhash: stateless is faster for both iterative hashing and small keys.
2019-08-04 12:34:37 +02:00
Sahnvour
4b5172d287
move autoHash into its own module since it can be used with any hash function implementing a streaming interface
2019-08-04 12:34:37 +02:00
Sahnvour
5bf63bfbf1
make use of hashing streaming interface in autoHash
2019-08-04 12:34:05 +02:00
Sahnvour
8805a7b509
adapt http/headers.zig to wyhash's new interface
2019-08-04 12:34:05 +02:00
Marc Tiehuis
4c93ccab5a
Add throughput test program for hash functions
2019-08-04 12:34:05 +02:00
Marc Tiehuis
83dffc70af
Add iterative wyhash api
2019-08-04 12:34:05 +02:00
Sahnvour
c9ce43f59f
fix hashmap using strings as keys
2019-08-04 12:34:05 +02:00
Sahnvour
5bd407b278
use wyhash in std's hashmap, and improve autoHash to handle more types and behave more correctly
2019-08-04 12:34:05 +02:00
Sahnvour
6150da3df9
direct port of wyhash v2
...
also inspired by https://github.com/ManDeJan/zig-wyhash
2019-08-04 12:34:02 +02:00
Andrew Kelley
f01cb8cc16
Merge pull request #2998 from daurnimator/return-elf
...
std: return Elf object from constructors instead of filling in pointer
2019-08-04 00:21:38 -07:00
daurnimator
887eac0219
std: remove elf.auto_close_stream and elf.prealloc_file
2019-08-04 16:27:36 +10:00
Andrew Kelley
63ebd9d12e
Merge remote-tracking branch 'origin/master' into llvm9
2019-08-03 12:39:15 -04:00