Remove is_stateful flag from tydesc. Closes #136

This commit is contained in:
Brian Anderson 2011-09-22 22:15:25 -07:00
parent 33dd7cc854
commit dbd2ee015a
5 changed files with 5 additions and 7 deletions

View File

@ -41,7 +41,7 @@ const tydesc_field_free_glue: int = 5;
const tydesc_field_unused: int = 6;
const tydesc_field_sever_glue: int = 7;
const tydesc_field_mark_glue: int = 8;
const tydesc_field_is_stateful: int = 9;
const tydesc_field_unused2: int = 9;
const tydesc_field_cmp_glue: int = 10;
const tydesc_field_shape: int = 11;
const tydesc_field_shape_tables: int = 12;

View File

@ -1275,7 +1275,7 @@ fn emit_tydescs(ccx: @crate_ctxt) {
C_null(T_ptr(T_i8())), // unused
C_null(glue_fn_ty), // sever_glue
C_null(glue_fn_ty), // mark_glue
C_null(glue_fn_ty), // is_stateful
C_null(glue_fn_ty), // unused
cmp_glue, // cmp_glue
C_shape(ccx, shape), // shape
shape_tables, // shape_tables

View File

@ -201,8 +201,8 @@ static void
debug_tydesc_helper(rust_task *task, type_desc *t)
{
LOG(task, stdlib, " size %" PRIdPTR ", align %" PRIdPTR
", stateful %" PRIdPTR ", first_param 0x%" PRIxPTR,
t->size, t->align, t->is_stateful, t->first_param);
", first_param 0x%" PRIxPTR,
t->size, t->align, t->first_param);
}
extern "C" CDECL void

View File

@ -38,8 +38,6 @@ rust_crate_cache::get_type_desc(size_t size,
"rust_crate_cache::descs[%" PRIdPTR "] = 0x%" PRIxPTR,
i, descs[i]);
td->descs[i] = descs[i];
// FIXME (issue #136): Below is a miscalculation.
td->is_stateful |= descs[i]->is_stateful;
}
td->n_obj_params = n_obj_params;
td->n_params = n_descs - 1;

View File

@ -274,7 +274,7 @@ struct type_desc {
void *unused;
glue_fn *sever_glue; // For GC.
glue_fn *mark_glue; // For GC.
uintptr_t is_stateful;
uintptr_t unused2;
cmp_glue_fn *cmp_glue;
const uint8_t *shape;
const rust_shape_tables *shape_tables;