support recursive async and non-async functions

which heap allocate their own frames

related: #1006
This commit is contained in:
Andrew Kelley
2019-08-30 20:06:02 -04:00
parent 2148943fff
commit 6ab8b2aab4
9 changed files with 157 additions and 23 deletions

View File

@@ -6340,9 +6340,12 @@ static LLVMValueRef gen_const_val(CodeGen *g, ConstExprValue *const_val, const c
ZigType *type_entry = const_val->type;
assert(type_has_bits(type_entry));
switch (const_val->special) {
check: switch (const_val->special) {
case ConstValSpecialLazy:
zig_unreachable();
if ((err = ir_resolve_lazy(g, nullptr, const_val))) {
report_errors_and_exit(g);
}
goto check;
case ConstValSpecialRuntime:
zig_unreachable();
case ConstValSpecialUndef: