Skip to content

Commit a469a35

Browse files
committed
rt: Remove unused string upcalls
1 parent 19dae8d commit a469a35

File tree

1 file changed

+0
-35
lines changed

1 file changed

+0
-35
lines changed

src/rt/rust_upcall.cpp

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -342,41 +342,6 @@ upcall_str_new(const char *cstr, size_t len) {
342342
return args.retval;
343343
}
344344

345-
346-
347-
struct s_str_new_shared_args {
348-
rust_task *task;
349-
const char *cstr;
350-
size_t len;
351-
rust_opaque_box *retval;
352-
};
353-
354-
extern "C" CDECL void
355-
upcall_s_str_new_shared(s_str_new_shared_args *args) {
356-
rust_task *task = args->task;
357-
LOG_UPCALL_ENTRY(task);
358-
359-
size_t str_fill = args->len + 1;
360-
size_t str_alloc = str_fill;
361-
args->retval = (rust_opaque_box *)
362-
task->boxed.malloc(&str_body_tydesc,
363-
str_fill + sizeof(rust_vec));
364-
rust_str *str = (rust_str *)args->retval;
365-
str->body.fill = str_fill;
366-
str->body.alloc = str_alloc;
367-
memcpy(&str->body.data, args->cstr, args->len);
368-
str->body.data[args->len] = '\0';
369-
}
370-
371-
extern "C" CDECL rust_opaque_box*
372-
upcall_str_new_shared(const char *cstr, size_t len) {
373-
rust_task *task = rust_get_current_task();
374-
s_str_new_shared_args args = { task, cstr, len, 0 };
375-
UPCALL_SWITCH_STACK(task, &args, upcall_s_str_new_shared);
376-
return args.retval;
377-
}
378-
379-
380345
extern "C" _Unwind_Reason_Code
381346
__gxx_personality_v0(int version,
382347
_Unwind_Action actions,

0 commit comments

Comments
 (0)