| author | |
| committer | |
| log | f0f56a4a9bd416d4d6ecf9ff4766f70926715aa9 |
| tree | 1acad8ed6841dbc6d59df1327b6f44af2e9fd2c4 |
| parent | ebd8e2d6062bad96c9c1fbc0e73894a13e683831 |
| parent | 361531891f3ec3b4e55ee8b10325fe693c581918 |
rename value_count to member_count4 files changed, 6 insertions(+), 6 deletions(-)
src/all_types.hpp+1-1| ... | @@ -850,7 +850,7 @@ enum BuiltinFnId { | ... | @@ -850,7 +850,7 @@ enum BuiltinFnId { |
| 850 | BuiltinFnIdSizeof, | 850 | BuiltinFnIdSizeof, |
| 851 | BuiltinFnIdMaxValue, | 851 | BuiltinFnIdMaxValue, |
| 852 | BuiltinFnIdMinValue, | 852 | BuiltinFnIdMinValue, |
| 853 | BuiltinFnIdValueCount, | 853 | BuiltinFnIdMemberCount, |
| 854 | BuiltinFnIdTypeof, | 854 | BuiltinFnIdTypeof, |
| 855 | BuiltinFnIdAddWithOverflow, | 855 | BuiltinFnIdAddWithOverflow, |
| 856 | BuiltinFnIdSubWithOverflow, | 856 | BuiltinFnIdSubWithOverflow, |
src/analyze.cpp+1-1| ... | @@ -2702,7 +2702,7 @@ static TypeTableEntry *analyze_builtin_fn_call_expr(CodeGen *g, ImportTableEntry | ... | @@ -2702,7 +2702,7 @@ static TypeTableEntry *analyze_builtin_fn_call_expr(CodeGen *g, ImportTableEntry |
| 2702 | case BuiltinFnIdMinValue: | 2702 | case BuiltinFnIdMinValue: |
| 2703 | return analyze_min_max_value(g, import, context, node, | 2703 | return analyze_min_max_value(g, import, context, node, |
| 2704 | "no min value available for type '%s'", false); | 2704 | "no min value available for type '%s'", false); |
| 2705 | case BuiltinFnIdValueCount: | 2705 | case BuiltinFnIdMemberCount: |
| 2706 | { | 2706 | { |
| 2707 | AstNode *type_node = node->data.fn_call_expr.params.at(0); | 2707 | AstNode *type_node = node->data.fn_call_expr.params.at(0); |
| 2708 | TypeTableEntry *type_entry = analyze_type_expr(g, import, context, type_node); | 2708 | TypeTableEntry *type_entry = analyze_type_expr(g, import, context, type_node); |
src/codegen.cpp+2-2| ... | @@ -315,7 +315,7 @@ static LLVMValueRef gen_builtin_fn_call_expr(CodeGen *g, AstNode *node) { | ... | @@ -315,7 +315,7 @@ static LLVMValueRef gen_builtin_fn_call_expr(CodeGen *g, AstNode *node) { |
| 315 | zig_unreachable(); | 315 | zig_unreachable(); |
| 316 | } | 316 | } |
| 317 | } | 317 | } |
| 318 | case BuiltinFnIdValueCount: | 318 | case BuiltinFnIdMemberCount: |
| 319 | { | 319 | { |
| 320 | assert(node->data.fn_call_expr.params.length == 1); | 320 | assert(node->data.fn_call_expr.params.length == 1); |
| 321 | AstNode *type_node = node->data.fn_call_expr.params.at(0); | 321 | AstNode *type_node = node->data.fn_call_expr.params.at(0); |
| ... | @@ -2558,7 +2558,7 @@ static void define_builtin_fns(CodeGen *g) { | ... | @@ -2558,7 +2558,7 @@ static void define_builtin_fns(CodeGen *g) { |
| 2558 | create_builtin_fn_with_arg_count(g, BuiltinFnIdSizeof, "sizeof", 1); | 2558 | create_builtin_fn_with_arg_count(g, BuiltinFnIdSizeof, "sizeof", 1); |
| 2559 | create_builtin_fn_with_arg_count(g, BuiltinFnIdMaxValue, "max_value", 1); | 2559 | create_builtin_fn_with_arg_count(g, BuiltinFnIdMaxValue, "max_value", 1); |
| 2560 | create_builtin_fn_with_arg_count(g, BuiltinFnIdMinValue, "min_value", 1); | 2560 | create_builtin_fn_with_arg_count(g, BuiltinFnIdMinValue, "min_value", 1); |
| 2561 | create_builtin_fn_with_arg_count(g, BuiltinFnIdValueCount, "value_count", 1); | 2561 | create_builtin_fn_with_arg_count(g, BuiltinFnIdMemberCount, "member_count", 1); |
| 2562 | create_builtin_fn_with_arg_count(g, BuiltinFnIdTypeof, "typeof", 1); | 2562 | create_builtin_fn_with_arg_count(g, BuiltinFnIdTypeof, "typeof", 1); |
| 2563 | create_builtin_fn_with_arg_count(g, BuiltinFnIdAddWithOverflow, "add_with_overflow", 4); | 2563 | create_builtin_fn_with_arg_count(g, BuiltinFnIdAddWithOverflow, "add_with_overflow", 4); |
| 2564 | create_builtin_fn_with_arg_count(g, BuiltinFnIdSubWithOverflow, "sub_with_overflow", 4); | 2564 | create_builtin_fn_with_arg_count(g, BuiltinFnIdSubWithOverflow, "sub_with_overflow", 4); |
test/run_tests.cpp+2-2| ... | @@ -1082,11 +1082,11 @@ pub fn main(args: [][]u8) i32 => { | ... | @@ -1082,11 +1082,11 @@ pub fn main(args: [][]u8) i32 => { |
| 1082 | print_str("BAD\n"); | 1082 | print_str("BAD\n"); |
| 1083 | } | 1083 | } |
| 1084 | 1084 | ||
| 1085 | if (@value_count(Foo) != 3) { | 1085 | if (@member_count(Foo) != 3) { |
| 1086 | print_str("BAD\n"); | 1086 | print_str("BAD\n"); |
| 1087 | } | 1087 | } |
| 1088 | 1088 | ||
| 1089 | if (@value_count(Bar) != 4) { | 1089 | if (@member_count(Bar) != 4) { |
| 1090 | print_str("BAD\n"); | 1090 | print_str("BAD\n"); |
| 1091 | } | 1091 | } |
| 1092 | 1092 |