authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-08-13 13:28:05-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-08-13 13:28:05-04:00
log82d4ebe53a9d86559dee4e82cde97ab26e76a375
tree00bac5741a2f06c507c3b276744f1e473ac19c2e
parent12ff91c1c99da11dcaab1e4a1adb6a6917ef4881
signature Commit is signed but in an unrecognized format.

organize TODOs


2 files changed, 21 insertions(+), 21 deletions(-)

BRANCH_TODO+17-18
......@@ -1,17 +1,27 @@
1 * grep for "coroutine" and "coro" and replace all that nomenclature with "async functions"
12 * alignment of variables not being respected in async functions
2 * for loops need to spill the index. other payload captures probably also need to spill
3 * compile error (instead of crashing) for trying to get @Frame of generic function
4 * compile error (instead of crashing) for trying to async call and passing @Frame of wrong function
5 * `const result = (await a) + (await b);` this causes "Instruction does not dominate all uses" - need spill
6 * compile error for error: expected anyframe->T, found 'anyframe'
7 * compile error for error: expected anyframe->T, found 'i32'
83 * await of a non async function
94 * async call on a non async function
5 * documentation
6 - @asyncCall
7 - @frame
8 - @Frame
9 - @frameSize
10 - coroutines section
11 - suspend
12 - resume
13 - anyframe, anyframe->T
1014 * a test where an async function destroys its own frame in a defer
15 * compile error (instead of crashing) for trying to get @Frame of generic function
16 * compile error (instead of crashing) for trying to async call and passing @Frame of wrong function
1117 * implicit cast of normal function to async function should be allowed when it is inferred to be async
12 * @typeInfo for @Frame(func)
18 * compile error for error: expected anyframe->T, found 'anyframe'
19 * compile error for error: expected anyframe->T, found 'i32'
1320 * peer type resolution of *@Frame(func) and anyframe
1421 * peer type resolution of *@Frame(func) and anyframe->T when the return type matches
22 * for loops need to spill the index. other payload captures probably also need to spill
23 * `const result = (await a) + (await b);` this causes "Instruction does not dominate all uses" - need spill
24 * @typeInfo for @Frame(func)
1525 * returning a value from within a suspend block
1626 * make resuming inside a suspend block, with nothing after it, a must-tail call.
1727 * make sure there are safety tests for all the new safety features (search the new PanicFnId enum values)
......@@ -22,17 +32,6 @@
2232 * calling a generic function which is async
2333 * make sure `await @asyncCall` and `await async` are handled correctly.
2434 * allow @asyncCall with a real @Frame(func) (the point of this is result pointer)
25 * documentation
26 - @asyncCall
27 - @frame
28 - @Frame
29 - @frameSize
30 - coroutines section
31 - suspend
32 - resume
33 - anyframe, anyframe->T
34 * call graph analysis to have fewer stack trace frames
35 * grep for "coroutine" and "coro" and replace all that nomenclature with "async functions"
3635 * when there are multiple calls to async functions in a function, reuse the same frame buffer, so that the
3736 needed bytes is equal to the largest callee's frame
3837 * if an async function is never called with async then a few optimizations can be made:
src/all_types.hpp+4-3
......@@ -3758,9 +3758,10 @@ static const size_t coro_awaiter_index = 2;
37583758static const size_t coro_prev_val_index = 3;
37593759static const size_t coro_ret_start = 4;
37603760
3761// TODO call graph analysis to find out what this number needs to be for every function
3762// MUST BE A POWER OF TWO.
3763static const size_t stack_trace_ptr_count = 32;
3761// TODO https://github.com/ziglang/zig/issues/3056
3762// We require this to be a power of 2 so that we can use shifting rather than
3763// remainder division.
3764static const size_t stack_trace_ptr_count = 32; // Must be a power of 2.
37643765
37653766#define NAMESPACE_SEP_CHAR '.'
37663767#define NAMESPACE_SEP_STR "."