Commit Graph

1198 Commits

Author SHA1 Message Date
Andrew Kelley 87710a1cc2 implement @asyncCall which supports async function pointers 2019-08-03 16:17:42 -04:00
Andrew Kelley e444e737b7 add runtime safety for resuming an awaiting function 2019-08-03 02:11:52 -04:00
Andrew Kelley 0920bb0872 implement async functions returning structs 2019-08-02 19:27:27 -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 90e64bc620 fix cmpxchg with discarded result 2019-08-02 14:47:26 -04:00
Andrew Kelley 056c4e2c98 implement async await and return 2019-08-02 01:06:00 -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 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 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
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 7e9760de10 inferring async from async calls 2019-07-23 18:54:45 -04:00
Andrew Kelley fcadeb50c0 fix multiple coroutines existing clobbering each other 2019-07-22 14:36:14 -04:00
Andrew Kelley bc31c1280e disable segfault handler when panicking
this prevents a segfault in stack trace printing to activate the
segfault handler.
2019-07-22 12:41:59 -04:00
Andrew Kelley 5b69a9cd83 disable segfault handler when panicking
this prevents a segfault in stack trace printing to activate the
segfault handler.
2019-07-22 12:15:16 -04:00
Andrew Kelley 32d0ac1355 fix wrong calling convention on async resume 2019-07-22 00:07:48 -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 56c08eb302 returning from async fn adds bad resume safety 2019-07-21 17:17:44 -04:00
Andrew Kelley 6053ca4f69 fix not jumping to entry 2019-07-21 17:10:16 -04:00
Andrew Kelley 72e983670e simple async function call working 2019-07-21 16:21:16 -04:00
Andrew Kelley 54e716afdc remove coroutines implementation and promise type 2019-07-19 18:18:44 -04:00
Andrew Kelley c0b4121ff2 libc headers before C language headers, and disable libunwind on arm32 2019-07-16 21:38:18 -04:00
Andrew Kelley d994379173 update bundled musl source to 1.1.23 2019-07-16 19:54:14 -04:00
Andrew Kelley f70ce707e2 update musl headers to musl v1.1.23 2019-07-16 19:02:51 -04:00
Andrew Kelley 776423bbf7 fix result location alignment in ir_render_call 2019-07-15 23:44:44 -04:00
Andrew Kelley 7b8ba871a9 mingw libc: solve the segfault having to do with destructors
* fixed --verbose-cc printing an extra "zig" before the rest of
   the command line
 * windows-gnu targets use libfoo.a, foo.o extensions to match mingw
   conventions.
2019-07-12 14:44:34 -04:00
Andrew Kelley d9c4c96bf2 add -Wno-pragma-pack when targeting windows-gnu
windows.h has files such as pshpack1.h which do #pragma packing,
triggering a clang warning. So for this target, this warning is
disabled.

this commit also improves the error message printed when no libc can be
used, printing the "zig triple" rather than the "llvm triple".
2019-07-11 23:48:13 -04:00
Andrew Kelley ea90a3a9a1 mingw: building and linking mingw32.lib 2019-07-10 14:13:00 -04:00
Andrew Kelley 56d8185650 expose glibc version in builtin 2019-07-07 17:56:43 -04:00
Andrew Kelley 7ccf7807b3 ability to target any glibc version 2019-07-07 17:56:08 -04:00
Andrew Kelley 4606baee07 add -ffunction-sections arg when building C objects
the other changes in this commit are minor tidying up
2019-07-03 15:46:27 -04:00
Andrew Kelley 2f4faf306d Merge branch 'function-sections' of https://github.com/timonkruiper/zig into timonkruiper-function-sections 2019-07-03 14:43:33 -04: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 140335b99f Merge branch 'has-field' of https://github.com/shawnl/zig into shawnl-has-field 2019-07-02 16:21:40 -04:00
Andrew Kelley b05b5649df print dir name on failure to write to cache dir
closes #2429
2019-07-02 16:11:05 -04:00
Andrew Kelley 704444a6e3 improved logic on whether to include start files 2019-07-02 14:26:54 -04:00
Timon Kruiper bbc0d440b8 Added ZigLLVMCreateTargetMachine and pass function-sections flag
Also added extra cache line

Added the ZigLVVMCreateTargetMachine to self hosted zig code
2019-07-02 19:54:29 +02:00
Timon Kruiper 7586f613d5 Added function-section functionality 2019-07-01 17:49:08 +02:00
Andrew Kelley 4b7e04f75a rename std/special/bootstrap.zig to std/special/start.zig 2019-06-28 02:00:56 -04:00
Andrew Kelley 69c7c5de09 fixups
* better detection for already seen packages
 * "root" instead of "@root"
2019-06-27 19:15:33 -04:00
Andrew Kelley fe2d89007b Merge branch 'root-import' of https://github.com/emekoi/zig into emekoi-root-import 2019-06-27 18:38:28 -04:00