about summary refs log tree commit diff
path: root/src/rt/rust_shape.cpp
diff options
context:
space:
mode:
authorMarijn Haverbeke <marijnh@gmail.com>2011-08-25 10:18:02 +0200
committerMarijn Haverbeke <marijnh@gmail.com>2011-08-29 09:07:53 +0200
commitc9c5ee252a8523778377f2832765442e611e85a4 (patch)
tree85c0837af34b2431fc17da0a166254144aaa99c7 /src/rt/rust_shape.cpp
parent855e0a471365c7c61a139e2437215028bd231af5 (diff)
downloadrust-c9c5ee252a8523778377f2832765442e611e85a4.tar.gz
rust-c9c5ee252a8523778377f2832765442e611e85a4.zip
Implement non-internal ivecs
Vectors are now similar to our old, pre-internal vectors, except that
they are uniquely owned, not refcounted.

Their name should probably change too, then. I've renamed them to vec
in the runtime, will do so throughout the compiler later.
Diffstat (limited to 'src/rt/rust_shape.cpp')
-rw-r--r--src/rt/rust_shape.cpp15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/rt/rust_shape.cpp b/src/rt/rust_shape.cpp
index f56aa0251ce..c08663bface 100644
--- a/src/rt/rust_shape.cpp
+++ b/src/rt/rust_shape.cpp
@@ -226,17 +226,6 @@ size_of::walk_struct(bool align, const uint8_t *end_sp) {
     sa = struct_sa;
 }
 
-void
-size_of::walk_ivec(bool align, bool is_pod, size_align &elem_sa) {
-    if (!elem_sa.is_set())
-        walk(align);    // Determine the size the slow way.
-    else
-        sa = elem_sa;   // Use the size hint.
-
-    sa.set(sizeof(rust_ivec) - sizeof(uintptr_t) + sa.size * 4,
-           max(sa.alignment, sizeof(uintptr_t)));
-}
-
 
 // Copy constructors
 
@@ -321,8 +310,8 @@ public:
         walk_vec(align, is_pod, get_evec_data_range(dp));
     }
 
-    void walk_ivec(bool align, bool is_pod, size_align &elem_sa) {
-        walk_vec(align, is_pod, get_ivec_data_range(dp));
+    void walk_vec(bool align, bool is_pod, uint16_t sp_size) {
+        walk_vec(align, is_pod, get_vec_data_range(dp));
     }
 
     void walk_box(bool align) {