27530 Commits

Author SHA1 Message Date
Igor Anić
4381241237 tar: refactor Buffer
Move reader into Buffer and make it BufferedReader. This doesn't
introduce any new functionality just grouping similar things.
2024-01-13 19:37:33 -07:00
Igor Anić
ff8544daa5 tar: refactor code to be more testable
Split reading/parsing tar file and writing results to the disk in two
separate steps. So we can later test parsing part without need to write
everyting to the disk.
2024-01-13 19:37:33 -07:00
Jacob Young
7916cf6f83 std.io.GenericReader: add missing error annotations 2024-01-13 13:16:51 -08:00
Luuk de Gram
4f2009de12
Merge pull request #18528 from Luukdegram/wasm-linker-fixes
wasm-linker: Fix debug info
2024-01-13 08:42:33 +01:00
Michael Scott
e5dc9b1d09 Update styles in std docs to correct display glitch 2024-01-12 16:25:55 -08:00
Meghan Denny
3d6c26525f sema: forbid asm output to const locals 2024-01-12 16:23:42 -08:00
Chris Boesch
d8b5831dc4 Fixed verbatim copy of trailing '%' in unescapeStr 2024-01-12 16:20:44 -08:00
Meghan Denny
f49a8c5431 std: make c.versionCheck() a comptime-known function 2024-01-12 16:17:39 -08:00
Luuk de Gram
3f22bb96f3
wasm-linker: fix debug info relocation
This corrects calculating the offsets to the code section as we now
correctly allocate the code atoms during write taking the 'size' into
account. We also handle dead symbols which are garbage-collected by
writing -2 and -1 to skip ranges, loc and other sections respectively.
2024-01-12 14:57:37 +01:00
Luuk de Gram
7fe629a812
wasm-linker: delay code atom allocation till write
We delay atom allocation for the code section until we write the actual
atoms. We do this to ensure the offset of the atom also includes the
'size' field which is leb128-encoded and therefore variable. We need this
correct offset to ensure debug info works correctly.

The ordering of the code section is now automatic due to iterating the
function section and then finding the corresponding atom to each
function. This also ensures each function corresponds to the right atom,
and they do not go out-of-sync.

Lastly, we removed the `next` field as it is no longer required and also
removed manually setting the offset in synthetic functions. This means
atoms use less memory and synthetic functions are less prone. They will
also be placed in order of function order correctly.
2024-01-12 14:57:36 +01:00
Luuk de Gram
2b3e6f680c
wasm-linker: ensure custom sections are parsed
Not all custom sections are represented by a symbol, which means the
section will not be parsed by the lazy parsing and therefore get garbage-
collected. This is problematic as it may contain debug information that
should not be garbage-collected. To resolve this, we manually create
local symbols for those sections and also ensure they do not get garbage-
collected.
2024-01-12 14:57:32 +01:00
Andrew Kelley
63de8a5989 langref: fix typo 2024-01-11 01:02:21 -08:00
Andrew Kelley
30688c341b LLVM: fix lowering of extern anyopaque
closes #18461
2024-01-11 01:00:49 -08:00
Andrew Kelley
aba8d4f62c langref: document inline functions 2024-01-10 19:31:45 -07:00
Andrew Kelley
45ec851733 zig build: handle stderr more elegantly
* Specifically recognize stderr as a different concept than an error
  message in Step results.
* Display it differently when only stderr occurs but the build proceeds
  successfully.

closes #18473
2024-01-10 17:11:26 -08:00
Andrew Kelley
df6aed0fc3
Merge pull request #18505 from ziglang/tsan
TSAN: update to LLVM 17.0.6
2024-01-10 15:08:49 -08:00
february cozzocrea
aafff25897
translate-c: float cast from boolean expr fix 2024-01-10 19:13:11 +00:00
Andrew Kelley
71e7bef2a2 tsan: use explicit error set
Fixes fail to build from source when LLVM not linked.
2024-01-10 09:30:24 -08:00
Andrew Kelley
798c68d5a5 tsan: update build logic for tsan from llvm 17.0.6 2024-01-10 01:00:37 -07:00
Andrew Kelley
854b88fda0 tsan: update rtl files to LLVM 17.0.6 2024-01-10 01:00:37 -07:00
Andrew Kelley
036e9fd479 libcxx: fix not passing any_sanitize_thread correctly 2024-01-10 00:51:18 -07:00
Andrew Kelley
3051d4390b Compilation: fix tsan error reporting 2024-01-10 00:51:02 -07:00
Andrew Kelley
e025ad7b46 std.mem: fix simd.suggestVectorLength merge conflict
Commits
2f8e4347b1f9c2bf093ac48a636576c22359c1ff and
6a32d58876995f18b35ffd89b8875a99417c29cf had a conflict that was
undetected by source control.
2024-01-09 18:20:53 -07:00
Veikka Tuominen
828d23956d std.heap: add runtime safety for calling stackFallback(N).get multiple times
Closes #16344
2024-01-09 17:18:20 -08:00
Andrew Kelley
6a32d58876
Merge pull request #18318 from castholm/simd-segfault
Rename `simd.suggestVectorSize` to clarify intent and fix related segfault
2024-01-09 17:13:58 -08:00
Matthew Wozniak
aaf1e0b25b
add ability to open dlls with platform-specific flags (#18370) 2024-01-09 20:11:22 -05:00
Bogdan Romanyuk
4a1a5ee47b
AstGen: add error for redundant comptime var in comptime scope (#18242) 2024-01-09 20:09:39 -05:00
Andrew Kelley
157cdaee0e
Merge pull request #18498 from castholm/cpu-cortex-m-optional-deps
Don't enable optional ARM Cortex-M series CPU features by default
2024-01-09 17:08:08 -08:00
PauloCampana
fcc0c5ddc7
Add std.math.gamma and lgamma (#18449)
See #7212
2024-01-09 14:53:47 -08:00
Andrew Kelley
7320b24e0e
Merge pull request #18486 from castholm/undefined-version
Add support for `--(no-)undefined-version`
2024-01-09 14:23:31 -08:00
Andrew Kelley
acca16c8ce
Merge pull request #18173 from dweiller/switch-err-union
Special-case switching on error union capture
2024-01-09 13:54:27 -08:00
Joel Gustafson
dbdee2d53c
ignore charset and boundary directives in content-type headers when fetching dependencies 2024-01-09 20:16:59 +00:00
Carl Åstholm
0cd508b09f Re-run update_cpu_features (LLVM 17)
release/17.x branch, commit 8f4dd44097c9ae25dd203d5ac87f3b48f854bba8
(same as the previous run)
2024-01-09 17:53:43 +01: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
Carl Åstholm
3cd646869b Add tests for --undefined-version 2024-01-09 17:26:10 +01:00
dhash
9bb6430318 Add support for --(no-)undefined-version
Co-authored-by: Motiejus Jakštys <motiejus@jakstys.lt>
Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
Co-authored-by: Samuel Cantero <scanterog@gmail.com>
Co-authored-by: Giorgos Georgiou <giorgos.georgiou@datadoghq.com>
Co-authored-by: Carl Åstholm <carl@astholm.se>
2024-01-09 17:24:11 +01:00
Andrew Kelley
60094cc3fc
Merge pull request #18491 from ziglang/fix-mod-link-obj-path
std.Build.Step.Compile: fix link object paths
2024-01-09 01:11:15 -08:00
joachimschmidt557
f12ec02bd7 stage2 AArch64: get empty file compiling again 2024-01-08 23:53:24 -08:00
David Rubin
2f8e4347b1
Optimized std.mem.eql with SIMD (#18389)
* optimized memeql
* add `sched_setaffinity` to `std.os.linux`

Co-authored-by: Protty <45520026+kprotty@users.noreply.github.com>
Co-authored-by: Ryan Liptak <squeek502@hotmail.com>
2024-01-09 02:50:22 -05:00
dweiller
67d7d7b5a7 fixup! astgen: use switch_block_err_union 2024-01-09 15:31:20 +11:00
dweiller
ec5b751373 sema: inherit block want_safety for err switch union 2024-01-09 14:42:12 +11:00
dweiller
69ab687156 test: add tests for switch_block_err_union 2024-01-09 14:42:12 +11:00
dweiller
fc6dc797ce astgen/sema: fix source locations for switch_block_err_union 2024-01-09 14:42:12 +11:00
dweiller
8695bc7ed3 langref: mention error union switch peer resolution 2024-01-09 14:42:12 +11:00
dweiller
6a18cee3af astgen/sema: use switch_block_err_union for if-else-switch 2024-01-09 14:42:12 +11:00
dweiller
b7eb59fc14 fix x86_64 crashes for switch_block_err_union
This change only emits the unwrap_errunion_err instruction if the error
capture is actually used in a branch.
2024-01-09 14:42:12 +11:00
dweiller
adcaad6d91 sema: fix err union switch with inferred empty error sets 2024-01-09 14:42:12 +11:00
dweiller
2fa69cce72 sema: allow maybeErrorUnwrap to handle err_union_code 2024-01-09 14:42:12 +11:00
dweiller
a175a64384 sema: implement runtime switch_block_err_union 2024-01-09 14:42:12 +11:00