aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
AgeCommit message (Collapse)Author
2019-09-07implement spills when expressions used across suspend pointsAndrew Kelley
closes #3077
2019-09-07fix await used in an expression generating bad LLVMAndrew Kelley
2019-09-06runtime safety for noasync function callsAndrew Kelley
See #3157
2019-09-05implement `noasync` function callsAndrew Kelley
See #3157
2019-09-05Resolve lazy values when checking for definednessLemonBoy
Fixes #3154
2019-09-04fixups and add documentation for `@Type`Andrew Kelley
2019-09-03Add @Type builtinJonathan Marler
2019-09-03emit a compile error if a test becomes asyncAndrew Kelley
See #3117
2019-09-03fix compiler crash in struct field pointersAndrew Kelley
when the llvm type has not been fully analyzed. This is a regression from lazy values.
2019-09-03fix stack traces on macos when passing absolute path to root source fileAndrew Kelley
The comment added by this commit is copied here: For macOS stack traces, we want to avoid having to parse the compilation unit debug info. As long as each debug info file has a path independent of the compilation unit directory (DW_AT_comp_dir), then we never have to look at the compilation unit debug info. If we provide an absolute path to LLVM here for the compilation unit debug info, LLVM will emit DWARF info that depends on DW_AT_comp_dir. To avoid this, we pass "." for the compilation unit directory. This forces each debug file to have a directory rather than be relative to DW_AT_comp_dir. According to DWARF 5, debug files will no longer reference DW_AT_comp_dir, for the purpose of being able to support the common practice of stripping all but the line number sections from an executable. closes #2700
2019-09-02omit prefix data for async functions sometimesAndrew Kelley
When `@frameSize` is never called, and `@asyncCall` on a runtime-known pointer is never used, no prefix data for async functions is needed. Related: #3160
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-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-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-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