diff options
| author | Michael Sullivan <sully@msully.net> | 2011-06-10 14:11:22 -0700 |
|---|---|---|
| committer | Michael Sullivan <sully@msully.net> | 2011-06-14 15:35:08 -0700 |
| commit | 491d1106454c9ffa3950afe27ea3488ef5c19e32 (patch) | |
| tree | 4e9f01bfea7acd1e869d0da26b0f84796e7407b3 /src/rt | |
| parent | 36755e42dfa22d13d94d5af18e8f635a4694a4ea (diff) | |
| download | rust-491d1106454c9ffa3950afe27ea3488ef5c19e32.tar.gz rust-491d1106454c9ffa3950afe27ea3488ef5c19e32.zip | |
Make type_desc fields have useful types and better names. Add in cmp_glue.
Diffstat (limited to 'src/rt')
| -rw-r--r-- | src/rt/rust_internal.h | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/rt/rust_internal.h b/src/rt/rust_internal.h index 5545d613a32..9426fec904a 100644 --- a/src/rt/rust_internal.h +++ b/src/rt/rust_internal.h @@ -206,19 +206,27 @@ struct rust_timer { #include "rust_util.h" +typedef void FASTCALL (glue_fn)(void *, rust_task *, void *, + const type_desc **, void *); +typedef void FASTCALL (cmp_glue_fn)(void *, rust_task *, void *, + const type_desc **, + void *, void *, int8_t); + + struct type_desc { // First part of type_desc is known to compiler. // first_param = &descs[1] if dynamic, null if static. const type_desc **first_param; size_t size; size_t align; - uintptr_t copy_glue_off; - uintptr_t drop_glue_off; - uintptr_t free_glue_off; - uintptr_t sever_glue_off; // For GC. - uintptr_t mark_glue_off; // For GC. - uintptr_t obj_drop_glue_off; // For custom destructors. + glue_fn *take_glue; + glue_fn *drop_glue; + glue_fn *free_glue; + glue_fn *sever_glue; // For GC. + glue_fn *mark_glue; // For GC. + glue_fn *obj_drop_glue; // For custom destructors. uintptr_t is_stateful; + cmp_glue_fn *cmp_glue; // Residual fields past here are known only to runtime. UT_hash_handle hh; |
