907 Commits

Author SHA1 Message Date
Andrew Kelley
a912c7d75f zig fmt: same-line comment after switch prong 2018-04-29 21:27:44 -04:00
Andrew Kelley
c53209a8a8 zig fmt: comments before var decl in struct 2018-04-29 19:55:57 -04:00
Andrew Kelley
3235eb03f9 zig fmt: preserve same line comment after struct field 2018-04-29 19:23:19 -04:00
Andrew Kelley
3fa0bed985 zig fmt: array literal with 1 item on 1 line 2018-04-29 18:22:39 -04:00
Josh Wolfe
9543c0a7cc use explicit error sets for utf8Decode functions
and run unicode tests at comptime also
2018-04-29 18:07:18 -04:00
Andrew Kelley
c03b9010db zig fmt: preserve same-line comment after statement 2018-04-29 17:37:15 -04:00
Josh Wolfe
2387292f20 move some checks around in utf8Encode logic to be more zig idiomatic 2018-04-29 17:28:11 -04:00
Josh Wolfe
8c567d84f1
Merge pull request #954 from BraedonWooding/patch-2
Utf8 Encoding from Codepoint to Bytes
2018-04-29 16:57:29 -04:00
Andrew Kelley
ad4ee47d9f zig fmt: preserve comments before global variables 2018-04-29 16:24:12 -04:00
Andrew Kelley
a0e9f1e0c3 fix bootstrap_lib for windows, take 2 2018-04-29 15:51:23 -04:00
Andrew Kelley
5e5eceb0de fix bootstrap_lib for windows 2018-04-29 15:50:56 -04:00
Andrew Kelley
b7095912c7 zig fmt: respect comments before statements 2018-04-29 15:48:53 -04:00
Andrew Kelley
f37e79e720
Merge pull request #963 from zig-lang/atomic-stack-and-queue
Atomic stack and queue
2018-04-29 12:29:40 -04:00
Andrew Kelley
c76b0a845f fix std threads for linux 2018-04-29 02:56:59 -04:00
Andrew Kelley
b21bcbd775 fix std threads for macos 2018-04-29 02:52:04 -04:00
Andrew Kelley
6376d96824 support kernel threads for windows
* remove std.os.spawnThreadAllocator - windows does not support
   an explicit stack, so using an allocator for a thread stack
   space does not work.
 * std.os.spawnThread - instead of accepting a stack argument, the
   implementation will directly allocate using OS-specific APIs.
2018-04-29 02:40:22 -04:00
Andrew Kelley
bf8e419d2b linux uses pthreads when linking against libc 2018-04-29 00:40:04 -04:00
Andrew Kelley
abf90eaa67 enable atomic queue and stack tests for macos 2018-04-29 00:09:32 -04:00
Andrew Kelley
a425420993 make pthreads threads work on darwin
darwin pthreads adds a restriction that the stack start and end
must be page aligned
2018-04-29 00:07:32 -04:00
Andrew Kelley
998e25a01e pthread support working 2018-04-28 23:47:39 -04:00
Andrew Kelley
a344cb03bc *WIP* use pthreads when linking libc 2018-04-28 23:30:13 -04:00
Andrew Kelley
ec2a81a081 fix compiler-rt ABI for x86_64 windows 2018-04-28 22:03:07 -04:00
Andrew Kelley
a10351b439 disable atomic stack and queue tests for non-linux 2018-04-28 18:19:00 -04:00
Andrew Kelley
5d6e44b3f2 add tests for std.atomic Queue and Stack 2018-04-28 18:00:51 -04:00
Andrew Kelley
96ecb40259 add fuzz tests for std.atomic.Stack 2018-04-28 17:53:06 -04:00
Andrew Kelley
4ac36d094c add std.atomic.Stack and std.atomic.Queue 2018-04-28 16:11:32 -04:00
Braedon
07af6559d8
Changed to use shifting and masking 2018-04-25 16:26:57 +10:00
Braedon
f6cbe9a9cc
Utf8 Encode 2018-04-25 14:59:03 +10:00
Andrew Kelley
7270f35c93 Merge remote-tracking branch 'origin/master' into float-printing 2018-04-24 23:47:37 -04:00
Andrew Kelley
27cbb44993
Merge pull request #949 from zig-lang/complex-math
Add initial complex-number support
2018-04-24 21:24:08 -04:00
Andrew Kelley
84391af7b8 convert NOTE to TODO so we catch it later
See #363

For Complex as a builtin type, see discussion in #949
2018-04-24 21:23:03 -04:00
Andrew Kelley
1d998d5dce clean up complex math tests 2018-04-24 21:14:12 -04:00
Andrew Kelley
13076d5f22 std.mem: add more slice manipulation functions
* add std.mem.trimLeft
 * add std.mem.trimRight
 * add std.mem.trimRight
 * add std.mem.lastIndexOfScalar
 * add std.mem.lastIndexOfAny
 * add std.mem.lastIndexOf
 * add std.mem.endsWith

closes #944

Thanks Braedon Wooding for the original PR
2018-04-24 20:53:36 -04:00
Marc Tiehuis
0501e066b5 crypto throughput test now uses os.time module 2018-04-24 23:54:27 +12:00
Marc Tiehuis
d5e99cc05e Add initial complex-number support
- Library type instead of builtin
 - All C complex functions implemented

Partial WIP: Needs more tests for edge cases.
2018-04-24 19:18:31 +12:00
Marc Tiehuis
e5175d432e Fix release float printing errors
Fixes #564.
Fixes #669.
Fixes #928.
2018-04-23 17:22:51 +12:00
Marc Tiehuis
d8ba1bc120 Improve fmt float-printing
- Fix errors printing very small numbers
 - Add explicit scientific output mode
 - Add rounding based on a specific precision for both decimal/exp
 modes.
 - Test and confirm exp/decimal against libc for all f32 values. Various
 changes to better match libc.
2018-04-23 17:22:51 +12:00
Andrew Kelley
371a3ad4bd Merge branch 'tgschultz-std.os.time' 2018-04-22 18:13:57 -04:00
Andrew Kelley
7af6ed3f20 add alignment docs 2018-04-22 18:13:53 -04:00
Andrew Kelley
21767144fc linux: support VDSO for clock_gettime
also fix a compiler crash when using cmpxchg with nullable pointer
2018-04-22 18:11:50 -04:00
Andrew Kelley
da2af9c613 fixups 2018-04-22 13:36:26 -04:00
Andrew Kelley
0dcadc61b4 Merge branch 'std.os.time' of https://github.com/tgschultz/zig into tgschultz-std.os.time 2018-04-22 13:24:25 -04:00
Andrew Kelley
98b88bb52f add alignment docs 2018-04-22 12:52:28 -04:00
Andrew Kelley
3010668390
Merge pull request #939 from tgschultz/large-alignment-directalloc
DirectAllocator alignments > os.page_size on posix
2018-04-22 12:49:13 -04:00
tgschultz
a1083b019c Added DirectAllocator support for alignments > os.page_size on posix systems 2018-04-21 20:41:49 -05:00
Andrew Kelley
1098545e47 std.zig.parser: remove unused field 2018-04-21 02:10:22 -04:00
Harry Eakins
eef4bbb65f Changed all MB to MiB 2018-04-21 11:06:10 +12:00
Harry Eakins
b229aff34a Readability improvements and bug-fix to std/crypto/throughput_test.zig 2018-04-21 11:06:10 +12:00
Andrew Kelley
6e57243a79 zig fmt: preserve comments in front of test blocks
* refactor std.zig.parser
 * fix compiler crashing for some compile errors
 * take advantage of @field in std.zig.ast
 * move ast.NodeFoo to ast.Node.Foo
 * comment preservation is more explicit

See #911
2018-04-20 02:15:09 -04:00
tgschultz
ca4053ba49 Use std.os.errorUnexpectedPosix if timer initialization encounters unexpected error 2018-04-19 14:53:58 -05:00