Jakub Konka
a84b67468c
dsym: recalculate DWARF segment size when finalizing
2022-12-04 16:58:45 +01:00
Jakub Konka
280dad0283
dsym+dwarf: remove copyRangeAllOverlappingAlloc
2022-12-04 16:58:45 +01:00
Jakub Konka
aa8b26cf25
dsym: refactor API - do not store ptr to MachO
2022-12-04 16:58:45 +01:00
Jakub Konka
d67de87baa
dsym: add helper for accessing dwarf seg pointer
2022-12-04 16:58:45 +01:00
Jakub Konka
73d76b26a2
dsym: rename updateLinkeditSegment to finalizeDwarfSegment
...
This is the checkpoint where we finalize the VM of the primary binary.
2022-12-04 16:58:45 +01:00
Jakub Konka
278426b851
dsym: make sure DWARF segment comes before LINKEDIT
...
This will greatly simplify incremental updates to DWARF sections
within the bundle.
2022-12-04 16:58:45 +01:00
Veikka Tuominen
e361740669
Merge pull request #13142 from mllken/gzip-safety
...
gzip: add missing header fields and bounds for header parsing
2022-12-04 14:32:25 +02:00
Gregory Oakes
8d17e90fcd
std: add a special case for empty structs in meta.FieldEnum.
...
Empty structs would previously result in a compilation error.
2022-12-04 14:22:16 +02:00
r00ster91
f094c4bce5
Sema: detect duplicate enum tag values
2022-12-04 14:12:24 +02:00
Andrew Kelley
19dd6de180
Merge pull request #13756 from jacobly0/cbe-behavior
...
cbe: pass more behavior tests
2022-12-04 01:52:04 -05:00
Jacob Young
e3b8658e65
cbe: add forward declarations for optionals and error unions
...
Arrays will have to wait for type rewrite.
2022-12-03 21:58:18 -05:00
Jacob Young
6d1292552e
cbe: implement function alignment
2022-12-03 08:40:08 -05:00
Jacob Young
ec3116f573
cbe: fix zero-bit struct field pointer
2022-12-03 08:40:08 -05:00
Jacob Young
7fb6eb3d14
cbe: implement multiple exports of a symbols
2022-12-03 08:21:03 -05:00
Jacob Young
81c271cc62
cbe: don't emit extern decls that are already exported
2022-12-03 08:21:03 -05:00
Jacob Young
2cfc08ba0d
cbe: fix named constraints without modifiers
2022-12-03 08:21:03 -05:00
Andrew Kelley
f68bfe2eb7
CBE: no braces when lowering block instruction
...
This change alone solves the bracket-depth issue when compiling zig1.c
with Clang.
2022-12-03 05:22:50 -05:00
Andrew Kelley
610d604f5b
Merge pull request #13748 from jacobly0/c-unaligned
...
cbe: use memcpy for underaligned loads and stores
2022-12-03 02:18:07 -05:00
Andrew Kelley
53dcf78a25
print_air: print Liveness info for switch_br
2022-12-02 23:46:42 -07:00
Andrew Kelley
fdbb0fb7b9
Merge pull request #13744 from Vexu/stage2-fixes
...
Improve error messages, fix dependency loops
2022-12-03 00:42:11 -05:00
Jacob Young
e1216077f0
cbe: add support for constraint modifiers specified after a colon
...
This translates `%[name:mod]` to `%mod[name]` for C.
2022-12-02 22:21:24 -05:00
Jacob Young
fdedd62365
cbe: use memcpy for underaligned loads and stores
2022-12-02 22:21:24 -05:00
Andrew Kelley
c43ac67f82
Merge pull request #13746 from ziglang/cbe-bools
...
CBE: use bool, true, false, instead of `zig_` prefixes
2022-12-02 22:19:12 -05:00
Andrew Kelley
29e8e67a7e
CBE: use bool, true, false, instead of zig_
prefixes
...
In general the C backend should lower to human-maintainable C code
whenever possible. Directly using C types that one would use when
writing C code is one part of the strategy.
The concern with including stdint.h is C89 compatibility. Well, we can
just check the C std lib version before deciding to include that header.
2022-12-02 16:12:49 -07:00
Veikka Tuominen
b500e0eb17
Sema: add "parameter type declared here" note to type coercion
2022-12-03 00:48:04 +02:00
Veikka Tuominen
74285a4ed7
add test for error message improved by self-hosted
...
Closes #5099
2022-12-03 00:48:04 +02:00
Veikka Tuominen
f20e449fd6
Sema: improve error for mismatched type in implicit return
...
Closes #2653
2022-12-03 00:48:03 +02:00
Andrew Kelley
d171279d79
CBE: use a 0 literal instead of error.@"(no error)"
...
This saves bytes and is easier to read too.
2022-12-02 15:42:20 -07:00
Andrew Kelley
af4361f57a
CI: update tarballs to 0.11.0-dev.448+e6e459e9e
...
Notably this contains a fix to zig cc that enables the syntax
`-Wl,-z,stack-size=0x10000`.
2022-12-02 17:31:33 -05:00
Veikka Tuominen
e2509ddbe6
AstGen: add error for invalid string comparisons
...
These operations are allowed because the string literals are just
pointers but they produce unexpected results. These errors prevent
beginners from shooting themselves in the foot while still allowing
advanced users to circumvent them if they desire to do so.
Closes #8290
2022-12-03 00:09:23 +02:00
Veikka Tuominen
0e38cc16d5
Sema: fix comparisons between lazy and runtime values
...
Closes #12498
2022-12-03 00:09:23 +02:00
Veikka Tuominen
7f9e841f74
Sema: do not forcibly canonicalize unresolved pointer element type
...
Closes #13308
2022-12-03 00:09:23 +02:00
Jakub Konka
5eaacf1ce9
windows: use array of tmp bufs as backing store for input memory to ntdll
2022-12-02 12:24:15 -05:00
Veikka Tuominen
59dad43de2
Sema: add error for failed assumption about struct having runtime bits
2022-12-02 18:46:59 +02:00
Jakub Konka
16dc86a49e
Merge pull request #13730 from ziglang/gen-dwarf-simple
...
dwarf: dedup generation of dwarf info for func args and vars in Dwarf module
2022-12-02 17:13:52 +01:00
Veikka Tuominen
86e6acb37b
AstGen: improve error message for missing parameter name
...
Closes #13393
2022-12-02 15:39:40 +02:00
Jakub Konka
bfd36cbf97
dwarf: pass linker Tag and owner Decl.Index instead of *Atom
2022-12-02 13:17:52 +01:00
Jakub Konka
05962a4aa2
x86: do not deref ptr type, let Dwart do it
2022-12-02 12:23:01 +01:00
Jakub Konka
3ec0520bac
dwarf: use common DI union object for arg and var gen
2022-12-02 12:22:17 +01:00
Andrew Kelley
665eba93c1
CBE: eliminate zig_void
...
C void is perfectly fine.
2022-12-02 00:46:27 -05:00
Andrew Kelley
e6e459e9e3
zig cc: detect -z stack-size arguments
2022-12-01 20:58:09 -07:00
Andrew Kelley
4071b22454
Merge pull request #13715 from Vexu/cbe
...
cbe bug fixes and improvements
2022-12-01 17:38:11 -05:00
Andrew Kelley
6e52f36d46
langref: eliminate dependencies on stage1
...
This commit removes async/await/suspend/resume from the language
reference, as that feature does not yet work in the self-hosted
compiler.
We will be regressing this feature temporarily. Users of these language
features should stick with 0.10.x with the `-fstage1` flag until they
are restored.
See tracking issue #6025 .
2022-12-01 15:28:44 -07:00
Jakub Konka
8fea84f77e
dwarf: move Wasm specific dwarf gen out of codegen
2022-12-01 20:55:55 +01:00
Jakub Konka
17ab40f755
dwarf: refactor arm and riscv64 to the new scheme
2022-12-01 20:06:11 +01:00
Jakub Konka
2823fcabd1
Merge pull request #13725 from mathetake/fixreaddir
...
wasi: fixes IterableDir.nextWasi for large directory
2022-12-01 17:30:00 +01:00
Jakub Konka
4120332577
dwarf: fix typos after refactoring dbi gen
2022-12-01 17:23:28 +01:00
Jakub Konka
5bffc17c42
codegen: make LinkerLoad a common struct shared by backends
2022-12-01 16:32:09 +01:00
Jakub Konka
00016ab6a0
dwarf: extract common logic for generating func var dbg info
2022-12-01 15:28:22 +01:00
Jakub Konka
7d0af639d8
dwarf: update arm and riscv codegens to the new model
2022-12-01 14:32:09 +01:00