@@ -1157,10 +1157,7 @@ fn declare_tydesc(cx: @local_ctxt, sp: span, t: ty::t, ty_params: [uint],
1157
1157
ret info;
1158
1158
}
1159
1159
1160
- tag glue_helper {
1161
- default_helper( fn ( @block_ctxt, ValueRef , ty:: t) ) ;
1162
- copy_helper ( fn ( @block_ctxt, ValueRef , ValueRef , ty:: t) ) ;
1163
- }
1160
+ type glue_helper = fn ( @block_ctxt , ValueRef , ty:: t ) ;
1164
1161
1165
1162
fn declare_generic_glue ( cx : @local_ctxt , t : ty:: t , llfnty : TypeRef , name : str )
1166
1163
-> ValueRef {
@@ -1215,14 +1212,7 @@ fn make_generic_glue_inner(cx: @local_ctxt, sp: span, t: ty::t,
1215
1212
let lltop = bcx. llbb ;
1216
1213
let llrawptr0 = llvm:: LLVMGetParam ( llfn, 3 u) ;
1217
1214
let llval0 = BitCast ( bcx, llrawptr0, llty) ;
1218
- alt helper {
1219
- default_helper( helper) { helper ( bcx, llval0, t) ; }
1220
- copy_helper ( helper) {
1221
- let llrawptr1 = llvm:: LLVMGetParam ( llfn, 4 u) ;
1222
- let llval1 = BitCast ( bcx, llrawptr1, llty) ;
1223
- helper ( bcx, llval0, llval1, t) ;
1224
- }
1225
- }
1215
+ helper ( bcx, llval0, t) ;
1226
1216
finish_fn ( fcx, lltop) ;
1227
1217
ret llfn;
1228
1218
}
@@ -1749,7 +1739,7 @@ fn lazily_emit_tydesc_glue(cx: @block_ctxt, field: int,
1749
1739
"take" ) ;
1750
1740
ti. take_glue = some :: < ValueRef > ( glue_fn) ;
1751
1741
make_generic_glue ( lcx, cx. sp , ti. ty , glue_fn,
1752
- default_helper ( make_take_glue) ,
1742
+ make_take_glue,
1753
1743
ti. ty_params , "take" ) ;
1754
1744
log #fmt[ "--- lazily_emit_tydesc_glue TAKE %s" ,
1755
1745
ty_to_str ( bcx_tcx ( cx) , ti. ty ) ] ;
@@ -1767,7 +1757,7 @@ fn lazily_emit_tydesc_glue(cx: @block_ctxt, field: int,
1767
1757
"drop" ) ;
1768
1758
ti. drop_glue = some :: < ValueRef > ( glue_fn) ;
1769
1759
make_generic_glue ( lcx, cx. sp , ti. ty , glue_fn,
1770
- default_helper ( make_drop_glue) ,
1760
+ make_drop_glue,
1771
1761
ti. ty_params , "drop" ) ;
1772
1762
log #fmt[ "--- lazily_emit_tydesc_glue DROP %s" ,
1773
1763
ty_to_str ( bcx_tcx ( cx) , ti. ty ) ] ;
@@ -1785,7 +1775,7 @@ fn lazily_emit_tydesc_glue(cx: @block_ctxt, field: int,
1785
1775
"free" ) ;
1786
1776
ti. free_glue = some :: < ValueRef > ( glue_fn) ;
1787
1777
make_generic_glue ( lcx, cx. sp , ti. ty , glue_fn,
1788
- default_helper ( make_free_glue) ,
1778
+ make_free_glue,
1789
1779
ti. ty_params , "free" ) ;
1790
1780
log #fmt[ "--- lazily_emit_tydesc_glue FREE %s" ,
1791
1781
ty_to_str ( bcx_tcx ( cx) , ti. ty ) ] ;
0 commit comments