Veikka Tuominen
dc128f403b
Merge pull request #13446 from Vexu/stage2-fixes
...
Stage2 bug fixes
2022-11-07 14:17:26 +02:00
Jakub Konka
72769f6cec
link-tests: add test case for parsing weak imports
2022-11-06 15:21:28 +01:00
Jakub Konka
5ef33e7c7e
Merge pull request #13459 from ziglang/issue-13457
...
macho: do not zero-out file if there are no nonzerofill sects
2022-11-06 08:39:13 +01:00
Jakub Konka
aaaa7df152
macho: add linker test case for issue 13457
2022-11-06 00:10:12 +01:00
Veikka Tuominen
5d28d171df
Sema: adjust result type of anyerror field access
...
Closes #13448
2022-11-05 13:22:21 +02:00
Veikka Tuominen
ea48f06fc2
stage2: address of threadlocal variable is not comptime known
...
Closes #13215
2022-11-05 13:22:21 +02:00
Veikka Tuominen
f96748ebc1
Sema: coerce elements of array cat
...
Closes #13347
2022-11-05 13:22:21 +02:00
Veikka Tuominen
f92e7bed7b
stage2: bitsize of packed struct should trigger backing int ty check
...
Closes #13398
2022-11-05 12:54:38 +02:00
Andrew Kelley
1d68045919
Merge pull request #13101 from alichraghi/o4
2022-11-05 02:34:24 -04:00
Veikka Tuominen
51b1083d66
stage2: fix onePossibleValue of empty unions and enums
...
Closes #13402
2022-11-04 23:13:50 +02:00
Veikka Tuominen
42db468dcb
Sema: make method call work with optionals and error unions
...
Closes #13414
2022-11-04 23:13:49 +02:00
Veikka Tuominen
35afa3fd8b
Sema: correct condition in validateArrayInit
...
Closes #13425
2022-11-04 23:13:49 +02:00
Veikka Tuominen
799a558e39
Sema: implement peer type resolution of function pointers and function bodies
...
Closes #13438
2022-11-04 23:13:49 +02:00
Veikka Tuominen
e6b3cb5043
Sema: detect division overflow
...
Closes #13434
2022-11-04 23:13:29 +02:00
Veikka Tuominen
8c4faa5f3f
Merge pull request #13338 from Vexu/stage2-compile-errors
...
Improve some error messages
2022-11-04 16:04:31 +02:00
Micah Switzer
ea54c9a375
Sema: resolve lazy align in zirReify for union fields
...
Closes #13435
2022-11-04 15:48:08 +02:00
Ali Chraghi
f5f1f8c666
all: rename i386 to x86
2022-11-04 00:09:27 +03:30
Nathan Bourgeois
e64eef366c
Translate-C Remainder Macro Fix
2022-11-03 14:07:00 +02:00
Jacob Young
4537c1b8b6
cbe: fix crash rendering union with zero-bit tag
2022-11-02 21:42:40 -04:00
Jacob Young
fa46f9a3d7
cbe: fix extern
2022-11-02 21:42:40 -04:00
Andrew Kelley
e50789f1cb
Merge pull request #13389 from jacobly0/fix-only-c
...
cbe: enough fixes for `-Donly-c` to be able to produce an executable
2022-11-02 15:53:59 -04:00
Andrew Kelley
57dbeb90af
Merge pull request #13396 from Luukdegram/fix-12880
...
llvm: mangle extern function names for Wasm target
2022-11-02 14:10:07 -04:00
Jacob Young
37c104ade0
cbe: ignore comptime fields when generating tuple typedefs
...
This vastly reduces the amount of deduplication state we need to deal with.
2022-11-02 10:21:05 -04:00
Jacob Young
5f31070b8b
cbe: hack around invalid Air
...
Can be changed to `!inst_ty.hisRuntimeBitsIgnoreComptime()` when the
"result location with inferred type ends up being pointer to comptime_int"
test stops producing Air containing a `bitcast(*comptime_int, ...)`.
See #13410
2022-11-02 10:20:31 -04:00
dweiller
ae0f12885b
test: add test_runner_path test
2022-11-02 22:41:20 +11:00
Jacob Young
09763435a8
cbe: support arrays in more places
2022-11-01 20:39:06 -04:00
Jacob Young
071404ff65
cbe: fix optional access
2022-11-01 20:39:05 -04:00
Jacob Young
91fe0b80a2
cbe: fix threadlocal
2022-11-01 20:38:51 -04:00
Jacob Young
757db665a7
build: remove ofmt from LibExeObjStep which is redundant with target.ofmt
2022-11-01 20:38:37 -04:00
joachimschmidt557
3ecec50f0c
stage2 AArch64: implement basic switch statements
2022-11-01 20:43:27 +01:00
Luuk de Gram
ef0df24626
test/link: add linker test to verify mangling
...
This adds a simple linker test to ensure the built library contains
an import entry for each extern function call that was mangled.
2022-11-01 15:43:34 +01:00
Jacob Young
b35514ecfe
cbe: disable aarch64 behavior tests that are broken with gcc
2022-10-31 21:01:04 -04:00
Jacob Young
b945d3eb90
cbe: improve support for non-native float types
...
* Fix _start on aarch64.
* Add fallbacks when a float type is unsupported.
Fixes #13357
2022-10-31 20:18:15 -04:00
Andrew Kelley
ef761c2cbc
Merge pull request #13360 from topolarity/comptime-bool-binops
...
Make `x and false` and `x or true` comptime-known
2022-10-30 22:11:44 -04:00
Jacob Young
a77d89afe3
behavior: enable fixed cbe tests
2022-10-30 15:38:50 -04:00
Cody Tapscott
ca332f57f7
stage2: Make x and false/x or true comptime-known
...
Same as preceding change, but for stage2.
2022-10-30 12:38:08 -07:00
Andrew Kelley
17df35025b
CI: disable failing C backend test
...
See #13357
2022-10-30 03:21:18 -07:00
Andrew Kelley
5f5a20ebaf
Merge pull request #13093 from jacobly0/backend-fixes
...
C backend fixes
2022-10-29 23:06:59 -04:00
Andrew Kelley
28dc208f65
Merge pull request #13082 from g-w1/unnamed-decls-and-relocs-p9
...
Plan9: Fix The Backend
2022-10-29 17:45:00 -04:00
Veikka Tuominen
d7314555f2
Sema: improve compile error for casting double pointer to anyopaque pointer
...
Closes #12042
2022-10-29 14:55:43 +03:00
Veikka Tuominen
1ea1228036
Sema: fix floatToInt to zero bit ints
...
Closes #9415
2022-10-29 14:55:43 +03:00
Veikka Tuominen
61f5ea4c9a
Sema: add error note for wrong pointer dereference syntax
...
Closes #1897
2022-10-29 14:55:43 +03:00
Jacob Young
48a2783969
cbe: implement optional slice representation change
2022-10-29 05:58:41 -04:00
Andrew Kelley
c36eb4ede9
Merge pull request #13221 from topolarity/packed-mem
...
Introduce `std.mem.readPackedInt` and improve bitcasting of packed memory layouts
2022-10-28 21:15:16 -04:00
Evan Haas
c616141241
translate-c: Better support for division in macros
...
Perform C-style arithmetic conversions on operands to division operator
in macros
Closes #13162
2022-10-28 17:59:32 -04:00
Cody Tapscott
40b7792a4c
Enable bitcast test now that #13214 is resolved.
2022-10-28 12:41:15 -07:00
Cody Tapscott
3295fee911
stage2: Use mem.readPackedInt etc. for packed bitcasts
...
Packed memory has a well-defined layout that doesn't require
conversion from an integer to read from. Let's use it :-)
This change means that for bitcasting to/from a packed value that
is N layers deep, we no longer have to create N temporary big-ints
and perform N copies.
Other miscellaneous improvements:
- Adds support for casting to packed enums and vectors
- Fixes bitcasting to/from vectors outside of a packed struct
- Adds a fast path for bitcasting <= u/i64
- Fixes bug when bitcasting f80 which would clear following fields
This also changes the bitcast memory layout of exotic integers on
big-endian systems to match what's empirically observed on our targets.
Technically, this layout is not guaranteed by LLVM so we should probably
ban bitcasts that reveal these padding bits, but for now this is an
improvement.
2022-10-28 08:41:04 -07:00
Veikka Tuominen
6fc71835c3
value: properly hash null_value pointer
...
Closes #13325
2022-10-28 13:31:16 +03:00
Veikka Tuominen
c3b85e4e2f
Sema: further enhance explanation of why expr is evaluated at comptime
2022-10-28 13:31:16 +03:00
Andrew Kelley
c389f8800b
Merge pull request #13290 from Vexu/generic-deletion-mitigation
...
Mitigate generic deletion bug
2022-10-28 01:04:00 -04:00