Veikka Tuominen
c4400e8aa5
AstGen: reset anon_name_strategy for sub expressions
...
Closes #12910
2022-09-24 16:30:37 +03:00
Veikka Tuominen
8e4d0ae4f5
Sema: avoid generic parameter error in nested function type
...
Related to cd1833044ab7505bc101c85f59889bd3ea3fac80
Closes #12945
2022-09-24 15:15:36 +03:00
Veikka Tuominen
3a5148112d
Sema: avoid using pointerDecl when dealing with slices
...
Closes #12885
2022-09-24 14:43:03 +03:00
Veikka Tuominen
3525b8778e
Sema: properly handle generic struct as parameter type
...
Closes #12907
2022-09-24 14:43:03 +03:00
Veikka Tuominen
ede3798485
Sema: resolve struct layout in zirStructInit
...
Closes #12911
2022-09-23 17:39:21 +03:00
Veikka Tuominen
8d1fdfc8ed
Sema: preserve volatileness when constructing field pointers
...
Closes #12928
2022-09-23 17:39:06 +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
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
e584558bd8
Sema: do not use coerceCompatiblePtr for alignCast
...
Closes #12902
2022-09-19 18:34:52 +03: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
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
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
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
Andrew Kelley
0a4cfb81bc
Merge remote-tracking branch 'origin/master' into llvm15
2022-09-13 13:50:25 -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
joachimschmidt557
261fec8036
stage2 ARM: amend implementation of various AIR instructions
...
- unwrap_errunion_err for registers
- unwrap_errunion_payload for registers
- ptr_slice_len_ptr for all MCValues
- ptr_slice_ptr_ptr for all MCValues
2022-09-09 19:17:17 +02:00
joachimschmidt557
e2b029e2c8
stage2 ARM: implement field_parent_ptr
2022-09-09 19:17:17 +02:00
Veikka Tuominen
c7e45aebaf
llvm: handle pointers in packed structs in more places
...
Closes #12776
2022-09-08 12:51:40 +03:00
Veikka Tuominen
37afab2add
Sema: preserve alignment of const decl pointers
...
Closes #12769
2022-09-08 00:37:11 +03:00
Evan Haas
e283a40d17
translate-c: convert tabs to \t in object-like macro string literals
...
Closes #12549
2022-09-07 14:46:58 +03:00
Andrew Kelley
b7900de168
Merge remote-tracking branch 'origin/master' into llvm15
2022-09-06 19:45:02 -07:00
riChar
349cf54b32
llvm: fix the type parameter of GlobalAlias
...
Closes 12680
2022-09-04 18:44:45 +03:00
Veikka Tuominen
f281f3d10e
Sema: improve behavior of comptime_int backed enums
2022-09-02 17:57:11 +03:00
Veikka Tuominen
8b58dab78b
Sema: resolve lazy value before intToFloat
...
Closes #12698
2022-09-02 17:57:10 +03:00
Veikka Tuominen
7a8d9af4a9
stage2 llvm: correct handling of zero-bit types in unionFieldPtr
...
Pointers to zero-bit types are not zero-bit types so the function should
return something.
Closes #12716
2022-09-02 17:57:10 +03:00
Veikka Tuominen
4462d08224
stage2 llvm: fix passing packed structs to callconv(.C) functions
...
Closes #12704
2022-09-02 17:57:10 +03:00
Veikka Tuominen
26e9839132
disable test for non-llvm backends
...
Follow up to fdb88708527742e450e4c566024d9d50ce61dd8d
2022-08-31 16:46:51 +03:00
Evan Haas
fdb8870852
translate-c: promote large integer macros to unsigned long long if necessary
...
Closes #10793
Co-authored-by: Veikka Tuominen <git@vexu.eu>
2022-08-31 15:52:53 +03:00
Andrew Kelley
1e21876de2
Merge remote-tracking branch 'origin/master' into llvm15
2022-08-30 13:02:43 -07:00
Andrew Kelley
7377dce368
avoid exposing supportsTailCall in the standard library
...
This is problematic because in practice it depends on whether the
compiler backend supports it too, as evidenced by the TODO comment about
LLVM not supporting some architectures that in fact do support tail
calls.
Instead this logic is organized strategically in src/target.zig, part of
the internal compiler source code, and the behavior tests in question
duplicate some logic for deciding whether to proceed with the test.
The proper place to expose this flag is in `@import("builtin")` - the
generated source file - so that third party compilers can advertise
whether they support tail calls.
2022-08-30 12:50:15 -07:00
Veikka Tuominen
65d3723968
Sema: check that target supports tail calls
2022-08-30 12:22:07 -07:00