Skip to content

Commit c11d0b0

Browse files
committed
rt: Move upcall_cmp_type/upcall_log_type to rust_upcall.cpp
1 parent 9b7347d commit c11d0b0

File tree

2 files changed

+24
-4
lines changed

2 files changed

+24
-4
lines changed

src/rt/rust_shape.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -530,9 +530,9 @@ log::walk_res(const rust_fn *dtor, unsigned n_params,
530530
} // end namespace shape
531531

532532
extern "C" void
533-
upcall_cmp_type(int8_t *result, const type_desc *tydesc,
534-
const type_desc **subtydescs, uint8_t *data_0,
535-
uint8_t *data_1, uint8_t cmp_type) {
533+
shape_cmp_type(int8_t *result, const type_desc *tydesc,
534+
const type_desc **subtydescs, uint8_t *data_0,
535+
uint8_t *data_1, uint8_t cmp_type) {
536536
rust_task *task = rust_scheduler::get_task();
537537
shape::arena arena;
538538

@@ -553,7 +553,7 @@ upcall_cmp_type(int8_t *result, const type_desc *tydesc,
553553
}
554554

555555
extern "C" void
556-
upcall_log_type(const type_desc *tydesc, uint8_t *data, uint32_t level) {
556+
shape_log_type(const type_desc *tydesc, uint8_t *data, uint32_t level) {
557557
rust_task *task = rust_scheduler::get_task();
558558
if (task->sched->log_lvl < level)
559559
return; // TODO: Don't evaluate at all?

src/rt/rust_upcall.cpp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,26 @@ upcall_rust_personality(int version,
457457
return upcall_s_rust_personality(&args);
458458
}
459459

460+
extern "C" void
461+
shape_cmp_type(int8_t *result, const type_desc *tydesc,
462+
const type_desc **subtydescs, uint8_t *data_0,
463+
uint8_t *data_1, uint8_t cmp_type);
464+
465+
extern "C" void
466+
upcall_cmp_type(int8_t *result, const type_desc *tydesc,
467+
const type_desc **subtydescs, uint8_t *data_0,
468+
uint8_t *data_1, uint8_t cmp_type) {
469+
shape_cmp_type(result, tydesc, subtydescs, data_0, data_1, cmp_type);
470+
}
471+
472+
extern "C" void
473+
shape_log_type(const type_desc *tydesc, uint8_t *data, uint32_t level);
474+
475+
extern "C" void
476+
upcall_log_type(const type_desc *tydesc, uint8_t *data, uint32_t level) {
477+
shape_log_type(tydesc, data, level);
478+
}
479+
460480
//
461481
// Local Variables:
462482
// mode: C++

0 commit comments

Comments
 (0)