Commit Graph

8054 Commits

Author SHA1 Message Date
Andrew Kelley
8e5913cfee
update mingw-w64 headers to v7.0.0 2020-03-05 15:41:28 -05:00
Michael Dusan
1aae5bebe9
Merge pull request #4641 from mikdusan/housekeeping
stage1: housekeeping
2020-03-05 14:58:02 -05:00
Michael Dusan
371c21aa70
stage1: housekeeping
- use consistent allocator in `realloc_const_vals_ptrs()`
- unexport `create_fn_raw()`
2020-03-05 12:17:47 -05:00
Vexu
ad27041de9 translate-c demote struct to opaque if unable to translate type 2020-03-05 10:55:32 -05:00
Andrew Kelley
b7614e63f5
Merge pull request #4636 from Vexu/translate-c
Translate-c macro comma operator
2020-03-05 10:38:51 -05:00
Andrew Kelley
d7dc7d7a50
Merge pull request #4633 from daurnimator/4632-i1
Fix formatting of i1 values
2020-03-05 10:33:02 -05:00
Vexu
e063854563
translate-c correct assumption about macros 2020-03-05 12:23:32 +02:00
Vexu
8088bdc6d5
translate-c macro comma operator 2020-03-05 11:22:50 +02:00
daurnimator
e9c3b65bf4
std: use testing.expectEqual in math.absCast tests 2020-03-05 16:02:26 +11:00
daurnimator
488ba1560f
std: fix math.absCast on i1 2020-03-05 16:00:19 +11:00
daurnimator
4f58bfe1a8
std: fix formatting of i1 integers 2020-03-05 15:52:19 +11:00
daurnimator
d5359ea541
std: use testing.expectEqualSlices from tests 2020-03-05 15:51:21 +11:00
Andrew Kelley
378bf1c3b7
Merge branch 'LemonBoy-fix-439' 2020-03-04 18:05:34 -05:00
Andrew Kelley
116e2a93f1
update docs for @TypeOf 2020-03-04 18:05:14 -05:00
Andrew Kelley
3e3d464884
@TypeOf avoids heap allocation for only 1 parameter 2020-03-04 17:43:23 -05:00
LemonBoy
2e3e8d0c74
ir: Adapt ir_print for the new @TypeOf format 2020-03-04 17:21:10 -05:00
LemonBoy
e029032251
std: Use @TypeOf(x,y) as return value for max 2020-03-04 17:21:10 -05:00
LemonBoy
0c310f0fbf
ir: Implement @TypeOf with multiple arguments
Closes #439
2020-03-04 17:21:10 -05:00
Andrew Kelley
24fc69acad
Merge pull request #4573 from alexnask/tuple_concat
Allow concatenation of tuples that contain a mix of runtime and comptime values
2020-03-04 17:09:43 -05:00
Andrew Kelley
f247a90541
get_codegen_ptr_type returns possible error
And fix most of the fallout. This also makes optional pointers not
require resolving zero bits, because the comptime value struct layout no
longer depends on whether the type has zero bits.

Thanks to @LemonBoy for the behavior test case

Closes #4357
Closes #4359
2020-03-04 17:04:59 -05:00
Andrew Kelley
6cbd1ac51a
zig is now aware of DragonflyBSD versions 2020-03-04 15:34:32 -05:00
Andrew Kelley
3ff2381042
update glibc source files to 2.31
This is mostly minor modifications to license text.
2020-03-04 14:59:09 -05:00
pfg
e3b37fc9c1 Generated documentation mobile support 2020-03-04 10:47:21 -05:00
Timon Kruiper
e095475d92 Fix docs generation
Commit edb210905d caused the docs generation
to fail, because all the type information in pass1 was already freed in
`zig_llvm_emit_output`.
2020-03-04 09:59:21 -05:00
Andrew Kelley
1cf3209cb8
Merge pull request #4623 from ziglang/update-glibc
Update glibc to 2.31
Closes #4459.
2020-03-04 09:01:19 -05:00
Andrew Kelley
447a89cd4d
update self-hosted zig targets to print correct glibc availability 2020-03-04 01:05:42 -05:00
Andrew Kelley
b21d44f26a
update glibc abilists for 2.31 2020-03-04 00:07:15 -05:00
Andrew Kelley
cd33c5bfe8
zig build: update InstallRawStep to new std.fs API
closes #4622
2020-03-04 00:00:42 -05:00
Andrew Kelley
74fef9db6e
update update_glibc tool to latest zig 2020-03-03 22:52:03 -05:00
Andrew Kelley
67480cd515
update glibc headers to 2.31 2020-03-03 22:46:57 -05:00
Andrew Kelley
3841acf7ef
update process_headers tool to latest zig 2020-03-03 22:40:41 -05:00
Andrew Kelley
8aaab75af0
docs: remove reference to deprecated builtins
closes #3959
2020-03-03 22:14:29 -05:00
Andrew Kelley
c0c9303bd6
put FreeBSD CI in timeout for misbehavior
FreeBSD is dealing with some weird upstream bug right now. We can try to
re-enable this when it is fixed.
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244549

very naughty
2020-03-03 21:32:01 -05:00
Andrew Kelley
3b235cfa80
std.zig.CrossTarget: fix compile errors
closes #4620
2020-03-03 21:09:32 -05:00
Andrew Kelley
f6f0b019be
Merge pull request #4618 from ziglang/daurnimator-paths
improvements to std.fs, std.os
2020-03-03 17:05:14 -05:00
Andrew Kelley
1141bfb21b Darwin can return EBADF for sendfile on non-files 2020-03-03 16:52:32 -05:00
Andrew Kelley
c4f81586f1
update docgen to new std.fs API 2020-03-03 16:01:09 -05:00
Andrew Kelley
55dfedff42
update cli test to new std.fs API 2020-03-03 15:58:14 -05:00
Andrew Kelley
4a67dd04c9
breaking changes to std.fs, std.os
* improve `std.fs.AtomicFile` to use sendfile()
   - also fix AtomicFile cleanup not destroying tmp files under some
     error conditions
 * improve `std.fs.updateFile` to take advantage of the new `makePath`
   which no longer needs an Allocator.
 * rename std.fs.makeDir to std.fs.makeDirAbsolute
 * rename std.fs.Dir.makeDirC to std.fs.Dir.makeDirZ
 * add std.fs.Dir.makeDirW and provide Windows implementation of
   std.os.mkdirat. std.os.windows.CreateDirectory is now implemented
   by calling ntdll, supports an optional root directory handle,
   and returns an open directory handle. Its error set has a few more
   errors in it.
 * rename std.fs.Dir.changeTo to std.fs.Dir.setAsCwd
 * fix std.fs.File.writevAll and related functions when len 0 iovecs
   supplied.
 * introduce `std.fs.File.writeFileAll`, exposing a convenient
   cross-platform API on top of sendfile().
 * `NoDevice` added to std.os.MakeDirError error set.
 * std.os.fchdir gets a smaller error set.
 * std.os.windows.CloseHandle is implemented with ntdll call rather than
   kernel32.
2020-03-03 15:23:27 -05:00
daurnimator
1ca5f06762
Update callers of fs.makePath 2020-03-03 13:25:43 -05:00
daurnimator
695b0976c3
std: move makePath to be a Dir method 2020-03-03 13:25:43 -05:00
daurnimator
a19a30bb17
std: move null byte check into toPosixPath
Note that windows NT paths *can* contain nulls
2020-03-03 13:25:43 -05:00
daurnimator
d8f966a04b
std: fix fs.makePath
The previous behaviour of using path.resolve has unexpected behaviour around symlinks.
This more simple implementation is more correct and doesn't require an allocator
2020-03-03 13:25:43 -05:00
daurnimator
bfc569bc98
std: add os.fstatat 2020-03-03 13:25:43 -05:00
daurnimator
627618a38d
std: add Dir.changeDir as wrapper around fchdir 2020-03-03 13:25:43 -05:00
daurnimator
dfb420e6d7
std: add fs.Dir.makeDir 2020-03-03 13:25:43 -05:00
daurnimator
88e27f01c8
std: add mkdirat 2020-03-03 13:25:40 -05:00
Andrew Kelley
582db68a15
remove superfluous comptime keyword 2020-03-03 12:01:17 -05:00
LemonBoy
a6fb6dcfc9 linux: Correct pread64 syscall for ARM/MIPS
Closes #4615
2020-03-03 11:59:16 -05:00
Andrew Kelley
226b801830
Merge pull request #4612 from ziglang/os-read-write-sendfile
std.os read/write functions + sendfile
2020-03-03 10:15:37 -05:00