aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
AgeCommit message (Collapse)Author
2018-04-09async tcp server proof of conceptAndrew Kelley
2018-04-08error return traces work with async return caseAndrew Kelley
2018-04-08fix calling convention at callsite of zig-generated fnsAndrew Kelley
2018-04-08put the error return addresses in the coro frameAndrew Kelley
2018-04-08codegen: fix not putting llvm allocas togetherAndrew Kelley
2018-04-08error return traces for the early return caseAndrew Kelley
it would work but LLVM is not correctly spilling the addresses. See #821
2018-04-06fix llvm assert on version string with git shaBen Noordhuis
LLVM's CodeViewDebug pass misparses the version string when it contains a git revision so stop doing that. This only affected Windows builds. closes #898
2018-04-01Add run compiler commandMarc Tiehuis
'zig run file.zig' builds a file and stores the artifacts in the global cache. On successful compilation the binary is executed. 'zig run file.zig -- a b c' does the same, but passes the arguments a, b and c as runtime arguments to the program. Everything after an '--' are treated as runtime arguments. On a posix system, a shebang can be used to run a zig file directly. An example shebang would be '#!/usr/bin/zig run'. You may not be able pass extra compile arguments currently as part of the shebang. Linux for example treats all arguments after the first as a single argument which will result in an 'invalid command'. Currently there is no customisability for the cache path as a compile argument. For a posix system you can use `TMPDIR=. zig run file.zig` to override, in this case using the current directory for the run cache. The input file is always recompiled, even if it has changed. This is intended to be cached but further discussion/thought needs to go into this. Closes #466.
2018-03-30find libc and zig std lib at runtimeAndrew Kelley
this removes the following configure options: * ZIG_LIBC_LIB_DIR * ZIG_LIBC_STATIC_LIB_DIR * ZIG_LIBC_INCLUDE_DIR * ZIG_DYNAMIC_LINKER * ZIG_EACH_LIB_RPATH * zig's reliance on CMAKE_INSTALL_PREFIX these options are still available as command line options, however, the default will attempt to execute the system's C compiler to collect system defaults for these values. closes #870
2018-03-24fix invalid codegen for error return traces across suspend pointsAndrew Kelley
See #821 Now the code works correctly, but error return traces are missing the frames from coroutines.
2018-03-24add promise->T syntax parsingAndrew Kelley
closes #857
2018-03-24fix async fns with inferred error setsAndrew Kelley
closes #856
2018-03-24move error ret tracing codegen to zig irAndrew Kelley
progress towards #821
2018-03-23Fix OpqaueType usage in exported c functionsMarc Tiehuis
We prefer `struct typename`. If a typedef is required, this must be done manually after generation.
2018-03-13fix casting a function to a pointer causing compiler crashAndrew Kelley
closes #777
2018-03-10fix await multithreaded data raceAndrew Kelley
coro return was reading from a value that coro await was writing to. that wasn't how it was designed to work, it was an implementation mistake. this commit also has some work-in-progress code for fixing error return traces across suspend points.
2018-03-10improvements to stack tracesAndrew Kelley
* @panic generates an error return trace * printing an error return trace no longer interferes with normal stack traces. * instead of ignore_frame_count, we look at the return address when you call panic, and that's the first stack trace function makes stack traces much cleaner - the error return trace flows gracefully into the stack trace
2018-03-06var is no longer a pseudo-type, it is syntaxAndrew Kelley
closes #779
2018-03-02add optnone noinline to async functionsAndrew Kelley
this works around LLVM optimization assertion failures. https://bugs.llvm.org/show_bug.cgi?id=36578 closes #800
2018-03-01fix not casting result of llvm.coro.promiseAndrew Kelley
2018-03-01implementation of awaitAndrew Kelley
but it has bugs
2018-02-28implement coroutine resumeAndrew Kelley
2018-02-28async function fulfills promise atomicallyAndrew Kelley
2018-02-28add atomicrmw builtin functionAndrew Kelley
2018-02-28break the data dependencies that llvm coro transforms cant handleAndrew Kelley
my simple coro test program builds now see #727
2018-02-28another workaround for llvm coroutinesAndrew Kelley
this one doesn't work either
2018-02-27Revert "llvm coroutine workaround: sret functions return sret pointer"Andrew Kelley
This reverts commit 132e604aa399a3bcb91996e550cf8972bd88422c. this workaround didn't work either
2018-02-27revert workaround for alloc and free as coro paramsAndrew Kelley
reverts 4ac6c4d6bfb8f7ada2799ddb5ce3a9797be0518d the workaround didn't work
2018-02-27llvm coroutine workaround: sret functions return sret pointerAndrew Kelley
2018-02-27Revert "another llvm workaround for getelementptr"Andrew Kelley
This reverts commit c2f5634fb3df51622cf74f23b4ae0d4a7d2bbbe9. It doesn't work. With this, LLVM moves the allocate fn call to after llvm.coro.begin
2018-02-27another llvm workaround for getelementptrAndrew Kelley
2018-02-26workaround llvm coro transformationsAndrew Kelley
by making alloc and free functions be parameters to async functions instead of using getelementptr in the DynAlloc block See #727
2018-02-26implement coroutine suspendAndrew Kelley
see #727
2018-02-25codegen for coro_resume instructionAndrew Kelley
See #727
2018-02-25codegen for coro_free instructionAndrew Kelley
See #727
2018-02-25codegen for coro_end instructionAndrew Kelley
See #727
2018-02-25codegen for coro_suspend instructionAndrew Kelley
See #727
2018-02-25codegen for coro_begin instructionAndrew Kelley
See #727
2018-02-25codegen for coro_alloc_fail instructionAndrew Kelley
See #727
2018-02-25codegen for get_implicit_allocator instructionAndrew Kelley
See #727
2018-02-25codegen for coro_alloc and coro_size instructionsAndrew Kelley
See #727
2018-02-25codegen for coro_id instructionAndrew Kelley
See #727
2018-02-25codegen for cancelAndrew Kelley
See #727
2018-02-25codegen for calling an async functionAndrew Kelley
See #727
2018-02-23implement Zig IR for async functionsAndrew Kelley
See #727
2018-02-22IR analysis for coro.beginAndrew Kelley
See #727
2018-02-21add coroutine startup IR to async functionsAndrew Kelley
See #727
2018-02-21implement IR analysis for async function callsAndrew Kelley
See #727
2018-02-20add promise typeAndrew Kelley
See #727
2018-02-20parse async fn definitionsAndrew Kelley
See #727