diff options
| author | bors <bors@rust-lang.org> | 2013-05-06 17:52:52 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-05-06 17:52:52 -0700 |
| commit | 05460fcd5a9b2be5055f55965f768b0aa37119d9 (patch) | |
| tree | 88e3b561606409ab312f933eee2df96a5397e643 /src/rt/rust_builtin.cpp | |
| parent | bd5fd6e42a904723c99383e684ddeaf02f01d972 (diff) | |
| parent | 39a119074aa27234a68bcf57899c8c4e015cd478 (diff) | |
| download | rust-05460fcd5a9b2be5055f55965f768b0aa37119d9.tar.gz rust-05460fcd5a9b2be5055f55965f768b0aa37119d9.zip | |
auto merge of #6286 : nikomatsakis/rust/issue-5910-dyna-freeze, r=nikomatsakis
This rather sprawling branch refactors the borrow checker and much of the region code, addressing a number of outstanding issues. I will close them manually after validating that there are test cases for each one, but here is a (probably partial) list: - #4903: Flow sensitivity - #3387: Moves in overloaded operators - #3850: Region granularity - #4666: Odd loaning errors - #6021: borrow check errors with hashmaps - #5910: @mut broken cc #5047 (take 5)
Diffstat (limited to 'src/rt/rust_builtin.cpp')
| -rw-r--r-- | src/rt/rust_builtin.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp index 8b7b89680fc..a491379153e 100644 --- a/src/rt/rust_builtin.cpp +++ b/src/rt/rust_builtin.cpp @@ -683,6 +683,20 @@ rust_task_local_data_atexit(rust_task *task, void (*cleanup_fn)(void *data)) { task->task_local_data_cleanup = cleanup_fn; } +// set/get/atexit task_borrow_list can run on the rust stack for speed. +extern "C" void * +rust_take_task_borrow_list(rust_task *task) { + void *r = task->borrow_list; + task->borrow_list = NULL; + return r; +} +extern "C" void +rust_set_task_borrow_list(rust_task *task, void *data) { + assert(task->borrow_list == NULL); + assert(data != NULL); + task->borrow_list = data; +} + extern "C" void task_clear_event_reject(rust_task *task) { task->clear_event_reject(); |
