Commit Graph

5655 Commits

Author SHA1 Message Date
Andrew Kelley
fbf21efd24
simpler, less memory intensive suspend/resume implementation 2019-08-04 18:58:14 -04:00
Andrew Kelley
042914de75
move state from ZigFn to CodeGen to save memory 2019-08-04 18:26:37 -04:00
Andrew Kelley
fa30ebfbe5
suspension points inside branching control flow 2019-08-04 18:24:10 -04:00
Andrew Kelley
12924477a5
fix regression in calling extern functions 2019-08-03 20:33:16 -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
b2d94f9af2
Merge branch 'assignment-result-loc'
With this merge, assignments participate in result location
semantics.
2019-08-02 16:10:45 -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
ceec2393cf
Merge pull request #2965 from Sahnvour/zig-stack-traces
Stage1 stack traces on windows
2019-07-29 17:50:11 -04:00
Sahnvour
c087525eda pdb: improved stream reading performance, printing stack trace from a stage1 crash is now 10x faster 2019-07-29 23:40:18 +02:00
Sahnvour
05032c8693 coff & pdb: improved correctness of our implementation, it is now able to handle stage1's pdb and print its stack traces 2019-07-29 23:40:18 +02:00
Sahnvour
d08425a0a5 os: missing accessW since recent refactoring 2019-07-29 23:33:58 +02:00
Michael Dusan
bc982e65cf fix std.fmt to handle std.SegmentedList
- add guards for use of prealloc_exp in SegmentedList
- define prealloc_exp even when invalid because std.fmt comptime
  triggers lazy-init
- fix std.fmt to print arrays of length 0 as style "[0]<typename>"
  because "<typename>@address" is n/a without address
2019-07-29 16:32:26 -04:00
Nick Erdmann
8736a5be2a std/build.zig: fix stack checking option 2019-07-29 16:30:21 -04:00
Michael Dusan
7e436006be fix std.rb.Node.getParent to return optional
closes #2962
2019-07-29 16:29:29 -04:00
Andrew Kelley
d694f298d8
Merge pull request #2958 from emekoi/mingw-cmake
fix backtraces on mingw
2019-07-29 16:27:35 -04:00
Marc Tiehuis
c47b75312d
Merge pull request #2969 from evangrayk/zero-width-structs
fix zero-width structs in zig.fmt.format
2019-07-29 19:19:47 +12:00
Evan Krause
a0ebfa64d9 support zero-sized structs in zig.fmt.format 2019-07-28 18:37:35 -07:00
emekoi
357fb4f143 avoid passing -static to msvc when static linking 2019-07-27 17:54:20 -05:00
emekoi
10b1017702 fixed backtraces when linking libc on mingw 2019-07-27 17:50:44 -05:00
Andrew Kelley
ee64a22045
add the anyframe and anyframe->T types 2019-07-26 19:52:35 -04:00
emekoi
5593c63e12 improved CMake file for MinGW 2019-07-26 16:26:01 -05:00
Joachim Henke
74abc5ad2f avoid a register copy when fetching the stack pointer in _start 2019-07-26 17:12:42 -04:00
Andrew Kelley
018a89c7a1
async functions return void, no more GetSize resume block 2019-07-26 17:07:19 -04:00
Andrew Kelley
7b3686861f
@frameSize works via PrefixData 2019-07-25 22:24:01 -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
Michael Dusan
8e4f3a6f15 align src for IrInstructionArrayToVector
closes #2942
2019-07-24 15:04:32 -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
Andrew Kelley
7e9760de10
inferring async from async calls 2019-07-23 18:54:45 -04:00
Timon Kruiper
59850c1ce1 Fixed an integer overflow in zig fmt and added testcase 2019-07-23 14:51:30 -04:00