Commit Graph

14155 Commits

Author SHA1 Message Date
LemonBoy 7babff0bc6 compiler-rt: Fix __floatunsitf signature
The function transforms an unsigned integer into a f128.

Closes #8996
2021-06-05 13:32:41 -04:00
Andrew Kelley ddf9c40bc1 ci: fix 0.8.0 release date 2021-06-04 16:33:50 -07:00
Andrew Kelley c7b68ce0f8 ci: fix aarch64-macos download tarball filename 2021-06-04 16:21:01 -07:00
Andrew Kelley 555805e0d5 ci: update download page releases 2021-06-04 15:33:18 -07:00
Andrew Kelley b755c46d70 start the 0.9.0 release cycle 2021-06-04 11:29:01 -07:00
Andrew Kelley a642552faf Release 0.8.0 0.8.0 2021-06-04 11:21:32 -07:00
Andrew Kelley 2699232c4e Merge pull request #8990 from ziglang/mingw-w64-9.0.0
upgrade to mingw-w64 9.0.0
2021-06-04 14:17:40 -04:00
Felix (xq) Queißner 167754b31b Makes std.io.StreamSource usable with freestanding 2021-06-04 13:04:36 -04:00
Andrew Kelley 6f4339be3a update mingw-w64 crt files to v9.0.0 2021-06-04 09:49:36 -07:00
Andrew Kelley d7f00c4389 update mingw-w64 headers to v9.0.0 2021-06-04 09:29:56 -07:00
Jacob G-W 5d94e754f4 fmt: fix #8974
also add a regression test
2021-06-04 10:49:05 +03:00
Min-Yih Hsu 83e0a49ba4 llvm: Add support for collecting time trace (#8546)
LLVM time profiler can collect time traces and present them in a
hierarchical view. Which breakdowns the time spent in each Pass or even
IR unit. The result is also exported into a format that can be easily
visualized by the Chrome browser.

Currently this features is controlled by the following environment
variables:
 - `ZIG_LLVM_TIME_TRACE_FILE` toggles this feature and specifies the
   output time trace file.
 - `ZIG_LLVM_TIME_TRACE_GRANULARITY` controls the time granularity in
   ms (default to 500).
2021-06-04 09:32:37 +02:00
Andrew Kelley 9c08a33b22 Merge pull request #8750 from lithdew/master
x/io, x/os: async i/o reactor, cross-platform socket syscalls and bits
2021-06-04 01:21:28 -04:00
Isaac Freund 05b677f0c4 langref: sync grammar with zig-spec repo 2021-06-04 01:18:45 -04:00
viri ce072894a1 docs: minor spelling fix 2021-06-04 01:18:14 -04:00
Andrew Kelley 7d15a3ac71 Merge pull request #8975 from SpexGuy/hash-map-updates
Breaking hash map changes for 0.8.0
2021-06-04 01:12:38 -04:00
Martin Wickham 6953c8544b Fix return type of HashMap.getAdapted 2021-06-03 17:58:06 -05:00
Martin Wickham fc9430f567 Breaking hash map changes for 0.8.0
- hash/eql functions moved into a Context object
- *Context functions pass an explicit context
- *Adapted functions pass specialized keys and contexts
- new getPtr() function returns a pointer to value
- remove functions renamed to fetchRemove
- new remove functions return bool
- removeAssertDiscard deleted, use assert(remove(...)) instead
- Keys and values are stored in separate arrays
- Entry is now {*K, *V}, the new KV is {K, V}
- BufSet/BufMap functions renamed to match other set/map types
- fixed iterating-while-modifying bug in src/link/C.zig
2021-06-03 17:02:16 -05:00
Andrew Kelley 87dae0ce98 Merge pull request #8932 from ziglang/llvm-needs-zlib
cmake: LLVM needs to link against zlib
2021-06-03 02:13:37 -04:00
Andrew Kelley 05cd8936c8 ci: drone: use zig-bootstrap tarball instead of system toolchain 2021-06-02 17:03:11 -07:00
Jakub Konka d1f60a63bd zld: fix the linker for 32bit comp targets 2021-06-03 00:23:04 +02:00
Andrew Kelley 16c5cbab0c ci: update x86_64-freebsd tarball
to llvm 12.0.1-rc1, and -DLLVM_ENABLE_ZLIB=FORCE_ON
2021-06-01 23:26:53 -07:00
Evan Haas a9dd8d7543 translate-c: Fix performance hazard in transPreprocessorEntities
Fixes O(N^2) behavior of `transPreprocessorEntities` due to repeated calls to
`mem.len`

Closes #8959
2021-06-02 09:12:45 +03:00
Veikka Tuominen c6a0a4e728 translate-c: support designated initializers in macros 2021-06-01 23:40:43 -04:00
Jonathan Marler 99b6305aa8 handle LimitToBig error on setrlimit 2021-06-01 23:39:48 -04:00
Andrew Kelley f693247295 Merge pull request #8917 from ifreund/fix-float-tokenize2
stage1, stage2: disallow 1.e9 and 0x1.p9 as float literals
2021-06-01 14:00:54 -04:00
Kenta Iwasaki 4909aa1da4 os/bits: remove duplicate sockaddr_storage for dragonfly 2021-06-01 18:35:13 +09:00
Kenta Iwasaki aad8491dbd os: make msghdr, msghdr_const, and sockaddr_storage backwards-compatible
`msghdr` and `msghdr_const` definitions have been added back the way
they were in std.os. std.os.sendmsg has also been modified to accept a
msghdr_const again to ensure backwards-compatibility with this PR.
Underneath the hood, std.os.sendmsg will @ptrCast the provided
msghdr_const into a std.x.os.Socket.Message.

`sockaddr_storage` definitions have been added back the way they were in
std.os, except that it now simply aliases
std.x.os.Socket.Address.Native.Storage as all of
std.x.os.Socket.Address.Native.Storage's fields are equivalent to the
fields that were previously defined for std.x.os.bits.sockaddr_storage.

std.x.os.Socket.sendMessage now no longer is a stub that aliases
std.os.sendmsg, but instead calls and handles
errors from std.os.system.sendmsg directly.

Addresses feedback to urge backwards compatibility from @andrewrk.
2021-06-01 18:24:43 +09:00
Kenta Iwasaki 6950e4c294 x/os/net: remove unnecessary comptime prefix in resolveScopeID() 2021-06-01 18:24:43 +09:00
Kenta Iwasaki 278e5d398e x: replace std.builtin with std.Target.current 2021-06-01 18:24:43 +09:00
Kenta Iwasaki 21ec0158a1 os: sockaddr_storage -> std.x.os.Socket.Address.Native.Storage 2021-06-01 18:24:42 +09:00
Kenta Iwasaki 7b6ec3e354 x/os: {read, write}Vectorized() -> {read, write}Message() 2021-06-01 18:23:54 +09:00
lithdew 9ba65592d6 os: have sendmsg, recvmsg flags be c_int 2021-06-01 18:22:58 +09:00
lithdew 12650bcda4 x/os, x/tcp: fix Socket.Message init values and tcp test buf len 2021-06-01 18:22:58 +09:00
lithdew 494665e408 std/c: have sendmsg, recvmsg flags be u32 2021-06-01 18:22:58 +09:00
lithdew d41575737e std/c: add recvmsg, sendmsg 2021-06-01 18:22:58 +09:00
lithdew 3600508fe1 x/io, x/os: async i/o reactor, cross-platform socket syscalls and bits
Cross-platform versions of msghdr, sendmsg, recvmsg, linger, and iovec
were provided based on findings from glibc, musl, and Microsoft's
documentation.

Implemented initial Reactor interface for epoll (linux) which wraps
around I/O reactor subsystems such as epoll, kqueue, select, etc. across
different platforms. The Reactor interface allows for driving async I/O
in Zig applications.

A test was added for the Reactor interface to drive a TCP
client/listener socket pair.

A greatest-common-subset of possible socket initialization flags (close
socket on exec syscalls, initialize socket to be non-blocking) were
implemented.

A test was added for using sendmsg/recvmsg syscalls across different
platforms for a TCP client/listener socket pair.
2021-06-01 18:22:57 +09:00
Frank Denis d496400cff std.crypto.p256.scalar: fe struct member is not a function (#8954) 2021-06-01 11:02:48 +02:00
Andrew Kelley a23fa896ef Tweak license in celebration of the upcoming 0.8.0 release :) 2021-05-31 14:12:20 -07:00
Isaac Freund abd1c75c4a stage1: disallow 1.e9 and 0x1.p9 as float literals 2021-05-31 19:51:11 +00:00
Isaac Freund 608bc1cbd5 stage2: disallow 1.e9 and 0x1.p9 as float literals
Instead require `1e9` and `0x1p9`, disallowing the trailing dot.

This change to the grammar is consistent with forbidding `1.` and `0x1.`
as float literals and ensures there is only one way to do things here.
2021-05-31 19:51:11 +00:00
protty eb6975f088 std.sync.atomic: extended atomic helper functions (#8866)
- deprecates `std.Thread.spinLoopHint` and moves it to `std.atomic.spinLoopHint`
- added an Atomic(T) generic wrapper type which replaces atomic.Bool and atomic.Int
- in Atomic(T), selectively expose member functions depending on T and include bitwise atomic methods when T is an Integer
- added fence() and compilerFence() to std.atomic
2021-05-31 11:11:30 -05:00
daurnimator 57cf9f7ea6 std: by default, disallow trailing data when parsing json 2021-05-31 14:09:59 +03:00
daurnimator 556d3e3d80 std: fix json.parse with 0 length arrays 2021-05-31 14:09:59 +03:00
Andrew Kelley 11ae6c42c1 Merge pull request #7918 from EthanGruffudd/json-ignore-fields
Add option to ignore unknown fields when parsing json
2021-05-30 14:59:02 -04:00
Andrew Kelley 32815914a4 std.json: update to new testing API 2021-05-30 11:57:44 -07:00
Ethan Gruffudd 781a21af2f std.json: option to ignore unknown fields
Closes #7906
2021-05-30 11:36:10 -07:00
Takeshi Yoneda 0ad1c04dd9 build: rename ast_render in build.zig.
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
2021-05-30 13:31:12 -04:00
Jakub Konka 0ad534b392 ci: update x86_64-macos and aarch64-macos tarballs
to llvm 12.0.1-rc1, and -DLLVM_ENABLE_ZLIB=FORCE_ON
2021-05-30 08:46:35 +02:00
Andrew Kelley e46c55edbd ci: update x86_64-linux, aarch64-linux, and windows tarballs
to llvm 12.0.1-rc1, and -DLLVM_ENABLE_ZLIB=FORCE_ON
2021-05-29 20:18:02 -07:00