mirror of
https://github.com/odin-lang/Odin.git
synced 2026-08-25 14:31:36 +00:00
Update subtype based Type_Info
This commit is contained in:
@@ -612,7 +612,7 @@ _marshal_into_encoder :: proc(e: Encoder, v: any, ti: ^runtime.Type_Info) -> (er
|
||||
case:
|
||||
panic("unknown bit_size size")
|
||||
}
|
||||
case runtime.Type_Info_Matrix:
|
||||
case ^runtime.Type_Info_Matrix:
|
||||
count := info.column_count * info.elem_stride
|
||||
err_conv(_encode_u64(e, u64(count), .Array)) or_return
|
||||
|
||||
@@ -631,7 +631,7 @@ _marshal_into_encoder :: proc(e: Encoder, v: any, ti: ^runtime.Type_Info) -> (er
|
||||
}
|
||||
return
|
||||
|
||||
case runtime.Type_Info_Simd_Vector:
|
||||
case ^runtime.Type_Info_Simd_Vector:
|
||||
err_conv(_encode_u64(e, u64(info.count), .Array)) or_return
|
||||
|
||||
if impl, ok := _tag_implementations_type[info.elem.id]; ok {
|
||||
|
||||
@@ -591,7 +591,7 @@ _unmarshal_array :: proc(d: Decoder, v: any, ti: ^reflect.Type_Info, hdr: Header
|
||||
if out_of_space { return _unsupported(v, hdr) }
|
||||
return
|
||||
|
||||
case reflect.Type_Info_Matrix:
|
||||
case ^reflect.Type_Info_Matrix:
|
||||
count := t.column_count * t.elem_stride
|
||||
length, _ := err_conv(_decode_len_container(d, add)) or_return
|
||||
if length > count {
|
||||
@@ -604,7 +604,7 @@ _unmarshal_array :: proc(d: Decoder, v: any, ti: ^reflect.Type_Info, hdr: Header
|
||||
if out_of_space { return _unsupported(v, hdr) }
|
||||
return
|
||||
|
||||
case reflect.Type_Info_Simd_Vector:
|
||||
case ^reflect.Type_Info_Simd_Vector:
|
||||
length, _ := err_conv(_decode_len_container(d, add)) or_return
|
||||
if length > t.count {
|
||||
return _unsupported(v, hdr)
|
||||
|
||||
@@ -123,7 +123,7 @@ assign_int :: proc(val: any, i: $T) -> bool {
|
||||
}
|
||||
t := runtime.type_info_base(ti)
|
||||
#partial switch info in t.variant {
|
||||
case runtime.Type_Info_Integer:
|
||||
case ^runtime.Type_Info_Integer:
|
||||
switch info.endianness {
|
||||
case .Platform: return false
|
||||
case .Little: return ODIN_ENDIAN != .Little
|
||||
|
||||
Reference in New Issue
Block a user