@@ -27,7 +27,7 @@ static inline int store_unboxed(jl_value_t *el_type) // jl_isbits
27
27
size_t fsz = 0 , al = 0 ;
28
28
return (jl_is_leaf_type (el_type ) && jl_is_immutable (el_type ) &&
29
29
((jl_datatype_t * )el_type )-> layout &&
30
- ((jl_datatype_t * )el_type )-> layout -> npointers == 0 ) || jl_union_isbits (el_type , fsz , al );
30
+ ((jl_datatype_t * )el_type )-> layout -> npointers == 0 ) || jl_union_isbits (el_type , & fsz , & al );
31
31
}
32
32
33
33
int jl_array_store_unboxed (jl_value_t * el_type )
@@ -80,6 +80,7 @@ static jl_array_t *_new_array_(jl_value_t *atype, uint32_t ndims, size_t *dims,
80
80
}
81
81
jl_value_t * el_type = (jl_value_t * )jl_tparam0 (jl_typeof (atype ));
82
82
if (jl_is_uniontype (el_type )) {
83
+ printf ("here 3" );
83
84
// allocate an extra sel byte for each element
84
85
tot += nel ;
85
86
}
@@ -503,6 +504,7 @@ JL_DLLEXPORT jl_value_t *jl_arrayref(jl_array_t *a, size_t i)
503
504
if (!a -> flags .ptrarray ) {
504
505
jl_value_t * el_type = (jl_value_t * )jl_tparam0 (jl_typeof (a ));
505
506
if (jl_is_uniontype (el_type )) {
507
+ printf ("here 1" );
506
508
uint8_t sel = ((uint8_t * )a -> data )[jl_array_len (a ) * a -> elsize + i ];
507
509
el_type = jl_nth_union_component (el_type , sel );
508
510
if (jl_is_datatype_singleton ((jl_datatype_t * )el_type ))
@@ -568,6 +570,7 @@ JL_DLLEXPORT void jl_arrayset(jl_array_t *a, jl_value_t *rhs, size_t i)
568
570
}
569
571
if (!a -> flags .ptrarray ) {
570
572
if (jl_is_uniontype (el_type )) {
573
+ printf ("here 2" );
571
574
uint8_t * psel = & ((uint8_t * )a -> data )[jl_array_len (a ) * a -> elsize + i ];
572
575
unsigned nth = 0 ;
573
576
if (!jl_find_union_component (el_type , jl_typeof (rhs ), & nth ))
0 commit comments