Skip to content

Commit b4484d5

Browse files
committed
Some cleanup in the runtime.
1 parent 8967a66 commit b4484d5

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

src/rt/rust_builtin.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -271,9 +271,8 @@ static void
271271
debug_tydesc_helper(type_desc *t)
272272
{
273273
rust_task *task = rust_get_current_task();
274-
LOG(task, stdlib, " size %" PRIdPTR ", align %" PRIdPTR
275-
", first_param 0x%" PRIxPTR,
276-
t->size, t->align, t->first_param);
274+
LOG(task, stdlib, " size %" PRIdPTR ", align %" PRIdPTR,
275+
t->size, t->align);
277276
}
278277

279278
extern "C" CDECL void

src/rt/rust_shape.h

-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ const uint8_t SHAPE_VEC = 11u;
4747
const uint8_t SHAPE_TAG = 12u;
4848
const uint8_t SHAPE_STRUCT = 17u;
4949
const uint8_t SHAPE_BOX_FN = 18u;
50-
const uint8_t SHAPE_OBJ = 19u;
5150
const uint8_t SHAPE_RES = 20u;
5251
const uint8_t SHAPE_UNIQ = 22u;
5352
const uint8_t SHAPE_UNIQ_FN = 25u;

src/rt/rust_task.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ void task_start_wrapper(spawn_args *a)
171171
if(env) {
172172
// free the environment (which should be a unique closure).
173173
const type_desc *td = env->td;
174-
td->drop_glue(NULL, NULL, td->first_param, box_body(env));
174+
td->drop_glue(NULL, NULL, NULL, box_body(env));
175175
upcall_exchange_free(env);
176176
}
177177

src/rt/rust_type.h

+6-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22
#ifndef RUST_TYPE_H
33
#define RUST_TYPE_H
44

5+
#include "rust_globals.h"
56
#include "rust_refcount.h"
67

8+
struct rust_opaque_box;
9+
710
// The type of functions that we spawn, which fall into two categories:
811
// - the main function: has a NULL environment, but uses the void* arg
912
// - unique closures of type fn~(): have a non-NULL environment, but
@@ -45,21 +48,21 @@ static inline void *box_body(rust_opaque_box *box) {
4548
// N.B. If you want to add a field to tydesc, please use one of the
4649
// unused fields!
4750
struct type_desc {
48-
const type_desc **first_param;
51+
uintptr_t UNUSED_1;
4952
size_t size;
5053
size_t align;
5154
glue_fn *take_glue;
5255
glue_fn *drop_glue;
5356
glue_fn *free_glue;
5457
glue_fn *visit_glue;
55-
uintptr_t UNUSED_1;
5658
uintptr_t UNUSED_2;
5759
uintptr_t UNUSED_3;
5860
uintptr_t UNUSED_4;
61+
uintptr_t UNUSED_5;
5962
const uint8_t *shape;
6063
const rust_shape_tables *shape_tables;
61-
uintptr_t UNUSED_5;
6264
uintptr_t UNUSED_6;
65+
uintptr_t UNUSED_7;
6366
};
6467

6568
extern "C" type_desc *rust_clone_type_desc(type_desc*);

0 commit comments

Comments
 (0)