Commit Graph

5762 Commits

Author SHA1 Message Date
Andrew Kelley
bf7b6fbbdb add missing compile error for fn call bad implicit cast
when the function's return type handle is a pointer but the result
location's result value type handle is not a pointer

closes #3055
2019-08-16 16:30:24 -04:00
Andrew Kelley
cbca6586e7 add test for struct parameter to async function being copied
closes #1155
2019-08-16 13:56:26 -04:00
Andrew Kelley
5a2cbe239f fix and test case for returning from suspend block
See #3063
2019-08-16 13:07:07 -04:00
yvt
2cb1f93894 correct LLVM subarch names for arm 2019-08-16 08:46:18 -07:00
Andrew Kelley
13c584d325 add compile error for casting const frame to anyframe
See #3063
2019-08-16 11:38:41 -04:00
Andrew Kelley
cba3b8291a codegen: LLVMConstSub instead of LLVMBuildSub in one place 2019-08-16 11:19:01 -04:00
Andrew Kelley
7798054b58 add tests for bad implicit casting of anyframe types
See #3063
2019-08-16 11:00:21 -04:00
Andrew Kelley
4ea2331e3d add test for async call of generic function
See #3063
2019-08-16 10:54:45 -04:00
Andrew Kelley
5df89dafef add test for wrong frame type used for async call
See #3063
2019-08-16 10:49:00 -04:00
Andrew Kelley
1254a453b9 add compile error for @Frame() of generic function
See #3063
2019-08-16 10:44:51 -04:00
Andrew Kelley
49c88e23af zig fmt 2019-08-16 10:13:40 -04:00
Andrew Kelley
7874d5a40b zig fmt: add more test cases 2019-08-16 10:11:53 -04:00
Vexu
2151f84d59 implement new async syntax in self-hosted compiler 2019-08-16 06:17:28 -07:00
Andrew Kelley
1e3b6816a8 note that -mllvm is unsupported
closes #3045
2019-08-15 22:57:06 -04:00
Andrew Kelley
ff7e826b82 fix crash with sometimes type not being resolved 2019-08-15 18:54:23 -04:00
Andrew Kelley
0b08ae581e add assertion about control flow to fix gcc warning 2019-08-15 18:38:20 -04:00
Andrew Kelley
7e75e1075e zig fmt 2019-08-15 18:19:04 -04:00
Andrew Kelley
8b97a1aee2 Merge pull request #3033 from ziglang/rewrite-coroutines
rework async function semantics
2019-08-15 14:01:01 -07:00
Andrew Kelley
d3672493cc basic docs for new async/await semantics 2019-08-15 16:46:43 -04:00
Andrew Kelley
55f5cee86b fix error return traces for async calls of blocking functions 2019-08-15 15:06:05 -04:00
Andrew Kelley
729807203a force static libs for vendored dependencies 2019-08-15 14:34:52 -04:00
Andrew Kelley
13b5a4bf8c remove cancel 2019-08-15 14:05:12 -04:00
Andrew Kelley
64c293f8a4 codegen for async call of blocking function 2019-08-14 12:52:20 -04:00
Andrew Kelley
f3f838cc01 add compile error for await in exported function 2019-08-14 11:22:12 -04:00
Andrew Kelley
7799423f24 rename behavior test files 2019-08-14 00:38:27 -04:00
Andrew Kelley
5749dc49d8 respect local variable alignment in async functions 2019-08-14 00:35:51 -04:00
Andrew Kelley
dd8c8c0802 get_struct_type accepts field alignment overrides 2019-08-13 18:14:38 -04:00
Andrew Kelley
5092634103 avoid the word "coroutine", they're "async functions" 2019-08-13 14:14:19 -04:00
Andrew Kelley
82d4ebe53a organize TODOs 2019-08-13 13:28:05 -04:00
Andrew Kelley
12ff91c1c9 alignment of structs no longer depends on LLVM
fixes async function tests in optimized builds
2019-08-13 12:44:30 -04:00
Andrew Kelley
8a9289996a Merge remote-tracking branch 'origin/master' into rewrite-coroutines 2019-08-13 11:39:32 -04:00
Andrew Kelley
98183e4743 flip the order of fields in error unions
to prepare for fixing u128 alignment issues
2019-08-13 11:33:01 -04:00
Andrew Kelley
24d5ec0783 fix async function frames not aligned enough 2019-08-11 22:35:12 -04:00
Andrew Kelley
911b1a0428 fix no-longer-correct nonnull attribute on merge err ret traces fn 2019-08-11 22:05:09 -04:00
Andrew Kelley
62c5bc6058 fix cancel invoking branch on undefined memory 2019-08-11 21:14:19 -04:00
Andrew Kelley
4d8d513e16 all tests passing 2019-08-11 19:53:10 -04:00
Andrew Kelley
3aed7de0c4 README: link to community projects 2019-08-11 16:09:23 -04:00
Andrew Kelley
af8c6ccb4b fix canceling async functions which have error return tracing 2019-08-11 14:26:34 -04:00
Andrew Kelley
b87686dfa0 fix enum with one member and custom tag type 2019-08-11 13:43:44 -04:00
Andrew Kelley
1b83ee78a4 allow comptime_int to implicit cast to comptime_float 2019-08-11 12:01:02 -04:00
data-man
4bd4c5e06d Fixed tiny typo in the math module (shr's description) 2019-08-11 08:15:42 -07:00
Andrew Kelley
3f5c6d7a89 add test case for typical async/await usage 2019-08-10 18:03:36 -04:00
Andrew Kelley
77d098e92d fix returning a const error from async function 2019-08-10 17:23:45 -04:00
Andrew Kelley
22428a7546 fix try in an async function with error union and non-zero-bit payload 2019-08-10 15:20:08 -04:00
Andrew Kelley
b9d1d45dfd fix combining try with errdefer cancel 2019-08-09 21:49:40 -04:00
Andrew Kelley
2e7f53f1f0 fix cancel inside an errdefer 2019-08-09 17:34:06 -04:00
Andrew Kelley
e6ebc41a07 add a little compile error to make Future Andy's life easier 2019-08-09 17:10:39 -04:00
Andrew Kelley
0bf6796b76 fix regression in std.math.min
closes #3035
2019-08-09 10:22:02 -04:00
Andrew Kelley
614cab5d68 fix passing string literals to async functions 2019-08-08 19:08:41 -04:00
Andrew Kelley
da56959a9a closer to std lib event stuff working 2019-08-08 16:41:38 -04:00