about summary refs log tree commit diff
path: root/src/rt/rust_task.cpp
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2011-04-08 21:27:54 -0700
committerPatrick Walton <pcwalton@mimiga.net>2011-04-14 11:24:25 -0700
commit65b75788517ad797c1ae86f9d0c550ec620c4dfc (patch)
tree31fed8460b11b6deea72485d60f606a4c4ab8327 /src/rt/rust_task.cpp
parentec5a60d5e26c9d38755e66660d7913e42f42a1b3 (diff)
downloadrust-65b75788517ad797c1ae86f9d0c550ec620c4dfc.tar.gz
rust-65b75788517ad797c1ae86f9d0c550ec620c4dfc.zip
rustc: Remove generalize_ty. Instead, maintain an explicit type parameter substitution list.
Diffstat (limited to 'src/rt/rust_task.cpp')
-rw-r--r--src/rt/rust_task.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp
index c2fefef0d99..053d3610552 100644
--- a/src/rt/rust_task.cpp
+++ b/src/rt/rust_task.cpp
@@ -252,6 +252,23 @@ rust_task::start(uintptr_t exit_task_glue,
     transition(&dom->newborn_tasks, &dom->running_tasks);
 }
 
+#if 0
+void
+rust_task::print_stack_trace()
+{
+    void *addrs[256];
+    uintptr_t sp = this->rust_sp;
+
+    // We need to be careful to not use any Rust stack space here, since this
+    // may be called on stack overflow.
+    asm("xchgl %0, %%esp\n"
+        "pushl $256\n"
+        "pushl %1\n"
+        "calll %3\n"
+        "xchgl %%esp, %0\n"
+}
+#endif
+
 void
 rust_task::grow(size_t n_frame_bytes)
 {