Veikka Tuominen
a5ac062689
stage2: make field/array base ptr work at comptime
2022-02-20 11:59:49 +02:00
Andrew Kelley
7d9e3840bb
Sema: fix inline break from a non-comptime scope to outer one
...
Prior to this, the compiler would hit an assertion because the
break_inline would not successfully move the compile-time control flow.
2022-02-20 00:20:29 -07:00
Veikka Tuominen
6f0601c793
stage2: support anon init through error unions and optionals at runtime
2022-02-20 02:11:02 +02:00
Andrew Kelley
746435a954
Sema: implement @typeInfo for list literals
2022-02-19 15:11:18 -07:00
Veikka Tuominen
27c63bf433
stage2: implement errunion_payload_ptr_set
2022-02-19 20:48:00 +02:00
Veikka Tuominen
e027492243
stage2: support anon init through error unions and optionals
2022-02-19 20:21:19 +02:00
Jakub Konka
59df39e949
add integer division tests
2022-02-19 14:24:03 +01:00
David Martschenko
4a6454fb8d
C backend: fix codegen for field_ptr/elem_ptr values
2022-02-19 13:04:59 +01:00
Veikka Tuominen
2f0204aca3
parser: fix "previous field here" pointing to wrong field
2022-02-19 10:15:54 +02:00
Cody Tapscott
db80dff4e0
Add backend-specific skips for bitreverse, byteswap tests
2022-02-18 14:28:32 -07:00
Cody Tapscott
fe1d6c2f56
Skip failing stage1 @bitReverse test
2022-02-18 14:28:32 -07:00
Cody Tapscott
ef417f19e1
stage2: Implement @bitReverse and @byteSwap
...
This change implements the above built-ins for Sema and the LLVM
backend. Other backends have had placeholders added for lowering.
2022-02-18 14:28:32 -07:00
Andrew Kelley
60bb1d4e1c
Merge pull request #10906 from topolarity/cbe-array-support
...
stage2 CBE: Implement 2D array support
2022-02-18 14:08:06 -05:00
Andrew Kelley
736b9dcdd6
Merge pull request #10858 from topolarity/stage2-bitcast
...
stage2 sema: Fix sign handling of exotic integers in `@bitCast`
2022-02-18 13:49:00 -05:00
Jakub Konka
5af9d0c603
Merge pull request #10916 from ziglang/x64-args-stack-debug
...
stage2,x64: pass all args on stack in debug and if not extern fn
2022-02-18 15:18:01 +01:00
Veikka Tuominen
53241f288e
Merge pull request #10913 from Vexu/err
...
further parser error improvements
2022-02-18 13:53:47 +02:00
Jakub Konka
97c25fb8d0
x64: implement array_elem_val when array is stored in memory
2022-02-18 09:14:15 +01:00
Jakub Konka
abfaf8382b
x64: implement array_elem_val when array fits in register
2022-02-18 09:14:15 +01:00
Jakub Konka
085c606b87
x64: implement slice_elem_ptr
2022-02-18 09:14:15 +01:00
Andrew Kelley
9ea253b9c4
Sema: implement type info for structs
2022-02-17 20:48:09 -07:00
Andrew Kelley
0bb22600bd
Sema: fix typeinfo for enums with no declarations
2022-02-17 20:48:09 -07:00
Andrew Kelley
feb4b01b38
Sema: fix typeinfo for sentinels of array and pointer
2022-02-17 20:48:09 -07:00
Andrew Kelley
5aa35f62c3
Revert "reduce build error noise"
...
This reverts commit baead472d7641bdd96130354bafadc1fb1ed223b.
Let's go through the proposal process on this one. I want to push back
on this. My position is that, at the very least, a full trace of command
lines of sub-processes should be printed on failure, with the exception
of opt-in flags such as `--prominent-compile-errors`.
2022-02-17 14:30:12 -07:00
Veikka Tuominen
6235afc632
stage1: fix f80 negation
2022-02-17 23:06:46 +02:00
Veikka Tuominen
6b65590715
parser: add notes to decl_between_fields error
2022-02-17 22:16:26 +02:00
Andrew Kelley
63cbec1a96
stage2: add more functions to freestanding libc
...
The log functions are not passing behavior tests.
2022-02-17 13:11:58 -07:00
Veikka Tuominen
92f2767814
parser: add error for missing colon before continue expr
...
If a '(' is found where the continue expression was expected and it is
on the same line as the previous token issue an error about missing
colon before the continue expression.
2022-02-17 20:51:26 +02:00
Jakub Konka
d1c74ac42d
Merge pull request #10914 from ziglang/x64-more-codegen
...
stage2,x64: refactor stack mgmt mechanics, implement slice, fix ptr_add and ptr_sub
2022-02-17 18:05:30 +01:00
Veikka Tuominen
c9dde10f86
stage1: improve error message when casting tuples
2022-02-17 17:39:54 +02:00
Jakub Konka
3193cc1c1e
x64: fix ptr_add and ptr_sub
...
Add standalone implementation of operand reuse for ptr related
arithmetic operations of add and sub.
2022-02-17 15:07:42 +01:00
Jonathan Marler
baead472d7
reduce build error noise
...
Address https://github.com/ziglang/zig/issues/3477
This provides a mechanism for builds to fully report an error to the user and prevent zig from piling on extra noise.
2022-02-17 14:48:22 +02:00
John Schmidt
e2ad95c088
stage2: implement vector floatops
2022-02-17 14:47:21 +02:00
Veikka Tuominen
9c36cf92f0
parser: make some errors point to end of previous token
...
For some errors if the found token is not on the same line as
the previous token, point to the end of the previous token.
This usually results in more helpful errors.
2022-02-17 14:23:35 +02:00
Cody Tapscott
1639fd4c45
Fix 2D array support for C backend
...
This updates the C backend to use proper array types.
In order to do that, this commit also:
- fixes up elem_ptr and field_ptr handling
- adds `renderTypecast` (renders in C typecast format, e.g. "int* [10]")
- adds a bit special handling for undefined pointers, which is necessary
to support slice/elem_ptr to undefined decls
2022-02-16 12:57:11 -07:00
Jakub Konka
78e6f9c44c
x64: fix ptr_add
...
However, still missing is taking into account pointer alignment
when performing arithmetic.
2022-02-16 14:13:06 +01:00
Jakub Konka
c7775a9f62
x64: impl genBinMathOpMir for ptr_stack_off and PIE memory
2022-02-16 14:13:06 +01:00
Jakub Konka
9c82f3ae6f
stage2: disable failing aarch64-macos behavior tests
2022-02-15 21:04:36 +01:00
Jan Philipp Hafer
c6cd919a18
stage1: fix comptime saturation subtraction
...
- also simplifies code
- adding a few more tests
closes #10870
2022-02-15 10:40:53 +02:00
joachimschmidt557
22895f5616
stage2 AArch64: Enable behavior testing
2022-02-14 22:33:01 +01:00
joachimschmidt557
783e216e7d
stage2 AArch64: Fix issue in binOp and add regression test
2022-02-14 22:09:44 +01:00
joachimschmidt557
3a33f31334
stage2 AArch64: implement cond_br for other MCValues
2022-02-14 22:09:44 +01:00
Andrew Kelley
f73044dae5
Merge pull request #10879 from Vexu/err
...
make some errors point to the end of the previous token
2022-02-13 16:15:00 -05:00
Cody Tapscott
45aed7171c
Skip 8/16-bit @bitCast test for wasm
2022-02-13 13:28:08 -07:00
Cody Tapscott
c586e3ba1b
Add additional tests for @bitCast
2022-02-13 13:28:08 -07:00
Mateusz Radomski
b5f8fb85e6
Implement f128 @rem
2022-02-13 15:37:38 +02:00
Jacob G-W
3bbe6a28e0
stage2: add decltests
2022-02-13 14:42:20 +02:00
Veikka Tuominen
8a432436ae
update compile error tests
2022-02-13 13:48:20 +02:00
Andrew Kelley
0b7347fd18
move more behavior tests to the "passing" section
2022-02-12 21:35:29 -07:00
Andrew Kelley
c349191b75
organize behavior tests
...
moving towards disabling failing tests on an individual basis
2022-02-12 21:13:07 -07:00
Andrew Kelley
a005ac9d3c
stage2: implement @popCount for SIMD vectors
2022-02-12 20:44:30 -07:00