Re-enabling some tests.
This commit is contained in:
parent
f6f8a06d6b
commit
866ee6ecb4
6 changed files with 6 additions and 15 deletions
|
@ -100,7 +100,7 @@ fn declare_upcalls(type_names tn, ModuleRef llmod) -> @upcalls {
|
||||||
mark=d("mark", [T_ptr(T_i8())], T_int()),
|
mark=d("mark", [T_ptr(T_i8())], T_int()),
|
||||||
new_str=d("new_str", [T_ptr(T_i8()), T_size_t()],
|
new_str=d("new_str", [T_ptr(T_i8()), T_size_t()],
|
||||||
T_ptr(T_str())),
|
T_ptr(T_str())),
|
||||||
dup_str=d("dup_str", [T_ptr(T_str())],
|
dup_str=d("dup_str", [T_taskptr(tn), T_ptr(T_str())],
|
||||||
T_ptr(T_str())),
|
T_ptr(T_str())),
|
||||||
new_vec=d("new_vec", [T_size_t(), T_ptr(T_tydesc(tn))],
|
new_vec=d("new_vec", [T_size_t(), T_ptr(T_tydesc(tn))],
|
||||||
T_opaque_vec_ptr()),
|
T_opaque_vec_ptr()),
|
||||||
|
|
|
@ -6512,7 +6512,7 @@ fn deep_copy(&@block_ctxt bcx, ValueRef v, ty::t t, ValueRef target_task)
|
||||||
else if(ty::type_is_str(tcx, t)) {
|
else if(ty::type_is_str(tcx, t)) {
|
||||||
ret rslt(bcx,
|
ret rslt(bcx,
|
||||||
bcx.build.Call(bcx.fcx.lcx.ccx.upcalls.dup_str,
|
bcx.build.Call(bcx.fcx.lcx.ccx.upcalls.dup_str,
|
||||||
[bcx.fcx.lltaskptr, v]));
|
[bcx.fcx.lltaskptr, target_task, v]));
|
||||||
}
|
}
|
||||||
else if(ty::type_is_chan(tcx, t)) {
|
else if(ty::type_is_chan(tcx, t)) {
|
||||||
// If this is a channel, we need to clone it.
|
// If this is a channel, we need to clone it.
|
||||||
|
|
|
@ -355,11 +355,11 @@ upcall_new_str(rust_task *task, char const *s, size_t fill) {
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" CDECL rust_str *
|
extern "C" CDECL rust_str *
|
||||||
upcall_dup_str(rust_task *task, rust_str *str) {
|
upcall_dup_str(rust_task *task, rust_task *target, rust_str *str) {
|
||||||
LOG_UPCALL_ENTRY(task);
|
LOG_UPCALL_ENTRY(task);
|
||||||
scoped_lock with(task->kernel->scheduler_lock);
|
scoped_lock with(task->kernel->scheduler_lock);
|
||||||
|
|
||||||
return make_str(task, (char const *)str->data, str->fill);
|
return make_str(target, (char const *)str->data, str->fill);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" CDECL rust_vec *
|
extern "C" CDECL rust_vec *
|
||||||
|
|
|
@ -1,10 +1,5 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// xfail-stage0
|
// xfail-stage0
|
||||||
// xfail-stage1
|
|
||||||
// xfail-stage2
|
|
||||||
// Reported as issue #126, child leaks the string.
|
// Reported as issue #126, child leaks the string.
|
||||||
fn child2(str s) { }
|
fn child2(str s) { }
|
||||||
|
|
||||||
fn main() { auto x = spawn child2("hi"); }
|
fn main() { auto x = spawn child2("hi"); }
|
||||||
|
|
|
@ -5,8 +5,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// xfail-stage0
|
// xfail-stage0
|
||||||
// xfail-stage1
|
|
||||||
// xfail-stage2
|
|
||||||
|
|
||||||
use std;
|
use std;
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
// xfail-stage0
|
// xfail-stage0
|
||||||
// xfail-stage1
|
|
||||||
// xfail-stage2
|
|
||||||
fn main() -> () {
|
fn main() -> () {
|
||||||
spawn child("Hello");
|
spawn child("Hello");
|
||||||
}
|
}
|
||||||
|
|
||||||
fn child(str s) {
|
fn child(str s) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue