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
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
Jakub Konka
5ee99f862a
dwarf: extract common logic for generating func arg dbg info
2022-12-01 14:06:24 +01:00
Veikka Tuominen
b7066b6024
add workaround for compiler bug
2022-12-01 14:48:09 +02:00
Veikka Tuominen
6ded2d2adb
cbe: disable failing behavior test on aarch64
2022-12-01 12:18:10 +02:00
Veikka Tuominen
d0edaabf9d
Value: fix elemValueAdvanced for optional payloads
...
Closes #13707
2022-12-01 11:49:06 +02:00
Andrew Kelley
fc3142aa9a
Merge branch 'ci-add-debug-aarch64-linux'
2022-12-01 00:38:21 -07:00
Andrew Kelley
8f079bad1f
langref: acknowledge design flaw in the self-hosted compiler
...
See tracking issue #13724
2022-12-01 00:38:02 -07:00
Andrew Kelley
9f9f1aadc7
CI: add aarch64-linux-debug job and flatten dirs
2022-12-01 00:37:47 -07:00
Ryan Liptak
c37afa2811
std.testing: Improve expectEqualBytes for large inputs and make expectEqualSlices use it
...
`expectEqualBytes` will now truncate the hexdump of each input to a maximum window of 256 bytes, which makes it safe to use for arbitrarily large inputs. Therefore, it can be used in `expectEqualSlices` when the type is u8.
2022-12-01 02:18:51 -05:00
Takeshi Yoneda
829bf5a03e
wasi: fixes IterableDir.nextWasi for large directory
...
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
2022-12-01 13:56:53 +09:00
Andrew Kelley
a943422672
Merge pull request #13717 from GethDW/option-fix
...
std.build.Builder: fix for Allocator changes
2022-11-30 19:43:51 -05:00
Andrew Kelley
94e751ad01
Merge pull request #13718 from Luukdegram/wasm-packed
...
stage2: Wasm - Implement packed structs
2022-11-30 19:29:26 -05:00
Ryan Liptak
34fa6a1e04
std.testing: Add expectEqualBytes that outputs hexdumps with diffs highlighted in red
...
The coloring is controlled by `std.debug.detectTTYConfig` so it will be disabled when appropriate.
2022-11-30 18:57:37 -05:00
Jacob Young
cf7a4de7f1
zig.h: fix disastrous typo
2022-11-30 15:48:44 -07:00
Andrew Kelley
16caea38d1
std.ArrayList: fix shrinkAndFree
...
Fixes a regression introduced in
e35f297aeb993ec956ae80379ddf7f86069e109b.
Now there is test coverage for ArrayList.shrinkAndFree in the case when
resizing fails.
2022-11-30 15:42:59 -07:00
Andrew Kelley
c84bc3a06b
std.os.test: disable flaky timerfd test
...
See tracking issue #13721
2022-11-30 15:18:35 -07:00
Veikka Tuominen
34f96c5fd0
Merge pull request #13719 from Vexu/debug
...
Improve debuggability of programs built by the self hosted compiler
2022-11-30 22:51:39 +02:00
Andrew Kelley
b1793c2b52
add test coverage for zig build CLI and options API
2022-11-30 13:22:43 -07:00
Andrew Kelley
abd9089aa6
std.build: simpler fix to options implementation
...
Instead of messing with ArrayList and more logic, just unwrap the error
of toOwnedSlice().
2022-11-30 13:22:04 -07:00
GethDW
747f64b3fb
std.build.Builder: fix for Allocator changes
2022-11-30 13:04:32 -07:00
Luuk de Gram
090deae41d
wasm: enable behavior tests for packed structs
2022-11-30 21:01:09 +01:00
Andrew Kelley
44ee1c885f
std.os.windows.ReadLink: add missing alignment of local data buffer
2022-11-30 12:55:23 -07:00