7742 Commits

Author SHA1 Message Date
Andrew Kelley
cdba521a06
annotate skipped test with issue link 2020-02-13 16:13:53 -05:00
data-man
948a463cf1
fmt: vector formatting 2020-02-13 16:12:54 -05:00
Andrew Kelley
1675d4f82b
Merge pull request #4443 from LemonBoy/werkzeug
A train of small patches
2020-02-13 13:12:18 -05:00
Vexu
fa377dbd15 fix c tokenizer bug 2020-02-13 12:21:28 -05:00
LemonBoy
f93c219f30 Minor changes for a test case 2020-02-13 12:13:56 +01:00
LemonBoy
c5260f7f86 ir: Allow implicit conversion between vector types
Only valid when the number of elements match and the types are
compatible.

Fixes #4334
2020-02-13 12:13:56 +01:00
data-man
4578d13b49 Vector comparison in meta and testing 2020-02-13 12:13:55 +01:00
Michael Dusan
1fb70497d2
Merge pull request #4441 from mikdusan/stage1-cmake
stage1: limit cmake checks on build type
2020-02-12 21:04:34 -05:00
Michael Dusan
08666a057a
Merge pull request #4439 from vegecode/custom-format-comment-issue
Correct comment to include comptime attribute on format output fn par…
2020-02-12 18:35:39 -05:00
Michael Dusan
471662f7c9
stage1: limit cmake checks on build type
Various maintainers pass custom build types and we don't need to check
those. We are interested only in checking and diagnosing common errors
for Zig project supported types.

Check is now limited to look for case-mismatch only on the well-known
values { Debug, Release, RelWithDebInfo, MinSizeRel }.
2020-02-12 17:23:48 -05:00
LemonBoy
55304128c0 Fix rendering of empty arrays 2020-02-12 23:10:53 +01:00
LemonBoy
327d40e7a3 Fix a UAF when verbose-llvm-ir is specified
The g->module is long gone when codegen_link is called.
2020-02-12 23:10:08 +01:00
vegecode
d06bfc2e2a Correct comment to include comptime attribute on format output fn parameter
Without comptime, printing custom type through the stream interface fails
2020-02-12 13:16:32 -06:00
Andrew Kelley
ab4ea5d3cf
Merge pull request #4433 from LemonBoy/ohno
Trivial patchset
2020-02-11 13:12:42 -05:00
LemonBoy
6c05f0949a ir: Fix erroneous error message for ptr casts
Don't blindly throw an error if two integer types are checked for
compatibility.

Bug reported in #4430
2020-02-11 17:03:11 +01:00
LemonBoy
b81c5be451 riscv: Remove 'relax' from the baseline cpu features
LLD doesn't implement relaxations at the moment.
2020-02-11 17:03:11 +01:00
LemonBoy
f8fd8c481a test: Skip the atomic-on-fp test for riscv64 2020-02-11 17:03:10 +01:00
LemonBoy
ea8755fda9 compiler-rt: Export the AEABI builtins when targeting thumb 2020-02-11 15:24:18 +01:00
Michael Dusan
e624c86289
Merge pull request #4389 from mikdusan/stage1-mem
stage1: memory/report overhaul
2020-02-10 23:08:33 -05:00
Michael Dusan
edb210905d
stage1: memory/report overhaul
- split util_base.hpp from util.hpp
- new namespaces: `mem` and `heap`
- new `mem::Allocator` interface
- new `heap::CAllocator` impl with global `heap::c_allocator`
- new `heap::ArenaAllocator` impl
- new `mem::TypeInfo` extracts names without RTTI
- name extraction is enabled w/ ZIG_ENABLE_MEM_PROFILE=1
- new `mem::List` takes explicit `Allocator&` parameter
- new `mem::HashMap` takes explicit `Allocator&` parameter
- add Codegen.pass1_arena and use for all `ZigValue` allocs
- deinit Codegen.pass1_arena early in `zig_llvm_emit_output()`
2020-02-10 21:08:08 -05:00
Timon Kruiper
2618366055 Add cast between [*c]T and ?[*:0]T on fn parameter
Fixes #4176
2020-02-10 19:43:58 -05:00
LemonBoy
3237528a59 fmt: Pass the fmt string to the inner formatters 2020-02-10 19:43:11 -05:00
Andrew Kelley
3170ead9eb
compile error instead of abort for unimplemented @typeInfo
of `@Frame(func)`. Closes #3995
2020-02-10 19:14:54 -05:00
Andrew Kelley
702398dd0e
Revert "windows: remove the 'A' versions of psapi functions"
This reverts commit 1cdefeb10b7496126bbb7d00709235abfee56a4a.

See #4426
2020-02-10 12:30:20 -05:00
Andrew Kelley
1cdefeb10b
windows: remove the 'A' versions of psapi functions
See #534
2020-02-10 12:03:11 -05:00
Vexu
ae5ba369e1 translate-c float fixes 2020-02-10 11:02:29 -05:00
Andrew Kelley
70a4794c57
fix compiler assertion when duplicating fields...
...in nested anonymous struct literals

closes #4391
2020-02-10 10:57:40 -05:00
Andrew Kelley
014f66e6de Merge pull request #4404 from ziglang/async-std
a big step towards std lib integration with async I/O
2020-02-10 00:22:59 -05:00
Andrew Kelley
27575d19c8
avoid conflict with master branch 2020-02-09 22:44:23 -05:00
Andrew Kelley
acdf4048b4
allow local variable address detection to regress
See #3180 for a more comprehensive plan to catch this problem. More
sophisticated control flow analysis is needed to provide compile errors
for returning local variable addresses from a function.
2020-02-09 22:40:36 -05:00
Andrew Kelley
5ea79bfc4a
fix not checking type of return pointer
Thanks to Vexu for the test cases.

Closes #3422
Closes #3646
Closes #3224
Closes #3327
Closes #3269
2020-02-09 22:34:34 -05:00
Andrew Kelley
04ee3b01a1
fix defer interfering with return value spill 2020-02-09 17:19:28 -05:00
Andrew Kelley
3b622f4494
fix off-by-one error in std.unicode.utf8ToUtf16LeWithNull
and fix larger-than-one-byte sentinels when being freed

Thank you to João Pedro for identifying both problems and
providing example code to solve them.

closes #4413
2020-02-09 14:56:19 -05:00
LemonBoy
c4d0f97b4c compiler_rt: Fix clzsi2 implementation for Thumb1
The LUT contains the number of bits set, not the number of leading zeros
as we're subtracting from the total number of bits in a word.

Closes #4415
2020-02-09 14:12:01 -05:00
Andrew Kelley
5b10d9f917
std: fix bitrotted evented code 2020-02-08 16:24:26 -05:00
Andrew Kelley
6ae36807b7
solve recursion in std.atomic.Queue.dump
by adding a maximum depth
2020-02-08 16:22:53 -05:00
Andrew Kelley
24d197b037
solve previous commit a better way 2020-02-08 15:28:12 -05:00
Andrew Kelley
d80db3546c
Revert "properly spill optional payload capture value"
This reverts commit 80ba21b83cd13849c1d1d9cdebfa070b03f334d3.
2020-02-08 15:07:12 -05:00
Andrew Kelley
80ba21b83c
properly spill optional payload capture value 2020-02-08 14:59:33 -05:00
Andrew Kelley
884804dbc3
fix async runtime function call resolves target fn frame 2020-02-08 13:45:31 -05:00
Andrew Kelley
c48831512b
std lib typo fixups 2020-02-08 01:38:01 -05:00
Andrew Kelley
eddca50059
fix regression in docgen
I used the wrong function here
2020-02-08 00:03:06 -05:00
Jared Miller
b55bc5eb26 Add wWinMain and wWinMainCRTStartup to fix #4376 2020-02-07 22:52:40 -05:00
Andrew Kelley
0e7461d4a3
Merge pull request #4408 from LemonBoy/mmap-i386-fix
handle SIGBUS, fix mmap on i386 linux
2020-02-07 22:51:43 -05:00
Andrew Kelley
877f39d227
fix async function call resolves target fn frame 2020-02-07 22:48:31 -05:00
Andrew Kelley
39ee1f4b97
fix invalid behavior tests from prev commit
and fix "no-op casts" from incorrectly spilling
2020-02-07 16:31:52 -05:00
LemonBoy
a779450fef linux/i386: Make syscall6 more robust and correct
LLVM10 exposed a subtle flaw in the previous implementation that made
the mmap tests fail.
2020-02-07 22:13:05 +01:00
Andrew Kelley
4a60689309
more carefully calculate llvm field indexes
more correctly solves #4403
2020-02-07 14:54:58 -05:00
Andrew Kelley
3fce8008cc
skip self-hosted for now as we work towards async I/O
1. behavior tests with --test-evented-io
 2. std lib tests with --test-evented-io
 3. fuzz test evented I/O a bit, make it robust
 4. make sure it works on all platforms (kqueue, Windows IOCP,
    epoll/other)
 5. restart efforts on self-hosted
2020-02-07 12:30:16 -05:00
Andrew Kelley
7f4cce3345 add fcntl support on darwin 2020-02-07 12:11:15 -05:00