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
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
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
tgschultz
89eade0548
Style cleanups, u64 casts, Timer.start returns error instead of unreachable on unexpected errno.
2018-04-19 10:01:41 -05:00
tgschultz
3c9b6f8cd5
Fixed another incorrect comment
2018-04-18 19:57:47 -05:00
tgschultz
fdebe38fa3
Added notes regarding CLOCK_MONOTONIC_RAW and made it easy to change our mind in the future.
...
Updated std.os imported tests' block with lazy declaration workaround and added time.zig.
Corrected some incorrect comments.
2018-04-18 19:48:19 -05:00
tgschultz
5c83d271a3
Fixed incorrect sign on epoch.clr
2018-04-18 18:50:28 -05:00
tgschultz
7cfe328a16
fixed typos.
2018-04-18 17:43:35 -05:00
tgschultz
bf9cf28322
Fixed compiler errors around darwin code.
2018-04-18 15:46:50 -05:00
tgschultz
8b66dd8c7d
Added unstaged changes.
2018-04-18 13:55:42 -05:00
tgschultz
c90f936eef
Added timestamp, high-perf. timer functions.
2018-04-18 13:52:25 -05:00
Marc Tiehuis
c7cb5c31e5
Add exp/norm distributed random float generation
2018-04-16 20:06:50 +12:00
Andrew Kelley
caefaf781e
std.debug: dumpStackTrace & friends use DirectAllocator
...
this has the downside of failing to print a stack trace
when the system is out of memory (maybe we could add a
FallbackAllocator which tries DirectAllocator and falls
back on the 200KB preallocated buffer).
but for the more common use case when the system is not
out of memory, but the debug info cannot fit in
std.debug.global_allocator, now stack traces will work.
this is the case for the self hosted compiler.
2018-04-16 03:17:15 -04:00
Alexandros Naskos
253ecd5c11
Added ReleaseSmall mode
2018-04-16 03:26:10 +03:00
Andrew Kelley
b9360640ce
add @atomicLoad builtin
...
See #174
2018-04-15 18:12:00 -04:00
Andrew Kelley
859b10d8bf
std.math.ln and std.math.exp use float strict mode
...
closes #920
2018-04-15 15:22:27 -04:00
Andrew Kelley
b5459eb987
add @sqrt built-in function
...
See #767
2018-04-15 13:26:58 -04:00
Andrew Kelley
b7af9edb8a
add std.os.createThread
...
this adds kernel thread support to the standard library for
linux.
See #174
2018-04-14 02:24:05 -04:00
Andrew Kelley
4662fd4d92
Merge pull request #919 from zig-lang/self-hosted-parser-refactor
...
Self-hosted parser refactor
2018-04-13 11:17:09 -04:00
Andrew Kelley
30c5f3c441
Merge pull request #915 from zig-lang/self-hosted-cli
...
Revise self-hosted command line interface
2018-04-13 11:16:06 -04:00
Marc Tiehuis
fe9489ad63
Fix windows access check
2018-04-13 22:50:57 +12:00
Marc Tiehuis
03bec631bd
Replace File.exists with File.access
2018-04-13 21:27:09 +12:00
Jimmi Holst Christensen
a498993fd1
Merged with master
2018-04-13 10:40:37 +02:00
Jimmi Holst Christensen
44c53c9979
std.zig.parser: Refactor round 2
...
* More work on ensuring that each state only eat one token
* VarDecl parsing now constructs its node
* Handling all fn parsing in the same case
* Using eatToken instead of getNextToken where possible
* All tokenIdTo* now takes @TagType(Token.Id)
* Added a createToCtxLiteral function
2018-04-13 10:15:12 +02:00
Andrew Kelley
0f652b4d80
zig fmt: switch cases on new lines
...
See #911
2018-04-12 21:56:12 -04:00
Andrew Kelley
9e701e951b
zig fmt includes trailing commas
...
See #911
2018-04-12 21:40:15 -04:00
Andrew Kelley
d4572d1140
zig fmt: container init fields each on own line
...
See #911
2018-04-12 21:23:18 -04:00
Jimmi Holst Christensen
fad54e62bb
std.zig.ast: Fixed build failures
2018-04-12 18:56:58 +02:00
Jimmi Holst Christensen
d35a6655e0
std.zig.parser: Refactored commaOrEnd
to expectCommaOrEnd
...
* Now it returns end when found, or null if comma was found.
* State should now be appended outside the function
2018-04-12 18:13:09 +02:00
Andrew Kelley
29e0e4088e
Merge remote-tracking branch 'origin/master' into self-hosted-cli
2018-04-12 11:20:38 -04:00