Minor code clean up

This commit is contained in:
gingerBill
2019-03-11 19:52:40 +00:00
parent e781056df1
commit bdab5e00da
6 changed files with 41 additions and 22 deletions
+2 -1
View File
@@ -5439,7 +5439,8 @@ ExprKind check_call_expr(CheckerContext *c, Operand *operand, Ast *call) {
operand->mode = Addressing_NoValue;
} else {
GB_ASSERT(is_type_tuple(result_type));
switch (result_type->Tuple.variables.count) {
isize count = result_type->Tuple.variables.count;
switch (count) {
case 0:
operand->mode = Addressing_NoValue;
break;
+1
View File
@@ -2049,6 +2049,7 @@ bool check_procedure_type(CheckerContext *ctx, Type *type, Ast *proc_type_node,
type->Proc.is_polymorphic = pt->generic;
type->Proc.specialization_count = specialization_count;
type->Proc.diverging = pt->diverging;
type->Proc.tags = pt->tags;
if (param_count > 0) {
Entity *end = params->Tuple.variables[param_count-1];
-1
View File
@@ -151,7 +151,6 @@ enum ProcTag {
ProcTag_bounds_check = 1<<0,
ProcTag_no_bounds_check = 1<<1,
ProcTag_require_results = 1<<4,
ProcTag_no_context = 1<<6,
};
enum ProcCallingConvention {
+1
View File
@@ -198,6 +198,7 @@ struct TypeUnion {
bool has_proc_default_values; \
bool has_named_results; \
bool diverging; /* no return */ \
u64 tags; \
isize specialization_count; \
ProcCallingConvention calling_convention; \
}) \