21600 Commits

Author SHA1 Message Date
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
Manlio Perillo
f020734347 langref: remove HTML code from a shell node
Several <em> elements where added inside a shell node in the
Using--target-and--cflags section.  Remove them, since they are not
supposed to be handled by codegen.

For the original commit, see
0c091feb5 (Improve HTML semantics and a11y of language reference).

Fixes #13846
2022-12-10 14:39:40 +02: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
Evin Yulo
e4874d842e Remove unneeded else unreachable in docgen.zig
See #707
2022-12-10 05:50:56 -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
89d1ccc477 replace zig1.wasm to the removal of BoundFn
This also no longer uses zstd compression on this file. The reasoning
for this is:

 * It has been demonstrated that the release tarballs are actually
   smaller if zig1.wasm gets compressed along with the other files
   rather than separately compressed.

 * More importantly, leaving zig1.wasm uncompressed may result in a
   smaller git repository size, since the repository as a whole could
   have savings across the multiple versions of zig1.wasm, which would
   not be possible if each one was independently compressed.

 * When in doubt, do what is simpler, which is to not have this extra
   zstd mechanism. This will remove the only "vendored" code from our
   build process, which is a nice property to have.

Co-authored-by: Andrew Kelley <andrew@ziglang.org>
2022-12-09 20:59:13 -07:00
Andrew Kelley
c51288f1f6 remove the zstd mechanism from the build process 2022-12-09 20:59:13 -07: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
h57624paen
b483c796c6 fix building wasm2c output with msvc
cmake tweaks to allow zig1 to compile successfully with msvc
2022-12-09 22:35:05 -05:00
Andrew Kelley
e945045437
Merge pull request #13850 from jacobly0/builtin-fallback
zig.h: fix and add builtin fallbacks
2022-12-09 22:19:40 -05: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
Jacob Young
a2854f71dc zig.h: fix and add builtin fallbacks 2022-12-09 13:40:55 -05:00
Jakub Konka
bd5a8f86a1
Merge pull request #13843 from ziglang/dwarf-abs-paths
debug info: resolve relative paths to source files into absolute paths
2022-12-09 19:18:06 +01:00
Evin Yulo
d0172488b2 langref: update anonymous struct naming
Closes #13841
2022-12-09 19:59:47 +02:00
Frank Denis
c49e4d534f
Improve and remove duplicate doNotOptimizeAway() implementations (#13790)
* Improve and remove duplicate doNotOptimizeAway() implementations

We currently have two doNotOptimizeAway() implementations, one in
std.math and the other one in std.mem.

Maybe we should deprecate one. In the meantime, the std.math one
now just calls the std.mem one.

In a comptime environment, just ignore the value. Previously,
std.mem.doNotOptimizeAway() did not work at comptime.

If the value fits in a CPU register, just tell the compiler we
need that value to be computed, without clobbering anything else.

Only clobber all possibly escaped memory on pointers or large arrays.

Add tests by the way since we didn't had any (we had, but only
indirect ones).
2022-12-09 18:22:50 +01:00
Manlio Perillo
65f35a76f9 langref: consistently use comptime-known and runtime-known 2022-12-09 18:24:40 +02:00
Manlio Perillo
505a21bcc5 langref: link "result location" to the "Result Location Semantics" section 2022-12-09 17:42:25 +02: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
d88eb75a69
Merge pull request #13820 from ziglang/dwarf-multiple-files
dwarf: add support for multiple source files
2022-12-09 14:11:28 +01:00
Ryan Liptak
71c82393eb std.testing: Fully absorb expectEqualBytes into expectEqualSlices
- In #13720, expectEqualBytes was added as a standalone function
- In #13723, expectEqualSlices was made to use expectEqualBytes when the type was u8
- In this commit, expectEqualSlices has fully absorbed expectEqualBytes, and expectEqualBytes itself has been removed

For non-`u8` types, expectEqualSlices will now work similarly to expectEqualBytes (highlighting diffs in red), but will use a full line for each index and therefore will only print a maximum of 16 indexes.
2022-12-09 04:36:27 -05:00
Jacob Young
6966fb8ca5 wasm2c: reuse locals
* Reduce stack usage of a -O0 build of zig1 by 33%.
 * Avoid compiler builtin calls.
2022-12-09 03:45:29 -05: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