Andrew Kelley
1951ecb228
add a code of conduct
...
this has always been the rules, they are just written down now.
also link to ziglearn.org in the readme
2020-10-08 22:48:16 -07:00
Andrew Kelley
a4828f6d0f
std.c (darwin) update to new opaque syntax
...
This was an undetected conflict between
76a195473d
and
95a37373e9
2020-10-08 22:45:39 -07:00
Andrew Kelley
76a195473d
Merge pull request #6516 from LemonBoy/fastfilecopy
...
std: Make file copy ops use zero-copy mechanisms
2020-10-08 20:14:47 -04:00
Andrew Kelley
b02341d6f5
Merge pull request #6614 from jedisct1/aes-arm
...
std/crypto/aes: add AES hardware acceleration on aarch64
2020-10-08 18:09:40 -04:00
Frank Denis
1bc2b68916
ghash: add pmull support on aarch64
2020-10-08 18:09:23 -04:00
Frank Denis
60d1e675d2
aes/aesni is not based on a Go implementation, only aes/soft is
...
Don't blame them for our bugs :)
2020-10-08 14:55:11 +02:00
Frank Denis
f39dc00ed4
std/crypto/aes: add AES hardware acceleration on aarch64
2020-10-08 14:55:08 +02:00
Tadeo Kondrak
83eda21488
zig_clang/translate_c: Use opaque declarations in Zig
2020-10-08 12:29:59 +03:00
Tadeo Kondrak
0e57f220fb
stage1: Disallow arrays in function parameters or return types
...
Closes #6535 .
2020-10-08 04:17:32 -04:00
xavier
eb33394d14
notice more kinds of optimization flags and debug flags
...
Closes #6091
2020-10-07 18:43:05 -04:00
xavier
a0a834a2f2
restore ability to do comptime math
...
until https://github.com/ziglang/zig/issues/6168 is implemented,
partially revert 0bd53dd203
in order to restore the ability to use std.math in comptime functions.
2020-10-07 17:04:48 -04:00
Andrew Kelley
95a37373e9
Merge pull request #6421 from tadeokondrak/opaque-syntax
...
Add opaque syntax that allows declarations
2020-10-07 16:58:50 -04:00
Andrew Kelley
3c43eeceab
Merge pull request #6595 from tadeokondrak/comptime-print-0
...
std.fmt.comptimePrint: Return null terminated string
2020-10-07 16:55:03 -04:00
Tadeo Kondrak
e9bca9de3c
std.fmt.comptimePrint: Properly null-terminate result and add test
2020-10-07 11:43:23 -06:00
Jakub Konka
07c33dfc95
Remove obsolete addPadding fn and callsites from MachO linker
...
This is no longer needed due to the way writing to the output
file is structured.
Signed-off-by: Jakub Konka <kubkon@jakubkonka.com>
2020-10-07 17:18:37 +02:00
LemonBoy
03762da2af
New review round
2020-10-07 11:13:26 +02:00
Loris Cro
53dee08af9
add WaitGroup to std.event
...
Signed-off-by: Loris Cro <kappaloris@gmail.com>
2020-10-07 04:34:09 -04:00
Tadeo Kondrak
0a6863a267
Remove .Cold calling convention.
...
This isn't a stable, defined calling convention, so it shouldn't be
grouped in with the others.
Closes https://github.com/ziglang/zig/issues/6556
2020-10-07 04:31:20 -04:00
pfg
ae161863db
stage1: improve error messages for missing try
statements
2020-10-07 03:50:11 -04:00
Andrew Kelley
f2d374e846
Merge branch 'FireFox317-fix-32-bit-target'
2020-10-07 00:42:58 -07:00
Andrew Kelley
b2b0bf0506
fixups for the previous commit
...
* std.fs.File.copyRange and copyRangeAll return u64 instead of usize -
the returned value is how much of the `len` is transferred, so the
types should match. This removes the need for an `@intCast`.
* fix typo that removed a subtraction
* Fix the size of codegen.AnyMCValue which gave me a compile error when
I tried to build self-hosted for i386-linux.
* restore the coercion to u64 of syms_sect.sh_info. We want to make
sure the multiplication happens with 64 bits and not the smaller type
used by the ELF format.
* fix another offset parameter in link/Elf.zig to be u64 instead of usize
* add a nice little TODO note to help out Jakub
* FmtError already has FileTooBig in it; we just need to return it.
2020-10-07 00:39:13 -07:00
Timon Kruiper
bd7eab573a
Fix building the zig compiler for 32-bit targets
2020-10-06 23:39:58 -07:00
Tadeo Kondrak
49e68bdcf3
std.fmt.comptimePrint: Return null terminated string
2020-10-06 22:21:06 -06:00
Tadeo Kondrak
bf4bfe54ac
Update compile error test for field access of opaque type
2020-10-06 22:08:30 -06:00
Tadeo Kondrak
6b8ae6fffb
langref: update for opaque {} syntax
2020-10-06 22:08:29 -06:00
Tadeo Kondrak
0a56390230
stage1: use size_t over int as index in resolve_opaque_type
2020-10-06 22:08:28 -06:00
Tadeo Kondrak
d71f339395
stage1: disallow fields in opaque types
2020-10-06 22:08:27 -06:00
Tadeo Kondrak
d5b8172a82
translate_c: emit opaque {} instead of @Type(.Opaque)
2020-10-06 22:08:26 -06:00
Tadeo Kondrak
2b4b03d301
Update zig files for opaque type syntax
2020-10-06 22:08:25 -06:00
Tadeo Kondrak
069fbb3c01
Add opaque type syntax
2020-10-06 22:08:24 -06:00
Frank Denis
fb63a2cfae
std/crypto: faster (mod 2^255-19) square root computation
...
251 squarings, 250 multiplications -> 251 squarings, 11 multiplications
2020-10-06 19:48:26 -04:00
travisstaloch
dd4771a5d2
cache-hash: add test_filter and test_name_prefix ( #6583 )
2020-10-06 19:36:14 -04:00
LemonBoy
87807d53dd
stage2: Fix arg processing for zig run
...
* Stop parsing arguments after `--`
* Calculate the correct index for the first argument after `--`
2020-10-06 19:31:57 -04:00
LemonBoy
1f7ec0de70
Address review comments & fix compilation errors
2020-10-06 11:57:23 +02:00
LemonBoy
a419a1aabc
Move copy_file to fs namespace
...
Now it is a private API.
Also handle short writes in copy_file_range fallback implementation.
2020-10-06 09:38:59 +02:00
Vexu
58502b8bfe
translate-c: respect C operator precedence in macros
2020-10-05 22:26:11 -04:00
Noah Altunian
c507c7862e
Fix spelling in code comment
...
Changed **an handle** -> **a handle**.
2020-10-05 22:25:07 -04:00
Andrew Kelley
41aa5edaaf
Merge pull request #6580 from jedisct1/aesgcm
...
std/crypto: Add support for AES-GCM
2020-10-05 22:20:29 -04:00
Timon Kruiper
75db8d9e2c
Fix cross-compiling the zig compiler
...
zig0 is only used for building objects, thus it has no options like
`build-exe/obj`. But when cross-compiling, we have a working zig
compiler on the host, thus we need to pass `build-obj` to the zig compiler.
2020-10-05 22:18:42 -04:00
Isaac Freund
0741505d6d
std/zig: handle underscore in kernel version
...
On some distros (e.g. Void Linux) the release field of the tsname
struct may contain an underscore followed by a revision number at the
end. (e.g. 5.8.12_2).
2020-10-05 22:17:28 -04:00
LemonBoy
dbc11be038
std: Fix two bugs in bigint pow
...
* Correctly scan all the exponent bits, this caused the incorrect result
to be computed for exponents being powers of two.
* Allocate enough limbs to make llmulacc stop whining.
2020-10-05 22:16:26 -04:00
Frank Denis
06c16f44e7
std/crypto: Add support for AES-GCM
...
Already pretty fast on platforms with AES-NI, even though GHASH
reduction hasn't been optimized yet, and we don't do stitching either.
2020-10-06 00:00:33 +02:00
Frank Denis
d343b75e7f
ghash & poly1305: fix handling of partial blocks and add pad()
...
pad() aligns the next input to the first byte of a block, which is
useful to implement the IETF version of ChaCha20Poly1305 and AES-GCM.
2020-10-05 23:50:38 +02:00
Andrew Kelley
7f7e2d608a
Revert "revert adding std.event.Loop.runDetached"
...
This reverts commit 70f3767903
.
After discussion, I can see the value provided here, specifically with
avoiding the footgun of defer { suspend { free(@frame()); } }.
However the doc comments are updated to explain the semantics directly,
rather than basing them on the behavior of another programming language.
2020-10-05 14:41:51 -07:00
Andrew Kelley
939b4860ef
Merge pull request #6472 from alexnask/add_some_frees
...
Add a few missing deallocations of temporaries to stage1
2020-10-05 04:56:58 -04:00
LemonBoy
22b5e47839
stage1: Implement @reduce builtin for vector types
...
The builtin folds a Vector(N,T) into a scalar T using a specified
operator.
Closes #2698
2020-10-05 04:51:45 -04:00
joachimschmidt557
7c5a24e08c
Turn zig fmt back on in various src/ files
2020-10-05 04:48:58 -04:00
Alexandros Naskos
9952a072cc
Remove MSVC 2015 from supported compilers in README
2020-10-05 03:55:41 -04:00
Andrew Kelley
55ac973953
fix each-lib-rpath functionality
...
It was regressed in 2 ways from the merge of #6250 :
* it was not being enabled by default when the target OS is native.
* we were testing the libfoo.so file path existence with bogus format
string ('{}' instead of '{s}') and so it ended up being something
like "libstd.HashMap(K,V,...).Entry.so" instead of "libfoo.so". Using
{} rather than {s} is a footgun, be careful!
Previous functionality is now restored.
closes #6523
2020-10-04 23:16:46 -07:00
Andrew Kelley
d5d48c6f4e
Merge pull request #6496 from xackus/rlimit
...
std: implement {get, set}rlimit for linux
2020-10-05 01:54:38 -04:00