@@ -375,48 +375,6 @@ fn trans_append_literal(bcx: block, vptrptr: ValueRef, vec_ty: ty::t,
375
375
bcx
376
376
}
377
377
378
- fn trans_add( bcx: block, vec_ty: ty:: t, lhs: ValueRef ,
379
- rhs: ValueRef , dest: dest) -> block {
380
- let _icx = bcx. insn_ctxt( "tvec::trans_add" ) ;
381
- let ccx = bcx. ccx( ) ;
382
-
383
- let unit_ty = ty:: sequence_element_type( bcx. tcx( ) , vec_ty) ;
384
- let llunitty = type_of:: type_of( ccx, unit_ty) ;
385
-
386
- if ty:: get( vec_ty) . struct == ty:: ty_str {
387
- let lhs = PointerCast ( bcx, lhs, T_ptr ( T_i8 ( ) ) ) ;
388
- let rhs = PointerCast ( bcx, rhs, T_ptr ( T_i8 ( ) ) ) ;
389
- let n = Call ( bcx, ccx. upcalls. str_concat, ~[ lhs, rhs] ) ;
390
- let n = PointerCast (
391
- bcx, n, T_unique_ptr ( T_unique ( ccx, T_vec ( ccx, llunitty) ) ) ) ;
392
- ret base:: store_in_dest( bcx, n, dest) ;
393
- }
394
-
395
- let lhs_fill = get_fill( bcx, get_bodyptr( bcx, lhs) ) ;
396
- let rhs_fill = get_fill( bcx, get_bodyptr( bcx, rhs) ) ;
397
- let new_fill = Add ( bcx, lhs_fill, rhs_fill) ;
398
- let mut { bcx: bcx, val: new_vec_ptr} =
399
- alloc_uniq_raw( bcx, unit_ty, new_fill, new_fill) ;
400
-
401
- let new_vec_body_ptr = get_bodyptr( bcx, new_vec_ptr) ;
402
- let write_ptr_ptr = do_spill_noroot
403
- ( bcx, get_dataptr( bcx, new_vec_body_ptr) ) ;
404
- let copy_fn = fn @( bcx: block, addr: ValueRef ,
405
- _ty: ty:: t) -> block {
406
- let ccx = bcx. ccx( ) ;
407
- let write_ptr = Load ( bcx, write_ptr_ptr) ;
408
- let bcx = copy_val( bcx, INIT , write_ptr,
409
- load_if_immediate( bcx, addr, unit_ty) , unit_ty) ;
410
- Store ( bcx, InBoundsGEP ( bcx, write_ptr, ~[ C_int ( ccx, 1 ) ] ) ,
411
- write_ptr_ptr) ;
412
- ret bcx;
413
- } ;
414
-
415
- let bcx = iter_vec_uniq( bcx, lhs, vec_ty, lhs_fill, copy_fn) ;
416
- let bcx = iter_vec_uniq( bcx, rhs, vec_ty, rhs_fill, copy_fn) ;
417
- ret base:: store_in_dest( bcx, new_vec_ptr, dest) ;
418
- }
419
-
420
378
type val_and_ty_fn = fn @( block, ValueRef , ty:: t) -> result;
421
379
422
380
type iter_vec_block = fn ( block, ValueRef , ty:: t) -> block;
0 commit comments