10304 Commits

Author SHA1 Message Date
Andrew Kelley
400d8d0b82
Merge pull request #6212 from ziglang/update-glibc
Update to glibc 2.32
2020-08-31 03:32:21 -04: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
Andrew Kelley
19d5dfba5f update glibc ABI files to 2.32 2020-08-30 21:28:11 -07:00
Andrew Kelley
dd8cc6b0f1 update glibc headers to 2.32 2020-08-30 21:27:30 -07:00
Andrew Kelley
eeadd55d15 fix tools/process_headers.zig regression
When upgrading to the new std lib HashMap API, the process_headers code
regressed because something that was supposed to be a pointer ended up
being a copy of a value. This resulted in the modification of a field
not being picked up.

Also switch from Sha256 to Blake3 while we're at it.
2020-08-30 21:24:41 -07: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
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
3c87872dc5
stage2: Update to new std.meta.TrailerFlags API 2020-08-27 15:21:19 -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
Veikka Tuominen
f6cedfaaca
Merge pull request #6160 from extrasharp/keyword-documentation
Add Keyword Reference section
2020-08-27 16:12:18 +03: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
Andrew Kelley
5fed721290 Merge branch 'Vexu-stage2'
closes #6175
2020-08-26 19:53:49 -07:00
Andrew Kelley
b0995cb9f9 stage2: correct logic for analyzeIsNull 2020-08-26 19:53:36 -07:00
Vexu
cc26cb9b23 stage2: codegen needed for basic for loop 2020-08-26 19:50:56 -07:00
Vexu
fb28349349 stage2: astgen catch 2020-08-26 19:50:56 -07:00
Vexu
bf014d529a stage2: array access astgen 2020-08-26 19:50:56 -07:00
Vexu
bcd04089eb stage2: add helpful error message for invalid for operands 2020-08-26 19:50:56 -07:00
Vexu
b1aa2857ff stage2: astgen for loops 2020-08-26 19:50:56 -07:00
Sobeston
7d0bb0774e std.mem.count 2020-08-26 17:37:05 -04:00
Andrew Kelley
091d693c53
Merge pull request #6164 from jedisct1/cryptobench
Improve crypto benchmarks
2020-08-26 17:30:31 -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
Andrew Kelley
3abf9e1457
Merge pull request #6163 from ziglang/stage2-condbr
stage2: codegen for conditional branching
2020-08-26 04:02:43 -04:00
Andrew Kelley
0c5faa61ae stage2: codegen: fix reuseOperand not doing death bookkeeping 2020-08-26 01:00:04 -07:00
Andrew Kelley
237d9a105d stage2: support debug dumping zir as a build option
So that it's not needed to manually comment and uncomment the debug
code.
2020-08-25 22:44:18 -07:00
Andrew Kelley
e97157f71c stage2: codegen for conditional branching
* Move branch-local register and stack allocation metadata to the
   function-local struct. Conditional branches clone this data in order
   to restore it after generating machine code for a branch.
   Branch-local data is now only the instruction table mapping *ir.Inst
   to MCValue.
 * Implement conditional branching
   - Process operand deaths
   - Handle register and stack allocation metadata
 * Avoid storing unreferenced or void typed instructions into
   the branch-local instruction table.
 * Fix integer types reporting the wrong value for hasCodeGenBits.
 * Remove the codegen optimization for eliding length-0 jumps. I need to
   reexamine how this works because it was causing invalid jumps to be
   emitted.
2020-08-25 22:44:18 -07:00
Andrew Kelley
b68fa9970b stage2 codegen: Rework genCondBr
so that the arch-independent logic isn't buried and duplicated.
2020-08-25 22:44:18 -07: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
Jakub Konka
55dc81ba2a
Hardcode runtime (libSystem) version to minimum possible
While we try to work out what the correlation between the OS and runtime
versions is, this commit hardcodes the latter to the minimum (compat)
version of 1.0.0.

Signed-off-by: Jakub Konka <kubkon@jakubkonka.com>
2020-08-26 06:30:54 +02:00