Commit Graph

299 Commits

Author SHA1 Message Date
Brandon Black 271d896446 std.hash.crc: get rid of usingnamespace
This flips things around such that std/hash/crc.zig is generated
by the catalog-based generation tool, and the real code that used
to be in that file is moved out to std/hash/crc/impl.zig.  The
generated tests are moved to std/hash/crc/test.zig.  By going this
route, we eliminate the need for usingnamespace without changing
anything for callers of these interfaces.  The Crc32 tests are
simply added to the fixed part of the generated output and
compactified a bit.

This was the second-to-last usage of usingnamespace left in std.
2024-04-11 14:42:04 -07:00
Carl Åstholm 4c393c7468 Update usages of fmtId/isValidId
`{}` for decls
`{p}` for enum fields
`{p_}` for struct fields and in contexts following a `.`

Elsewhere, `{p}` was used since it's equivalent to the old behavior.
2024-04-07 14:47:11 +02:00
Jacob Young 5a41704f7e cbe: rewrite CType
Closes #14904
2024-03-30 20:50:48 -04:00
Elaine Gibson add74427b9 mingw: support -municode 2024-03-27 10:05:57 +00:00
Andrew Kelley 869c2a03f3 mingw-w64 updater: don't include windowsapp or onecore APIs 2024-03-20 11:25:54 -07:00
Andrew Kelley 43f240803d mingw-w64 updater: don't omit win32 def files
see #18968
2024-03-20 11:23:48 -07:00
Robin Voetter 9b18125562 spirv: make generic globals invocation-local 2024-03-18 19:13:50 +01:00
Robin Voetter 20d7bb68ac spirv: add zig-specific ext inst
This may be removed again in the future...
2024-03-18 19:13:49 +01:00
Robin Voetter e566158acf spirv: make IdResult an enum 2024-03-18 19:13:49 +01:00
Robin Voetter 3d5721da23 spirv: update spec generator
For module parsing and assembling, we will also need to know
all of the SPIR-V extensions and their instructions. This commit
updates the generator to generate those. Because there are
multiple instruction sets that each have a separate list of Opcodes,
no separate enum is generated for these opcodes. Additionally, the
previous mechanism for runtime instruction information, `Opcode`'s
`fn operands()`, has been removed in favor for
`InstructionSet.core.instructions()`.

Any mapping from operand to instruction is to be done at runtime.
Using a runtime populated hashmap should also be more efficient
than the previous mechanism using `stringToEnum`.
2024-03-18 19:13:46 +01:00
Ahmed 5c8eda36d6 chore: Fix some typos 2024-03-14 19:43:24 +02:00
Tristan Ross 9d70d614ae std.builtin: make link mode fields lowercase 2024-03-11 07:09:10 -07:00
Jacob Young 136d7c2138 tools: add lldb pretty printer for stage2 inst indices 2024-03-02 01:06:58 +01:00
Ali Chraghi afa7793351 spirv: basic shader support 2024-02-05 11:55:14 +03:30
Jakub Konka 92deebcd66 cli+build: handle -ObjC flag and route it to MachO linker 2024-02-02 22:00:16 +01:00
Andrew Kelley 9be831e15a langref: remove line numbers from code samples
It's unnecessary, more complicated, bloated, and it messes up the table
of operators.
2024-01-21 20:31:13 -07:00
Elaine Gibson b126978555 mingw-w64: remove msvcrt sources 2024-01-20 00:21:34 +00:00
F3real 1322049e24 Don't crash or CR/LF line endings in docgen 2024-01-13 22:05:09 -08:00
Carl Åstholm f2dfd7d212 Override incorrect ARM Cortex-M series CPU feature definitions
Based on the Arm Cortex-M Processor Comparison Table v3.0
<https://developer.arm.com/documentation/102787/0300/?lang=en>
2024-01-09 17:53:18 +01:00
Carl Åstholm 55f2a6684e update_cpu_features: Support omitting deps 2024-01-09 17:53:09 +01:00
Andrew Kelley 089ebeb873 update-mingw tool: add config.h to whitelist 2024-01-08 11:52:38 -07:00
Andrew Kelley 491b460e0a add tool for updating mingw crt files 2024-01-08 11:52:38 -07:00
Andrew Kelley 3f6e651d5a remove tool: update-license-headers
This tool is not needed since license headers were removed in
d29871977f.
2024-01-07 17:02:17 -07:00
Andrew Kelley f5613a0e35 update docgen for std Target.Query API breaks 2024-01-01 17:51:18 -07:00
David Rubin 1e42a3de89 Remove all usages of std.mem.copy and remove std.mem.set (#18143) 2023-11-29 16:03:02 -05:00
Andrew Kelley e357550610 update for the std.fs.Dir changes 2023-11-22 15:24:57 -07:00
Andrew Kelley 519ba9bb65 Revert "Merge pull request #12060 from Vexu/IterableDir"
This reverts commit da94227f78, reversing
changes made to 8f943b3d33.

I was against this change originally, but decided to approve it to keep
an open mind. After a year of trying it in practice, I firmly believe
that the previous way of doing it was better.
2023-11-22 12:35:33 -07:00
Andrew Kelley ddd8d59188 tools/gen_spirv_spec: fix wrong use of BoundedArray
It incorrectly, was returning an error, when it actually wanted to
assert that the array bounds were not exceeded. Fixed by using ArrayList
instead.
2023-11-22 11:33:34 -07:00
mlugg 026a8278f8 tools: correct unnecessary uses of 'var' 2023-11-19 09:57:04 +00:00
Andrew Kelley 3fc6fc6812 std.builtin.Endian: make the tags lower case
Let's take this breaking change opportunity to fix the style of this
enum.
2023-10-31 21:37:35 -04:00
Jacob Young 27fe945a00 Revert "Revert "Merge pull request #17637 from jacobly0/x86_64-test-std""
This reverts commit 6f0198cadb.
2023-10-22 15:46:43 -04:00
Andrew Kelley 6f0198cadb Revert "Merge pull request #17637 from jacobly0/x86_64-test-std"
This reverts commit 0c99ba1eab, reversing
changes made to 5f92b070bf.

This caused a CI failure when it landed in master branch due to a
128-bit `@byteSwap` in std.mem.
2023-10-22 12:16:35 -07:00
Jan Philipp Hafer fd2239bde9 child_process + Build: rename exec to run + all related code
Justification: exec, execv etc are unix concepts and portable version
should be called differently.

Do no touch non-Zig code. Adjust error names as well, if associated.
Closes #5853.
2023-10-22 14:47:20 -04:00
Jacob Young 2e6e39a700 x86_64: fix bugs and disable erroring tests 2023-10-21 10:55:41 -04:00
Andrew Kelley 0813539c28 it's unclear which zig target glibc sparcv9 maps to
so let's not include those headers until more investigation happens.
2023-10-13 17:44:27 -07:00
Andrew Kelley 87b3e23172 tools/update_glibc: exempt some more files 2023-10-13 17:44:27 -07:00
Jakub Konka 91ef6d1173 docgen: update use of getExternalExecutor 2023-10-06 16:04:57 +02:00
Jakub Konka 8b4e3b6aee comp: add support for -fdata-sections 2023-10-04 11:21:56 -07:00
Stephen Gregoratto 11fcbe5a46 gen_linux_syscalls: use default max output bytes
Apparently, 20KiB is not enough anymore.
2023-09-28 18:58:05 +10:00
Andrew Kelley 62a12e0631 LLVM 17 std lib updates and fixes
* some manual fixes to generated CPU features code. in the future it
   would be nice to make the script do those automatically. I suspect
   the sm_90a thing is a bug in LLVM.
 * add liteos to various target OS switches. I know nothing about this
   OS; someone will need to work specifically on support for this OS
   when the time comes to support it properly in zig.
 * while waiting for the compiler, I went ahead and made more
   conservative choices about when to use `inline` in std/Target.zig
2023-09-19 09:37:31 -07:00
Andrew Kelley 3ed40b1140 update CPU features to LLVM 17
release/17.x branch, commit 8f4dd44097c9ae25dd203d5ac87f3b48f854bba8
2023-09-19 09:37:31 -07:00
Marc Tiehuis f056e01c23 update crc catalog gen script 2023-09-06 16:43:57 +12:00
Jacob Young 8b9161179d Sema: avoid deleting runtime side-effects in comptime initializers
Closes #16744
2023-08-11 11:01:47 -07:00
Zachary Raineri 0461a64a93 change uses of std.builtin.Mode to OptimizeMode (#16745)
std.builtin.Mode is deprecated.
2023-08-09 14:39:34 -04:00
Andrew Kelley acbb6418c3 move docgen.zig to tools/ 2023-07-30 18:44:31 -07:00
Andrew Kelley 48e0b89f2c remove tools/extract-grammar.zig
This is not a sound way to check Zig's grammar against the spec.

This is a partial revert of f8f1c6ac06.
2023-07-25 18:17:18 -07:00
mlugg f26dda2117 all: migrate code to new cast builtin syntax
Most of this migration was performed automatically with `zig fmt`. There
were a few exceptions which I had to manually fix:

* `@alignCast` and `@addrSpaceCast` cannot be automatically rewritten
* `@truncate`'s fixup is incorrect for vectors
* Test cases are not formatted, and their error locations change
2023-06-24 16:56:39 -07:00
Andrew Kelley 09c7f1bd7c musl: update libc.S to v1.2.4 2023-06-20 12:55:38 -04:00
Andrew Kelley cdcfd15d3c musl: deal with zig rename of i386 to x86
musl uses "i386" for this while Zig has switched to "x86".
2023-06-20 12:55:38 -04:00
Eric Joldasov 50339f595a all: zig fmt and rename "@XToY" to "@YFromX"
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
2023-06-19 12:34:42 -07:00