Ian Johnson
d3eaa75c07
autodoc: use commonmark.js for Markdown rendering
2023-07-04 17:08:46 +02:00
Evin Yulo
ba6e5e65a0
json: give enums a default stringify implementation
2023-07-03 20:33:36 -07:00
yujiri8
b26fa4ec4b
add docstring to std.json.stringify ( #16241 )
2023-07-03 19:26:11 -04:00
Andrew Kelley
17890f6b8a
Merge pull request #15879 from r00ster91/more_stage1_test_coverage
...
More stage1 test coverage
2023-07-03 15:59:54 -07:00
xdBronch
0dffab7356
check for UEFI in io.StreamSource
2023-07-03 11:00:54 -07:00
r00ster91
2b8687ba2d
std.math.big.int: better name for equal function
...
All of the std except these few functions call it "eql" instead of "eq".
This has previously tripped me up when I expected the equality check function to be called "eql"
(just like all the rest of the std) instead of "eq".
The motivation is consistency.
If search "eq" on Autodoc, these functions stick out and it looks inconsistent.
I just noticed there are also a few functions spelling it out as "equal" (such as std.mem.allEqual).
Maybe those functions should also spell it "eql" but that can be done in a future PR.
2023-07-03 11:00:13 -07:00
r00ster91
2583a39fb6
behavior: test @bitCast of packed struct of bools
...
This seems to have resolved itself now.
Tested on x86_64 using debug optimize mode.
Closes #9851
2023-07-03 10:59:13 -07:00
John Simon
cb5a6be41a
Smaller memory footprint for BoundedArray ( #16299 )
...
Store BoundedArray's length using the smallest possible integer
Co-authored-by: zooster <r00ster91@proton.me>
2023-07-03 13:58:03 -04:00
Loris Cro
28ad74e8a6
autodoc: wire in js tokenizer to frontend
2023-07-03 19:18:44 +02:00
Emile Badenhorst
116a99d3ce
Autodoc: Javascript port of zig lexer. ( #16306 )
...
* Most of the js lexer ported
* Fixed lexical Ranges
* Mini test framework
* More testing and bug fixing in zig js lexer
* Removed bad import
* Implemented good html generation
Closes #15863
2023-07-03 17:47:08 +02:00
Philipp Lühmann
de227ace14
std: fix doc comment of GPA deinit
...
This was missed in #15269
2023-07-03 01:14:20 -07:00
Michael Dusan
fc9ab5f0e8
tls certificates: support more BSDs
...
- add support for freebsd, netbsd, dragonfly
- refactor rescanOpenBSD -> rescanBSD
- make os-specific rescan*() non-public
closes #16279
2023-07-02 19:24:37 -07:00
Ryan Liptak
689f3163af
Fix TTY.detectConfig regression on windows
...
e05412669c8dde1230612de5af64fbc3fb0bc17e inadvertently changed the logic on Windows and made it so that supportsAnsiEscapeCodes was never checked. This fixes that regression while keeping the logic intact for other platforms.
2023-07-02 00:07:24 -07:00
David Carlier
9e0ac4449a
std.c: fix haiku's find_path signature.
...
codePointer and subPath are not mandatory.
following up on 1084590
2023-07-01 22:20:21 -07:00
Andrew Kelley
afc5edabe0
Merge pull request #16287 from Snektron/amdgpu-panic-fix
...
Some amdgcn fixes
2023-07-01 22:04:06 -07:00
Andrew Kelley
309aacfc89
Merge pull request #16284 from Snektron/spirv-internpool-fixes
...
SPIR-V InternPool aftermath damage control
2023-07-01 14:21:04 -07:00
Robin Voetter
a1b583dc24
std: make panic and abort for amdhsa call trap
2023-07-01 21:23:45 +02:00
Robin Voetter
13c0624f23
llvm: cast optional null ptr representation to generic address space
...
The panic handler expects that this value is represented with the
generic address space, so cast the global to the generic address-
space before caching and returning the value.
2023-07-01 20:28:17 +02:00
David CARLIER
8f14431bc8
std.c: msghdr* struct removing prefixes to match linux.
2023-07-01 11:14:39 -07:00
Robin Voetter
073289d0da
spirv: disable new behavior tests that do not pass
...
Some new behavior tests have recently been added, and not all of these
pass with the SPIR-V backend.
2023-07-01 19:45:09 +02:00
Loris Cro
97a1b046ea
autodoc: fix scoring bug when matching full decl name
2023-07-01 17:38:18 +02:00
Emile Badenhorst
35a8e8a06c
Fixed Autodoc rendering of @truncate builtin ( #16263 )
...
* fixed autodoc rendering of @trucate builtin
* Changed to LHS for typeRef
* autodoc: fix typeref for `truncate`
---------
Co-authored-by: Loris Cro <kappaloris@gmail.com>
2023-07-01 16:43:17 +02:00
Robin Voetter
aa398034eb
testing: disable printing for targets that do not support it
...
The SPIR-V cannot print the helpful error messages from the
std.testing module. This commit overrides the default print
function used here to one that only prints if the target supports
it. For now, its only done for SPIR-V, but this function could
be adapted to more targets that need it.
2023-07-01 14:29:11 +02:00
Robin Voetter
74f40ddd11
spirv: enable simplified default panic handler
...
SPIR-V cannot print, so we cannot yet use the fancy default
panic handler. Instead we will just use the infinite loop
one for now.
2023-07-01 14:27:57 +02:00
Robin Voetter
8eee392862
spirv: fix up todos & errors from intern pool changes
...
This replaces the implementation of constant() which one that
is directly based on the intern pool rather than the Zig type tag
too.
2023-07-01 14:27:12 +02:00
Jacob Young
f571438fc0
Unrevert "Sema: preserve extern struct field alignment"
...
This unreverts commit 1a2468abfcd8b539193d943c1eefb71319cc7b88.
2023-06-30 23:24:52 -04:00
Jacob Young
2282c27885
Remerge pull request #15995 from mlugg/fix/union-field-ptr-align
...
Sema: copy pointer alignment to union field pointers
This is an unrevert of 43c98dc11567eeb38be041c7dad179c53156f3df.
2023-06-30 23:23:26 -04:00
mlugg
402b958e19
std.pdb: fix incorrect field alignment in ptrCast
2023-06-30 23:23:03 -04:00
mlugg
730f2e0407
Sema: copy pointer alignment to struct field pointers
2023-06-30 23:23:03 -04:00
mlugg
5b594139d9
Sema: copy pointer alignment to union field pointers
...
This implements the semantics as discussed in today's compiler meeting,
where the alignment of pointers to fields of default-layout unions
cannot exceed the field's alignment.
Resolves : #15878
2023-06-30 23:23:01 -04:00
Evan Haas
0a6cd257b9
translate-c: Use @constCast and @volatileCast to remove CV-qualifiers
...
Instead of converting a pointer to an int and then back to a pointer.
2023-06-29 23:36:56 +03:00
Michael Dusan
614bc6755e
openbsd: add root certificate scanning
...
patch by @bilaliscarioth, thank you!
closes #16168
2023-06-29 10:29:28 -07:00
Jacob Young
43c98dc115
Revert "Merge pull request #15995 from mlugg/fix/union-field-ptr-align"
...
This reverts commit 40cf3f7ae5fbfb84b7af6b27e6296ee858b209ef, reversing
changes made to d98147414d084bc41b00ba9c0be8c7b82ad4e76c.
2023-06-29 00:23:19 -04:00
Jacob Young
1a2468abfc
Revert "Sema: preserve extern struct field alignment"
...
This reverts commit 4620972d086ebb3b7686a79914876488c6dfd171.
2023-06-29 00:23:19 -04:00
Evan Haas
77dcd903a0
langref: Add c_char to the list of primitive types
2023-06-28 17:35:22 -07:00
Lauri Tirkkonen
82520a214c
std.crypto.hash.sha2: require avx2 on x86_64
...
according to
https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=vpalignr&ig_expand=283,283,284,283,283&techs=AVX_ALL
the vpalignr instruction requires AVX2 support
2023-06-28 17:33:02 -07:00
Krzysztof Wolicki
0c1bfe271e
autodoc: Correct a comment about types from std.builtin
2023-06-28 19:03:24 +02:00
Krzysztof Wolicki
2984a75804
autodoc: Try to handle all InternPool.Index types good enough
2023-06-28 19:03:24 +02:00
Ian Johnson
4dacaa1e12
Autodoc: add preference for / search
...
Closes #16081
2023-06-28 18:16:16 +02:00
Bertie Wheen
7166407d8f
langref: correct ordering of @xFromY builtins
2023-06-28 17:38:41 +03:00
Alex Kladov
4620972d08
Sema: preserve extern struct field alignment
...
In
extern struct { x: u32, y: u16 }
we actually know that y's alignment is `@alignOf(u32)`, and not just
`@alignOf(u16)`.
closes : #16134
2023-06-28 16:36:32 +02:00
zooster
28f515acd7
behavior: test slicing array of zero-sized values
...
Closes #15343
2023-06-28 14:00:18 +03:00
Motiejus Jakštys
910ad92e0e
ld: support -version-script
...
gettext uses this version and, surely enough, it is supported by lld
2023-06-28 09:32:10 +02:00
r00ster91
adf0718316
behavior: boolean vector with 2 or more elements
...
Closes #12169
2023-06-27 19:57:23 -04:00
r00ster91
d01641f6be
test cases: fix typo in filename
2023-06-27 19:57:23 -04:00
r00ster91
2cc9c99ebf
behavior: if-@as-if chain
...
Closes #8952
2023-06-27 19:57:23 -04:00
r00ster91
c647799e5e
test cases: expected optional type in for loop
...
Closes #10674
2023-06-27 19:57:23 -04:00
r00ster91
5e9fe84d24
test cases: array inside of anonymous struct
...
Closes #7525
2023-06-27 19:57:23 -04:00
r00ster91
10218dd096
test cases: never-inline call of inline function with comptime parameter
...
Closes #5995
2023-06-27 19:57:23 -04:00
r00ster91
18fe951e24
test cases: returning undefined [:0]const u8
...
Closes #5947
2023-06-27 19:57:23 -04:00