Skip to content

Commit 8d3cf7c

Browse files
committed
---
yaml --- r: 14400 b: refs/heads/try c: b1d7f25 h: refs/heads/master v: v3
1 parent 4e7881e commit 8d3cf7c

File tree

5 files changed

+11
-24
lines changed

5 files changed

+11
-24
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5-
refs/heads/try: 389aff333d17053878823fc8e6b09096f8eeb78c
5+
refs/heads/try: b1d7f252a9fce3881f48df25197e6d03f94ea8da
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/try/src/comp/back/upcall.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,20 +57,17 @@ fn declare_upcalls(targ_cfg: @session::config,
5757
T_ptr(T_i8()),
5858
size_t]),
5959
malloc:
60-
d("malloc", [T_ptr(tydesc_type)],
61-
T_ptr(T_i8())),
60+
d("malloc", [T_ptr(tydesc_type)], T_ptr(T_i8())),
6261
free:
6362
dv("free", [T_ptr(T_i8())]),
6463
validate_box:
6564
dv("validate_box", [T_ptr(T_i8())]),
6665
shared_malloc:
67-
d("shared_malloc", [size_t, T_ptr(tydesc_type)],
68-
T_ptr(T_i8())),
66+
d("shared_malloc", [size_t], T_ptr(T_i8())),
6967
shared_free:
7068
dv("shared_free", [T_ptr(T_i8())]),
7169
shared_realloc:
72-
d("shared_realloc", [T_ptr(T_i8()), size_t],
73-
T_ptr(T_i8())),
70+
d("shared_realloc", [T_ptr(T_i8()), size_t], T_ptr(T_i8())),
7471
mark:
7572
d("mark", [T_ptr(T_i8())], int_t),
7673
create_shared_type_desc:

branches/try/src/comp/middle/trans/base.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -481,12 +481,7 @@ fn GEP_enum(cx: block, llblobptr: ValueRef, enum_id: ast::def_id,
481481
// and a size indicating how much space we want malloc'd.
482482
fn trans_shared_malloc(cx: block, llptr_ty: TypeRef, llsize: ValueRef)
483483
-> result {
484-
// FIXME: need a table to collect tydesc globals.
485-
486-
let tydesc = C_null(T_ptr(cx.ccx().tydesc_type));
487-
let rval =
488-
Call(cx, cx.ccx().upcalls.shared_malloc,
489-
[llsize, tydesc]);
484+
let rval = Call(cx, cx.ccx().upcalls.shared_malloc, [llsize]);
490485
ret rslt(cx, PointerCast(cx, rval, llptr_ty));
491486
}
492487

branches/try/src/comp/middle/trans/closure.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ fn make_opaque_cbox_take_glue(
627627

628628
// Allocate memory, update original ptr, and copy existing data
629629
let malloc = ccx.upcalls.shared_malloc;
630-
let cbox_out = Call(bcx, malloc, [sz, tydesc]);
630+
let cbox_out = Call(bcx, malloc, [sz]);
631631
let cbox_out = PointerCast(bcx, cbox_out, llopaquecboxty);
632632
let {bcx, val: _} = call_memmove(bcx, cbox_out, cbox_in, sz);
633633
Store(bcx, cbox_out, cboxptr);

branches/try/src/rt/rust_upcall.cpp

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -217,29 +217,24 @@ upcall_validate_box(rust_opaque_box* ptr) {
217217
struct s_shared_malloc_args {
218218
uintptr_t retval;
219219
size_t nbytes;
220-
type_desc *td;
221220
};
222221

223222
extern "C" CDECL void
224223
upcall_s_shared_malloc(s_shared_malloc_args *args) {
225224
rust_task *task = rust_task_thread::get_task();
226225
LOG_UPCALL_ENTRY(task);
227226

228-
LOG(task, mem,
229-
"upcall shared_malloc(%" PRIdPTR ", 0x%" PRIxPTR ")",
230-
args->nbytes, args->td);
227+
LOG(task, mem, "upcall shared_malloc(%" PRIdPTR ")", args->nbytes);
231228
void *p = task->kernel->malloc(args->nbytes, "shared malloc");
232229
memset(p, '\0', args->nbytes);
233-
LOG(task, mem,
234-
"upcall shared_malloc(%" PRIdPTR ", 0x%" PRIxPTR
235-
") = 0x%" PRIxPTR,
236-
args->nbytes, args->td, (uintptr_t)p);
230+
LOG(task, mem, "upcall shared_malloc(%" PRIdPTR ") = 0x%" PRIxPTR,
231+
args->nbytes, (uintptr_t)p);
237232
args->retval = (uintptr_t) p;
238233
}
239234

240235
extern "C" CDECL uintptr_t
241-
upcall_shared_malloc(size_t nbytes, type_desc *td) {
242-
s_shared_malloc_args args = {0, nbytes, td};
236+
upcall_shared_malloc(size_t nbytes) {
237+
s_shared_malloc_args args = {0, nbytes};
243238
UPCALL_SWITCH_STACK(&args, upcall_s_shared_malloc);
244239
return args.retval;
245240
}

0 commit comments

Comments
 (0)