@@ -2064,7 +2064,8 @@ STATIC_INLINE void gc_mark_objarray(jl_ptls_t ptls, jl_value_t *obj_parent, jl_v
2064
2064
// the first young object before starting this chunk
2065
2065
// (this also would be valid for young objects, but probably less beneficial)
2066
2066
for (; obj_begin < obj_end ; obj_begin += step ) {
2067
- new_obj = * obj_begin ;
2067
+ jl_value_t * * slot = obj_begin ;
2068
+ new_obj = * slot ;
2068
2069
if (new_obj != NULL ) {
2069
2070
verify_parent2 ("obj array" , obj_parent , obj_begin , "elem(%d)" ,
2070
2071
gc_slot_to_arrayidx (obj_parent , obj_begin ));
@@ -2073,7 +2074,7 @@ STATIC_INLINE void gc_mark_objarray(jl_ptls_t ptls, jl_value_t *obj_parent, jl_v
2073
2074
nptr |= 1 ;
2074
2075
if (!gc_marked (o -> header ))
2075
2076
break ;
2076
- gc_heap_snapshot_record_array_edge (obj_parent , & new_obj );
2077
+ gc_heap_snapshot_record_array_edge (obj_parent , slot );
2077
2078
}
2078
2079
}
2079
2080
}
@@ -2095,13 +2096,14 @@ STATIC_INLINE void gc_mark_objarray(jl_ptls_t ptls, jl_value_t *obj_parent, jl_v
2095
2096
}
2096
2097
}
2097
2098
for (; obj_begin < scan_end ; obj_begin += step ) {
2099
+ jl_value_t * * slot = obj_begin ;
2098
2100
new_obj = * obj_begin ;
2099
2101
if (new_obj != NULL ) {
2100
2102
verify_parent2 ("obj array" , obj_parent , obj_begin , "elem(%d)" ,
2101
2103
gc_slot_to_arrayidx (obj_parent , obj_begin ));
2102
2104
gc_assert_parent_validity (obj_parent , new_obj );
2103
2105
gc_try_claim_and_push (mq , new_obj , & nptr );
2104
- gc_heap_snapshot_record_array_edge (obj_parent , & new_obj );
2106
+ gc_heap_snapshot_record_array_edge (obj_parent , slot );
2105
2107
}
2106
2108
}
2107
2109
if (too_big ) {
@@ -2132,7 +2134,8 @@ STATIC_INLINE void gc_mark_array8(jl_ptls_t ptls, jl_value_t *ary8_parent, jl_va
2132
2134
for (; ary8_begin < ary8_end ; ary8_begin += elsize ) {
2133
2135
int early_end = 0 ;
2134
2136
for (uint8_t * pindex = elem_begin ; pindex < elem_end ; pindex ++ ) {
2135
- new_obj = ary8_begin [* pindex ];
2137
+ jl_value_t * * slot = & ary8_begin [* pindex ];
2138
+ new_obj = * slot ;
2136
2139
if (new_obj != NULL ) {
2137
2140
verify_parent2 ("array" , ary8_parent , & new_obj , "elem(%d)" ,
2138
2141
gc_slot_to_arrayidx (ary8_parent , ary8_begin ));
@@ -2143,7 +2146,7 @@ STATIC_INLINE void gc_mark_array8(jl_ptls_t ptls, jl_value_t *ary8_parent, jl_va
2143
2146
early_end = 1 ;
2144
2147
break ;
2145
2148
}
2146
- gc_heap_snapshot_record_array_edge (ary8_parent , & new_obj );
2149
+ gc_heap_snapshot_record_array_edge (ary8_parent , slot );
2147
2150
}
2148
2151
}
2149
2152
if (early_end )
@@ -2169,13 +2172,14 @@ STATIC_INLINE void gc_mark_array8(jl_ptls_t ptls, jl_value_t *ary8_parent, jl_va
2169
2172
}
2170
2173
for (; ary8_begin < ary8_end ; ary8_begin += elsize ) {
2171
2174
for (uint8_t * pindex = elem_begin ; pindex < elem_end ; pindex ++ ) {
2172
- new_obj = ary8_begin [* pindex ];
2175
+ jl_value_t * * slot = & ary8_begin [* pindex ];
2176
+ new_obj = * slot ;
2173
2177
if (new_obj != NULL ) {
2174
2178
verify_parent2 ("array" , ary8_parent , & new_obj , "elem(%d)" ,
2175
2179
gc_slot_to_arrayidx (ary8_parent , ary8_begin ));
2176
2180
gc_assert_parent_validity (ary8_parent , new_obj );
2177
2181
gc_try_claim_and_push (mq , new_obj , & nptr );
2178
- gc_heap_snapshot_record_array_edge (ary8_parent , & new_obj );
2182
+ gc_heap_snapshot_record_array_edge (ary8_parent , slot );
2179
2183
}
2180
2184
}
2181
2185
}
@@ -2207,7 +2211,8 @@ STATIC_INLINE void gc_mark_array16(jl_ptls_t ptls, jl_value_t *ary16_parent, jl_
2207
2211
for (; ary16_begin < ary16_end ; ary16_begin += elsize ) {
2208
2212
int early_end = 0 ;
2209
2213
for (uint16_t * pindex = elem_begin ; pindex < elem_end ; pindex ++ ) {
2210
- new_obj = ary16_begin [* pindex ];
2214
+ jl_value_t * * slot = & ary16_begin [* pindex ];
2215
+ new_obj = * slot ;
2211
2216
if (new_obj != NULL ) {
2212
2217
verify_parent2 ("array" , ary16_parent , & new_obj , "elem(%d)" ,
2213
2218
gc_slot_to_arrayidx (ary16_parent , ary16_begin ));
@@ -2218,7 +2223,7 @@ STATIC_INLINE void gc_mark_array16(jl_ptls_t ptls, jl_value_t *ary16_parent, jl_
2218
2223
early_end = 1 ;
2219
2224
break ;
2220
2225
}
2221
- gc_heap_snapshot_record_array_edge (ary16_parent , & new_obj );
2226
+ gc_heap_snapshot_record_array_edge (ary16_parent , slot );
2222
2227
}
2223
2228
}
2224
2229
if (early_end )
@@ -2244,13 +2249,14 @@ STATIC_INLINE void gc_mark_array16(jl_ptls_t ptls, jl_value_t *ary16_parent, jl_
2244
2249
}
2245
2250
for (; ary16_begin < scan_end ; ary16_begin += elsize ) {
2246
2251
for (uint16_t * pindex = elem_begin ; pindex < elem_end ; pindex ++ ) {
2247
- new_obj = ary16_begin [* pindex ];
2252
+ jl_value_t * * slot = & ary16_begin [* pindex ];
2253
+ new_obj = * slot ;
2248
2254
if (new_obj != NULL ) {
2249
2255
verify_parent2 ("array" , ary16_parent , & new_obj , "elem(%d)" ,
2250
2256
gc_slot_to_arrayidx (ary16_parent , ary16_begin ));
2251
2257
gc_assert_parent_validity (ary16_parent , new_obj );
2252
2258
gc_try_claim_and_push (mq , new_obj , & nptr );
2253
- gc_heap_snapshot_record_array_edge (ary16_parent , & new_obj );
2259
+ gc_heap_snapshot_record_array_edge (ary16_parent , slot );
2254
2260
}
2255
2261
}
2256
2262
}
0 commit comments