@@ -453,7 +453,8 @@ ctxt<T>::walk_res(bool align) {
453
453
uint16_t sp_size = get_u16_bump (sp);
454
454
const uint8_t *end_sp = sp + sp_size;
455
455
456
- static_cast <T *>(this )->walk_res (align, dtor, n_ty_params, ty_params_sp);
456
+ static_cast <T *>(this )->walk_res (align, dtor, n_ty_params, ty_params_sp,
457
+ end_sp);
457
458
458
459
sp = end_sp;
459
460
}
@@ -479,7 +480,7 @@ class print : public ctxt<print> {
479
480
void walk_tag (bool align, tag_info &tinfo);
480
481
void walk_struct (bool align, const uint8_t *end_sp);
481
482
void walk_res (bool align, const rust_fn *dtor, uint16_t n_ty_params,
482
- const uint8_t *ty_params_sp);
483
+ const uint8_t *ty_params_sp, const uint8_t *end_sp );
483
484
void walk_var (bool align, uint8_t param);
484
485
485
486
void walk_evec (bool align, bool is_pod, uint16_t sp_size) {
@@ -559,7 +560,7 @@ class size_of : public ctxt<size_of> {
559
560
}
560
561
561
562
void walk_res (bool align, const rust_fn *dtor, uint16_t n_ty_params,
562
- const uint8_t *ty_params_sp) {
563
+ const uint8_t *ty_params_sp, const uint8_t *end_sp ) {
563
564
abort (); // TODO
564
565
}
565
566
@@ -788,10 +789,11 @@ class data : public ctxt< data<T,U> > {
788
789
}
789
790
790
791
void walk_res (bool align, const rust_fn *dtor, uint16_t n_ty_params,
791
- const uint8_t *ty_params_sp) {
792
+ const uint8_t *ty_params_sp, const uint8_t *end_sp) {
793
+ typename U::template data<uintptr_t >::t live = bump_dp<uintptr_t >(dp);
792
794
// Delegate to the implementation.
793
795
static_cast <T *>(this )->walk_res (align, dtor, n_ty_params,
794
- ty_params_sp);
796
+ ty_params_sp, end_sp, live );
795
797
}
796
798
797
799
void walk_var (bool align, uint8_t param_index) {
@@ -957,8 +959,6 @@ class log : public data<log,ptr> {
957
959
: data<log,ptr>(other.task, other.sp, other.params, other.tables, in_dp),
958
960
out (other.out) {}
959
961
960
- void walk_string (const std::pair<ptr,ptr> &data);
961
-
962
962
void walk_evec (bool align, bool is_pod, uint16_t sp_size) {
963
963
walk_vec (align, is_pod, get_evec_data_range (dp));
964
964
}
@@ -991,11 +991,6 @@ class log : public data<log,ptr> {
991
991
void walk_chan (bool align) { out << " chan" ; }
992
992
void walk_task (bool align) { out << " task" ; }
993
993
994
- void walk_res (bool align, const rust_fn *dtor, uint16_t n_ty_params,
995
- const uint8_t *ty_params_sp) {
996
- out << " res" ; // TODO
997
- }
998
-
999
994
void walk_subcontext (bool align, log &sub) { sub.walk (align); }
1000
995
1001
996
void walk_box_contents (bool align, log &sub, ptr &ref_count_dp) {
@@ -1010,6 +1005,10 @@ class log : public data<log,ptr> {
1010
1005
void walk_variant (bool align, tag_info &tinfo, uint32_t variant_id,
1011
1006
const std::pair<const uint8_t *,const uint8_t *>
1012
1007
variant_ptr_and_end);
1008
+ void walk_string (const std::pair<ptr,ptr> &data);
1009
+ void walk_res (bool align, const rust_fn *dtor, uint16_t n_ty_params,
1010
+ const uint8_t *ty_params_sp, const uint8_t *end_sp,
1011
+ bool live);
1013
1012
1014
1013
template <typename T>
1015
1014
void walk_number () { out << get_dp<T>(dp); }
0 commit comments