Commit Graph

3873 Commits

Author SHA1 Message Date
Andrew Kelley
b16229da1d
add compile error for @ptrCast 0 bit type to non-0 bit type 2018-09-17 19:41:11 -04:00
Andrew Kelley
78a9a465a3
add compile error for non-optional types compared against null
closes #1539
2018-09-17 18:58:50 -04:00
Andrew Kelley
6c71e9a54d
fix crash when bit shifting a u1 2018-09-17 18:44:45 -04:00
Andrew Kelley
cf9200b815
dereferencing a *u0 is comptime-known to be 0 2018-09-17 18:13:38 -04:00
Andrew Kelley
4c6f1e614a
remove zig build --init. add zig init-lib and zig init-exe
init-lib creates a working static library with tests, and
init-exe creates a working hello world with a `run` target.

both now have test coverage with the new "cli tests" file.

closes #1035
2018-09-17 17:11:18 -04:00
Andrew Kelley
9c9eefc841
allow extern structs to have stdcallcc function pointers
closes #1536
2018-09-17 11:22:30 -04:00
Andrew Kelley
dd5b2d1b04
fix crash when pointer casting a runtime extern function 2018-09-16 11:23:38 -04:00
Andrew Kelley
a2abdb185f
Merge remote-tracking branch 'origin/master' into llvm7 2018-09-16 10:51:58 -04:00
Andrew Kelley
780e567446
add docs for @This() 2018-09-15 10:14:50 -04:00
Andrew Kelley
3f776af3fa
fix alignment of structs
closes #1248
closes #1052
closes #1154
2018-09-14 19:08:59 -04:00
Wink Saville
d9ed3d186d
Add test for Queue.dump
To make dump testable added dumpToSteam which takes a stream as input
and added the stream as a paraemter to dumpRecursive.

Added test "std.atomic.Queue dump"

And to make the test more robust SliceOutStream.pos is now public. This
allows the user of SliceOutStream to know the length of the data captured.
2018-09-14 14:14:58 -07:00
Andrew Kelley
639c381128
fix coroutine alignment
zig returned the wrong alignment for coroutine promises
in some cases
2018-09-14 13:55:45 -04:00
Wink Saville
82af31ce36 Fix additional regressions calling FileOutStream/FileInStream init()
This is caused by change 686663239a and not
fixed in 832caefc2a.
2018-09-14 12:07:21 -04:00
Andrew Kelley
5e39328542
docs: more syntax highlighting 2018-09-14 10:35:03 -04:00
Andrew Kelley
3d38feded9
fix tagged union with all void payloads but meaningful tag
closes #1322
2018-09-14 00:38:22 -04:00
Andrew Kelley
1e03cf1739
fix assertion failure on compile-time @intToPtr of function 2018-09-13 19:12:25 -04:00
Andrew Kelley
c06a61e9bf
remove this. add @This().
closes #1283
2018-09-13 16:34:33 -04:00
Andrew Kelley
7c3636aaa3
remove the scope parameter of setFloatMode
also document that scopes inherit this value. See #367
See #1283
2018-09-13 15:46:34 -04:00
Andrew Kelley
9ac9633b10
stage1: put test output artifact back in zig-cache folder
close #1508
2018-09-13 14:30:15 -04:00
Andrew Kelley
ac0cda8df8
add compile error for merging non- error sets
closes #1509
2018-09-13 13:48:41 -04:00
Andrew Kelley
22e39e1e5a
fix tagged union with only 1 field tripping assertion
closes #1495

now the tag type of an enum with only 1 item is comptime_int.
2018-09-13 13:33:11 -04:00
Andrew Kelley
77fd147b26
appveyor: skip all release tests to save time
appveyor is taking longer than 1 hour to run the tests
2018-09-13 11:26:13 -04:00
Andrew Kelley
d332311e53
Merge branch 'kristate-cache-invalidformat-issue1510' 2018-09-13 11:25:31 -04:00
Andrew Kelley
e3f0ba4984
alternate fix using the rest() function 2018-09-13 11:24:57 -04:00
kristopher tate
6d0a122816
src/cache_hash.cpp: support file paths that contain spaces;
ref: #1510
2018-09-13 23:34:01 +09:00
Marc Tiehuis
e70c543bc4 math/complex: cexp test correction and ldexp usage fix 2018-09-13 20:33:05 +12:00
Andrew Kelley
afe6316d32
appveyor: skip release-safe to save time
appveyor is taking longer than 1 hour to run the tests
2018-09-12 17:36:24 -04:00
Andrew Kelley
0dbbc91bc9
docs: langref is now javascript-free 2018-09-12 17:27:10 -04:00
Andrew Kelley
869475c110
ci: skip release-small tests to save time
we keep hitting the limit on how long CI tests take to run.
2018-09-12 14:50:26 -04:00
Andrew Kelley
a757533386 fix zig fmt on windows
closes #1069
2018-09-12 14:26:21 -04:00
Andrew Kelley
178d69191b windows: std.fs functions support concurrent ops
when reading and writing the same file descriptors
2018-09-12 13:55:35 -04:00
Andrew Kelley
0cfd019377
Merge pull request #1494 from ziglang/stage1-caching
stage1 caching
2018-09-12 12:40:16 -04:00
Andrew Kelley
3a49d115cf
fix zig build cache dir path 2018-09-12 11:49:46 -04:00
Andrew Kelley
1caa48c2df windows os.cpp implementations 2018-09-12 11:33:26 -04:00
Andrew Kelley
7bd8a2695b
Merge pull request #1506 from emekoi/master
fixed WriteFile segfault
2018-09-12 09:03:14 -04:00
emekoi
54f7d58722 fixed WriteFile segfault 2018-09-12 07:01:48 -05:00
Andrew Kelley
ff0b7fe29a
error messages for attempted cache when zig cannot perfectly do it 2018-09-11 22:59:40 -04:00
Andrew Kelley
014cc60a72
rename --enable-timing-info to -ftime-report to match clang
and have it print llvm's internal timing info
2018-09-11 22:46:22 -04:00
Andrew Kelley
ee263a15cc
bring back zig-cache
we need somewhere to put .o files and leave them while the user
executes their program, so that stack traces on MacOS can find
the .o files and get at the DWARF info.

if we try to clean up old global tmp dir files, first of all that's
a hard and complicated problem, and secondly it's not clear how
that is better than dumping the .o file inside zig-cache locally.
2018-09-11 22:25:52 -04:00
Andrew Kelley
25466ffb71
Merge remote-tracking branch 'origin/master' into stage1-caching 2018-09-11 20:54:55 -04:00
Andrew Kelley
7e9f25dd18
stage1: clean up timing report in test mode 2018-09-11 20:54:39 -04:00
Andrew Kelley
6b7f3d01ae
ci: build zig in release mode
It makes sense to test release mode, plus we're up against the
time limits of CI, so this should make room.
2018-09-11 20:53:28 -04:00
Andrew Kelley
04dc5cdaca
zig build: make the cache root dir before building 2018-09-11 18:15:08 -04:00
Andrew Kelley
1a4dcf10fe darwin fixups 2018-09-11 17:42:03 -04:00
Andrew Kelley
a1132ffe0f stage1: build blake code with -std=c99 2018-09-11 17:29:18 -04:00
Andrew Kelley
9227315bf2
zig build: better placement of test exe artifact 2018-09-11 17:23:36 -04:00
Andrew Kelley
15c67d2d50
fix docgen tests 2018-09-11 16:52:50 -04:00
Andrew Kelley
4af844732a
Merge remote-tracking branch 'origin/master' into stage1-caching 2018-09-11 15:56:04 -04:00
Andrew Kelley
7dd3c3814d
fix incorrect error union const value generation
closes #1442

zig needed to insert explicit padding into this structure before
it got bitcasted.
2018-09-11 15:16:50 -04:00
Andrew Kelley
dd1338b0e6
fix incorrect union const value generation
closes #1381

The union was generated as a 3 byte struct when it needed to be
4 bytes so that the packed struct bitcast could work correctly.

Now it recognizes this situation and adds padding bytes to become
the correct size so that it can fit into an array.
2018-09-11 12:59:39 -04:00