mirror of
https://github.com/odin-lang/Odin.git
synced 2026-10-06 12:52:49 -04:00
Remove using in arrays; Remove _ non-exported struct fields
Start determining slow parts of the compiler
This commit is contained in:
1 parent
91b534d128
commit
cfabc0e61f
9 files changed
+299
-369
No files matched your search
+12
-1
@@ -950,7 +950,18 @@ bool is_type_valid_for_keys(Type *t) {
|
||||
|
||||
|
||||
bool is_type_indexable(Type *t) {
|
||||
return is_type_array(t) || is_type_slice(t) || is_type_vector(t) || is_type_string(t);
|
||||
Type *bt = base_type(t);
|
||||
switch (bt->kind) {
|
||||
case Type_Basic:
|
||||
return is_type_string(bt);
|
||||
case Type_Array:
|
||||
case Type_Slice:
|
||||
case Type_Vector:
|
||||
case Type_DynamicArray:
|
||||
case Type_Map:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool is_type_polymorphic_struct(Type *t) {
|
||||
|
||||
Reference in new issue
Block a user