@@ -73,19 +73,37 @@ class irc : public shape::data<irc,shape::ptr> {
73
73
in_tables, in_data),
74
74
ircs (in_ircs) {}
75
75
76
- void walk_vec2 (bool is_pod) {
77
- if (is_pod || shape::get_dp<void *>(dp) == NULL )
78
- return ; // There can't be any outbound pointers from this.
79
76
80
- std::pair<uint8_t *,uint8_t *> data_range (get_vec_data_range (dp));
77
+ void walk_vec2 (bool is_pod, std::pair<uint8_t *,uint8_t *> data_range) {
78
+
79
+ // There can't be any outbound pointers from pod.
80
+ if (is_pod)
81
+ return ;
82
+
81
83
irc sub (*this , data_range.first );
82
84
shape::ptr data_end = sub.end_dp = data_range.second ;
83
85
while (sub.dp < data_end) {
84
86
sub.walk_reset ();
87
+ // FIXME: shouldn't this be 'sub.align = true;'?
85
88
align = true ;
86
89
}
87
90
}
88
91
92
+ void walk_vec2 (bool is_pod) {
93
+ if (shape::get_dp<void *>(dp) == NULL )
94
+ return ;
95
+
96
+ walk_vec2 (is_pod, get_vec_data_range (dp));
97
+ }
98
+
99
+ void walk_slice2 (bool is_pod, bool is_str) {
100
+ walk_vec2 (is_pod, get_slice_data_range (is_str, dp));
101
+ }
102
+
103
+ void walk_fixedvec2 (uint16_t sz, bool is_pod) {
104
+ walk_vec2 (is_pod, get_fixedvec_data_range (sz, dp));
105
+ }
106
+
89
107
void walk_tag2 (shape::tag_info &tinfo, uint32_t tag_variant) {
90
108
shape::data<irc,shape::ptr>::walk_variant1 (tinfo, tag_variant);
91
109
}
@@ -102,6 +120,10 @@ class irc : public shape::data<irc,shape::ptr> {
102
120
shape::data<irc,shape::ptr>::walk_uniq_contents1 ();
103
121
}
104
122
123
+ void walk_rptr2 () {
124
+ shape::data<irc,shape::ptr>::walk_rptr_contents1 ();
125
+ }
126
+
105
127
void walk_fn2 (char code) {
106
128
switch (code) {
107
129
case shape::SHAPE_BOX_FN: {
@@ -137,6 +159,8 @@ class irc : public shape::data<irc,shape::ptr> {
137
159
138
160
void walk_uniq_contents2 (irc &sub) { sub.walk (); }
139
161
162
+ void walk_rptr_contents2 (irc &sub) { sub.walk (); }
163
+
140
164
void walk_box_contents2 (irc &sub) {
141
165
maybe_record_irc ();
142
166
@@ -305,11 +329,12 @@ class mark : public shape::data<mark,shape::ptr> {
305
329
in_tables, in_data),
306
330
marked (in_marked) {}
307
331
308
- void walk_vec2 (bool is_pod) {
309
- if (is_pod || shape::get_dp<void *>(dp) == NULL )
310
- return ; // There can't be any outbound pointers from this.
332
+ void walk_vec2 (bool is_pod, std::pair<uint8_t *,uint8_t *> data_range) {
333
+
334
+ // There can't be any outbound pointers from pod.
335
+ if (is_pod)
336
+ return ;
311
337
312
- std::pair<uint8_t *,uint8_t *> data_range (get_vec_data_range (dp));
313
338
if (data_range.second - data_range.first > 100000 )
314
339
abort (); // FIXME: Temporary sanity check.
315
340
@@ -321,6 +346,20 @@ class mark : public shape::data<mark,shape::ptr> {
321
346
}
322
347
}
323
348
349
+ void walk_vec2 (bool is_pod) {
350
+ if (shape::get_dp<void *>(dp) == NULL )
351
+ return ;
352
+ walk_vec2 (is_pod, get_vec_data_range (dp));
353
+ }
354
+
355
+ void walk_slice2 (bool is_pod, bool is_str) {
356
+ walk_vec2 (is_pod, get_slice_data_range (is_str, dp));
357
+ }
358
+
359
+ void walk_fixedvec2 (uint16_t sz, bool is_pod) {
360
+ walk_vec2 (is_pod, get_fixedvec_data_range (sz, dp));
361
+ }
362
+
324
363
void walk_tag2 (shape::tag_info &tinfo, uint32_t tag_variant) {
325
364
shape::data<mark,shape::ptr>::walk_variant1 (tinfo, tag_variant);
326
365
}
@@ -337,6 +376,10 @@ class mark : public shape::data<mark,shape::ptr> {
337
376
shape::data<mark,shape::ptr>::walk_uniq_contents1 ();
338
377
}
339
378
379
+ void walk_rptr2 () {
380
+ shape::data<mark,shape::ptr>::walk_rptr_contents1 ();
381
+ }
382
+
340
383
void walk_fn2 (char code) {
341
384
switch (code) {
342
385
case shape::SHAPE_BOX_FN: {
@@ -372,6 +415,8 @@ class mark : public shape::data<mark,shape::ptr> {
372
415
373
416
void walk_uniq_contents2 (mark &sub) { sub.walk (); }
374
417
418
+ void walk_rptr_contents2 (mark &sub) { sub.walk (); }
419
+
375
420
void walk_box_contents2 (mark &sub) {
376
421
rust_opaque_box *box_ptr = *(rust_opaque_box **) dp;
377
422
0 commit comments