Jimmi Holst Christensen
8139c5a516
New Zig formal grammar ( #1685 )
...
Reverted #1628 and changed the grammar+parser of the language to not allow certain expr where types are expected
2018-11-13 05:08:37 -08:00
Andrew Kelley
0f3e7387bf
cleanups
2018-10-31 10:44:05 -04:00
Andrew Kelley
b04c6cee60
Merge branch 'add-test-for-atomic-Queue-dump' of https://github.com/winksaville/zig into winksaville-add-test-for-atomic-Queue-dump
2018-10-31 10:29:49 -04:00
Jimmi Holst Christensen
378d3e4403
Solve the return type ambiguity ( #1628 )
...
Changed container and initializer syntax
* <container> { ... } -> <container> . { ... }
* <exrp> { ... } -> <expr> . { ...}
2018-10-15 09:51:15 -04:00
Marc Tiehuis
67fb4d1359
Improve time.sleep api
2018-10-11 11:57:59 -04:00
Andrew Kelley
9d4eaf1e07
update std lib API for I/O
...
std.io.FileInStream -> std.os.File.InStream
std.io.FileInStream.init(file) -> file.inStream()
std.io.FileOutStream -> std.os.File.OutStream
std.io.FileOutStream.init(file) -> file.outStream()
remove a lot of error code possibilities from os functions
std.event.net.socketRead -> std.event.net.read
std.event.net.socketWrite -> std.event.net.write
add std.event.net.readv
add std.event.net.writev
add std.event.net.readvPosix
add std.event.net.writevPosix
add std.event.net.OutStream
add std.event.net.InStream
add std.event.io.InStream
add std.event.io.OutStream
2018-09-30 17:28:35 -04:00
Wink Saville
d9ed3d186d
Add test for Queue.dump
...
To make dump testable added dumpToSteam which takes a stream as input
and added the stream as a paraemter to dumpRecursive.
Added test "std.atomic.Queue dump"
And to make the test more robust SliceOutStream.pos is now public. This
allows the user of SliceOutStream to know the length of the data captured.
2018-09-14 14:14:58 -07:00
Wink Saville
82af31ce36
Fix additional regressions calling FileOutStream/FileInStream init()
...
This is caused by change 686663239a
and not
fixed in 832caefc2a
.
2018-09-14 12:07:21 -04:00
Andrew Kelley
c06a61e9bf
remove this
. add @This()
.
...
closes #1283
2018-09-13 16:34:33 -04:00
Andrew Kelley
821805aa92
WIP: Channel.getOrNull
2018-08-02 17:04:17 -04:00
Andrew Kelley
a9ab528e34
std.event.Loop.onNextTick dispatches work to waiting threads
2018-07-17 15:17:44 -04:00
Andrew Kelley
9751a0ae04
std.atomic: use spinlocks
...
the lock-free data structures all had ABA problems and
std.atomic.Stack had a possibility to load an unmapped memory address.
2018-07-11 19:38:01 -04:00
Andrew Kelley
0874a5ba77
std.atomic.queue - document limitation and add MPSC queue
2018-06-29 14:45:42 -04:00
Andrew Kelley
85f928f8bf
remove std.mem.Allocator.construct and other fixups
2018-06-20 17:33:29 -04:00
Andrew Kelley
e891f9cd9d
zig fmt
2018-06-20 17:16:27 -04:00
kristopher tate
71db8df548
std: update stdlib to match updated allocator create signature; ref #733
2018-06-21 00:40:21 +09:00
Andrew Kelley
fc87f6e417
fix race condition bug in test harness of std.atomic
2018-06-13 11:57:57 -04:00
Andrew Kelley
fdd9cf0928
better debugging for CI failures of std.atomic
2018-06-12 15:14:32 -04:00
Andrew Kelley
77678b2cbc
breaking syntax change: orelse keyword instead of ?? ( #1096 )
...
use the `zig-fmt-optional-default` branch to have zig fmt
automatically do the changes.
closes #1023
2018-06-10 01:13:51 -04:00
Andrew Kelley
fcbb7426fa
use * for pointer type instead of &
...
See #770
To help automatically translate code, see the
zig-fmt-pointer-reform-2 branch.
This will convert all & into *. Due to the syntax
ambiguity (which is why we are making this change),
even address-of & will turn into *, so you'll have
to manually fix thes instances. You will be guaranteed
to get compile errors for them - expected 'type', found 'foo'
2018-05-31 17:28:07 -04:00
Andrew Kelley
43085417be
update github.com/zig-lang to github.com/ziglang
2018-05-24 21:27:44 -04:00
Andrew Kelley
4787127cf6
partial conversion to post-fix pointer deref using zig fmt
2018-05-10 00:29:49 -04:00
Andrew Kelley
02c1b9df3b
fix compiler-rt tests accidentally running std tests
...
also reduce the aggressiveness of std.atomic.stack
and std.atomic.queue fuzz testing. appveyor has 1 core
and 10,000 iterations is too much for 6 threads to
thrash over
2018-05-02 21:34:34 -04:00
Andrew Kelley
c186cd187e
std.atomic - use AtomicOrder.SeqCst for everything
...
also use less memory for the tests
2018-05-02 20:19:26 -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
abf90eaa67
enable atomic queue and stack tests for macos
2018-04-29 00:09:32 -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
4ac36d094c
add std.atomic.Stack and std.atomic.Queue
2018-04-28 16:11:32 -04:00