diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2011-09-02 10:49:03 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2011-09-02 10:49:03 -0700 |
| commit | 00470fef1297d61e1efbc485d0658e3ecdbaf35e (patch) | |
| tree | edf8e766d29b2b2740f4ad214ebaf34cddcd1ab3 /src/rt | |
| parent | 10ea78777262befef997bf61e7c21db0aa6792e7 (diff) | |
| download | rust-00470fef1297d61e1efbc485d0658e3ecdbaf35e.tar.gz rust-00470fef1297d61e1efbc485d0658e3ecdbaf35e.zip | |
rt: Remove evecs from the shape code
Diffstat (limited to 'src/rt')
| -rw-r--r-- | src/rt/rust_shape.cpp | 4 | ||||
| -rw-r--r-- | src/rt/rust_shape.h | 51 |
2 files changed, 0 insertions, 55 deletions
diff --git a/src/rt/rust_shape.cpp b/src/rt/rust_shape.cpp index 066bc1a115c..47f8b1d688e 100644 --- a/src/rt/rust_shape.cpp +++ b/src/rt/rust_shape.cpp @@ -333,10 +333,6 @@ public: in_dp), result(0) {} - void walk_evec(bool is_pod, uint16_t sp_size) { - walk_vec(is_pod, get_evec_data_range(dp)); - } - void walk_vec(bool is_pod, uint16_t sp_size) { walk_vec(is_pod, get_vec_data_range(dp)); } diff --git a/src/rt/rust_shape.h b/src/rt/rust_shape.h index dd09940a539..16a271cf5ff 100644 --- a/src/rt/rust_shape.h +++ b/src/rt/rust_shape.h @@ -33,7 +33,6 @@ const uint8_t SHAPE_I32 = 6u; const uint8_t SHAPE_I64 = 7u; const uint8_t SHAPE_F32 = 8u; const uint8_t SHAPE_F64 = 9u; -const uint8_t SHAPE_EVEC = 10u; const uint8_t SHAPE_VEC = 11u; const uint8_t SHAPE_TAG = 12u; const uint8_t SHAPE_BOX = 13u; @@ -237,7 +236,6 @@ protected: inline size_align get_size_align(const uint8_t *&addr); private: - void walk_evec(); void walk_vec(); void walk_tag(); void walk_box(); @@ -335,7 +333,6 @@ ctxt<T>::walk() { case SHAPE_I64: WALK_NUMBER(int64_t); break; case SHAPE_F32: WALK_NUMBER(float); break; case SHAPE_F64: WALK_NUMBER(double); break; - case SHAPE_EVEC: walk_evec(); break; case SHAPE_VEC: walk_vec(); break; case SHAPE_TAG: walk_tag(); break; case SHAPE_BOX: walk_box(); break; @@ -380,19 +377,6 @@ ctxt<T>::get_variant_sp(tag_info &tinfo, uint32_t variant_id) { template<typename T> void -ctxt<T>::walk_evec() { - bool is_pod = *sp++; - - uint16_t sp_size = get_u16_bump(sp); - const uint8_t *end_sp = sp + sp_size; - - static_cast<T *>(this)->walk_evec(is_pod, sp_size); - - sp = end_sp; -} - -template<typename T> -void ctxt<T>::walk_vec() { bool is_pod = *sp++; @@ -514,9 +498,6 @@ public: const type_param *params, const uint8_t *end_sp); void walk_var(uint8_t param); - void walk_evec(bool is_pod, uint16_t sp_size) { - DPRINT("evec<"); walk(); DPRINT(">"); - } void walk_vec(bool is_pod, uint16_t sp_size) { DPRINT("vec<"); walk(); DPRINT(">"); } @@ -571,9 +552,6 @@ public: void walk_fn() { sa.set(sizeof(void *)*2, sizeof(void *)); } void walk_obj() { sa.set(sizeof(void *)*2, sizeof(void *)); } - void walk_evec(bool is_pod, uint16_t sp_size) { - sa.set(sizeof(void *), sizeof(void *)); - } void walk_vec(bool is_pod, uint16_t sp_size) { sa.set(sizeof(void *), sizeof(void *)); } @@ -781,9 +759,7 @@ protected: void walk_obj_contents(ptr &dp); void walk_variant(tag_info &tinfo, uint32_t variant); - static std::pair<uint8_t *,uint8_t *> get_evec_data_range(ptr dp); static std::pair<uint8_t *,uint8_t *> get_vec_data_range(ptr dp); - static std::pair<ptr_pair,ptr_pair> get_evec_data_range(ptr_pair &dp); static std::pair<ptr_pair,ptr_pair> get_vec_data_range(ptr_pair &dp); public: @@ -803,9 +779,6 @@ public: static_cast<T *>(this)->walk_struct(end_sp); } - void walk_evec(bool is_pod, uint16_t sp_size) { - DATA_SIMPLE(void *, walk_evec(is_pod, sp_size)); - } void walk_vec(bool is_pod, uint16_t sp_size) { DATA_SIMPLE(void *, walk_vec(is_pod, sp_size)); } @@ -867,13 +840,6 @@ data<T,U>::walk_variant(tag_info &tinfo, uint32_t variant_id) { template<typename T,typename U> std::pair<uint8_t *,uint8_t *> -data<T,U>::get_evec_data_range(ptr dp) { - rust_evec *vp = bump_dp<rust_evec *>(dp); - return std::make_pair(vp->data, vp->data + vp->fill); -} - -template<typename T,typename U> -std::pair<uint8_t *,uint8_t *> data<T,U>::get_vec_data_range(ptr dp) { rust_vec* ptr = bump_dp<rust_vec*>(dp); uint8_t* data = &ptr->data[0]; @@ -882,16 +848,6 @@ data<T,U>::get_vec_data_range(ptr dp) { template<typename T,typename U> std::pair<ptr_pair,ptr_pair> -data<T,U>::get_evec_data_range(ptr_pair &dp) { - std::pair<uint8_t *,uint8_t *> fst = get_evec_data_range(dp.fst); - std::pair<uint8_t *,uint8_t *> snd = get_evec_data_range(dp.snd); - ptr_pair start(fst.first, snd.first); - ptr_pair end(fst.second, snd.second); - return std::make_pair(start, end); -} - -template<typename T,typename U> -std::pair<ptr_pair,ptr_pair> data<T,U>::get_vec_data_range(ptr_pair &dp) { std::pair<uint8_t *,uint8_t *> fst = get_vec_data_range(dp.fst); std::pair<uint8_t *,uint8_t *> snd = get_vec_data_range(dp.snd); @@ -1014,13 +970,6 @@ private: out(other.out), prefix("") {} - void walk_evec(bool is_pod, uint16_t sp_size) { - if (!get_dp<void *>(dp)) - out << prefix << "(null)"; - else - walk_vec(is_pod, get_evec_data_range(dp)); - } - void walk_vec(bool is_pod, uint16_t sp_size) { if (!get_dp<void *>(dp)) out << prefix << "(null)"; |
