aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
AgeCommit message (Collapse)Author
2019-09-02fix const result loc, runtime if cond, else unreachableAndrew Kelley
Closes #2791. See that issue for more details; I documented the debugging process quite thoroughly on this one.
2019-09-02add ability to specify darwin framework search dirsAndrew Kelley
2019-08-31improvements to `@asyncCall`Andrew Kelley
* `await @asyncCall` generates better code. See #3065 * `@asyncCall` works with a real `@Frame(func)` in addition to a byte slice. Closes #3072 * `@asyncCall` allows passing `{}` (a void value) as the result pointer, which uses the result location inside the frame. Closes #3068 * support `await @asyncCall` on a non-async function. This is in preparation for safe recursion (#1006).
2019-08-31`@typeOf` now guarantees no runtime side effectsAndrew Kelley
related: #1627
2019-08-30support recursive async and non-async functionsAndrew Kelley
which heap allocate their own frames related: #1006
2019-08-29await does not force async if callee is blockingAndrew Kelley
closes #3067
2019-08-29make `@sizeOf` lazyAndrew Kelley
2019-08-29fix not fully resolving debug info for structs causing llvm errorAndrew Kelley
2019-08-29fix not fully resolving debug info for structs causing llvm errorAndrew Kelley
2019-08-28Merge remote-tracking branch 'origin/master' into llvm9Andrew Kelley
2019-08-28fix implicit cast from zero sized array ptr to sliceAndrew Kelley
closes #1850
2019-08-26fix regression with global variable assignment...Andrew Kelley
...with optional unwrapping with var initialized to undefined
2019-08-25hook up unions with lazy valuesAndrew Kelley
this case works now: ```zig const Expr = union(enum) { Literal: u8, Question: *Expr, }; ```
2019-08-23better handling of lazy structsAndrew Kelley
this case works now: ```zig const A = struct { b_list_pointer: *const []B, }; const B = struct { a_pointer: *const A, }; const b_list: []B = [_]B{}; const a = A{ .b_list_pointer = &b_list }; const obj = B{ .a_pointer = &a }; ```
2019-08-23allow top level declarations to be lazyAndrew Kelley
this case now works: ```zig const A = struct { b: B, }; const B = fn (A) void; ```
2019-08-23Merge remote-tracking branch 'origin/master' into fix-field-alignment-kludgeAndrew Kelley
2019-08-23Encapsulate bigint representation, assert on cast data lossJonathan Marler
2019-08-22introduce lazy valuesAndrew Kelley
see #2174
2019-08-16Merge remote-tracking branch 'origin/master' into llvm9Andrew Kelley
2019-08-16fix and test case for returning from suspend blockAndrew Kelley
See #3063
2019-08-16codegen: LLVMConstSub instead of LLVMBuildSub in one placeAndrew Kelley
2019-08-15fix crash with sometimes type not being resolvedAndrew Kelley
2019-08-15add assertion about control flow to fix gcc warningAndrew Kelley
2019-08-15fix error return traces for async calls of blocking functionsAndrew Kelley
2019-08-15remove `cancel`Andrew Kelley
2019-08-14codegen for async call of blocking functionAndrew Kelley
2019-08-13avoid the word "coroutine", they're "async functions"Andrew Kelley
2019-08-13alignment of structs no longer depends on LLVMAndrew Kelley
fixes async function tests in optimized builds
2019-08-13Merge remote-tracking branch 'origin/master' into rewrite-coroutinesAndrew Kelley
2019-08-13flip the order of fields in error unionsAndrew Kelley
to prepare for fixing u128 alignment issues
2019-08-11fix no-longer-correct `nonnull` attribute on merge err ret traces fnAndrew Kelley
2019-08-11fix cancel invoking branch on undefined memoryAndrew Kelley
2019-08-11all tests passingAndrew Kelley
2019-08-11fix canceling async functions which have error return tracingAndrew Kelley
2019-08-11src/codegen: configure stack probes explicitlyNick Erdmann
2019-08-10fix returning a const error from async functionAndrew Kelley
2019-08-10fix try in an async function with error union and non-zero-bit payloadAndrew Kelley
2019-08-09fix combining try with errdefer cancelAndrew Kelley
2019-08-09fix cancel inside an errdeferAndrew Kelley
2019-08-08fix passing string literals to async functionsAndrew Kelley
2019-08-08async functions in single threaded mode do not use atomic opsAndrew Kelley
2019-08-08more debuggable safety for awaiting twiceAndrew Kelley
2019-08-08cancel, defer, errdefer all working as intended nowAndrew Kelley
2019-08-07modify header precedence for zig cc, resolves intrinsics issues (#3027)Ryan Saunderson
2019-08-07clean up the bitcasting of awaiter fn ptrAndrew Kelley
2019-08-07implement cancelAndrew Kelley
all behavior tests passing in this branch
2019-08-06fix awaiting when result type is a structAndrew Kelley
2019-08-06error return trace across suspend pointsAndrew Kelley
2019-08-06passing the error return trace async function testAndrew Kelley
2019-08-06improve async function semanticsAndrew Kelley
* add safety panic for resuming a function which is returning, pending an await * remove IrInstructionResultPtr * add IrInstructionReturnBegin. This does the early return in async functions; does nothing in normal functions. * `await` gets a result location * `analyze_fn_async` will call `analyze_fn_body` if necessary. * async function frames have a result pointer field for themselves to access and one for the awaiter to supply before the atomic rmw. when returning, async functions copy the result to the awaiter result pointer, if it is non-null. * async function frames have a stack trace pointer which is supplied by the awaiter before the atomicrmw. Later in the frame is a stack trace struct and addresses, which is used for its own calls and awaits. * when awaiting an async function, if an early return occurred, the awaiter tail resumes the frame. * when an async function returns, early return does a suspend (in IrInstructionReturnBegin) before copying the error return trace data, result, and running the defers. After the last defer runs, the frame will no longer be accessed. * proper acquire/release atomic ordering attributes in async functions.