Create some infrastructure for building up @-vectors. Work on #2921.

This commit is contained in:
Michael Sullivan
2012-07-17 16:31:19 -07:00
parent 8e6d66280f
commit aa5b5ab886
9 changed files with 295 additions and 14 deletions

View File

@@ -133,6 +133,14 @@ unsupervise() {
task->unsupervise();
}
extern "C" CDECL void
vec_reserve_shared_actual(type_desc* ty, rust_vec_box** vp,
size_t n_elts) {
rust_task *task = rust_get_current_task();
reserve_vec_exact_shared(task, vp, n_elts * ty->size);
}
// This is completely misnamed.
extern "C" CDECL void
vec_reserve_shared(type_desc* ty, rust_vec_box** vp,
size_t n_elts) {