rename value_count to member_count
rename BuiltinFnIdValueCount to BuiltinFnIdMemberCount rename value_count to member_countmaster
parent
26b9d709aa
commit
361531891f
|
@ -850,7 +850,7 @@ enum BuiltinFnId {
|
|||
BuiltinFnIdSizeof,
|
||||
BuiltinFnIdMaxValue,
|
||||
BuiltinFnIdMinValue,
|
||||
BuiltinFnIdValueCount,
|
||||
BuiltinFnIdMemberCount,
|
||||
BuiltinFnIdTypeof,
|
||||
BuiltinFnIdAddWithOverflow,
|
||||
BuiltinFnIdSubWithOverflow,
|
||||
|
|
|
@ -2702,7 +2702,7 @@ static TypeTableEntry *analyze_builtin_fn_call_expr(CodeGen *g, ImportTableEntry
|
|||
case BuiltinFnIdMinValue:
|
||||
return analyze_min_max_value(g, import, context, node,
|
||||
"no min value available for type '%s'", false);
|
||||
case BuiltinFnIdValueCount:
|
||||
case BuiltinFnIdMemberCount:
|
||||
{
|
||||
AstNode *type_node = node->data.fn_call_expr.params.at(0);
|
||||
TypeTableEntry *type_entry = analyze_type_expr(g, import, context, type_node);
|
||||
|
|
|
@ -315,7 +315,7 @@ static LLVMValueRef gen_builtin_fn_call_expr(CodeGen *g, AstNode *node) {
|
|||
zig_unreachable();
|
||||
}
|
||||
}
|
||||
case BuiltinFnIdValueCount:
|
||||
case BuiltinFnIdMemberCount:
|
||||
{
|
||||
assert(node->data.fn_call_expr.params.length == 1);
|
||||
AstNode *type_node = node->data.fn_call_expr.params.at(0);
|
||||
|
@ -2558,7 +2558,7 @@ static void define_builtin_fns(CodeGen *g) {
|
|||
create_builtin_fn_with_arg_count(g, BuiltinFnIdSizeof, "sizeof", 1);
|
||||
create_builtin_fn_with_arg_count(g, BuiltinFnIdMaxValue, "max_value", 1);
|
||||
create_builtin_fn_with_arg_count(g, BuiltinFnIdMinValue, "min_value", 1);
|
||||
create_builtin_fn_with_arg_count(g, BuiltinFnIdValueCount, "value_count", 1);
|
||||
create_builtin_fn_with_arg_count(g, BuiltinFnIdMemberCount, "member_count", 1);
|
||||
create_builtin_fn_with_arg_count(g, BuiltinFnIdTypeof, "typeof", 1);
|
||||
create_builtin_fn_with_arg_count(g, BuiltinFnIdAddWithOverflow, "add_with_overflow", 4);
|
||||
create_builtin_fn_with_arg_count(g, BuiltinFnIdSubWithOverflow, "sub_with_overflow", 4);
|
||||
|
|
|
@ -1082,11 +1082,11 @@ pub fn main(args: [][]u8) i32 => {
|
|||
print_str("BAD\n");
|
||||
}
|
||||
|
||||
if (@value_count(Foo) != 3) {
|
||||
if (@member_count(Foo) != 3) {
|
||||
print_str("BAD\n");
|
||||
}
|
||||
|
||||
if (@value_count(Bar) != 4) {
|
||||
if (@member_count(Bar) != 4) {
|
||||
print_str("BAD\n");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue