mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-09 15:19:07 +00:00
Merge branch 'master' of github.com:andrewrk/zig
This commit is contained in:
commit
95a7f3553d
2 changed files with 6 additions and 3 deletions
|
|
@ -1408,7 +1408,7 @@ TypeTableEntry *find_container(BlockContext *context, Buf *name) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static TypeEnumField *get_enum_field(TypeTableEntry *enum_type, Buf *name) {
|
static TypeEnumField *get_enum_field(TypeTableEntry *enum_type, Buf *name) {
|
||||||
for (int i = 0; i < enum_type->data.enumeration.field_count; i += 1) {
|
for (uint32_t i = 0; i < enum_type->data.enumeration.field_count; i += 1) {
|
||||||
TypeEnumField *type_enum_field = &enum_type->data.enumeration.fields[i];
|
TypeEnumField *type_enum_field = &enum_type->data.enumeration.fields[i];
|
||||||
if (buf_eql_buf(type_enum_field->name, name)) {
|
if (buf_eql_buf(type_enum_field->name, name)) {
|
||||||
return type_enum_field;
|
return type_enum_field;
|
||||||
|
|
@ -1418,7 +1418,7 @@ static TypeEnumField *get_enum_field(TypeTableEntry *enum_type, Buf *name) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static TypeStructField *get_struct_field(TypeTableEntry *struct_type, Buf *name) {
|
static TypeStructField *get_struct_field(TypeTableEntry *struct_type, Buf *name) {
|
||||||
for (int i = 0; i < struct_type->data.structure.field_count; i += 1) {
|
for (uint32_t i = 0; i < struct_type->data.structure.field_count; i += 1) {
|
||||||
TypeStructField *type_struct_field = &struct_type->data.structure.fields[i];
|
TypeStructField *type_struct_field = &struct_type->data.structure.fields[i];
|
||||||
if (buf_eql_buf(type_struct_field->name, name)) {
|
if (buf_eql_buf(type_struct_field->name, name)) {
|
||||||
return type_struct_field;
|
return type_struct_field;
|
||||||
|
|
@ -3561,6 +3561,7 @@ Expr *get_resolved_expr(AstNode *node) {
|
||||||
case NodeTypeStructValueField:
|
case NodeTypeStructValueField:
|
||||||
zig_unreachable();
|
zig_unreachable();
|
||||||
}
|
}
|
||||||
|
zig_unreachable();
|
||||||
}
|
}
|
||||||
|
|
||||||
NumLitCodeGen *get_resolved_num_lit(AstNode *node) {
|
NumLitCodeGen *get_resolved_num_lit(AstNode *node) {
|
||||||
|
|
@ -3607,6 +3608,7 @@ NumLitCodeGen *get_resolved_num_lit(AstNode *node) {
|
||||||
case NodeTypeArrayType:
|
case NodeTypeArrayType:
|
||||||
zig_unreachable();
|
zig_unreachable();
|
||||||
}
|
}
|
||||||
|
zig_unreachable();
|
||||||
}
|
}
|
||||||
|
|
||||||
TopLevelDecl *get_resolved_top_level_decl(AstNode *node) {
|
TopLevelDecl *get_resolved_top_level_decl(AstNode *node) {
|
||||||
|
|
@ -3654,6 +3656,7 @@ TopLevelDecl *get_resolved_top_level_decl(AstNode *node) {
|
||||||
case NodeTypeArrayType:
|
case NodeTypeArrayType:
|
||||||
zig_unreachable();
|
zig_unreachable();
|
||||||
}
|
}
|
||||||
|
zig_unreachable();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool is_node_void_expr(AstNode *node) {
|
bool is_node_void_expr(AstNode *node) {
|
||||||
|
|
|
||||||
|
|
@ -2428,7 +2428,7 @@ static void define_builtin_fns_int(CodeGen *g, TypeTableEntry *type_entry) {
|
||||||
{"sub", "ssub", "usub"},
|
{"sub", "ssub", "usub"},
|
||||||
{"mul", "smul", "umul"},
|
{"mul", "smul", "umul"},
|
||||||
};
|
};
|
||||||
for (int i = 0; i < sizeof(overflow_fns)/sizeof(overflow_fns[0]); i += 1) {
|
for (size_t i = 0; i < sizeof(overflow_fns)/sizeof(overflow_fns[0]); i += 1) {
|
||||||
OverflowFn *overflow_fn = &overflow_fns[i];
|
OverflowFn *overflow_fn = &overflow_fns[i];
|
||||||
BuiltinFnEntry *builtin_fn = allocate<BuiltinFnEntry>(1);
|
BuiltinFnEntry *builtin_fn = allocate<BuiltinFnEntry>(1);
|
||||||
buf_resize(&builtin_fn->name, 0);
|
buf_resize(&builtin_fn->name, 0);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue