Skip to content

Commit 5378f48

Browse files
committed
Remove vec_append_glue from the compiler.
1 parent 95def69 commit 5378f48

File tree

2 files changed

+4
-39
lines changed

2 files changed

+4
-39
lines changed

src/comp/back/abi.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ fn bzero_glue_name() -> str {
8888
ret "rust_bzero_glue";
8989
}
9090

91-
fn vec_append_glue_name() -> str {
92-
ret "rust_vec_append_glue";
91+
fn yield_glue_name() -> str {
92+
ret "rust_yield_glue";
9393
}
9494

9595
fn no_op_type_glue_name() -> str {

src/comp/middle/trans.rs

Lines changed: 2 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@ state obj namegen(mutable int i) {
8585

8686
type derived_tydesc_info = rec(ValueRef lltydesc, bool escapes);
8787

88-
type glue_fns = rec(ValueRef no_op_type_glue,
89-
ValueRef vec_append_glue);
88+
type glue_fns = rec(ValueRef no_op_type_glue);
9089

9190
type tydesc_info = rec(ty::t ty,
9291
ValueRef tydesc,
@@ -8724,39 +8723,6 @@ fn make_no_op_type_glue(ValueRef fun) {
87248723
new_builder(llbb).RetVoid();
87258724
}
87268725

8727-
fn make_vec_append_glue(ModuleRef llmod, type_names tn) -> ValueRef {
8728-
/*
8729-
* Args to vec_append_glue:
8730-
*
8731-
* 0. (Implicit) task ptr
8732-
*
8733-
* 1. Pointer to the tydesc of the vec, so that we can tell if it's gc
8734-
* mem, and have a tydesc to pass to malloc if we're allocating anew.
8735-
*
8736-
* 2. Pointer to the tydesc of the vec's stored element type, so that
8737-
* elements can be copied to a newly alloc'ed vec if one must be
8738-
* created.
8739-
*
8740-
* 3. Dst vec ptr (i.e. ptr to ptr to rust_vec).
8741-
*
8742-
* 4. Src vec (i.e. ptr to rust_vec).
8743-
*
8744-
* 5. Flag indicating whether to skip trailing null on dst.
8745-
*
8746-
*/
8747-
8748-
auto ty = T_fn([T_taskptr(tn),
8749-
T_ptr(T_tydesc(tn)),
8750-
T_ptr(T_tydesc(tn)),
8751-
T_ptr(T_opaque_vec_ptr()),
8752-
T_opaque_vec_ptr(), T_bool()],
8753-
T_void());
8754-
8755-
auto llfn = decl_fastcall_fn(llmod, abi::vec_append_glue_name(), ty);
8756-
ret llfn;
8757-
}
8758-
8759-
87608726
fn vec_fill(&@block_ctxt bcx, ValueRef v) -> ValueRef {
87618727
ret bcx.build.Load(bcx.build.GEP(v, [C_int(0),
87628728
C_int(abi::vec_elt_fill)]));
@@ -8769,8 +8735,7 @@ fn vec_p0(&@block_ctxt bcx, ValueRef v) -> ValueRef {
87698735
}
87708736

87718737
fn make_glues(ModuleRef llmod, &type_names tn) -> @glue_fns {
8772-
ret @rec(no_op_type_glue = decl_no_op_type_glue(llmod, tn),
8773-
vec_append_glue = make_vec_append_glue(llmod, tn));
8738+
ret @rec(no_op_type_glue = decl_no_op_type_glue(llmod, tn));
87748739
}
87758740

87768741
fn make_common_glue(&session::session sess, &str output) {

0 commit comments

Comments
 (0)