22529 Commits

Author SHA1 Message Date
Jakub Konka
9d4a4e9ed1 link-tests: update uuid test with new uuid given dyld ops changes 2023-01-19 00:05:54 +01:00
Jakub Konka
61e38d0c34 macho+zld: add improved dyld opcodes emitters 2023-01-19 00:05:45 +01:00
Loris Cro
35f5d43768 autodoc: add support for top-level doc comments 2023-01-18 19:45:32 +01:00
Manlio Perillo
72c09b7b3b langref: use the term tuple in the Hello World section
In the Hello World section, replace the term "anonymous struct literal"
with tuple, when documenting the second argument of stdout.print().
2023-01-18 15:33:58 +02:00
Michael Dusan
c9f7b32fbd netbsd: add mcontext_t for aarch64
- test `lib/std/std.zig` passes
- stack traces work
2023-01-18 02:50:11 -05:00
Andrew Kelley
7f604b6f48
Merge pull request #14333 from Vexu/fixes
Misc fixes
2023-01-17 21:32:13 -05:00
Andrew Kelley
73827d2ea9 CI: give x86_64-linux-debug a little more time 2023-01-17 17:21:22 -07:00
Andrew Kelley
bbab4bedac
Merge pull request #14350 from FnControlOption/bundle
std.crypto.Certificate.Bundle: clear bundle before macOS rescan
2023-01-17 19:04:55 -05:00
Veikka Tuominen
841b38aae8 tokenizer: detect null as non-first byte of a line comment
Line comments do not produce actual tokens so they need special
handling for null bytes.

Closes #14346
2023-01-17 20:39:19 +02:00
Veikka Tuominen
fc066992d9 Sema: do not create slices with undefined pointers
The undef pointer ended up being zero on wasm32.
2023-01-17 20:28:43 +02:00
Veikka Tuominen
3b2c421102 Sema: fix bad boolean logic for cast to null panic
Closes #14349
2023-01-17 20:28:43 +02:00
Veikka Tuominen
e04547642a Sema: promote smaller float types passed to variadic functions
Closes #6854
2023-01-17 20:28:43 +02:00
Veikka Tuominen
14f03fbd16 AstGen: reset source cursor before generating pointer attributes
These attributes can appear in any order but AstGen expects the source
cursor to be incremented in a monotonically increasing order.

Closes #14332
2023-01-17 20:28:43 +02:00
Veikka Tuominen
24646b8b5d windows x86_64 C ABI: pass byref structs as byref_mut 2023-01-17 20:28:43 +02:00
Veikka Tuominen
8b35f09f4a Sema: resolve lazy values in switch prong items
Closes #14330
2023-01-17 20:28:43 +02:00
Veikka Tuominen
6b037bad59 Sema: ignore dependency loops in typeinfo decls
This matches stage1 behavior.

Closes #14322
2023-01-17 20:28:43 +02:00
Veikka Tuominen
94be9dcc7f enable passing compile error test 2023-01-17 20:28:43 +02:00
Veikka Tuominen
6e067dc050 llvm: do not offset packed struct field pointers if they have a host size
Closes #14261
2023-01-17 20:28:42 +02:00
Manlio Perillo
06e9b2c4e3 langref: document UTF-8 BOM handling
The current compiler ignores the UTF-8 BOM if it is at the start of the
file, and disallows it anywhere else.  Document it in the Source Encoding
section.
2023-01-17 20:07:53 +02:00
Andrew Kelley
7b68b76326 CI: additionally test debug builds on Windows 2023-01-17 13:06:07 -05:00
Manlio Perillo
0973f36389 langref: add the new addrspace keyword
Add the new addrspace keyword in the Keyword Reference section, without
documentation.

Move the linksection keyword in order to keep the keywords list sorted.
2023-01-17 20:04:37 +02:00
fn ⌃ ⌥
2623e1c4d6 Add std.os.darwin.cssm 2023-01-17 09:51:39 -08:00
fn ⌃ ⌥
faf0fe4305 std.crypto.Certificate.Bundle: use parseCert in rescanWindows 2023-01-17 08:59:38 -08:00
fn ⌃ ⌥
40c400ec9e std.crypto.Certificate.Bundle: clear bundle before macOS rescan 2023-01-17 08:58:06 -08:00
Andrew Kelley
f3107e2cb2
Merge pull request #14344 from ziglang/config-header-step
zig build: enhance LibExeObjStep and ConfigHeaderStep
2023-01-17 08:10:36 -05:00
Andrew Kelley
f4b4e570d8
Merge pull request #14229 from star-tek-mb/wincerts
windows root certificate scanning
2023-01-17 07:35:25 -05:00
Andrew Kelley
65586b9869 std.build.LibExeObjStep: change installHeader API
Now it always takes a dest_rel_path parameter, making it slightly more
verbose, and much more useful.
2023-01-17 00:45:04 -07:00
Andrew Kelley
6db3869fc7 std.build.ConfigHeaderStep: support cmake syntax
It's not fully implemented yet, for example `@FOO@` syntax is not
handled.
2023-01-17 00:44:57 -07:00
Andrew Kelley
d35d086ae6 std.crypto.Certificate: add more object id 2023-01-17 00:09:38 -07:00
Andrew Kelley
7623f3fad0 std.crypto.Certificate: skip unknown attributes 2023-01-17 00:09:34 -07:00
Andrew Kelley
86308ba1e1 std.net.getAddressList: call WSAStartup on Windows 2023-01-17 00:08:42 -07:00
Andrew Kelley
62e3fdcf4f std.crypto.Certificate: add more object ids 2023-01-17 00:08:42 -07:00
Andrew Kelley
09560bc69a clean up windows cert scanning
* keep helper functions out of the DLL bindings APIs
 * unify the logic for linux and windows certificate scanning with
   regards to error handling
2023-01-17 00:08:42 -07:00
star-tek-mb
1f9fa82235 windows root certificate scanning 2023-01-17 00:08:42 -07:00
Andrew Kelley
d56a65a8c4 std.http.Client: default to lazy root cert scanning
After this change, the system will be inspected for root certificates
only upon the first https request that actually occurs. This makes the
compiler no longer do SSL certificate scanning when running `zig build`
if no network requests are made.
2023-01-17 01:44:56 -05:00
Andrew Kelley
e646becd04
Merge pull request #14336 from Vexu/field-reorder
Sema: automatically optimize order of struct fields
2023-01-16 21:19:48 -05:00
Andrew Kelley
37424fd11a add std.build.LibExeObjStep.installHeadersDirectoryOptions
For when you need options such as excluding certain extensions.
2023-01-16 16:09:24 -07:00
fn ⌃ ⌥
e45b471ad3
Find system-installed root SSL certificates on macOS (#14325) 2023-01-16 22:34:04 +00:00
Veikka Tuominen
b2c85464be std.os.linux.io_uring: fix ABI error
`register_files_update` was passing a pointer to a Zig struct to the kernel.
2023-01-16 22:25:34 +02:00
Veikka Tuominen
342bae02d8 Sema: automatically optimize order of struct fields
This is a simple starting version of the optimization described in #168
where the fields are just sorted by order of descending alignment.
2023-01-16 19:46:41 +02:00
Loris Cro
b42bd759a7 autodoc: missing fmt on Autodoc.zig 2023-01-16 18:04:31 +01:00
Krzysztof Wolicki
ae69dfe6e7
autodoc: Better handling of variable decls (#14301) 2023-01-16 17:28:07 +01:00
Michael Bartnett
31a2b8c364
std: Handle field struct defaults in std.mem.zeroInit
I originally started monkeying with this because std.mem.zeroes doesn't support sentinel-terminated const slices even with defaults in 0.10.x.

I see that std.mem.zeroes was modified in #13256 to allow setting these slices to "".

That got me partway to where I wanted, but there was still an issue fields whose types are structs, they wouldn't get their defaults.

So when iterating struct fields looking for default values, when there is no default value and the type is .Struct, it will delegate to a call to zeroInit.

* Initialize struct fields in zeroInit exactly once

In my changes, similar to the previous implementation, the priority order for fields being initialized is:

1. If the `init` argument is a tuple, the nth element corresponding to the nth field of the struct.
2. Otherwise, if the `init` argument is not a tuple, try to find a matching field name on `init` and use that field.
3. Is the field has a default value, initalize with that value.
4. Fall back to what the field would have been initialized to via a recursive call to `std.mem.zeroInit`.

But instead of initializing a default instance of the struct and then running multiple passes over it, the init method is chosen per-field and each field is initialized exactly once.
2023-01-16 14:24:47 +02:00
Michael Bartnett
99febb54d3 Add fromOwnedSliceSentinel to ArrayList ArrayList and ArrayListUnmanaged, add fromOwnedSlice to ArrayListUnmanaged 2023-01-16 14:22:38 +02:00
r00ster91
3dd8f43ad3 std.Thread: make Id smaller where possible 2023-01-16 14:20:57 +02:00
Veikka Tuominen
4aa33da189
Merge pull request #14303 from perillo/improve-docgen
Improve docgen
2023-01-16 14:19:58 +02:00
Techatrix
32544ed56c
swap align and callconv in function typeName 2023-01-16 14:04:03 +02:00
Andrew Kelley
d389dba04f
Merge pull request #14329 from ziglang/v1-ssl-certificates
support v1/v2 SSL certificates and search more Linux directories for certificates
2023-01-16 00:24:03 -05:00
kcbanner
9856bea34e build: avoid zig's libc++ on *-windows-msvc 2023-01-15 18:29:02 -05:00
Andrew Kelley
e3505c0a5a std.crypto.Certificate.Bundle: add more Linux directories
Thanks to the Go project for finding all these paths.
2023-01-15 15:01:42 -07:00