Skip to content

Commit e351ad7

Browse files
committed
rt: Stub shape glue and implement shape::print and shape::size_of.
1 parent 1b1d8e7 commit e351ad7

File tree

3 files changed

+706
-0
lines changed

3 files changed

+706
-0
lines changed

mk/rt.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ RUNTIME_CS := rt/sync/timer.cpp \
2323
rt/isaac/randport.cpp \
2424
rt/rust_srv.cpp \
2525
rt/rust_kernel.cpp \
26+
rt/rust_shape.cpp \
2627
rt/memory_region.cpp \
2728
rt/test/rust_test_harness.cpp \
2829
rt/test/rust_test_runtime.cpp \

src/rt/rust_internal.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,10 @@ typedef void CDECL (cmp_glue_fn)(void *, rust_task *, void *,
251251
const type_desc **,
252252
void *, void *, int8_t);
253253

254+
struct rust_shape_tables {
255+
uint8_t *tags;
256+
uint8_t *resources;
257+
};
254258

255259
struct type_desc {
256260
// First part of type_desc is known to compiler.
@@ -266,6 +270,9 @@ struct type_desc {
266270
glue_fn *obj_drop_glue; // For custom destructors.
267271
uintptr_t is_stateful;
268272
cmp_glue_fn *cmp_glue;
273+
const uint8_t *shape;
274+
const rust_shape_tables *shape_tables;
275+
uint32_t n_params;
269276

270277
// Residual fields past here are known only to runtime.
271278
UT_hash_handle hh;

0 commit comments

Comments
 (0)