提交 5378f48a 编写于 作者: M Michael Sullivan

Remove vec_append_glue from the compiler.

上级 95def699
......@@ -88,8 +88,8 @@ fn bzero_glue_name() -> str {
ret "rust_bzero_glue";
}
fn vec_append_glue_name() -> str {
ret "rust_vec_append_glue";
fn yield_glue_name() -> str {
ret "rust_yield_glue";
}
fn no_op_type_glue_name() -> str {
......
......@@ -85,8 +85,7 @@ fn next(str prefix) -> str {
type derived_tydesc_info = rec(ValueRef lltydesc, bool escapes);
type glue_fns = rec(ValueRef no_op_type_glue,
ValueRef vec_append_glue);
type glue_fns = rec(ValueRef no_op_type_glue);
type tydesc_info = rec(ty::t ty,
ValueRef tydesc,
......@@ -8724,39 +8723,6 @@ fn make_no_op_type_glue(ValueRef fun) {
new_builder(llbb).RetVoid();
}
fn make_vec_append_glue(ModuleRef llmod, type_names tn) -> ValueRef {
/*
* Args to vec_append_glue:
*
* 0. (Implicit) task ptr
*
* 1. Pointer to the tydesc of the vec, so that we can tell if it's gc
* mem, and have a tydesc to pass to malloc if we're allocating anew.
*
* 2. Pointer to the tydesc of the vec's stored element type, so that
* elements can be copied to a newly alloc'ed vec if one must be
* created.
*
* 3. Dst vec ptr (i.e. ptr to ptr to rust_vec).
*
* 4. Src vec (i.e. ptr to rust_vec).
*
* 5. Flag indicating whether to skip trailing null on dst.
*
*/
auto ty = T_fn([T_taskptr(tn),
T_ptr(T_tydesc(tn)),
T_ptr(T_tydesc(tn)),
T_ptr(T_opaque_vec_ptr()),
T_opaque_vec_ptr(), T_bool()],
T_void());
auto llfn = decl_fastcall_fn(llmod, abi::vec_append_glue_name(), ty);
ret llfn;
}
fn vec_fill(&@block_ctxt bcx, ValueRef v) -> ValueRef {
ret bcx.build.Load(bcx.build.GEP(v, [C_int(0),
C_int(abi::vec_elt_fill)]));
......@@ -8769,8 +8735,7 @@ fn vec_p0(&@block_ctxt bcx, ValueRef v) -> ValueRef {
}
fn make_glues(ModuleRef llmod, &type_names tn) -> @glue_fns {
ret @rec(no_op_type_glue = decl_no_op_type_glue(llmod, tn),
vec_append_glue = make_vec_append_glue(llmod, tn));
ret @rec(no_op_type_glue = decl_no_op_type_glue(llmod, tn));
}
fn make_common_glue(&session::session sess, &str output) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册