Skip to content

Commit dbd2ee0

Browse files
committed
Remove is_stateful flag from tydesc. Closes #136
1 parent 33dd7cc commit dbd2ee0

File tree

5 files changed

+5
-7
lines changed

5 files changed

+5
-7
lines changed

src/comp/back/abi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const tydesc_field_free_glue: int = 5;
4141
const tydesc_field_unused: int = 6;
4242
const tydesc_field_sever_glue: int = 7;
4343
const tydesc_field_mark_glue: int = 8;
44-
const tydesc_field_is_stateful: int = 9;
44+
const tydesc_field_unused2: int = 9;
4545
const tydesc_field_cmp_glue: int = 10;
4646
const tydesc_field_shape: int = 11;
4747
const tydesc_field_shape_tables: int = 12;

src/comp/middle/trans.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1275,7 +1275,7 @@ fn emit_tydescs(ccx: @crate_ctxt) {
12751275
C_null(T_ptr(T_i8())), // unused
12761276
C_null(glue_fn_ty), // sever_glue
12771277
C_null(glue_fn_ty), // mark_glue
1278-
C_null(glue_fn_ty), // is_stateful
1278+
C_null(glue_fn_ty), // unused
12791279
cmp_glue, // cmp_glue
12801280
C_shape(ccx, shape), // shape
12811281
shape_tables, // shape_tables

src/rt/rust_builtin.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,8 @@ static void
201201
debug_tydesc_helper(rust_task *task, type_desc *t)
202202
{
203203
LOG(task, stdlib, " size %" PRIdPTR ", align %" PRIdPTR
204-
", stateful %" PRIdPTR ", first_param 0x%" PRIxPTR,
205-
t->size, t->align, t->is_stateful, t->first_param);
204+
", first_param 0x%" PRIxPTR,
205+
t->size, t->align, t->first_param);
206206
}
207207

208208
extern "C" CDECL void

src/rt/rust_crate_cache.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ rust_crate_cache::get_type_desc(size_t size,
3838
"rust_crate_cache::descs[%" PRIdPTR "] = 0x%" PRIxPTR,
3939
i, descs[i]);
4040
td->descs[i] = descs[i];
41-
// FIXME (issue #136): Below is a miscalculation.
42-
td->is_stateful |= descs[i]->is_stateful;
4341
}
4442
td->n_obj_params = n_obj_params;
4543
td->n_params = n_descs - 1;

src/rt/rust_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ struct type_desc {
274274
void *unused;
275275
glue_fn *sever_glue; // For GC.
276276
glue_fn *mark_glue; // For GC.
277-
uintptr_t is_stateful;
277+
uintptr_t unused2;
278278
cmp_glue_fn *cmp_glue;
279279
const uint8_t *shape;
280280
const rust_shape_tables *shape_tables;

0 commit comments

Comments
 (0)