Vexu
e62671f643
fix missing const on address of literal
2020-04-07 15:25:44 +03:00
LemonBoy
0a936c1d76
Add some tests for the runtime safety checks
2020-04-06 20:14:06 +02:00
LemonBoy
a59d31bd28
ir: Support tuple multiplication
2020-04-06 14:03:43 -04:00
Vexu
c5ced0d74a
Merge pull request #4939 from SuperAuguste/master
...
translate-c: Properly translate C multicharacter literals
2020-04-06 10:31:17 +03:00
SuperAuguste
6106cf4419
fixes
2020-04-05 19:06:43 -04:00
Andrew Kelley
e84b9b70ff
annotate disabled tests with github issue links
2020-04-05 18:34:32 -04:00
Andrew Kelley
5597b11a52
add runtime safety tests for SIMD integer division
2020-04-05 18:34:31 -04:00
LemonBoy
0f964e1910
I'm getting tired of this shit LLVM
2020-04-05 18:34:31 -04:00
LemonBoy
91a8e3b47b
tests: Chop away some flaky tests
2020-04-05 18:34:31 -04:00
LemonBoy
d2d97e55cc
ir: Support shift left/right on vectors
2020-04-05 18:34:31 -04:00
LemonBoy
2485f30046
ir: Support bitwise not on vectors
2020-04-05 18:34:31 -04:00
LemonBoy
54ffcf95a8
ir: Support div/mod/rem on vector types
...
Closes #4050
2020-04-05 18:34:31 -04:00
Andrew Kelley
e2dc63644a
type_has_one_possible_value takes comptime struct fields into account
...
Before, type_has_one_possible_value would return false for the value
`.{1}`. But actually, that type is a tuple with a single comptime field.
Such a type, in fact, has one possible value.
This plus the corresponding adjustment to get_the_one_possible_value
solves #3878 .
2020-04-05 17:09:01 -04:00
Vexu
6ef15fc8d0
Merge pull request #4901 from phase/feature/translate-c-remassign
...
translate-c: RemAssign and DivAssign
2020-04-05 21:05:18 +03:00
xackus
cd20e0cc67
rename mem.separate to mem.split
2020-04-04 17:37:51 -04:00
Jadon Fowler
391ee996a5
translate-c: account for signedness when translating div & mod
...
Signed-off-by: Jadon Fowler <j@jadon.io>
2020-04-04 02:16:30 -04:00
Andrew Kelley
e89c42655c
Merge pull request #4868 from xackus/new-arraylist-api
...
new ArrayList API
2020-04-03 22:31:15 -04:00
Michael Dusan
8b6a06eefe
add compiler-error test: coerce
...
Issue fixed by an unknown commit.
closes #4207
2020-04-03 19:11:51 -04:00
Michael Dusan
db4c06ce60
stage1: add compile errors for sentinel slicing
...
closes #3963
2020-04-03 19:05:30 -04:00
Andrew Kelley
a2cad9a3d9
add issue links to disabled test cases
2020-04-03 18:36:13 -04:00
Andrew Kelley
11b50e3ad8
change the default ABI of riscv64-linux-musl
...
Before, this would cause a link failure when mixing Zig and C code for
RISC-V targets.
Now, the ABIs match and Zig and C code can be mixed successfully.
I will file a follow-up issue for the ability to deal more explicitly
with ABIs.
closes #4863
2020-04-03 13:13:09 -04:00
Andrew Kelley
048da6f631
ci: enable riscv64-linux tests
...
Thanks to Michael Dusan's work in
deef063bbf these tests can be enabled.
2020-04-02 21:44:03 -04:00
xackus
7a28c644aa
new ArrayList API: fix everything else
2020-04-02 16:12:08 +02:00
Michael Dusan
f6d384450f
add compile-error test: bitcast
...
Issue fixed by an unknown commit.
closes #3818
2020-04-01 18:07:45 -04:00
LemonBoy
6695fa4f32
ir: Fix comparison of ?T values
...
The code assumed that every ?T had a pointer child type T, add some more
checks to make sure the type is effectively a pointer.
Closes #4789
2020-04-01 15:56:38 -04:00
Andrew Kelley
0f1f56bb69
Merge pull request #4896 from FireFox317/fix-arm32-stuff
...
fix some nullptr dereferences on arm-linux-musleabhif
2020-04-01 15:55:31 -04:00
Timon Kruiper
d9cf779b47
Fix some nullptr dereferences on arm-linux-musleabhif
2020-04-01 20:38:32 +02:00
Jadon Fowler
b9cb1e0d83
translate-c: add tests for div & rem assignment
...
Signed-off-by: Jadon Fowler <j@jadon.io>
2020-04-01 14:28:21 -04:00
Andrew Kelley
2e806682f4
(breaking) std.Buffer => std.ArrayListSentineled(u8, 0)
...
This new name (and the fact that it is a function returning a type) will
make it more clear which use cases are better suited for ArrayList and
which are better suited for ArrayListSentineled.
Also for consistency with ArrayList,
* `append` => `appendSlice`
* `appendByte` => `append`
Thanks daurnimator for pointing out the confusion of std.Buffer.
2020-04-01 13:30:07 -04:00
Michael Dusan
e3d12471a2
add compile-error test for #2687
...
Issue fixed by an unknown commit.
closes #2687
2020-03-31 20:08:00 -04:00
Andrew Kelley
47a0e3ec5e
Merge pull request #4871 from boothby/issue4769
...
Address bugs when //, /// or //! are immediately followed by EOF
2020-03-31 10:56:21 -04:00
Kelly Boothby
44aadaff59
added unit tests to demonstrate #4769 and related bugs
2020-03-30 18:29:48 -07:00
Andrew Kelley
9e7ae06249
std lib API deprecations for the upcoming 0.6.0 release
...
See #3811
2020-03-30 14:23:22 -04:00
Andrew Kelley
b980568c81
add peer type resolution for mixed-const []T and *[N]T
...
closes #4766
This commit also fixes the implementation of some utility functions for
adjusting properties of pointer types. Previously these functions would
incorrectly drop vector, sentinel, and inference metadata.
2020-03-30 13:02:50 -04:00
LemonBoy
c1cc1ebc35
ir: Avoid constant-folding ptr to sentinels
...
Constant-folding the pointers to the expected sentinel value have some
big problems: it hides the real content of the array, makes the pointer
to the sentinel point to a completely different memory region and treats
it like a const value even when the underlying array is mutable.
Fixes #4840
2020-03-30 11:03:56 -04:00
Andrew Kelley
c70471fae6
enable now-passing test cases
...
These can now be enabled thanks to bug fixes that landed in
LLVM 10.
2020-03-29 10:34:12 -04:00
Layne Gustafson
a55897106e
Add macro string concat tests
2020-03-28 20:40:26 -04:00
LemonBoy
d788b0cd8b
std: Minor changes to TLS handling
...
* Always allocate an info block per-thread so that libc can store
important stuff there.
* Respect ABI-mandated alignment in more places.
* Nicer code, use slices/pointers instead of raw addresses whenever
possible.
2020-03-28 11:20:38 -04:00
Andrew Kelley
ab20b351ce
update compile error tests
2020-03-26 14:07:19 -04:00
Andrew Kelley
ddd98a7f10
prevent ptr cast from forcing alignment resolution unnecessarily
2020-03-26 12:34:16 -04:00
Andrew Kelley
93c7fa105f
Merge remote-tracking branch 'origin/llvm10'
...
LLVM 10 was released today
2020-03-24 09:57:09 -04:00
LemonBoy
0cd953d40e
ir: Prevent crash when slicing hardcoded pointer
...
Closes #4780
2020-03-23 09:13:52 -04:00
Andrew Kelley
13d04f9963
Merge pull request #4741 from momumi/master
...
allow `_` separators in number literals (stage 1)
2020-03-23 00:54:54 -04:00
Andrew Kelley
e5e5196d8e
Merge remote-tracking branch 'origin/master' into llvm10
2020-03-22 20:48:21 -04:00
LemonBoy
6a89751025
ir: Implement cast from anon struct to union
2020-03-22 19:06:22 -04:00
Andrew Kelley
3bded9cf29
disable failing stack trace test for aarch64
2020-03-22 18:54:19 -04:00
Andrew Kelley
380c276deb
ci: disable qemu-riscv64 tests due to qemu being too old
2020-03-22 17:36:58 -04:00
Andrew Kelley
87b8b69eb0
update stack trace test expected output
2020-03-22 17:07:24 -04:00
Andrew Kelley
23c263776c
Merge remote-tracking branch 'origin/master' into llvm10
2020-03-22 15:09:29 -04:00
LemonBoy
dc79f181a5
ir: Disallow comparison between enum literal and untagged enum
...
Closes #4770
2020-03-21 20:54:05 -04:00