Cody Tapscott
25d3713b07
stage2: Teach Liveness that safety checks do not modify memory
...
This change adds to Liveness a simple pattern match for the
try-like `.condbr` blocks emitted by Sema's safety checks. This
allows us to determine that these do not modify memory, which
permits us to elide additional loads in the backend.
As @Vexu points out in the main issue, this is probably not a
complete solution on its own. We'll still want a way to reliably
narrow the load/copy when performing several consecutive accesses,
such as `foo.arr[x][y].z`
Resolves https://github.com/ziglang/zig/issues/12215
2022-12-12 18:48:10 -05:00
Lee Cannon
4efdbd3044
update TracyAllocator for new Allocator changes
2022-12-11 15:02:44 -05:00
IntegratedQuantum
15a6336bb4
Add a helpful note when using ** on number types. ( #13871 )
2022-12-11 14:41:42 -05:00
Andrew Kelley
cffbb32d31
Merge pull request #13872 from koachan/sparc64-codegen
...
stage2: sparc64: Some Air lowerings + skip unbuildable tests
2022-12-10 15:10:21 -05:00
Andrew Kelley
023b597ab4
Merge pull request #13370 from r00ster91/newascii
...
std.ascii: remove LUT and deprecations
2022-12-10 14:53:41 -05:00
Andrew Kelley
ac0488430f
Compilation: revert asking for exclusive locks on cache hits
...
We definitely want a shared lock on a cache hit. Without this, we get a
deadlock when Zig is asked to compile the same C source file multiple
times as part of the same compilation.
This is a partial revert of 8ccb9a6ad327a4d7fbc321b33d4aa66a27a1f5ee.
cc @kcbanner
2022-12-10 14:34:30 -05:00
Koakuma
644593ab18
stage2: sparc64: Implement airMinMax
2022-12-10 21:32:00 +07:00
Koakuma
b4b7a404cf
stage2: sparc64: Implement airBitReverse
2022-12-10 21:31:59 +07:00
Koakuma
a369e8af9e
stage2: sparc64: Add more types for genTypedValue
2022-12-10 21:31:59 +07:00
Jacob Young
fc6d7d2799
CBE: fix compiling for aarch64-windows
...
These bugs were triggered in the C backend by aarch64-specific code in
os/windows.zig. Intentionally not updating zig1.wasm yet because of
upcoming changes and since aarch64-windows is not tested on master yet.
2022-12-10 09:15:40 -05:00
Koakuma
e9204f84ad
stage2: sparc64: Log generated function name for debug purposes
2022-12-10 21:11:14 +07:00
Koakuma
fb9357f06c
stage2: sparc64: Implement atomic ops
2022-12-10 21:11:14 +07:00
Koakuma
219b5f0ad6
stage2: sparc64: Implement stack argument
2022-12-10 21:11:14 +07:00
Koakuma
a72362f395
stage2: sparc64: Implement airWrapErrUnionPayload
2022-12-10 21:11:14 +07:00
Koakuma
1b5b9eb365
stage2: sparc64: Add extra note about stack_offset MCV
2022-12-10 21:11:14 +07:00
Koakuma
57616debf9
stage2: sparc64: Implement airTrunc
2022-12-10 21:11:14 +07:00
Koakuma
ef532ada8a
stage2: sparc64: Implement airSplat
2022-12-10 21:11:14 +07:00
Koakuma
4687bc2730
stage2: sparc64: Implement airUnionInit
2022-12-10 21:11:14 +07:00
Koakuma
0bc936685b
stage2: sparc64: Implement airErrorName
2022-12-10 21:11:14 +07:00
Koakuma
4ddedb3885
stage2: sparc64: Implement get/setUnionTag
2022-12-10 21:11:14 +07:00
Andrew Kelley
7637ac584f
Merge pull request #13821 from Vexu/eliminate-bound-fn
...
Eliminate `BoundFn` type from the language
2022-12-10 06:14:57 -05:00
Andrew Kelley
02b221051a
fix aarch64-windows-gnu libc
...
We were missing some math functions. After this enhancement I verified
that I was able to cross-compile ninja.exe for aarch64-windows and
produce a viable binary.
2022-12-10 03:06:17 -05:00
Veikka Tuominen
9d93b2ccf1
Eliminate BoundFn type from the language
...
Closes #9484
2022-12-09 20:37:18 -07:00
Veikka Tuominen
5831b68341
AstGen: add check for missing builtin argument
...
Closes #13817
2022-12-09 20:37:18 -07:00
r00ster91
37b1707370
DepTokenizer.printUnderstandableChar: consider space printable
...
This makes the function consider space to be printable as well (because it is)
and simplifies that function.
2022-12-09 21:57:17 +01:00
r00ster91
6b7d9b34e8
api(std.ascii): remove deprecated decls
2022-12-09 21:57:17 +01:00
Jakub Konka
f7fea080b2
macho+zld: skip atomless synthetic globals in dead_strip
...
They are implicitly marked live.
2022-12-09 21:12:38 +01:00
Jakub Konka
182751ba27
Revert "coff: specify default base path for relative source paths in pdb"
2022-12-09 14:16:44 +01:00
Jakub Konka
4d640f9bb9
dwarf: resolve all relative paths when generating include_dirs and file_names lists
2022-12-09 14:16:44 +01:00
Jakub Konka
bda5180b2c
llvm: resolve all relative paths when creating DIFiles
...
This will make stack traces and debugging experience more consistent
in the sense that the presence of source lines in stack traces will
not be dependent on the current working directory of the running process.
2022-12-09 14:16:44 +01:00
Jakub Konka
9735953ae2
wasm: implement moving debug_line program when header too big
2022-12-09 09:24:25 +01:00
Jakub Konka
742aa94280
dsym: hint linker when file range copy is not necessary
2022-12-09 09:24:25 +01:00
Jakub Konka
9ade4f6d8c
elf: hint linker when file range copy is not necessary
2022-12-09 09:24:25 +01:00
Jakub Konka
d7e42014ca
elf: add growAllocSection and growNonAllocSection
...
Update `Dwarf.zig` to use `growNonAllocSection` for ELF and implement
routine to make space for `.debug_line` header.
2022-12-09 09:24:25 +01:00
Jakub Konka
aa2f48f013
dsym: reuse growSection where possible
2022-12-09 09:24:25 +01:00
Jakub Konka
fa44c73c1e
dwarf: move any remaining section growth to dsym
2022-12-09 09:24:25 +01:00
Jakub Konka
b14e580ad8
dwarf: move growing debug_aranges section to dsym
2022-12-09 09:24:25 +01:00
Jakub Konka
136a508027
dsym: finish markDirty helper
2022-12-09 09:24:25 +01:00
Jakub Konka
ecb341a006
dwarf: move growing debug_abbrev section to dsym
2022-12-09 09:24:25 +01:00
Jakub Konka
381abcfb7a
dwarf: move another sect growing routine to d_sym
2022-12-09 09:24:25 +01:00
Jakub Konka
4bb66b63ba
macho: add helper for getting ptr to DebugSymbols
2022-12-09 09:24:25 +01:00
Jakub Konka
05e221796a
dwarf+d_sym: move logic for growing section to d_sym
2022-12-09 09:24:25 +01:00
Jakub Konka
4c38ba7d1b
dwarf: move SrcFns if debug_line header exceeded its padding
2022-12-09 09:24:25 +01:00
Jakub Konka
be2b85f670
dwarf: refactor object file format and ptr width switches in writeDbgLineHeader
2022-12-09 09:24:25 +01:00
Jakub Konka
8e71a79e4b
dwarf: fix incorrect calc of dir index
2022-12-09 09:24:25 +01:00
Jakub Konka
62145a1b08
dwarf: refactor routine for precalculating size of dbg line header
2022-12-09 09:24:25 +01:00
Jakub Konka
6817219e27
dwarf: generate list of include dirs and file names like LLVM backend
2022-12-09 09:24:25 +01:00
Jakub Konka
6ec34edb9a
dwarf: fully resolve each path to each file source
2022-12-09 09:24:25 +01:00
Jakub Konka
f5c764d892
dwarf: track source files via *const Module.File pointers
2022-12-09 09:24:25 +01:00
Jakub Konka
4c4821d993
dwarf: specify all referenced zig source files
2022-12-09 09:24:25 +01:00