diff options
| author | gingerBill <bill@gingerbill.org> | 2017-12-12 18:21:40 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2017-12-12 18:21:40 +0000 |
| commit | f7e9649be466ea03f556e2918063c5a4d0d28e2e (patch) | |
| tree | 254ccca62132e5fae8af7bbf03ffe7fc5b75f0a4 /src/check_expr.cpp | |
| parent | fd1f6ec75cf7e26e2e87f84885e4166cd25cf376 (diff) | |
Disable struct field reordering (for the time being)
Diffstat (limited to 'src/check_expr.cpp')
| -rw-r--r-- | src/check_expr.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index da830aab1..b153b65a3 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -267,6 +267,8 @@ bool find_or_generate_polymorphic_procedure(Checker *c, Entity *base_entity, Typ } + gb_mutex_lock(&c->mutex); + defer (gb_mutex_unlock(&c->mutex)); auto *found_gen_procs = map_get(&c->info.gen_procs, hash_pointer(base_entity->identifier)); if (found_gen_procs) { @@ -553,7 +555,6 @@ i64 check_distance_between_types(Checker *c, Operand *operand, Type *type) { } } -#if defined(ALLOW_ARRAY_PROGRAMMING) if (is_type_array(dst)) { Type *elem = base_array_type(dst); i64 distance = check_distance_between_types(c, operand, elem); @@ -561,7 +562,6 @@ i64 check_distance_between_types(Checker *c, Operand *operand, Type *type) { return distance + 6; } } -#endif if (is_type_any(dst)) { if (!is_type_polymorphic(src)) { @@ -2235,7 +2235,6 @@ void convert_to_typed(Checker *c, Operand *operand, Type *target_type) { } break; -#if defined(ALLOW_ARRAY_PROGRAMMING) case Type_Array: { Type *elem = base_array_type(t); if (check_is_assignable_to(c, operand, elem)) { @@ -2248,7 +2247,6 @@ void convert_to_typed(Checker *c, Operand *operand, Type *target_type) { break; } -#endif case Type_Union: if (!is_operand_nil(*operand) && !is_operand_undef(*operand)) { |