2260 Commits

Author SHA1 Message Date
Bas van den Berg
0a40a61548 os.send(to) and os.recv(from) functions made to work on windows. 2020-09-03 13:23:48 +02:00
Bas van den Berg
d80554cedf Made some changes and additions to the networking to make it work on windows. 2020-09-02 23:53:29 +02:00
Sahnvour
90ace40e07
Merge pull request #5999 from Sahnvour/hashmap
New hashmap implementation
2020-09-02 08:52:32 +02:00
Tadeo Kondrak
1b2154dfe2 builtin: Add TypeInfo.StructField.is_comptime 2020-09-02 00:17:59 -04:00
Sahnvour
575fbd5e35 hash_map: rename to ArrayHashMap and add new HashMap implementation 2020-09-02 00:17:50 +02:00
Jan200101
2148336a81 follow filesystem hierarchy standard when adding lib directories 2020-08-31 17:44:43 -04:00
Andrew Kelley
8dc58a4e94
Merge pull request #6208 from tadeokondrak/remove-@OpaqueType
Remove @OpaqueType
2020-08-31 17:44:03 -04:00
Andrew Kelley
0d94cb932f
Merge pull request #6197 from LemonBoy/fix-6049
gpa: Fix bookkeeping logic
2020-08-31 17:38:17 -04:00
LemonBoy
29de809a92 gpa: Don't leak memory when the upper bound is hit 2020-08-31 12:35:25 +02:00
Tadeo Kondrak
96e46cdd6e
std.zig.render: specify when rewrite should be removed 2020-08-30 23:45:47 -06:00
Tadeo Kondrak
c51de3c266
std.zig.render: rewrite @OpaqueType() to @Type(.Opaque) 2020-08-30 23:41:40 -06:00
Andrew Kelley
43ac5e5dac
Merge pull request #6184 from tadeokondrak/TrailerFlags-update
std.meta.TrailerFlags: use @Type to improve API
2020-08-31 01:00:23 -04:00
Tadeo Kondrak
d3e5105ecc
std.zig.ast: make getTrailer/setTrailer private and add getters/setters 2020-08-30 17:18:25 -06:00
daurnimator
1bb30c5e22 std.ChildProcess: pass CLOEXEC when creating error pipe 2020-08-30 14:21:14 -04:00
Jakub Konka
04361dd461 Add more missing MachO constants and structs
Signed-off-by: Jakub Konka <kubkon@jakubkonka.com>
2020-08-30 09:47:36 +02:00
Andrew Kelley
427e2d689d
Merge pull request #6189 from katesuyu/div-ceil
std: Add std.math.divCeil
2020-08-30 01:09:39 -04:00
Sahnvour
ac85befbb4 handle lack of privilege to create symbolic links on windows 2020-08-30 06:52:53 +02:00
LemonBoy
e355bcce36 compiler-rt: Add missing floatdisf routine
Add __floatdisf and __aeabi_l2f

Closes #6188
2020-08-30 00:28:18 -04:00
LemonBoy
ff4fde767f std: Open the eventfd fd with CLOEXEC flag
Make sure the fd we use to communicate with the parent process is not
leaked to the child process.

Closes #5966
2020-08-30 00:22:54 -04:00
LemonBoy
f20305d249 gpa: Fix bookkeeping logic
The backing allocator may return a block that's actually bigger than the
one required by the user, use the correct quantity when keeping track of
the allocation ceiling.

Closes #6049
2020-08-29 20:51:30 +02:00
wozeparrot
00301bbdd3 fix SimpleTextInputProtocol 2020-08-29 20:24:59 +03:00
Kate Tsuyu
e496485af4
std.math.divCeil: fix expectEqual argument order 2020-08-29 03:07:36 -04:00
Kate Tsuyu
552e2bf758
std.math.divCeil: use expectEqual for tests 2020-08-29 02:32:54 -04:00
Kate Tsuyu
340871f061
std.math.divCeil: move compile error back down 2020-08-29 00:37:10 -04:00
Kate Tsuyu
49e67ce0e8
std.math.divCeil: move compile error to top 2020-08-29 00:31:49 -04:00
Kate Tsuyu
933bfcff64
std.math.divCeil: support comptime_int/float 2020-08-29 00:21:17 -04:00
joachimschmidt557
3750cc06fd Improve io.Reader.skipBytes and add tests 2020-08-28 19:42:36 +02:00
Kate Tsuyu
f577d12fbc
std.math.divCeil: conform to more test cases 2020-08-28 11:20:42 -04:00
Kate Tsuyu
14b6fb88fb
std.math.divCeil: handle floats correctlier 2020-08-28 09:55:50 -04:00
Kate Tsuyu
aacfef17d5
std.math.divCeil: handle floats correctly 2020-08-28 09:48:40 -04:00
Kate Tsuyu
9dfb917c20
std: Add std.math.divCeil 2020-08-28 08:58:51 -04:00
Tadeo Kondrak
e4b61aa527
std.meta.TrailerFlags fixes 2020-08-27 16:02:00 -06:00
Tadeo Kondrak
ce8a3ef2de
std.zig: Update to new std.meta.TrailerFlags API 2020-08-27 15:21:18 -06:00
Tadeo Kondrak
f94583076e
std.meta.TrailerFlags: use @Type to improve API
- Use an enum of all field names instead of string literals
- Create a struct type with all fields optional instead of relying on
anonymous struct literals

This should provide better type inference, compile errors, and a
(subjectively) cleaner API.
2020-08-27 15:11:33 -06:00
Asherah Connor
dc7608da97 ensure main return type is not i8
Avoids a compile error from start.zig:

	/home/kivikakk/zig/build/lib/zig/std/start.zig:265:28: error:
	expected type 'u8', found 'i8'
			    return result;
				   ^
	/home/kivikakk/zig/build/lib/zig/std/start.zig:265:28: note:
	unsigned 8-bit int cannot represent all possible signed 8-bit
	values
			    return result;
2020-08-27 15:03:56 +03:00
Cléo Rebert
fc001110b4 Added edge case test to mem.count
Some implementations break on this edge case. Thought relevant to add it.
2020-08-27 04:12:28 -04:00
Sobeston
7d0bb0774e std.mem.count 2020-08-26 17:37:05 -04:00
Frank Denis
ad18078d53 forceEval() -> doNotOptimizeAway() 2020-08-26 10:50:34 +02:00
Frank Denis
0bd53dd203 Rename blackBox, move it to std.mem.forceEval() 2020-08-26 10:50:34 +02:00
Frank Denis
ff2e82f382 Rename at to tag in AEADs 2020-08-26 10:50:34 +02:00
Frank Denis
b8729ca1a0 Improve crypto benchmarks
- 1MiB objects on the stack doesn't play well with wasmtime.
Reduce these to 512KiB so that the webassembly benchmarks can run.
- Pass expected results to a blackBox() function. Without this, in
release-fast mode, the compiler could detected unused return values,
and would produce results that didn't make sense for siphash.
- Add AEAD constructions to the benchmarks.
- Inline chacha20Core() makes it 4 times faster.
- benchmarkSignatures() -> benchmarkSignature() for consistency.
2020-08-26 10:50:34 +02:00
Jakub Konka
982ab7df6c
Merge pull request #6161 from kubkon/macho-text
Add (empty) __TEXT segment load command
2020-08-26 07:03:58 +02:00
Andrew Kelley
3e24e95892 std.rand: promote normal comments to doc comments 2020-08-25 19:51:40 -07:00
Andrew Kelley
b498eebfd4 std.math.big: fix use-after-free
When there is parameter aliasing, the ensureCapacity calls can cause the
Const parameters to become dangling pointers.

See #6167
2020-08-25 19:49:40 -07:00
Andrew Kelley
973e6c978c std: clean up GeneralPurposeAllocator memset code
The freeSlot function was only called once so I inlined the logic and
utilized some of the other locals that were in scope.
2020-08-25 19:48:39 -07:00
Andrew Kelley
6fb105fdd7 std: GeneralPurposeAllocator: set freed bytes to undefined
Helps catch use-after-free. Caught a couple issues in the self-hosted
compiler.
2020-08-25 13:36:40 -07:00
Rocknest
140c599559
Fix & update windows version stuff (#6157)
* Update windows version constants
* Add docs
2020-08-24 16:47:44 -04:00
Jakub Konka
43b6d0e4b1
Add (empty) __TEXT segment load command
Also, link against `libSystem` by default when targeting macOS.

Signed-off-by: Jakub Konka <kubkon@jakubkonka.com>
2020-08-24 21:18:27 +02:00
Jakub Konka
9745e7b512 Clean up draft for merging into upstream
Signed-off-by: Jakub Konka <kubkon@jakubkonka.com>
2020-08-24 17:59:44 +02:00
Jakub Konka
1698e6d7a7 Link against libSystem when generating Mach-O exe
This is required when generating an exe on macOS.

Signed-off-by: Jakub Konka <kubkon@jakubkonka.com>
2020-08-24 17:59:44 +02:00