6889 Commits

Author SHA1 Message Date
LemonBoy
e1e06e6766 linux-i386 support 2019-11-30 16:13:33 +01:00
Andrew Kelley
85e1e3b95f
Merge pull request #3284 from Sahnvour/export_variables
Improved support for exporting variables
2019-11-30 00:25:52 -05:00
Andrew Kelley
b220be7a33
more test regression fixes 2019-11-29 23:04:19 -05:00
Andrew Kelley
f980c29306
fix typo in error note for integer casting 2019-11-29 22:33:55 -05:00
Andrew Kelley
d87b13f2f7
fix windows std lib regressions 2019-11-29 21:55:27 -05:00
Andrew Kelley
6936243ee1
fix self-hosted compiler regressions 2019-11-29 21:49:08 -05:00
Andrew Kelley
7278c51ddd
fix empty result location for parameters not working 2019-11-29 21:36:12 -05:00
Andrew Kelley
559bd27b08
fix @bitCast result coercing to error union by returning 2019-11-29 19:58:00 -05:00
Andrew Kelley
815b4cfd9d
fix return result loc as peer result loc in inferred error set function 2019-11-29 18:21:21 -05:00
Andrew Kelley
a438a615e6
docs: this statement was in the wrong section 2019-11-29 12:41:07 -05:00
Andrew Kelley
2ab7f31e99
std.math: remove constants that should be expressions
All four of these can be represented in fewer characters with
expressions, which will be guaranteed to happen at compile-time, and
have the same or better precision.

The other math constants here which depend on function calls could be
similarly removed if and when #425 is solved. However I left them for
now since Zig does not eagerly evaluate functions with comptime parameters.
2019-11-29 10:48:46 -05:00
Andrew Kelley
bcdb3a9006
more progress 2019-11-28 00:02:53 -05:00
Quetzal Bradley
a6c9c5f767 implement correct buffer wrapping logic in std.event.Channel 2019-11-27 23:09:24 -05:00
Michael Dusan
ca61a5f0b7 Windows: fix test/standalone/shared_library
- on Windows use first found env var { "Path", "PATH" }

Bug Description: `build test` results in the following error on in
a msys64 shell with "PATH" env var instead of "Path":

    error while loading shared libraries: mathtest.dll:
    cannot open shared object file: No such file or directory
2019-11-27 19:24:06 -05:00
Felix Queißner
f0d6447569 Implements std.testing.expectEqual for tagged unions. (#3773) 2019-11-27 16:35:32 -05:00
Andrew Kelley
0f2a9af4aa
Merge pull request #3769 from MCRusher/initcapacity-for-buffer-arraylist
Add initCapacity for buffer & arraylist
2019-11-27 13:40:39 -05:00
Andrew Kelley
83c664eaa0
Merge pull request #3780 from Vexu/stage2-async-review
Update use of async functions in self hosted compiler
2019-11-27 13:38:49 -05:00
Andrew Kelley
bf3ac66150
remove type coercion from array values to references
* Implements #3768. This is a sweeping breaking change that requires
   many (trivial) edits to Zig source code. Array values no longer
   coerced to slices; however one may use `&` to obtain a reference to
   an array value, which may then be coerced to a slice.

 * Adds `IrInstruction::dump`, for debugging purposes. It's useful to
   call to inspect the instruction when debugging Zig IR.

 * Fixes bugs with result location semantics. See the new behavior test
   cases, and compile error test cases.

 * Fixes bugs with `@typeInfo` not properly resolving const values.

 * Behavior tests are passing but std lib tests are not yet. There
   is more work to do before merging this branch.
2019-11-27 03:37:50 -05:00
Vexu
4d8a8e65df
add more workarounds 2019-11-27 10:17:37 +02:00
Andrew Kelley
63300a21dd
Merge branch 'kprotty-event_lock'
closes #3751
2019-11-26 21:08:25 -05:00
daurnimator
8a71f77c4a
std: lie about windows socklen_t signed-ness 2019-11-27 13:01:34 +11:00
daurnimator
edc84e7ef7
std: add more winsock functions 2019-11-27 13:01:33 +11:00
daurnimator
19f26578c0
std: windows sockaddr constants come from ws2_32 2019-11-27 13:01:32 +11:00
daurnimator
8aa3d6019c
std: add windows.USHORT definition 2019-11-27 13:01:30 +11:00
daurnimator
254c79125b
std: fix WSAIoctl definition
zig automatically passes functions as pointers
2019-11-27 13:01:28 +11:00
daurnimator
d99f0a2b8f
std: IO_STATUS_BLOCK's status member is an NTSTATUS; add union 2019-11-27 13:01:10 +11:00
daurnimator
1537d4701e
std: fix definition of NtDeviceIoControlFile 2019-11-27 13:01:09 +11:00
daurnimator
a453c99ba9
std: add comments for some nt status codes 2019-11-27 13:01:08 +11:00
daurnimator
2c6788d7de
std: add windows.closesocket 2019-11-27 13:01:07 +11:00
daurnimator
6b5b0e6cd6
std: fix windows.GetOverlappedResult 2019-11-27 13:01:05 +11:00
daurnimator
ce9966a39b
std: improved windows.DeviceIoControl 2019-11-27 13:01:04 +11:00
daurnimator
b05a5a3e52
std: add CreateEvent for windows 2019-11-27 13:01:03 +11:00
daurnimator
78c0d33eb7
std: add WaitForMultipleObjects for windows 2019-11-27 13:01:02 +11:00
daurnimator
21ca54f560
std: add alertable argument for windows.WaitForSingleObject 2019-11-27 13:00:59 +11:00
kprotty
ff445814cb
remove wait timeout test cases 2019-11-26 20:40:28 -05:00
kprotty
056b5a26c9
ResetEvent: get abstime based on std.time 2019-11-26 20:40:28 -05:00
kprotty
ca2d566ec8
replace ThreadParker with ResetEvent + WordLock mutex 2019-11-26 20:40:27 -05:00
kprotty
a0955990dc
fix ResetEvent windows bugs 2019-11-26 20:40:04 -05:00
kprotty
ef208fee3c
Definition fixups & ResetEvent test cases 2019-11-26 20:40:04 -05:00
kprotty
9bce97a479
Start on ResetEvent 2019-11-26 20:40:04 -05:00
Andrew Kelley
8ecd6c4d8c
add compiler note for bad int coercion
closes #3724
2019-11-26 19:50:52 -05:00
syscall0
a6ef83cccf Fix build system crash when compiling windows dll 2019-11-26 15:40:31 -05:00
Vexu
0d55075de4
fix command functions not being async pointers 2019-11-26 22:38:05 +02:00
Vexu
798d05dd02
add workaround for #3190 2019-11-26 22:11:04 +02:00
Vexu
379d547603
add missing cast to generic function call result 2019-11-26 14:32:37 -05:00
Vexu
0e405c5fc5
add missing cast to call result type 2019-11-26 14:32:34 -05:00
Andrew Kelley
7de138ad7c
std.elf: breaking improvements to the API
and also integration with std.Target.Arch
2019-11-26 14:25:35 -05:00
Benjamin Feng
aca1367533 Optimize binary search algorithm 2019-11-26 13:09:58 -05:00
Vexu
128034481a
solve recursion in self hosted 2019-11-26 18:25:29 +02:00
Vexu
36849d8a7b
fixes and cleanup in self hosted 2019-11-26 11:52:12 +02:00