Andrew Kelley
e0178890ba
Merge pull request #12379 from ifreund/packed-struct-explicit-backing-int
...
stage2: Implement explicit backing integers for packed structs
2022-08-10 19:13:29 -04:00
zooster
8fd20a5eb0
fix: disallow newline in char literal
2022-08-10 16:13:56 -04:00
Isaac Freund
0d32b73078
stage2: Implement explicit backing integers for packed structs
...
Now the backing integer of a packed struct type may be explicitly
specified with e.g. `packed struct(u32) { ... }`.
2022-08-10 19:54:45 +02:00
Veikka Tuominen
19af4b5cad
std: add workaround for stage2 bug
2022-08-09 16:19:55 +03:00
Andrew Kelley
1a500b9699
Sema: avoid error return traces when possible
...
stage2 was adding bogus error return trace frames when an error was not
being returned. This commit makes several improvements:
* Make a runtime check if necessary to only emit a frame into the error
return trace when an actual error is returned.
* Use the `analyzeIsNonErrComptimeOnly` machinery to avoid runtime
checks when it is compile-time-known that the value is an error, or a
non-error.
* Make std.builtin.returnError take a non-optional stack trace pointer.
closes #12174
2022-08-08 19:16:21 -07:00
Ryotaro "Justin" Kimura
50b36e84fa
std: fix BoundedArray test checking wrong condition ( #12372 )
2022-08-08 18:13:35 -04:00
Loris Cro
1db99b08e2
Merge pull request #12347 from r00ster91/nicedocs
...
autodoc: various improvements
2022-08-08 18:31:01 +02:00
r00ster91
ff6d2e632f
fix: cleanup recent changes
2022-08-08 18:14:26 +02:00
Meghan Denny
0879cbeed2
remove 'builtin.stage2_arch', Sema is smart enough now
2022-08-07 16:07:08 -07:00
Jakub Konka
ae16c1d083
std: use std.macho.LoadCommandIterator for MachO parsing in std.debug
2022-08-06 23:14:54 -07:00
Veikka Tuominen
bd21f499dc
Type: adjust C type sizes
2022-08-06 14:42:05 -07:00
zooster
3debd6b732
Merge branch 'master' into nicedocs
2022-08-06 19:32:42 +02:00
Loris Cro
cb7c912a1b
autodoc: use location.replace to avoid history spam when searching
2022-08-06 17:29:39 +02:00
Loris Cro
9fc6990052
autodoc: re-introduce search result limits
2022-08-06 17:29:13 +02:00
r00ster91
943f4eb515
fix: use brighter bg color for help modal in light mode
...
You can see this issue in the video.
2022-08-06 16:07:32 +02:00
r00ster91
60b04b0988
style: some more formatting
2022-08-06 16:01:43 +02:00
r00ster91
2f5afe1194
let -> const for dom elements
...
These should never be reassigned.
2022-08-06 15:53:20 +02:00
r00ster91
e921dd1136
style: missing semi
2022-08-06 15:38:32 +02:00
r00ster91
beba29c24f
feat: make shadow of <kbd>s look nicer
2022-08-06 15:34:38 +02:00
r00ster91
ee72868f92
style: format
...
This is mostly manually formatted. I couldn't find a good HTML formatter for this file.
It also converts a bunch of tabs to spaces.
2022-08-06 15:34:00 +02:00
r00ster91
2f0abe63d4
fix: disable search bar before loading
...
This fixes the new search placeholder not disappearing if you type before
it finished loading, and maybe some other things.
2022-08-06 15:16:27 +02:00
r00ster91
df8cfb1273
feat: new search placeholder
...
This new search placeholder looks much nicer because it allows HTML inside it which
the `placeholder` attribute on `<input>`s doesn't allow.
I tested it for all kinds of cases and it seems to work pretty well.
2022-08-06 15:15:59 +02:00
r00ster91
6354851909
fix: "dialog" -> "modal"
...
"Dialog" is the incorrect term here because a dialog is a separate window that still lets you use the app
but a modal is a window where you can't continue using the app until you close it.
2022-08-06 15:05:58 +02:00
r00ster91
4ef567ba41
feat: make help modal disappear if you click outside it
2022-08-06 15:01:55 +02:00
Austin Rude
7afe7de4f0
autodoc: only modify the DOM once to display the search results
2022-08-05 21:47:36 -06:00
Austin Rude
e02f51762f
autodoc: Run through prettier formatter with default settings
2022-08-05 16:01:57 -06:00
N00byEdge
18440cb239
std.mem.zeroes: Zero sized structs with uninitialized members ( #12246 )
...
`std.mem.zeroes(struct{handle: void})` Failed with the following error before:
```
/nix/store/l6v4359wc9xrxxmvvp3rynsb5s3d78xf-zig-0.9.1/lib/zig/std/mem.zig:270:42: error: missing field: 'handle'
if (@sizeOf(T) == 0) return T{};
^
```
2022-08-05 15:47:52 +03:00
Allan Regush
44c321c05e
std.enums: make directEnumArrayLen public
2022-08-05 15:41:03 +03:00
Felix "xq" Queißner
263b5933d2
Makes std.meta.Tuple and std.meta.ArgsTuple generate a unique type instead of generating one per invocation.
2022-08-05 15:39:53 +03:00
Stephen Gregoratto
b3950d4a88
Update Linux syscall list for 5.19
...
New changes: memfd_secret implemented for RISC-V.
2022-08-05 15:36:32 +03:00
Loris Cro
7ffba492a5
autodoc: fix inconsistency when indexing generic types for search
...
closes #12334
2022-08-05 00:11:32 +02:00
Loris Cro
616f65df75
init-exe template: add flushing to the buffered writer
2022-08-04 21:12:42 +02:00
Loris Cro
cbac7a0194
init-exe template: small improvements
2022-08-04 20:27:46 +02:00
Loris Cro
fb0b9f05b3
new init-exe template
...
- removed an unnecessary (and confusing) `anyerror` fronm the function
signature of `main`
- replaced the call to std.log with two prints: one to stderr and one to
stdout
- replaced the test code with a better example
2022-08-04 20:10:43 +02:00
Jakub Konka
421d3e8d28
macho: add missing align cast in LoadCommandIterator
2022-08-03 21:19:41 +02:00
Jakub Konka
bb532584bc
macho: update how we insert output sections
...
Instead of generating sections upfront, allow generation by scanning
the object files for input -> output sections mapping. Next, always
strive to keep output sections in the final container sorted as they
appear in the final binary. This makes the linker less messy wrt
handling of output sections sort order for dyld/macOS not to complain.
There's still more work to be done for incremental context though
to make this work but looks promising already.
2022-08-03 21:19:41 +02:00
Jakub Konka
f26d5ee7ea
macho: sync with zld
...
gitrev a2c32e972f8c5adfcda8ed2d99379ae868f59c24
a2c32e972f
2022-08-03 21:19:41 +02:00
Loris Cro
4c750016eb
autodoc: inferred error unions in function return values
2022-08-03 17:21:56 +02:00
Frank Denis
fa321a07cd
crypto.sign.ed25519: include a context string in blind key signatures ( #12316 )
...
The next revision of the specification is going to include a context
string in the way blinded scalars are computed.
See:
https://github.com/cfrg/draft-irtf-cfrg-signature-key-blinding/issues/30#issuecomment-1180516152
https://github.com/cfrg/draft-irtf-cfrg-signature-key-blinding/pull/37
2022-08-03 15:25:15 +02:00
Loris Cro
c5afefec42
autodoc: fix autodoc analysis for @typeInfo
...
We were previously erroneously saving it as a `@TypeOf`.
2022-08-02 17:49:36 +02:00
Loris Cro
622714b76b
autodoc: fix frontend crash while rendering std.mem
...
Previously we expected to only find decl refs in a `foo.bar.baz`
type of expression. This would crash when trying to render something
like `@typeInfo(T).Int.bits`. We now properly account for builtins
and other components.
2022-08-02 17:49:36 +02:00
Veikka Tuominen
14f0b70570
Sema: add safety for sentinel slice
2022-08-02 18:34:30 +03:00
Loris Cro
2375658da9
Merge pull request #12276 from r00ster91/shortdesc
...
autodoc: better short description algorithm
2022-08-02 16:32:08 +02:00
Loris Cro
9ba2377d64
Merge pull request #12305 from squeek502/autodoc-field-doc-borders
...
autodoc: Add borders to field docs to make it clear which field they are associated with
2022-08-02 16:30:12 +02:00
Ryan Liptak
e7b6a18331
std.fs: Split Iterator.next on Linux and WASI to allow for handling platform-specific errors
...
Follow up to #12226 , implements the compromise detailed in https://github.com/ziglang/zig/issues/12211#issuecomment-1196011590
2022-08-01 19:38:05 +03:00
Ryan Liptak
1a1b7a3afd
Linux: Add IN_MASK_CREATE and corresponding error handling in inotify_add_watch
...
From https://man7.org/linux/man-pages/man7/inotify.7.html
> **IN_MASK_CREATE** (since Linux 4.18)
>
> Watch pathname only if it does not already have a watch associated with it; the error EEXIST results if pathname is already being watched.
2022-07-31 13:00:16 -07:00
Ryan Liptak
921ba6cad4
autodoc: Add borders to field docs to make it clear which field they are associated with
2022-07-30 17:26:29 -07:00
Veikka Tuominen
d26d696ee0
parser: require expression after colon in slice expr
2022-07-30 00:18:08 +03:00
Andrew Kelley
a482517357
std.debug: default signal handler also handles SIGFPE
2022-07-29 02:35:06 -07:00
Meghan Denny
b5861193e0
std: rename std.Target.systemz to .s390x
2022-07-28 23:22:44 -07:00