diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2012-01-06 12:06:35 -0800 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2012-01-06 22:40:31 -0800 |
| commit | 8506241f3a0dce3f0d24764a3ce3d16f99bcb809 (patch) | |
| tree | 70d453fea82f951f06184de75d45f2ada8536e4b /src/rt/rust_shape.cpp | |
| parent | 8e89df69de47a4f944f5c3fc249a88c5934864b2 (diff) | |
| download | rust-8506241f3a0dce3f0d24764a3ce3d16f99bcb809.tar.gz rust-8506241f3a0dce3f0d24764a3ce3d16f99bcb809.zip | |
fix how we walk functions to match new closure fmt
Diffstat (limited to 'src/rt/rust_shape.cpp')
| -rw-r--r-- | src/rt/rust_shape.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/rt/rust_shape.cpp b/src/rt/rust_shape.cpp index bd388ffff82..1743aaad9dd 100644 --- a/src/rt/rust_shape.cpp +++ b/src/rt/rust_shape.cpp @@ -47,13 +47,9 @@ type_param::make(const type_desc **tydescs, unsigned n_tydescs, // Constructs type parameters from a function shape. This is a bit messy, // because it requires that the function shape have a specific format. 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 **tydescs = (const type_desc **)dp; - unsigned n_tydescs = tydesc->n_obj_params & 0x7fffffff; - for (unsigned i = 0; i < n_tydescs; i++) - bump_dp<const type_desc*>(dp); - return make(tydescs, n_tydescs, arena); +type_param::from_fn_shape(rust_opaque_closure *env, arena &arena) { + unsigned n_tydescs = env->td->n_obj_params & 0x7fffffff; + return make(env->captured_tds, n_tydescs, arena); } // Constructs type parameters from an object shape. This is also a bit messy, |
