Started work on function definition TypeInfo generation.

This commit is contained in:
Alexandros Naskos
2018-04-28 19:57:59 +03:00
parent 9ba400673d
commit af73462da4
2 changed files with 52 additions and 2 deletions

View File

@@ -6494,7 +6494,19 @@ static void define_builtin_compile_vars(CodeGen *g) {
" const Data = union(enum) {\n"
" Type: type,\n"
" Var: type,\n"
" Fn: void,\n"
" Fn: FnDef,\n"
"\n"
" const FnDef = struct {\n"
" fn_type: type,\n"
" inline_type: Inline,\n"
" calling_convention: CallingConvention,\n"
"\n"
" const Inline = enum {\n"
" Auto,\n"
" Always,\n"
" Never,\n"
" };\n"
" };\n"
" };\n"
" };\n"
"};\n\n");
@@ -6508,6 +6520,10 @@ static void define_builtin_compile_vars(CodeGen *g) {
assert(CallingConventionNaked == 3);
assert(CallingConventionStdcall == 4);
assert(CallingConventionAsync == 5);
assert(FnInlineAuto == 0);
assert(FnInlineAlways == 1);
assert(FnInlineNever == 2);
}
{
buf_appendf(contents,