Andrew Kelley
fa30ebfbe5
suspension points inside branching control flow
2019-08-04 18:24:10 -04:00
Andrew Kelley
87710a1cc2
implement @asyncCall which supports async function pointers
2019-08-03 16:17:42 -04:00
Andrew Kelley
c879209661
add compile error for calling async function pointer
2019-08-03 02:40:38 -04:00
Andrew Kelley
e444e737b7
add runtime safety for resuming an awaiting function
2019-08-03 02:11:52 -04:00
Andrew Kelley
24d78177ee
add compile error for async call of function pointer
2019-08-03 01:06:14 -04:00
Andrew Kelley
0920bb0872
implement async functions returning structs
2019-08-02 19:27:27 -04:00
Andrew Kelley
5bd330e76c
add heap allocated async function frame test
2019-08-02 16:32:24 -04:00
Andrew Kelley
b3b6a98451
Merge remote-tracking branch 'origin/master' into rewrite-coroutines
2019-08-02 16:31:43 -04:00
Andrew Kelley
f07f09a373
Merge branch 'master' into rewrite-coroutines
2019-08-02 16:13:36 -04:00
Andrew Kelley
d105769926
fix regressions regarding writing through const pointers
2019-08-02 16:09:40 -04:00
Andrew Kelley
9069ee957c
fix discarding function call results
2019-08-02 15:17:02 -04:00
Andrew Kelley
90e64bc620
fix cmpxchg with discarded result
2019-08-02 14:47:26 -04:00
Andrew Kelley
a5cb0f77d1
assignment participates in result location
...
fix one regression with optionals but there are more
2019-08-02 13:54:58 -04:00
Andrew Kelley
056c4e2c98
implement async await and return
2019-08-02 01:06:00 -04:00
Andrew Kelley
0f879d02a4
more passing coroutine tests
2019-08-01 19:14:48 -04:00
Andrew Kelley
1dd0c3d49f
fix calling an inferred async function
2019-08-01 16:41:30 -04:00
Andrew Kelley
e7ae4e4645
reimplement async with function splitting instead of switch
2019-08-01 16:08:52 -04:00
Andrew Kelley
6cb4cac5cd
disable behavior test for 128-bit cmpxchg
...
once #2883 is done this can be revisited
2019-08-01 03:36:03 -04:00
Andrew Kelley
38b5812c48
allow 128 bit cmpxchg on x86_64
2019-08-01 02:46:37 -04:00
Andrew Kelley
dbdc4d62d0
improve support for anyframe and anyframe->T
...
* add implicit cast from `*@Frame(func)` to `anyframe->T` or `anyframe`.
* add implicit cast from `anyframe->T` to `anyframe`.
* `resume` works on `anyframe->T` and `anyframe` types.
2019-07-29 19:32:49 -04:00
Andrew Kelley
ee64a22045
add the anyframe and anyframe->T types
2019-07-26 19:52:35 -04:00
Andrew Kelley
538c0cd225
implement @frameSize
2019-07-25 15:05:55 -04:00
Andrew Kelley
70bced5dcf
implement @frame and @Frame
2019-07-25 01:47:56 -04:00
Andrew Kelley
ead2d32be8
calling an inferred async function
2019-07-25 00:03:06 -04:00
Andrew Kelley
9e11f67f0d
add test for previous commit
2019-07-24 15:05:39 -04:00
Andrew Kelley
e220812f2f
implement local variables in async functions
2019-07-24 02:59:51 -04:00
Andrew Kelley
19ee495750
add error for function with ccc indirectly calling async function
2019-07-23 19:35:41 -04:00
Vexu
57aa8997bd
fix escape sequence rendering
2019-07-23 14:49:19 -04:00
Andrew Kelley
317d1ecb2c
Merge remote-tracking branch 'origin/master' into rewrite-coroutines
2019-07-22 14:37:08 -04:00
Andrew Kelley
fcadeb50c0
fix multiple coroutines existing clobbering each other
2019-07-22 14:36:14 -04:00
Andrew Kelley
16be70cbbf
compiler-rt: add __muldi3
2019-07-22 12:49:26 -04:00
Andrew Kelley
59bf9ca58c
implement async function parameters
2019-07-21 23:27:47 -04:00
Andrew Kelley
11bd50f2b2
implement coroutine resume
2019-07-21 20:54:08 -04:00
Andrew Kelley
78e03c466c
simple async function passing test
2019-07-21 19:56:37 -04:00
Andrew Kelley
54e716afdc
remove coroutines implementation and promise type
2019-07-19 18:18:44 -04:00
Andrew Kelley
af8661405b
fix usingnamespace
...
It used to be that usingnamespace was only allowed at top level. This
made it OK to put the state inside the AST node data structure. However,
now usingnamespace can occur inside any aggregate data structure, and
therefore the state must be in the TopLevelDeclaration rather than in
the AST node.
There were two other problems with the usingnamespace implementation:
* It was passing the wrong destination ScopeDecl, so it could cause an
incorrect error such as "import of file outside package path".
* When doing `usingnamespace` on a file that already had
`pub usingnamespace` in it would "steal" the usingnamespace, causing
incorrect "use of undeclared identifier" errors in the target file.
closes #2632
closes #2580
2019-07-19 16:56:44 -04:00
Andrew Kelley
9dcddc2249
retire the example/ folder, rename test-build-examples to "standalone"
...
closes #2759
2019-07-16 12:15:46 -04:00
Andrew Kelley
741c74e427
cleanups
2019-07-16 11:50:00 -04:00
Andrew Kelley
45cc488cef
Merge branch 'main-return-!u8' of https://github.com/SamTebbs33/zig into SamTebbs33-main-return
2019-07-16 11:27:11 -04:00
Andrew Kelley
6fe3b20962
Merge branch 'translate-c-userland' of https://github.com/hryx/zig into hryx-translate-c-userland
2019-07-15 22:19:54 -04:00
Andrew Kelley
c0489abcdb
translate-c: fix incorrectly translated double function pointer
...
closes #2887
2019-07-13 12:38:10 -04:00
Andrew Kelley
4e58855a4a
translate-c: better detection of pointer to struct demoted to opaque
2019-07-12 12:11:26 -04:00
SamTebbs33
b118806c69
Add implicit cast for *[N]T to [*c]T
2019-07-06 17:02:17 -04:00
hryx
6bfa8546bb
Unicode escapes: stage1 tokenizer and behavior tests
2019-07-04 22:40:19 -07:00
SamTebbs33
f24b8f2a4a
Support returning !u8 from main
2019-07-04 14:26:05 +01:00
Andrew Kelley
96fd103073
improve the error message and test coverage
2019-07-04 00:35:28 -04:00
Andrew Kelley
bfe0bf695b
Merge branch 'impl-1107' of https://github.com/emekoi/zig into emekoi-impl-1107
2019-07-03 23:40:47 -04:00
emekoi
a1b952f4b0
added tests for #1107 and a note in the reference
2019-07-03 13:12:14 -05:00
Andrew Kelley
9da054095c
Merge branch 'comptime-union-init' of https://github.com/rbscott/zig into rbscott-comptime-union-init
2019-07-03 11:26:55 -04:00
Andrew Kelley
9daf0140e5
add missing compile error for comptime continue inside runtime catch
...
See #2604
2019-07-02 21:14:42 -04:00