Commit Graph

3592 Commits

Author SHA1 Message Date
Andrew Kelley
7505529e44
Merge branch 'c-abi'
closes #1411
closes #1264
2018-09-07 13:56:54 -04:00
Andrew Kelley
743b2e4afc
add C ABI test for big unions 2018-09-07 13:51:11 -04:00
Andrew Kelley
421ca1523f
stage1: refactor variable inits to use c abi fn walk 2018-09-07 13:24:41 -04:00
Andrew Kelley
c528c00900
stage1: refactor param vars for C ABI 2018-09-07 12:59:59 -04:00
Andrew Kelley
04d7b565f7
stage1: refactor fn type analysis to use C ABI walk fn 2018-09-07 12:23:50 -04:00
Andrew Kelley
be6cccb3a5
stage1: c abi for big struct works 2018-09-07 11:52:57 -04:00
Andrew Kelley
a9a925e500
add C ABI tests 2018-09-06 16:29:35 -04:00
Andrew Kelley
a375bd0d9f
stage1: compile error instead of incorrect code
for unimplemented C ABI

See #1411
See #1481
2018-09-06 11:58:58 -04:00
Marc Tiehuis
29923efb95
Merge pull request #1480 from kristate/x25519-pubkey-fix
X25519: Fix createPublicKey signature and add test
2018-09-06 17:23:38 +12:00
kristopher tate
15d30b967a std/crypto/x25519.zig: add test for createPublicKey; 2018-09-06 12:24:53 +09:00
kristopher tate
d1855a0e93 std/crypto/x25519.zig: fix signature for createPublicKey; 2018-09-06 12:24:12 +09:00
Andrew Kelley
6632d85e5f
stage1: improve handling of generic fn proto type expr
closes #902
2018-09-05 21:21:59 -04:00
Andrew Kelley
1d8b8ad687
add compile error for using outer scoped runtime variables
from a fn defined inside it. closes #876
2018-09-05 20:32:06 -04:00
Andrew Kelley
8400163e02
stage1: rename more TypeTableEntry types to ZigType 2018-09-05 18:42:56 -04:00
Andrew Kelley
1f5c7ff4d7
stage1: rename VariableTableEntry to ZigVar 2018-09-05 18:35:57 -04:00
Andrew Kelley
3500d32db5
stage1: rename FnTableEntry to ZigFn 2018-09-05 18:34:33 -04:00
Andrew Kelley
db882e5d63
stage1: rename TypeTableEntry to ZigType 2018-09-05 18:33:07 -04:00
Andrew Kelley
a3d384e593
add test case for #726 2018-09-05 18:20:04 -04:00
Andrew Kelley
cc17b662e4
Merge branch 'hcff-floatToIntError' 2018-09-05 18:02:13 -04:00
Andrew Kelley
b517bea734
allow comptime_int to @floatToInt 2018-09-05 18:01:48 -04:00
hfcc
768d1fc539 Added compilation error when a non-float is given to @floatToInt() 2018-09-05 23:31:25 +02:00
Andrew Kelley
ffb3b1576b
stage1: fix tagged union with no payloads
closes #1478
2018-09-05 16:19:58 -04:00
Andrew Kelley
c87a576cb5
stage1 compile error instead of crashing for unsupported comptime ptr cast
See #955
2018-09-05 15:53:36 -04:00
Andrew Kelley
ba7836ea48 stage1: fix build on macos 2018-09-05 12:10:53 -04:00
Andrew Kelley
a76a72469b
stage1: fix crash when invalid type used in array type
closes #1186
2018-09-05 10:43:35 -04:00
Andrew Kelley
3e94650ef7
stage1: fix emit asm with explicit output file
closes #1473
2018-09-05 10:28:08 -04:00
Andrew Kelley
9a123697e3
fix compile error on gcc 7.3.0
Only set -Werror for debug builds, and only for zig itself, not for
embedded LLD.

See #1474
2018-09-05 10:18:12 -04:00
Andrew Kelley
ac3cf0775f
Merge pull request #1474 from ziglang/issue-1357
Downgrade new g++-8.0 error to warning
2018-09-05 09:05:01 -04:00
Marc Tiehuis
ef2b8d4574 Downgrade new g++-8.0 error to warning
Allows building in Debug mode. Closes #1357.
2018-09-05 20:43:14 +12:00
Andrew Kelley
b35c74ea4c
stage1: use os_path_resolve instead of os_path_real
to canonicalize imports.

This means that softlinks can represent different files,
but referencing the same absolute path different ways
still references the same import.
2018-09-04 23:17:38 -04:00
Andrew Kelley
2bf1b6840d
port std.os.path.resolve to stage1 2018-09-04 22:45:20 -04:00
Andrew Kelley
869167fc6d
compile error for @noInlineCall on an inline fn
closes #1133
2018-09-04 17:38:48 -04:00
Andrew Kelley
cbb3f1d76c
ir: consistent error checking for br and cond_br instructions 2018-09-04 16:58:19 -04:00
Andrew Kelley
b00007056d
update throughput test to new File API
closes #1468
2018-09-04 15:33:44 -04:00
Andrew Kelley
68db9d5074
add compile error for comptime control flow inside runtime block
closes #834
2018-09-04 15:28:35 -04:00
Andrew Kelley
36828a2e6a
fix incorrect variable ref count
regression introduced by e82cd53df4
2018-09-04 12:50:02 -04:00
Andrew Kelley
ff4591f0e6
fix llvm assertion when adding callsite sret attr 2018-09-04 12:15:15 -04:00
Andrew Kelley
2bd2a8ea34
Merge pull request #1441 from ziglang/poly1305-x25519
Add poly1305 and x25519 crypto primitives
2018-09-04 10:34:46 -04:00
Marc Tiehuis
8b50d10a84 std/crypto: Clean up poly1305/x25519 2018-09-04 20:16:12 +12:00
Andrew Kelley
bc88ef2dc3
compile errors for unimplemented minValue/maxValue builtins 2018-09-03 22:47:23 -04:00
Andrew Kelley
e82cd53df4
fix incorrect value for inline loop
09cc1dc660 failed to handle mem_slot_index correctly

closes #1436
2018-09-03 21:24:20 -04:00
Andrew Kelley
a11e73bee2
compile error instead of segfault for unimplemented feature
closes #1103
2018-09-03 12:38:24 -04:00
Andrew Kelley
3f273479f8
clarify const variables in docs
closes #1200
2018-09-03 12:18:12 -04:00
Andrew Kelley
2a9329c998
better anonymous struct naming
this makes anonymous structs inherit the name of the function they are in
only when they are the return expression.

also document the behavior and provide examples.

closes #1243
2018-09-03 11:32:39 -04:00
Andrew Kelley
95636c7e5f
ability to @ptrCast to *void
fixes #960
2018-09-03 00:04:12 -04:00
Andrew Kelley
92f7474359 switch most windows calls to use W versions instead of A
See #534
2018-09-02 23:25:04 -04:00
Andrew Kelley
d5968086fe
use the sret attribute at the callsite when appropriate
Thanks to Shawn Landden for the original pull request.

closes #1450
2018-09-02 21:08:59 -04:00
Andrew Kelley
8558caecb5
Merge branch 'kristate-std-fmt-hexToBytes' 2018-09-02 19:25:07 -04:00
Andrew Kelley
3eb89ee4db
fixups
* zig fmt
 * use canonical parameter order. memcpy has dest first and
   the base64 code follows the pattern.
 * pass correct radix to charToDigit
2018-09-02 19:23:30 -04:00
Andrew Kelley
0d8412d9f0
Merge branch 'std-fmt-hexToBytes' of https://github.com/kristate/zig into kristate-std-fmt-hexToBytes 2018-09-02 19:08:54 -04:00