diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2025-05-21 19:37:09 +0200 |
|---|---|---|
| committer | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2025-05-21 19:37:09 +0200 |
| commit | 95183e4b9ce7f5cecf652e129ace6b7b15362167 (patch) | |
| tree | 2828e0035ee432c73ea3eb903e3f691286ede1cd /src/check_expr.cpp | |
| parent | bd4134382b6a819972255f7e044ce48c05363194 (diff) | |
Remove now unnecessary checks.
Diffstat (limited to 'src/check_expr.cpp')
| -rw-r--r-- | src/check_expr.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index 8721aab5d..95c898adf 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -5472,7 +5472,7 @@ gb_internal Entity *check_selector(CheckerContext *c, Operand *operand, Ast *nod } if (entity == nullptr && selector->kind == Ast_Ident && operand->type != nullptr && - (is_type_array(type_deref(operand->type)) || is_type_simd_vector(type_deref(operand->type)))) { + (is_type_array(type_deref(operand->type)))) { String field_name = selector->Ident.token.string; if (1 < field_name.len && field_name.len <= 4) { u8 swizzles_xyzw[4] = {'x', 'y', 'z', 'w'}; @@ -5527,7 +5527,7 @@ gb_internal Entity *check_selector(CheckerContext *c, Operand *operand, Ast *nod Type *original_type = operand->type; Type *array_type = base_type(type_deref(original_type)); - GB_ASSERT(array_type->kind == Type_Array || array_type->kind == Type_SimdVector); + GB_ASSERT(array_type->kind == Type_Array); i64 array_count = get_array_type_count(array_type); @@ -5568,10 +5568,6 @@ gb_internal Entity *check_selector(CheckerContext *c, Operand *operand, Ast *nod break; } - if (array_type->kind == Type_SimdVector) { - operand->mode = Addressing_Value; - } - Entity *swizzle_entity = alloc_entity_variable(nullptr, make_token_ident(field_name), operand->type, EntityState_Resolved); add_type_and_value(c, operand->expr, operand->mode, operand->type, operand->value); return swizzle_entity; |