30753 Commits

Author SHA1 Message Date
Jacob Young
c6286eee4b
Merge pull request #21170 from jacobly0/more-dwarf-cleanup
Dwarf: more cleanup
2024-08-22 23:20:53 -04:00
Andrew Kelley
ee84deda98
Merge pull request #21095 from alexrp/mips64-tests
Get `mips64(el)-linux` working and start testing it
2024-08-22 20:09:08 -07:00
Jacob Young
0a52914355 Elf: all dwarf relocs need to become linker relocs 2024-08-22 20:08:05 -04:00
Jacob Young
17171cdb07 Dwarf: fix big and zero enum values 2024-08-22 20:08:05 -04:00
Jacob Young
f47e1e148e Dwarf: add more childless special cases 2024-08-22 20:08:05 -04:00
Jacob Young
874ad98f7a Dwarf: fix treating big int limbs as signed 2024-08-22 20:08:04 -04:00
Jacob Young
4a132d4bce Type: fix inconsistency between zig fmt and @typeName 2024-08-22 20:08:04 -04:00
Jacob Young
cbaff43b2a Dwarf: add missing var args info on function decls 2024-08-22 19:53:04 -04:00
Andrew Kelley
c262061129 update readme 2024-08-22 14:06:01 -07:00
Andrew Kelley
205e17a73c
Merge pull request #21161 from jedisct1/mlkem-update
Update ML-KEM to the final specification
2024-08-22 12:54:40 -07:00
Josh Wolfe
febfcbd49d
std.json.WriteStream supports streaming long values directly to the underlying stream (#21155) 2024-08-22 08:26:14 -04:00
Jacob Young
31220b50b5 Dwarf: cleanup emitted debug info
* reduce iteration cost by not tracking unused entries
 * avoid emitting unused abbrevs to `.debug_abbrev`
 * get the compiler executable passing `llvm-dwarfdump --verify`
 * make it possible to skip `.debug_line` padding much more quickly
2024-08-22 08:44:08 +02:00
Frank Denis
b131b6dd36 Rename the namespace for ml_kem variants of Kyber to nist 2024-08-22 07:54:12 +02:00
Jakub Konka
7cd1c882c9
Merge pull request #21160 from ziglang/link-thunks-test 2024-08-22 06:59:45 +02:00
Frank Denis
067ae04e0b Update ML-KEM to the final specification
NIST has published the final specification of ML-KEM, which adds
domain separation to the seed used to create the inner secret key.
2024-08-22 01:00:12 +02:00
Jakub Konka
fa79f53f92 test/macho: simplify testing range extension thunks 2024-08-22 00:36:47 +02:00
Jakub Konka
cbb8093455 macho: emit local symbols for thunks 2024-08-22 00:34:58 +02:00
Matthew Lugg
5bf9dc3850
Merge pull request #21157 from mlugg/kill-cimport
`std.Build.Step.TranslateC` fixes
2024-08-21 22:16:56 +01:00
Jakub Konka
ca417e1e32 link/elf: simplify how we test thunks 2024-08-21 23:05:28 +02:00
mlugg
a0b03d7fff
std.Build.Step.TranslateC: propagate target, optimize, link_libc to created module 2024-08-21 19:13:26 +01:00
mlugg
4f437e4d24
translate-c: populate file system inputs on error
Resolves: #20648
2024-08-21 19:13:26 +01:00
mlugg
7bbbbf8ffa compiler: fix losing ZIR instructions in main_struct_inst fields 2024-08-21 16:24:57 +01:00
Jakub Konka
8fc15f188c
Merge pull request #21145 from ziglang/elf-dwarf-relocs
elf+zigobject: emit relocs for debug sections
2024-08-21 14:51:10 +02:00
Jakub Konka
e79ac14ef3 elf: refactor tracking debug section sizes 2024-08-21 10:28:31 +02:00
Jacob Young
db48a78963 Dwarf: ensure stale relocations are deleted 2024-08-21 01:43:22 -04:00
Jakub Konka
b17bbf9e6c elf: fixes after rebase 2024-08-21 01:43:21 -04:00
Jakub Konka
6c731be3a1 elf: allow for concatenating atoms to merge sections 2024-08-21 01:43:21 -04:00
Jakub Konka
b2fad5c58b test/debugger: test emitting relocs by ELF linker 2024-08-21 01:43:21 -04:00
Jakub Konka
6a86a1041c elf: remove obsolete call to Dwarf.resolveRelocs 2024-08-21 01:43:21 -04:00
Jakub Konka
fe6dfd5090 elf: fix emitting cross-section relocs for .debug* sections 2024-08-21 01:43:21 -04:00
Jakub Konka
c4d820b3f1 elf: emit DTPOFF32/DTPOFF64 relocation for .debug* sections 2024-08-21 01:43:21 -04:00
Jakub Konka
d388d555d5 elf: parse and emit Elf relocs for cross section refs for .debug* sections 2024-08-21 01:43:21 -04:00
Jakub Konka
d3d5ed992c elf: emit .rela.debug* sections for relocatable if required 2024-08-21 01:43:21 -04:00
Jakub Konka
517721bbcc elf: start unraveling Dwarf relocs into Elf relocs 2024-08-21 01:43:21 -04:00
Jakub Konka
56e1ae21e4 elf: populate debug atoms on the linker side after Dwarf.flushModule 2024-08-21 01:43:21 -04:00
Jakub Konka
41f2302865 elf: create section symbols and atoms per each ZigObject debug section 2024-08-21 01:43:21 -04:00
Jakub Konka
84105be4df elf: remove unused code 2024-08-21 01:43:21 -04:00
Matthew Lugg
61919fe63d
Merge pull request #21135 from mlugg/incremental
incremental: more progress
2024-08-21 05:28:24 +01:00
mlugg
a99ad52b36
Sema: register correct dependencies for inline calls
And add a corresponding test case.
2024-08-21 01:30:46 +01:00
mlugg
2fb78430db
test: remove accidental hard tab 2024-08-21 01:30:46 +01:00
mlugg
018262d537
std: update eval branch quotas after bdbc485
Also, update `std.math.Log2Int[Ceil]` to more efficient implementations
that don't use up so much damn quota!
2024-08-21 01:30:46 +01:00
mlugg
ceb76b2ba7
test: add incremental compilation test for moving @src() call 2024-08-21 01:30:46 +01:00
mlugg
43fdd061f7
AstGen: incorporate extra information into source hashes
* Indices of referenced captures
* Line and column of `@src()`

The second point aligns with a reversal of the "incremental compilation"
section of https://github.com/ziglang/zig/issues/2029#issuecomment-645793168.
This reversal was already done as #17688 (46a6d50), with the idea to
push incremental compilation down the line. My proposal is to keep it as
comptime-known, and simply re-analyze uses of `@src()` whenever their
line/column change.

I think this decision is reasonable for a few reasons:

* The Zig compiler is quite fast. Occasionally re-analyzing a few
  functions containing `@src()` calls is perfectly acceptable and won't
  noticably impact update times.
* The system described by Andrew in #2029 is currently vaporware.
* The system described by Andrew in #2029 is non-trivial to implement.
  In particular, it requires some way to have backends update a single
  global in certain cases, without re-doing semantic analysis. There is
  no other part of incremental compilation which requires this.
* Having `@src().line` be comptime-known is useful. For instance, #17688
  was justified by broken Tracy integration because the source line
  couldn't be comptime-known.
2024-08-21 01:30:46 +01:00
mlugg
95fbfde9da
Sema: delete bootstrap compiler bug workaround 2024-08-21 01:30:44 +01:00
mlugg
9cf8a7661f
compiler: handle eval branch quota in memoized calls
In a `memoized_call`, store how many backwards braches the call
performs. Add this to `sema.branch_count` when using a memoized call. If
this exceeds the quota, perform a non-memoized call to get a correct
"exceeded X backwards branches" error.

Also, do not memoize calls which do `@setEvalBranchQuota` or similar, as
this affects global state which must apply to the caller.

Change some eval branch quotas so that the compiler itself still builds correctly.

This commit manually changes a file in Aro which is automatically
generated. The sources which generate the file are not in this repo.
Upstream Aro should make the suitable changes on their end before the
next sync of Aro sources into the Zig repo.
2024-08-21 01:26:55 +01:00
Jacob Young
16d74809d4
Merge pull request #21140 from jacobly0/self-dwarf
Dwarf: inline calls progress
2024-08-20 18:41:26 -04:00
Jacob Young
55864e98e0 x86_64: support more dwarf locations 2024-08-20 15:08:23 -04:00
Jacob Young
eaa227449c Dwarf: fix issues with inline call sites 2024-08-20 15:08:23 -04:00
Jacob Young
62f7276501 Dwarf: emit info about inline call sites 2024-08-20 08:09:33 -04:00
Jacob Young
ef90eb0d4d Dwarf: delete incorrect logic that also has the possibility of crashing 2024-08-20 08:09:33 -04:00