From 8bd019bdc868e9d563aa72acbb0307deaeca919f Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Thu, 25 Aug 2011 14:20:21 -0700 Subject: rt: Remember the number of captured type descriptors for objects in the type descriptor crate cache --- src/rt/rust_crate_cache.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/rt/rust_crate_cache.cpp') diff --git a/src/rt/rust_crate_cache.cpp b/src/rt/rust_crate_cache.cpp index ba5a104b024..035715d219f 100644 --- a/src/rt/rust_crate_cache.cpp +++ b/src/rt/rust_crate_cache.cpp @@ -1,5 +1,6 @@ #include "rust_internal.h" +#include type_desc * rust_crate_cache::get_type_desc(size_t size, @@ -14,6 +15,10 @@ rust_crate_cache::get_type_desc(size_t size, HASH_FIND(hh, this->type_descs, descs, keysz, td); if (td) { DLOG(sched, cache, "rust_crate_cache::get_type_desc hit"); + + // FIXME: This is a gross hack. + td->n_obj_params = std::max(td->n_obj_params, n_obj_params); + return td; } DLOG(sched, cache, "rust_crate_cache::get_type_desc miss"); -- cgit 1.4.1-3-g733a5