diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2011-08-26 17:05:05 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2011-08-26 17:05:59 -0700 |
| commit | 5fe80a0d486b0276a2181d179af83a62e6590f34 (patch) | |
| tree | 81fefdfe6d59d609865fab45abbe54143cb8a0df /src/rt/rust_shape.cpp | |
| parent | b894069a8fb0914761738d2bead216c38d581132 (diff) | |
| download | rust-5fe80a0d486b0276a2181d179af83a62e6590f34.tar.gz rust-5fe80a0d486b0276a2181d179af83a62e6590f34.zip | |
rt: Allow closures to be logged
Diffstat (limited to 'src/rt/rust_shape.cpp')
| -rw-r--r-- | src/rt/rust_shape.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/rt/rust_shape.cpp b/src/rt/rust_shape.cpp index 6a586860cd6..f56aa0251ce 100644 --- a/src/rt/rust_shape.cpp +++ b/src/rt/rust_shape.cpp @@ -42,7 +42,17 @@ type_param::make(const type_desc **tydescs, unsigned n_tydescs, return ptrs; } -// Constructs type parameters from an object shape. This is a bit messy, +// 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 **descs = (const type_desc **)(dp + tydesc->size); + unsigned n_tydescs = tydesc->n_obj_params & 0x7fffffff; + return make(descs, n_tydescs, arena); +} + +// Constructs type parameters from an object shape. This is also a bit messy, // because it requires that the object shape have a specific format. type_param * type_param::from_obj_shape(const uint8_t *sp, ptr dp, arena &arena) { @@ -461,12 +471,6 @@ log::walk_vec(bool align, bool is_pod, const std::pair<ptr,ptr> &data) { } void -log::walk_obj(bool align) { - out << "obj"; - data<log,ptr>::walk_obj_contents(align, dp); -} - -void log::walk_variant(bool align, tag_info &tinfo, uint32_t variant_id, const std::pair<const uint8_t *,const uint8_t *> variant_ptr_and_end) { |
