authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-08-03 20:33:16-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-08-03 20:33:16-04:00
log12924477a50d37bf055fd5fc1cdf0fd77684a472
tree13c3b0e0304da5afc98f7eab745fa5ff766af630
parent87710a1cc2c4d0e7ecc309e430f7d33baadc5f02
signaturelock-open Commit is signed but in an unrecognized format.

fix regression in calling extern functions


2 files changed, 7 insertions(+), 4 deletions(-)

BRANCH_TODO+4-4
...@@ -1,13 +1,13 @@...@@ -1,13 +1,13 @@
1 * @asyncCall with an async function pointer1 * suspension points inside branching control flow
2 * go over the commented out tests
3 * error return tracing
2 * compile error for error: expected anyframe->T, found 'anyframe'4 * compile error for error: expected anyframe->T, found 'anyframe'
3 * compile error for error: expected anyframe->T, found 'i32'5 * compile error for error: expected anyframe->T, found 'i32'
4 * await of a non async function6 * await of a non async function
5 * async call on a non async function7 * async call on a non async function
6 * cancel8 * cancel
7 * defer and errdefer9 * defer and errdefer
8 * safety for double await
9 * implicit cast of normal function to async function should be allowed when it is inferred to be async10 * implicit cast of normal function to async function should be allowed when it is inferred to be async
10 * go over the commented out tests
11 * revive std.event.Loop11 * revive std.event.Loop
12 * @typeInfo for @Frame(func)12 * @typeInfo for @Frame(func)
13 * peer type resolution of *@Frame(func) and anyframe13 * peer type resolution of *@Frame(func) and anyframe
...@@ -15,7 +15,6 @@...@@ -15,7 +15,6 @@
15 * returning a value from within a suspend block15 * returning a value from within a suspend block
16 * make resuming inside a suspend block, with nothing after it, a must-tail call.16 * make resuming inside a suspend block, with nothing after it, a must-tail call.
17 * make sure there are safety tests for all the new safety features (search the new PanicFnId enum values)17 * make sure there are safety tests for all the new safety features (search the new PanicFnId enum values)
18 * error return tracing
19 * compile error for casting a function to a non-async function pointer, but then later it gets inferred to be an async function18 * compile error for casting a function to a non-async function pointer, but then later it gets inferred to be an async function
20 * compile error for copying a frame19 * compile error for copying a frame
21 * compile error for resuming a const frame pointer20 * compile error for resuming a const frame pointer
...@@ -33,3 +32,4 @@...@@ -33,3 +32,4 @@
33 - suspend32 - suspend
34 - resume33 - resume
35 - anyframe, anyframe->T34 - anyframe, anyframe->T
35 * safety for double await
src/analyze.cpp+3
...@@ -5182,6 +5182,9 @@ static Error resolve_coro_frame(CodeGen *g, ZigType *frame_type) {...@@ -5182,6 +5182,9 @@ static Error resolve_coro_frame(CodeGen *g, ZigType *frame_type) {
5182 buf_sprintf("function is not comptime-known; @asyncCall required"));5182 buf_sprintf("function is not comptime-known; @asyncCall required"));
5183 return ErrorSemanticAnalyzeFail;5183 return ErrorSemanticAnalyzeFail;
5184 }5184 }
5185 if (callee->body_node == nullptr) {
5186 continue;
5187 }
51855188
5186 analyze_fn_body(g, callee);5189 analyze_fn_body(g, callee);
5187 if (callee->anal_state == FnAnalStateInvalid) {5190 if (callee->anal_state == FnAnalStateInvalid) {