@@ -626,7 +626,6 @@ fn make_take_glue(bcx: block, v: ValueRef, t: ty::t) {
626626 Store ( bcx, val, v) ;
627627 bcx
628628 }
629- ty:: ty_vec ( _) | ty:: ty_str |
630629 ty:: ty_evec ( _, ty:: vstore_uniq) | ty:: ty_estr ( ty:: vstore_uniq) {
631630 let { bcx, val} = tvec:: duplicate_uniq ( bcx, Load ( bcx, v) , t) ;
632631 Store ( bcx, val, v) ;
@@ -704,8 +703,7 @@ fn make_free_glue(bcx: block, v: ValueRef, t: ty::t) {
704703 uniq:: make_free_glue ( bcx, v, t)
705704 }
706705 ty:: ty_evec ( _, ty:: vstore_uniq) | ty:: ty_estr ( ty:: vstore_uniq) |
707- ty:: ty_evec ( _, ty:: vstore_box) | ty:: ty_estr ( ty:: vstore_box) |
708- ty:: ty_vec ( _) | ty:: ty_str {
706+ ty:: ty_evec ( _, ty:: vstore_box) | ty:: ty_estr ( ty:: vstore_box) {
709707 make_free_glue ( bcx, v,
710708 tvec:: expand_boxed_vec_ty ( bcx. tcx ( ) , t) ) ;
711709 ret;
@@ -769,7 +767,7 @@ fn make_drop_glue(bcx: block, v0: ValueRef, t: ty::t) {
769767 ty:: ty_estr ( ty:: vstore_box) | ty:: ty_evec ( _, ty:: vstore_box) {
770768 decr_refcnt_maybe_free ( bcx, Load ( bcx, v0) , t)
771769 }
772- ty:: ty_uniq ( _) | ty :: ty_vec ( _ ) | ty :: ty_str |
770+ ty:: ty_uniq ( _) |
773771 ty:: ty_evec ( _, ty:: vstore_uniq) | ty:: ty_estr ( ty:: vstore_uniq) {
774772 free_ty ( bcx, Load ( bcx, v0) , t)
775773 }
@@ -1235,7 +1233,7 @@ fn drop_ty(cx: block, v: ValueRef, t: ty::t) -> block {
12351233fn drop_ty_immediate ( bcx : block , v : ValueRef , t : ty:: t ) -> block {
12361234 let _icx = bcx. insn_ctxt ( ~"drop_ty_immediate") ;
12371235 alt ty:: get ( t) . struct {
1238- ty:: ty_uniq ( _) | ty :: ty_vec ( _ ) | ty :: ty_str |
1236+ ty:: ty_uniq ( _) |
12391237 ty:: ty_evec ( _, ty:: vstore_uniq) |
12401238 ty:: ty_estr ( ty:: vstore_uniq) {
12411239 free_ty ( bcx, v, t)
@@ -1261,7 +1259,6 @@ fn take_ty_immediate(bcx: block, v: ValueRef, t: ty::t) -> result {
12611259 ty:: ty_uniq ( _) {
12621260 uniq:: duplicate ( bcx, v, t)
12631261 }
1264- ty:: ty_str | ty:: ty_vec ( _) |
12651262 ty:: ty_evec ( _, ty:: vstore_uniq) |
12661263 ty:: ty_estr ( ty:: vstore_uniq) {
12671264 tvec:: duplicate_uniq ( bcx, v, t)
@@ -2972,9 +2969,7 @@ fn adapt_borrowed_value(lv: lval_result,
29722969 ret { lv : lval_temp ( bcx, body_ptr) , ty : rptr_ty} ;
29732970 }
29742971
2975- ty:: ty_str | ty:: ty_vec ( _) |
2976- ty:: ty_estr ( _) |
2977- ty:: ty_evec ( _, _) {
2972+ ty:: ty_estr ( _) | ty:: ty_evec ( _, _) {
29782973 let ccx = bcx. ccx ( ) ;
29792974 let val = alt lv. kind {
29802975 temporary { lv. val }
@@ -4997,10 +4992,11 @@ fn create_main_wrapper(ccx: @crate_ctxt, sp: span, main_llfn: ValueRef,
49974992
49984993 fn create_main ( ccx : @crate_ctxt , main_llfn : ValueRef ,
49994994 takes_argv : bool ) -> ValueRef {
5000- let unit_ty = ty:: mk_str ( ccx. tcx ) ;
4995+ let unit_ty = ty:: mk_estr ( ccx. tcx , ty :: vstore_uniq ) ;
50014996 let vecarg_ty: ty:: arg =
50024997 { mode: ast:: expl ( ast:: by_val) ,
5003- ty: ty:: mk_vec ( ccx. tcx , { ty: unit_ty, mutbl: ast:: m_imm} ) } ;
4998+ ty: ty:: mk_evec ( ccx. tcx , { ty: unit_ty, mutbl: ast:: m_imm} ,
4999+ ty:: vstore_uniq) } ;
50045000 let nt = ty:: mk_nil ( ccx. tcx ) ;
50055001 let llfty = type_of_fn ( ccx, ~[ vecarg_ty] , nt) ;
50065002 let llfdecl = decl_fn ( ccx. llmod , ~"_rust_main",
0 commit comments