kkHAIKE
4961044ce8
AstGen: store void to ptr result loc when there is no else branch
2022-09-21 20:21:02 +03:00
kkHAIKE
183127733c
AstGen: make loop body's ResultLoc .none
...
Fixes #12555
Fixes #12551
Fixes #12455
2022-09-21 20:20:05 +03:00
Jacob Young
14f4c73191
sema: fix typo
2022-09-21 11:29:20 +02:00
Veikka Tuominen
694fab4848
std: add return address parameter to panic fn
2022-09-20 19:05:00 -07:00
Veikka Tuominen
8f2e82dbf6
safety: show error return trace when unwrapping error in switch
2022-09-20 19:05:00 -07:00
Veikka Tuominen
3e80aa9079
Sema: validate @alignOf type
2022-09-20 00:50:13 +03:00
Veikka Tuominen
540130650f
Sema: pass calculated offset to elemPtrType in elemPtrSlice
2022-09-20 00:50:13 +03:00
Veikka Tuominen
541b3e3a31
Sema: check pointer qualifiers before implicit cast
...
Closes #12881
2022-09-20 00:50:13 +03:00
Veikka Tuominen
fb91483e48
Sema: do not use coerceCompatiblePtr for ptrCast
2022-09-19 18:34:53 +03:00
Veikka Tuominen
e584558bd8
Sema: do not use coerceCompatiblePtr for alignCast
...
Closes #12902
2022-09-19 18:34:52 +03:00
Jakub Konka
54854e2ab8
add removed expected stdout comparison in link test
2022-09-18 09:28:46 +02:00
Jakub Konka
0030e72d53
use EmulatableRunStep for newly added macho link test
...
Reverts 75e9a8c7fabb1f32753960b9114dcee875256351
2022-09-18 09:22:49 +02:00
Andrew Kelley
75e9a8c7fa
skip macho link test execution on non-macOS
...
2c3d87b168bf522f538e78325fdae71c320e6e20 introduced a new test that
passes on macOS but fails on other operating systems. This commit makes
it only run on macOS.
2022-09-17 21:33:19 -07:00
Jakub Konka
437ddcce7a
test-cases: remove removed "note: referenced here" note from the error
2022-09-17 23:38:40 +02:00
Jakub Konka
2c3d87b168
macho: test empty translation units
2022-09-17 18:43:24 +02:00
Veikka Tuominen
b2aedb0709
Merge pull request #12796 from Vexu/referenced-by-v2
...
stage2: add referenced by trace to compile errors attempt #2 (+ some fixes)
2022-09-16 23:49:00 +03:00
Andrew Kelley
8edd7219c0
Sema: improve source location after as_node is used
...
+2 more passing compile error tests
2022-09-16 14:47:17 -04:00
Andrew Kelley
9f4408d68b
organize some compile error tests
...
Many of these tests check for the incorrect behavior of stage1 whereas
self-hosted correctly does not emit an error, so they are simply
deleted.
The remaining number of test cases within the stage1/ subdirectory is
reduced from 143 to 103.
2022-09-15 14:40:45 -04:00
Koakuma
0910cb6fcb
stage2: sparc64: Skip compile-failing tests for now
2022-09-14 16:58:12 -07:00
Koakuma
2263bba6cd
stage2: sparc64: Skip Sema-failing tests for now
2022-09-14 16:57:31 -07:00
Andrew Kelley
d7a0fe67b3
disable spuriously failing test on Windows
...
See tracking issue #12844
2022-09-14 16:12:55 -07:00
Veikka Tuominen
31daea74d2
stage2: implement referenced by trace for error messages
...
Closes #7668
Closes #12141
2022-09-15 00:50:18 +03:00
Veikka Tuominen
5e4483fff8
Sema: handle comptime fields in field call bind
...
Closes #12801
2022-09-15 00:50:18 +03:00
Veikka Tuominen
5e37da6ade
Sema: check_comptime_control_flow needs to check runtime_index
2022-09-15 00:50:18 +03:00
Veikka Tuominen
bf4a3df9a9
Sema: allow runtime break from inline loop
...
Closes #12787
2022-09-15 00:48:47 +03:00
Veikka Tuominen
002260c274
Sema: copy runtime_index & friends when making child blocks
2022-09-15 00:48:47 +03:00
Veikka Tuominen
6f6b14621d
value: hash extern functions
...
Closes #12766
2022-09-15 00:48:47 +03:00
Veikka Tuominen
930f904aaa
Sema: resolve lazy align in reifyStruct
...
Closes #12786
2022-09-15 00:48:47 +03:00
Veikka Tuominen
de24cea2cf
Sema: handle empty_struct_value in beginComptimePtrMutation
...
Closes #12794
2022-09-15 00:48:47 +03:00
Veikka Tuominen
349d78a443
validate number literals in AstGen
2022-09-13 20:26:04 -04:00
Andrew Kelley
0a4cfb81bc
Merge remote-tracking branch 'origin/master' into llvm15
2022-09-13 13:50:25 -07:00
Andrew Kelley
f9859c102d
fix libc++ exceptions for musl targets
...
This reverts commit d31be31267523cadd6d59b52633f2d4a9758a3b4.
The problem was happening due to an LLVM bug exposed by having LTO
enabled for libunwind. The simple workaround is to disable LTO for
libunwind. It can be re-enabled in the future when the upstream bug
is fixed.
See #12828
2022-09-13 11:38:14 -07:00
Andrew Kelley
b2e94de358
add compile error test for pointless discards
2022-09-13 10:01:17 -07:00
Andrew Kelley
ebd082d3f6
remove pointless discards in test cases
2022-09-13 02:04:20 -07:00
Andrew Kelley
f8a9bc57ce
translate-c: lower discards differently
...
This makes translate-c lower discards as `_ = @TypeOf(foo);` to avoid
tripping the "pointless discard" error.
Ideally, translate-c would avoid emitting pointless discards, in which
case this commit can be reverted, however, that is a separate
enhancement.
2022-09-13 02:04:20 -07:00
Andrew Kelley
d31be31267
disable failing c++ test
...
See tracking issue #12828
2022-09-12 23:16:57 -07:00
Andrew Kelley
f16855b9d7
remove pointless discards
2022-09-12 18:13:24 -07:00
Andrew Kelley
011663eea5
Merge remote-tracking branch 'origin/master' into llvm15
2022-09-12 16:11:18 -07:00
Andrew Kelley
01e89fec71
disable LLVM 15 regressed behavior test: "vector @splat"
...
See #12827
2022-09-12 16:02:31 -07:00
Veikka Tuominen
e323cf1264
stage2: change how defers are stored in Zir
...
Storing defers this way has the benefits that the defer doesn't get
analyzed multiple times in AstGen, it takes up less space, and it
makes Sema aware of defers allowing for 'unreachable else prong'
error on error sets in generic code.
The disadvantage is that it is a bit more complex and errdefers with
payloads now emit a placeholder instruction (but those are rare).
Sema.zig before:
Total ZIR bytes: 3.7794370651245117MiB
Instructions: 238996 (2.051319122314453MiB)
String Table Bytes: 89.2802734375KiB
Extra Data Items: 430144 (1.640869140625MiB)
Sema.zig after:
Total ZIR bytes: 3.3344192504882812MiB
Instructions: 211829 (1.8181428909301758MiB)
String Table Bytes: 89.2802734375KiB
Extra Data Items: 374611 (1.4290275573730469MiB)
2022-09-12 01:52:44 -04:00
Andrew Kelley
ab3ac291ac
Merge remote-tracking branch 'origin/master' into llvm15
2022-09-11 20:26:53 -07:00
Jakub Konka
4fd4c733d4
x86_64: pass more behavior tests
2022-09-10 09:23:26 +02:00
Jakub Konka
5778077f9f
Merge pull request #12799 from joachimschmidt557/stage2-arm
...
stage2 ARM: introduce allocRegs mechanism and other improvements
2022-09-10 09:13:08 +02:00
Jacob Young
5b9c5191ab
type: print comptime on fn type params
...
This avoids the following confusing error message:
error: expected type 'fn(i32, i32) void', found 'fn(i32, i32) void'
2022-09-10 01:55:52 +03:00
Evan Haas
8e631ee3e7
translate-c: Escape non-ASCII characters that appear in macros
...
Macro definitions are simply a slice of bytes, which may not be
UTF-8 encoded. If they are not UTF-8 encoded, escape non-printable
and non-ASCII characters as `\xNN`.
Fixes #12784
2022-09-10 01:50:17 +03:00
joachimschmidt557
94499898e5
stage2 ARM: implement basic array_elem_val
2022-09-09 20:26:04 +02:00
Andrew Kelley
37cdb5dbf9
Merge remote-tracking branch 'origin/master' into llvm15
2022-09-09 10:26:17 -07:00
joachimschmidt557
b976997e16
stage2 ARM: implement ptr_elem_val
2022-09-09 19:17:18 +02:00
joachimschmidt557
a0a7d15142
stage2 ARM: support larger function stacks
...
This is done by introducing a new Mir pseudo-instruction
2022-09-09 19:17:18 +02:00
joachimschmidt557
3794f2c493
stage2 ARM: implement struct_field_val for registers
2022-09-09 19:17:18 +02:00