about summary refs log tree commit diff
path: root/src/rt/rust_shape.cpp
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2011-12-15 11:06:48 -0800
committerNiko Matsakis <niko@alum.mit.edu>2011-12-15 13:44:06 -0800
commit1e3259e119b6370267415b9e07f3ea80869f839d (patch)
tree164d059055aef5b9ee59b55b2ae6176d6cccc1f1 /src/rt/rust_shape.cpp
parentd381cc072a9c9c0fef605c56ed77d538a49c8ead (diff)
downloadrust-1e3259e119b6370267415b9e07f3ea80869f839d.tar.gz
rust-1e3259e119b6370267415b9e07f3ea80869f839d.zip
massive refactor of how closures work
Diffstat (limited to 'src/rt/rust_shape.cpp')
-rw-r--r--src/rt/rust_shape.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rt/rust_shape.cpp b/src/rt/rust_shape.cpp
index 3593d0ff335..c4d9eb6a5a4 100644
--- a/src/rt/rust_shape.cpp
+++ b/src/rt/rust_shape.cpp
@@ -23,7 +23,6 @@ const uint8_t CMP_EQ = 0u;
 const uint8_t CMP_LT = 1u;
 const uint8_t CMP_LE = 2u;
 
-
 // Type parameters
 
 type_param *
@@ -50,9 +49,11 @@ type_param::make(const type_desc **tydescs, unsigned n_tydescs,
 type_param *
 type_param::from_fn_shape(const uint8_t *sp, ptr dp, arena &arena) {
     const type_desc *tydesc = bump_dp<const type_desc *>(dp);
-    const type_desc **descs = (const type_desc **)(dp + tydesc->size);
+    const type_desc **tydescs = (const type_desc **)dp;
     unsigned n_tydescs = tydesc->n_obj_params & 0x7fffffff;
-    return make(descs, n_tydescs, arena);
+    for (unsigned i = 0; i < n_tydescs; i++)
+        bump_dp<const type_desc*>(dp);
+    return make(tydescs, n_tydescs, arena);
 }
 
 // Constructs type parameters from an object shape. This is also a bit messy,
@@ -250,7 +251,6 @@ size_of::walk_struct(const uint8_t *end_sp) {
     sa = struct_sa;
 }
 
-
 // Copy constructors
 
 #if 0