about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEric Holk <eholk@mozilla.com>2011-06-28 14:21:31 -0700
committerGraydon Hoare <graydon@mozilla.com>2011-06-28 16:12:34 -0700
commit866ee6ecb42e35d18bdbd89e63c45c1ccb38540b (patch)
tree6fe7285dac82706012f7c4a1f0908a6feb8871de /src
parentf6f8a06d6bf010b8d30c23786976792cccfbd6de (diff)
downloadrust-866ee6ecb42e35d18bdbd89e63c45c1ccb38540b.tar.gz
rust-866ee6ecb42e35d18bdbd89e63c45c1ccb38540b.zip
Re-enabling some tests.
Diffstat (limited to 'src')
-rw-r--r--src/comp/back/upcall.rs2
-rw-r--r--src/comp/middle/trans.rs2
-rw-r--r--src/rt/rust_upcall.cpp4
-rw-r--r--src/test/run-pass/child-outlives-parent.rs7
-rw-r--r--src/test/run-pass/spawn-types.rs2
-rw-r--r--src/test/run-pass/task-life-0.rs4
6 files changed, 6 insertions, 15 deletions
diff --git a/src/comp/back/upcall.rs b/src/comp/back/upcall.rs
index 1ed0d4bbf9c..5fad90ce031 100644
--- a/src/comp/back/upcall.rs
+++ b/src/comp/back/upcall.rs
@@ -100,7 +100,7 @@ fn declare_upcalls(type_names tn, ModuleRef llmod) -> @upcalls {
              mark=d("mark", [T_ptr(T_i8())], T_int()),
              new_str=d("new_str", [T_ptr(T_i8()), T_size_t()],
                        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())),
              new_vec=d("new_vec", [T_size_t(), T_ptr(T_tydesc(tn))],
                        T_opaque_vec_ptr()),
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs
index 428076e46ba..95488f76a20 100644
--- a/src/comp/middle/trans.rs
+++ b/src/comp/middle/trans.rs
@@ -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)) {
         ret rslt(bcx,
                 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)) {
         // If this is a channel, we need to clone it.
diff --git a/src/rt/rust_upcall.cpp b/src/rt/rust_upcall.cpp
index 18d9f4c1e8c..f6257470b29 100644
--- a/src/rt/rust_upcall.cpp
+++ b/src/rt/rust_upcall.cpp
@@ -355,11 +355,11 @@ upcall_new_str(rust_task *task, char const *s, size_t fill) {
 }
 
 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);
     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 *
diff --git a/src/test/run-pass/child-outlives-parent.rs b/src/test/run-pass/child-outlives-parent.rs
index 9cd3b67821b..4bf03ea243a 100644
--- a/src/test/run-pass/child-outlives-parent.rs
+++ b/src/test/run-pass/child-outlives-parent.rs
@@ -1,10 +1,5 @@
-
-
-
 // xfail-stage0
-// xfail-stage1
-// xfail-stage2
 // Reported as issue #126, child leaks the string.
 fn child2(str s) { }
 
-fn main() { auto x = spawn child2("hi"); }
\ No newline at end of file
+fn main() { auto x = spawn child2("hi"); }
diff --git a/src/test/run-pass/spawn-types.rs b/src/test/run-pass/spawn-types.rs
index 0051b2ba14d..4bbeb3c064f 100644
--- a/src/test/run-pass/spawn-types.rs
+++ b/src/test/run-pass/spawn-types.rs
@@ -5,8 +5,6 @@
  */
 
 // xfail-stage0
-// xfail-stage1
-// xfail-stage2
 
 use std;
 
diff --git a/src/test/run-pass/task-life-0.rs b/src/test/run-pass/task-life-0.rs
index 726dfa261e0..74d966c780b 100644
--- a/src/test/run-pass/task-life-0.rs
+++ b/src/test/run-pass/task-life-0.rs
@@ -1,10 +1,8 @@
 // xfail-stage0
-// xfail-stage1
-// xfail-stage2
 fn main() -> () {
     spawn child("Hello");
 }
 
 fn child(str s) {
     
-}
\ No newline at end of file
+}