authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-01-06 15:23:05-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-01-06 15:23:05-05:00
log5951b79af40212754071157596b8aebbe2414ffb
tree9e2377dddfec47701210dd4135d0c0f1de12926d
parent0a9daeb37e997ff75dcd16d1fc3b4cc143314e85
signaturelock-open Commit is signed but in an unrecognized format.

remove stdcallcc, extern, nakedcc from stage1; zig fmt rewrites


10 files changed, 31 insertions(+), 52 deletions(-)

lib/std/builtin.zig-1
...@@ -322,7 +322,6 @@ pub const TypeInfo = union(enum) {...@@ -322,7 +322,6 @@ pub const TypeInfo = union(enum) {
322 pub const FnDecl = struct {322 pub const FnDecl = struct {
323 fn_type: type,323 fn_type: type,
324 inline_type: Inline,324 inline_type: Inline,
325 calling_convention: CallingConvention,
326 is_var_args: bool,325 is_var_args: bool,
327 is_extern: bool,326 is_extern: bool,
328 is_export: bool,327 is_export: bool,
lib/std/zig/parser_test.zig+3-1
...@@ -10,13 +10,15 @@ test "zig fmt: change @typeOf to @TypeOf" {...@@ -10,13 +10,15 @@ test "zig fmt: change @typeOf to @TypeOf" {
10}10}
1111
12// TODO: Remove nakedcc/stdcallcc once zig 0.6.0 is released. See https://github.com/ziglang/zig/pull/397712// TODO: Remove nakedcc/stdcallcc once zig 0.6.0 is released. See https://github.com/ziglang/zig/pull/3977
13test "zig fmt: convert nakedcc/stdcallcc into callconv(...)" {13test "zig fmt: convert extern/nakedcc/stdcallcc into callconv(...)" {
14 try testTransform(14 try testTransform(
15 \\nakedcc fn foo1() void {}15 \\nakedcc fn foo1() void {}
16 \\stdcallcc fn foo2() void {}16 \\stdcallcc fn foo2() void {}
17 \\extern fn foo3() void {}
17 ,18 ,
18 \\fn foo1() callconv(.Naked) void {}19 \\fn foo1() callconv(.Naked) void {}
19 \\fn foo2() callconv(.Stdcall) void {}20 \\fn foo2() callconv(.Stdcall) void {}
21 \\fn foo3() callconv(.C) void {}
20 \\22 \\
21 );23 );
22}24}
lib/std/zig/render.zig+10-5
...@@ -1311,17 +1311,22 @@ fn renderExpression(...@@ -1311,17 +1311,22 @@ fn renderExpression(
1311 try renderToken(tree, stream, visib_token_index, indent, start_col, Space.Space); // pub1311 try renderToken(tree, stream, visib_token_index, indent, start_col, Space.Space); // pub
1312 }1312 }
13131313
1314 // Some extra machinery is needed to rewrite the old-style cc
1315 // notation to the new callconv one
1316 var cc_rewrite_str: ?[*:0]const u8 = null;
1314 if (fn_proto.extern_export_inline_token) |extern_export_inline_token| {1317 if (fn_proto.extern_export_inline_token) |extern_export_inline_token| {
1315 try renderToken(tree, stream, extern_export_inline_token, indent, start_col, Space.Space); // extern/export1318 const tok = tree.tokens.at(extern_export_inline_token);
1319 if (tok.id != .Keyword_extern or fn_proto.body_node == null) {
1320 try renderToken(tree, stream, extern_export_inline_token, indent, start_col, Space.Space); // extern/export
1321 } else {
1322 cc_rewrite_str = ".C";
1323 }
1316 }1324 }
13171325
1318 if (fn_proto.lib_name) |lib_name| {1326 if (fn_proto.lib_name) |lib_name| {
1319 try renderExpression(allocator, stream, tree, indent, start_col, lib_name, Space.Space);1327 try renderExpression(allocator, stream, tree, indent, start_col, lib_name, Space.Space);
1320 }1328 }
13211329
1322 // Some extra machinery is needed to rewrite the old-style cc
1323 // notation to the new callconv one
1324 var cc_rewrite_str: ?[*:0]const u8 = null;
1325 if (fn_proto.cc_token) |cc_token| {1330 if (fn_proto.cc_token) |cc_token| {
1326 var str = tree.tokenSlicePtr(tree.tokens.at(cc_token));1331 var str = tree.tokenSlicePtr(tree.tokens.at(cc_token));
1327 if (mem.eql(u8, str, "stdcallcc")) {1332 if (mem.eql(u8, str, "stdcallcc")) {
...@@ -1405,7 +1410,7 @@ fn renderExpression(...@@ -1405,7 +1410,7 @@ fn renderExpression(
1405 const callconv_lparen = tree.prevToken(callconv_expr.firstToken());1410 const callconv_lparen = tree.prevToken(callconv_expr.firstToken());
1406 const callconv_kw = tree.prevToken(callconv_lparen);1411 const callconv_kw = tree.prevToken(callconv_lparen);
14071412
1408 try renderToken(tree, stream, callconv_kw, indent, start_col, Space.None); // section1413 try renderToken(tree, stream, callconv_kw, indent, start_col, Space.None); // callconv
1409 try renderToken(tree, stream, callconv_lparen, indent, start_col, Space.None); // (1414 try renderToken(tree, stream, callconv_lparen, indent, start_col, Space.None); // (
1410 try renderExpression(allocator, stream, tree, indent, start_col, callconv_expr, Space.None);1415 try renderExpression(allocator, stream, tree, indent, start_col, callconv_expr, Space.None);
1411 try renderToken(tree, stream, callconv_rparen, indent, start_col, Space.Space); // )1416 try renderToken(tree, stream, callconv_rparen, indent, start_col, Space.Space); // )
src/all_types.hpp-3
...@@ -653,8 +653,6 @@ struct AstNodeFnProto {...@@ -653,8 +653,6 @@ struct AstNodeFnProto {
653 Buf doc_comments;653 Buf doc_comments;
654654
655 FnInline fn_inline;655 FnInline fn_inline;
656 bool is_nakedcc;
657 bool is_stdcallcc;
658 bool is_async;656 bool is_async;
659657
660 VisibMod visib_mod;658 VisibMod visib_mod;
...@@ -1610,7 +1608,6 @@ struct ZigFn {...@@ -1610,7 +1608,6 @@ struct ZigFn {
1610 Buf **param_names;1608 Buf **param_names;
1611 IrInstruction *err_code_spill;1609 IrInstruction *err_code_spill;
1612 AstNode *assumed_non_async;1610 AstNode *assumed_non_async;
1613 CallingConvention cc;
16141611
1615 AstNode *fn_no_inline_set_node;1612 AstNode *fn_no_inline_set_node;
1616 AstNode *fn_static_eval_set_node;1613 AstNode *fn_static_eval_set_node;
src/analyze.cpp+10-12
...@@ -1451,8 +1451,6 @@ ZigType *analyze_type_expr(CodeGen *g, Scope *scope, AstNode *node) {...@@ -1451,8 +1451,6 @@ ZigType *analyze_type_expr(CodeGen *g, Scope *scope, AstNode *node) {
1451ZigType *get_generic_fn_type(CodeGen *g, FnTypeId *fn_type_id) {1451ZigType *get_generic_fn_type(CodeGen *g, FnTypeId *fn_type_id) {
1452 ZigType *fn_type = new_type_table_entry(ZigTypeIdFn);1452 ZigType *fn_type = new_type_table_entry(ZigTypeIdFn);
1453 buf_resize(&fn_type->name, 0);1453 buf_resize(&fn_type->name, 0);
1454 if (fn_type->data.fn.fn_type_id.cc == CallingConventionC)
1455 buf_append_str(&fn_type->name, "extern ");
1456 buf_appendf(&fn_type->name, "fn(");1454 buf_appendf(&fn_type->name, "fn(");
1457 size_t i = 0;1455 size_t i = 0;
1458 for (; i < fn_type_id->next_param_index; i += 1) {1456 for (; i < fn_type_id->next_param_index; i += 1) {
...@@ -1465,7 +1463,7 @@ ZigType *get_generic_fn_type(CodeGen *g, FnTypeId *fn_type_id) {...@@ -1465,7 +1463,7 @@ ZigType *get_generic_fn_type(CodeGen *g, FnTypeId *fn_type_id) {
1465 buf_appendf(&fn_type->name, "%svar", comma_str);1463 buf_appendf(&fn_type->name, "%svar", comma_str);
1466 }1464 }
1467 buf_append_str(&fn_type->name, ")");1465 buf_append_str(&fn_type->name, ")");
1468 if (fn_type_id->cc != CallingConventionUnspecified && fn_type_id->cc != CallingConventionC) {1466 if (fn_type_id->cc != CallingConventionUnspecified) {
1469 buf_appendf(&fn_type->name, " callconv(%s)", calling_convention_name(fn_type_id->cc));1467 buf_appendf(&fn_type->name, " callconv(%s)", calling_convention_name(fn_type_id->cc));
1470 }1468 }
1471 buf_append_str(&fn_type->name, " var");1469 buf_append_str(&fn_type->name, " var");
...@@ -1479,10 +1477,6 @@ ZigType *get_generic_fn_type(CodeGen *g, FnTypeId *fn_type_id) {...@@ -1479,10 +1477,6 @@ ZigType *get_generic_fn_type(CodeGen *g, FnTypeId *fn_type_id) {
1479}1477}
14801478
1481CallingConvention cc_from_fn_proto(AstNodeFnProto *fn_proto) {1479CallingConvention cc_from_fn_proto(AstNodeFnProto *fn_proto) {
1482 if (fn_proto->is_nakedcc)
1483 return CallingConventionNaked;
1484 if (fn_proto->is_stdcallcc)
1485 return CallingConventionStdcall;
1486 if (fn_proto->is_async)1480 if (fn_proto->is_async)
1487 return CallingConventionAsync;1481 return CallingConventionAsync;
1488 // Compatible with the C ABI1482 // Compatible with the C ABI
...@@ -1764,13 +1758,15 @@ ZigType *get_auto_err_set_type(CodeGen *g, ZigFn *fn_entry) {...@@ -1764,13 +1758,15 @@ ZigType *get_auto_err_set_type(CodeGen *g, ZigFn *fn_entry) {
1764 return err_set_type;1758 return err_set_type;
1765}1759}
17661760
1767static ZigType *analyze_fn_type(CodeGen *g, AstNode *proto_node, Scope *child_scope, ZigFn *fn_entry) {1761static ZigType *analyze_fn_type(CodeGen *g, AstNode *proto_node, Scope *child_scope, ZigFn *fn_entry,
1762 CallingConvention cc)
1763{
1768 assert(proto_node->type == NodeTypeFnProto);1764 assert(proto_node->type == NodeTypeFnProto);
1769 AstNodeFnProto *fn_proto = &proto_node->data.fn_proto;1765 AstNodeFnProto *fn_proto = &proto_node->data.fn_proto;
1770 Error err;1766 Error err;
17711767
1772 FnTypeId fn_type_id = {0};1768 FnTypeId fn_type_id = {0};
1773 init_fn_type_id(&fn_type_id, proto_node, fn_entry->cc, proto_node->data.fn_proto.params.length);1769 init_fn_type_id(&fn_type_id, proto_node, cc, proto_node->data.fn_proto.params.length);
17741770
1775 for (; fn_type_id.next_param_index < fn_type_id.param_count; fn_type_id.next_param_index += 1) {1771 for (; fn_type_id.next_param_index < fn_type_id.param_count; fn_type_id.next_param_index += 1) {
1776 AstNode *param_node = fn_proto->params.at(fn_type_id.next_param_index);1772 AstNode *param_node = fn_proto->params.at(fn_type_id.next_param_index);
...@@ -3432,7 +3428,7 @@ static void resolve_decl_fn(CodeGen *g, TldFn *tld_fn) {...@@ -3432,7 +3428,7 @@ static void resolve_decl_fn(CodeGen *g, TldFn *tld_fn) {
34323428
3433 Scope *child_scope = fn_table_entry->fndef_scope ? &fn_table_entry->fndef_scope->base : tld_fn->base.parent_scope;3429 Scope *child_scope = fn_table_entry->fndef_scope ? &fn_table_entry->fndef_scope->base : tld_fn->base.parent_scope;
34343430
3435 fn_table_entry->cc = cc_from_fn_proto(fn_proto);3431 CallingConvention cc;
3436 if (fn_proto->callconv_expr != nullptr) {3432 if (fn_proto->callconv_expr != nullptr) {
3437 ZigType *cc_enum_value = get_builtin_type(g, "CallingConvention");3433 ZigType *cc_enum_value = get_builtin_type(g, "CallingConvention");
34383434
...@@ -3444,7 +3440,9 @@ static void resolve_decl_fn(CodeGen *g, TldFn *tld_fn) {...@@ -3444,7 +3440,9 @@ static void resolve_decl_fn(CodeGen *g, TldFn *tld_fn) {
3444 return;3440 return;
3445 }3441 }
34463442
3447 fn_table_entry->cc = (CallingConvention)bigint_as_u32(&result_val->data.x_enum_tag);3443 cc = (CallingConvention)bigint_as_u32(&result_val->data.x_enum_tag);
3444 } else {
3445 cc = cc_from_fn_proto(fn_proto);
3448 }3446 }
34493447
3450 if (fn_proto->section_expr != nullptr) {3448 if (fn_proto->section_expr != nullptr) {
...@@ -3455,7 +3453,7 @@ static void resolve_decl_fn(CodeGen *g, TldFn *tld_fn) {...@@ -3455,7 +3453,7 @@ static void resolve_decl_fn(CodeGen *g, TldFn *tld_fn) {
3455 }3453 }
3456 }3454 }
34573455
3458 fn_table_entry->type_entry = analyze_fn_type(g, source_node, child_scope, fn_table_entry);3456 fn_table_entry->type_entry = analyze_fn_type(g, source_node, child_scope, fn_table_entry, cc);
34593457
3460 if (type_is_invalid(fn_table_entry->type_entry)) {3458 if (type_is_invalid(fn_table_entry->type_entry)) {
3461 tld_fn->base.resolution = TldResolutionInvalid;3459 tld_fn->base.resolution = TldResolutionInvalid;
src/codegen.cpp+1-1
...@@ -519,7 +519,7 @@ static LLVMValueRef make_fn_llvm_value(CodeGen *g, ZigFn *fn) {...@@ -519,7 +519,7 @@ static LLVMValueRef make_fn_llvm_value(CodeGen *g, ZigFn *fn) {
519 if (cc == CallingConventionNaked) {519 if (cc == CallingConventionNaked) {
520 addLLVMFnAttr(llvm_fn, "naked");520 addLLVMFnAttr(llvm_fn, "naked");
521 } else {521 } else {
522 ZigLLVMFunctionSetCallingConv(llvm_fn, get_llvm_cc(g, fn_type->data.fn.fn_type_id.cc));522 ZigLLVMFunctionSetCallingConv(llvm_fn, get_llvm_cc(g, cc));
523 }523 }
524524
525 bool want_cold = fn->is_cold || cc == CallingConventionCold;525 bool want_cold = fn->is_cold || cc == CallingConventionCold;
src/ir.cpp+6-12
...@@ -18263,7 +18263,6 @@ static IrInstruction *ir_analyze_fn_call(IrAnalyze *ira, IrInstruction *source_i...@@ -18263,7 +18263,6 @@ static IrInstruction *ir_analyze_fn_call(IrAnalyze *ira, IrInstruction *source_i
18263 buf_init_from_buf(&impl_fn->symbol_name, &fn_entry->symbol_name);18263 buf_init_from_buf(&impl_fn->symbol_name, &fn_entry->symbol_name);
18264 impl_fn->fndef_scope = create_fndef_scope(ira->codegen, impl_fn->body_node, parent_scope, impl_fn);18264 impl_fn->fndef_scope = create_fndef_scope(ira->codegen, impl_fn->body_node, parent_scope, impl_fn);
18265 impl_fn->child_scope = &impl_fn->fndef_scope->base;18265 impl_fn->child_scope = &impl_fn->fndef_scope->base;
18266 impl_fn->cc = fn_entry->cc;
18267 FnTypeId inst_fn_type_id = {0};18266 FnTypeId inst_fn_type_id = {0};
18268 init_fn_type_id(&inst_fn_type_id, fn_proto_node, fn_type_id->cc, new_fn_arg_count);18267 init_fn_type_id(&inst_fn_type_id, fn_proto_node, fn_type_id->cc, new_fn_arg_count);
18269 inst_fn_type_id.param_count = 0;18268 inst_fn_type_id.param_count = 0;
...@@ -22599,29 +22598,24 @@ static Error ir_make_type_info_decls(IrAnalyze *ira, IrInstruction *source_instr...@@ -22599,29 +22598,24 @@ static Error ir_make_type_info_decls(IrAnalyze *ira, IrInstruction *source_instr
22599 fn_decl_fields[1]->special = ConstValSpecialStatic;22598 fn_decl_fields[1]->special = ConstValSpecialStatic;
22600 fn_decl_fields[1]->type = type_info_fn_decl_inline_type;22599 fn_decl_fields[1]->type = type_info_fn_decl_inline_type;
22601 bigint_init_unsigned(&fn_decl_fields[1]->data.x_enum_tag, fn_entry->fn_inline);22600 bigint_init_unsigned(&fn_decl_fields[1]->data.x_enum_tag, fn_entry->fn_inline);
22602 // calling_convention: TypeInfo.CallingConvention
22603 ensure_field_index(fn_decl_val->type, "calling_convention", 2);
22604 fn_decl_fields[2]->special = ConstValSpecialStatic;
22605 fn_decl_fields[2]->type = get_builtin_type(ira->codegen, "CallingConvention");
22606 bigint_init_unsigned(&fn_decl_fields[2]->data.x_enum_tag, fn_entry->cc);
22607 // is_var_args: bool22601 // is_var_args: bool
22608 ensure_field_index(fn_decl_val->type, "is_var_args", 3);22602 ensure_field_index(fn_decl_val->type, "is_var_args", 2);
22609 bool is_varargs = fn_node->is_var_args;22603 bool is_varargs = fn_node->is_var_args;
22610 fn_decl_fields[3]->special = ConstValSpecialStatic;22604 fn_decl_fields[3]->special = ConstValSpecialStatic;
22611 fn_decl_fields[3]->type = ira->codegen->builtin_types.entry_bool;22605 fn_decl_fields[3]->type = ira->codegen->builtin_types.entry_bool;
22612 fn_decl_fields[3]->data.x_bool = is_varargs;22606 fn_decl_fields[3]->data.x_bool = is_varargs;
22613 // is_extern: bool22607 // is_extern: bool
22614 ensure_field_index(fn_decl_val->type, "is_extern", 4);22608 ensure_field_index(fn_decl_val->type, "is_extern", 3);
22615 fn_decl_fields[4]->special = ConstValSpecialStatic;22609 fn_decl_fields[4]->special = ConstValSpecialStatic;
22616 fn_decl_fields[4]->type = ira->codegen->builtin_types.entry_bool;22610 fn_decl_fields[4]->type = ira->codegen->builtin_types.entry_bool;
22617 fn_decl_fields[4]->data.x_bool = fn_node->is_extern;22611 fn_decl_fields[4]->data.x_bool = fn_node->is_extern;
22618 // is_export: bool22612 // is_export: bool
22619 ensure_field_index(fn_decl_val->type, "is_export", 5);22613 ensure_field_index(fn_decl_val->type, "is_export", 4);
22620 fn_decl_fields[5]->special = ConstValSpecialStatic;22614 fn_decl_fields[5]->special = ConstValSpecialStatic;
22621 fn_decl_fields[5]->type = ira->codegen->builtin_types.entry_bool;22615 fn_decl_fields[5]->type = ira->codegen->builtin_types.entry_bool;
22622 fn_decl_fields[5]->data.x_bool = fn_node->is_export;22616 fn_decl_fields[5]->data.x_bool = fn_node->is_export;
22623 // lib_name: ?[]const u822617 // lib_name: ?[]const u8
22624 ensure_field_index(fn_decl_val->type, "lib_name", 6);22618 ensure_field_index(fn_decl_val->type, "lib_name", 5);
22625 fn_decl_fields[6]->special = ConstValSpecialStatic;22619 fn_decl_fields[6]->special = ConstValSpecialStatic;
22626 ZigType *u8_ptr = get_pointer_to_type_extra(22620 ZigType *u8_ptr = get_pointer_to_type_extra(
22627 ira->codegen, ira->codegen->builtin_types.entry_u8,22621 ira->codegen, ira->codegen->builtin_types.entry_u8,
...@@ -22637,12 +22631,12 @@ static Error ir_make_type_info_decls(IrAnalyze *ira, IrInstruction *source_instr...@@ -22637,12 +22631,12 @@ static Error ir_make_type_info_decls(IrAnalyze *ira, IrInstruction *source_instr
22637 fn_decl_fields[6]->data.x_optional = nullptr;22631 fn_decl_fields[6]->data.x_optional = nullptr;
22638 }22632 }
22639 // return_type: type22633 // return_type: type
22640 ensure_field_index(fn_decl_val->type, "return_type", 7);22634 ensure_field_index(fn_decl_val->type, "return_type", 6);
22641 fn_decl_fields[7]->special = ConstValSpecialStatic;22635 fn_decl_fields[7]->special = ConstValSpecialStatic;
22642 fn_decl_fields[7]->type = ira->codegen->builtin_types.entry_type;22636 fn_decl_fields[7]->type = ira->codegen->builtin_types.entry_type;
22643 fn_decl_fields[7]->data.x_type = fn_entry->type_entry->data.fn.fn_type_id.return_type;22637 fn_decl_fields[7]->data.x_type = fn_entry->type_entry->data.fn.fn_type_id.return_type;
22644 // arg_names: [][] const u822638 // arg_names: [][] const u8
22645 ensure_field_index(fn_decl_val->type, "arg_names", 8);22639 ensure_field_index(fn_decl_val->type, "arg_names", 7);
22646 size_t fn_arg_count = fn_entry->variable_list.length;22640 size_t fn_arg_count = fn_entry->variable_list.length;
22647 ZigValue *fn_arg_name_array = create_const_vals(1);22641 ZigValue *fn_arg_name_array = create_const_vals(1);
22648 fn_arg_name_array->special = ConstValSpecialStatic;22642 fn_arg_name_array->special = ConstValSpecialStatic;
src/parser.cpp+1-11
...@@ -2117,20 +2117,10 @@ static AstNode *ast_parse_callconv(ParseContext *pc) {...@@ -2117,20 +2117,10 @@ static AstNode *ast_parse_callconv(ParseContext *pc) {
2117}2117}
21182118
2119// FnCC2119// FnCC
2120// <- KEYWORD_nakedcc2120// <- KEYWORD_extern
2121// / KEYWORD_stdcallcc
2122// / KEYWORD_extern
2123// / KEYWORD_async2121// / KEYWORD_async
2124static Optional<AstNodeFnProto> ast_parse_fn_cc(ParseContext *pc) {2122static Optional<AstNodeFnProto> ast_parse_fn_cc(ParseContext *pc) {
2125 AstNodeFnProto res = {};2123 AstNodeFnProto res = {};
2126 if (eat_token_if(pc, TokenIdKeywordNakedCC) != nullptr) {
2127 res.is_nakedcc = true;
2128 return Optional<AstNodeFnProto>::some(res);
2129 }
2130 if (eat_token_if(pc, TokenIdKeywordStdcallCC) != nullptr) {
2131 res.is_stdcallcc = true;
2132 return Optional<AstNodeFnProto>::some(res);
2133 }
2134 if (eat_token_if(pc, TokenIdKeywordAsync) != nullptr) {2124 if (eat_token_if(pc, TokenIdKeywordAsync) != nullptr) {
2135 res.is_async = true;2125 res.is_async = true;
2136 return Optional<AstNodeFnProto>::some(res);2126 return Optional<AstNodeFnProto>::some(res);
src/tokenizer.cpp-4
...@@ -127,7 +127,6 @@ static const struct ZigKeyword zig_keywords[] = {...@@ -127,7 +127,6 @@ static const struct ZigKeyword zig_keywords[] = {
127 {"for", TokenIdKeywordFor},127 {"for", TokenIdKeywordFor},
128 {"if", TokenIdKeywordIf},128 {"if", TokenIdKeywordIf},
129 {"inline", TokenIdKeywordInline},129 {"inline", TokenIdKeywordInline},
130 {"nakedcc", TokenIdKeywordNakedCC},
131 {"noalias", TokenIdKeywordNoAlias},130 {"noalias", TokenIdKeywordNoAlias},
132 {"noasync", TokenIdKeywordNoAsync},131 {"noasync", TokenIdKeywordNoAsync},
133 {"noinline", TokenIdKeywordNoInline},132 {"noinline", TokenIdKeywordNoInline},
...@@ -139,7 +138,6 @@ static const struct ZigKeyword zig_keywords[] = {...@@ -139,7 +138,6 @@ static const struct ZigKeyword zig_keywords[] = {
139 {"resume", TokenIdKeywordResume},138 {"resume", TokenIdKeywordResume},
140 {"return", TokenIdKeywordReturn},139 {"return", TokenIdKeywordReturn},
141 {"linksection", TokenIdKeywordLinkSection},140 {"linksection", TokenIdKeywordLinkSection},
142 {"stdcallcc", TokenIdKeywordStdcallCC},
143 {"struct", TokenIdKeywordStruct},141 {"struct", TokenIdKeywordStruct},
144 {"suspend", TokenIdKeywordSuspend},142 {"suspend", TokenIdKeywordSuspend},
145 {"switch", TokenIdKeywordSwitch},143 {"switch", TokenIdKeywordSwitch},
...@@ -1562,7 +1560,6 @@ const char * token_name(TokenId id) {...@@ -1562,7 +1560,6 @@ const char * token_name(TokenId id) {
1562 case TokenIdKeywordFor: return "for";1560 case TokenIdKeywordFor: return "for";
1563 case TokenIdKeywordIf: return "if";1561 case TokenIdKeywordIf: return "if";
1564 case TokenIdKeywordInline: return "inline";1562 case TokenIdKeywordInline: return "inline";
1565 case TokenIdKeywordNakedCC: return "nakedcc";
1566 case TokenIdKeywordNoAlias: return "noalias";1563 case TokenIdKeywordNoAlias: return "noalias";
1567 case TokenIdKeywordNoAsync: return "noasync";1564 case TokenIdKeywordNoAsync: return "noasync";
1568 case TokenIdKeywordNoInline: return "noinline";1565 case TokenIdKeywordNoInline: return "noinline";
...@@ -1573,7 +1570,6 @@ const char * token_name(TokenId id) {...@@ -1573,7 +1570,6 @@ const char * token_name(TokenId id) {
1573 case TokenIdKeywordPub: return "pub";1570 case TokenIdKeywordPub: return "pub";
1574 case TokenIdKeywordReturn: return "return";1571 case TokenIdKeywordReturn: return "return";
1575 case TokenIdKeywordLinkSection: return "linksection";1572 case TokenIdKeywordLinkSection: return "linksection";
1576 case TokenIdKeywordStdcallCC: return "stdcallcc";
1577 case TokenIdKeywordStruct: return "struct";1573 case TokenIdKeywordStruct: return "struct";
1578 case TokenIdKeywordSwitch: return "switch";1574 case TokenIdKeywordSwitch: return "switch";
1579 case TokenIdKeywordTest: return "test";1575 case TokenIdKeywordTest: return "test";
src/tokenizer.hpp-2
...@@ -77,7 +77,6 @@ enum TokenId {...@@ -77,7 +77,6 @@ enum TokenId {
77 TokenIdKeywordInline,77 TokenIdKeywordInline,
78 TokenIdKeywordNoInline,78 TokenIdKeywordNoInline,
79 TokenIdKeywordLinkSection,79 TokenIdKeywordLinkSection,
80 TokenIdKeywordNakedCC,
81 TokenIdKeywordNoAlias,80 TokenIdKeywordNoAlias,
82 TokenIdKeywordNoAsync,81 TokenIdKeywordNoAsync,
83 TokenIdKeywordNull,82 TokenIdKeywordNull,
...@@ -87,7 +86,6 @@ enum TokenId {...@@ -87,7 +86,6 @@ enum TokenId {
87 TokenIdKeywordPub,86 TokenIdKeywordPub,
88 TokenIdKeywordResume,87 TokenIdKeywordResume,
89 TokenIdKeywordReturn,88 TokenIdKeywordReturn,
90 TokenIdKeywordStdcallCC,
91 TokenIdKeywordStruct,89 TokenIdKeywordStruct,
92 TokenIdKeywordSuspend,90 TokenIdKeywordSuspend,
93 TokenIdKeywordSwitch,91 TokenIdKeywordSwitch,