mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 23:28:48 +00:00
Merge pull request #5034 from Kelimion/yeet-tuple
Remove Type_Info_Tuple
This commit is contained in:
@@ -110,7 +110,6 @@ Type_Info_Parameters :: struct { // Only used for procedures parameters and resu
|
|||||||
types: []^Type_Info,
|
types: []^Type_Info,
|
||||||
names: []string,
|
names: []string,
|
||||||
}
|
}
|
||||||
Type_Info_Tuple :: Type_Info_Parameters // Will be removed eventually
|
|
||||||
|
|
||||||
Type_Info_Struct_Flags :: distinct bit_set[Type_Info_Struct_Flag; u8]
|
Type_Info_Struct_Flags :: distinct bit_set[Type_Info_Struct_Flag; u8]
|
||||||
Type_Info_Struct_Flag :: enum u8 {
|
Type_Info_Struct_Flag :: enum u8 {
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ Type_Kind :: enum u32le {
|
|||||||
Struct = 10,
|
Struct = 10,
|
||||||
Union = 11,
|
Union = 11,
|
||||||
Enum = 12,
|
Enum = 12,
|
||||||
Tuple = 13,
|
Parameters = 13,
|
||||||
Proc = 14,
|
Proc = 14,
|
||||||
Bit_Set = 15,
|
Bit_Set = 15,
|
||||||
Simd_Vector = 16,
|
Simd_Vector = 16,
|
||||||
@@ -256,10 +256,10 @@ Type :: struct {
|
|||||||
types: Array(Type_Index),
|
types: Array(Type_Index),
|
||||||
|
|
||||||
// Used by:
|
// Used by:
|
||||||
// .Named - 1 field for the definition
|
// .Named - 1 field for the definition
|
||||||
// .Struct - fields
|
// .Struct - fields
|
||||||
// .Enum - fields
|
// .Enum - fields
|
||||||
// .Tuple - parameters (procedures only)
|
// .Parameters - parameters (procedures only)
|
||||||
entities: Array(Entity_Index),
|
entities: Array(Entity_Index),
|
||||||
|
|
||||||
// Used By: .Struct, .Union
|
// Used By: .Struct, .Union
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ Type_Info_Enumerated_Array :: runtime.Type_Info_Enumerated_Array
|
|||||||
Type_Info_Dynamic_Array :: runtime.Type_Info_Dynamic_Array
|
Type_Info_Dynamic_Array :: runtime.Type_Info_Dynamic_Array
|
||||||
Type_Info_Slice :: runtime.Type_Info_Slice
|
Type_Info_Slice :: runtime.Type_Info_Slice
|
||||||
Type_Info_Parameters :: runtime.Type_Info_Parameters
|
Type_Info_Parameters :: runtime.Type_Info_Parameters
|
||||||
Type_Info_Tuple :: runtime.Type_Info_Parameters
|
|
||||||
Type_Info_Struct :: runtime.Type_Info_Struct
|
Type_Info_Struct :: runtime.Type_Info_Struct
|
||||||
Type_Info_Union :: runtime.Type_Info_Union
|
Type_Info_Union :: runtime.Type_Info_Union
|
||||||
Type_Info_Enum :: runtime.Type_Info_Enum
|
Type_Info_Enum :: runtime.Type_Info_Enum
|
||||||
@@ -58,7 +57,7 @@ Type_Kind :: enum {
|
|||||||
Enumerated_Array,
|
Enumerated_Array,
|
||||||
Dynamic_Array,
|
Dynamic_Array,
|
||||||
Slice,
|
Slice,
|
||||||
Tuple,
|
Parameters,
|
||||||
Struct,
|
Struct,
|
||||||
Union,
|
Union,
|
||||||
Enum,
|
Enum,
|
||||||
@@ -93,7 +92,7 @@ type_kind :: proc(T: typeid) -> Type_Kind {
|
|||||||
case Type_Info_Enumerated_Array: return .Enumerated_Array
|
case Type_Info_Enumerated_Array: return .Enumerated_Array
|
||||||
case Type_Info_Dynamic_Array: return .Dynamic_Array
|
case Type_Info_Dynamic_Array: return .Dynamic_Array
|
||||||
case Type_Info_Slice: return .Slice
|
case Type_Info_Slice: return .Slice
|
||||||
case Type_Info_Parameters: return .Tuple
|
case Type_Info_Parameters: return .Parameters
|
||||||
case Type_Info_Struct: return .Struct
|
case Type_Info_Struct: return .Struct
|
||||||
case Type_Info_Union: return .Union
|
case Type_Info_Union: return .Union
|
||||||
case Type_Info_Enum: return .Enum
|
case Type_Info_Enum: return .Enum
|
||||||
|
|||||||
@@ -348,12 +348,6 @@ is_parameters :: proc(info: ^Type_Info) -> bool {
|
|||||||
_, ok := type_info_base(info).variant.(Type_Info_Parameters)
|
_, ok := type_info_base(info).variant.(Type_Info_Parameters)
|
||||||
return ok
|
return ok
|
||||||
}
|
}
|
||||||
@(require_results, deprecated="prefer is_parameters")
|
|
||||||
is_tuple :: proc(info: ^Type_Info) -> bool {
|
|
||||||
if info == nil { return false }
|
|
||||||
_, ok := type_info_base(info).variant.(Type_Info_Parameters)
|
|
||||||
return ok
|
|
||||||
}
|
|
||||||
@(require_results)
|
@(require_results)
|
||||||
is_struct :: proc(info: ^Type_Info) -> bool {
|
is_struct :: proc(info: ^Type_Info) -> bool {
|
||||||
if info == nil { return false }
|
if info == nil { return false }
|
||||||
|
|||||||
Reference in New Issue
Block a user