@@ -3581,12 +3581,7 @@ fn trans_expr(bcx: @block_ctxt, e: @ast::expr, dest: dest) -> @block_ctxt {
3581
3581
}
3582
3582
else { ret lval_to_dps ( bcx, a, dest) ; }
3583
3583
}
3584
- ast:: expr_cast ( val, _) {
3585
- alt tcx. cast_map . find ( e. id ) {
3586
- some ( ty:: triv_cast. ) { ret trans_expr ( bcx, val, dest) ; }
3587
- _ { ret trans_cast( bcx, val, e. id , dest) ; }
3588
- }
3589
- }
3584
+ ast:: expr_cast ( val, _) { ret trans_cast ( bcx, val, e. id , dest) ; }
3590
3585
ast:: expr_anon_obj ( anon_obj) {
3591
3586
ret trans_anon_obj ( bcx, e. span , anon_obj, e. id , dest) ;
3592
3587
}
@@ -3615,7 +3610,7 @@ fn trans_expr(bcx: @block_ctxt, e: @ast::expr, dest: dest) -> @block_ctxt {
3615
3610
// that is_call_expr(ex) -- but we don't support that
3616
3611
// yet
3617
3612
// FIXME
3618
- check ( ast_util:: is_tail_call_expr ( ex) ) ;
3613
+ check ( ast_util:: is_call_expr ( ex) ) ;
3619
3614
ret trans_be( bcx, ex) ;
3620
3615
}
3621
3616
ast:: expr_fail ( expr) {
@@ -3952,8 +3947,7 @@ fn trans_ret(bcx: @block_ctxt, e: option::t<@ast::expr>) -> @block_ctxt {
3952
3947
fn build_return ( bcx : @block_ctxt ) { Br ( bcx, bcx_fcx ( bcx) . llreturn ) ; }
3953
3948
3954
3949
// fn trans_be(cx: &@block_ctxt, e: &@ast::expr) -> result {
3955
- fn trans_be( cx : @block_ctxt , e : @ast:: expr ) :
3956
- ast_util:: is_tail_call_expr ( e ) ->
3950
+ fn trans_be( cx : @block_ctxt , e : @ast:: expr ) : ast_util:: is_call_expr ( e ) ->
3957
3951
@block_ctxt {
3958
3952
// FIXME: Turn this into a real tail call once
3959
3953
// calling convention issues are settled
@@ -4354,7 +4348,7 @@ fn new_fn_ctxt_w_id(cx: @local_ctxt, sp: span, llfndecl: ValueRef,
4354
4348
lllocals : new_int_hash :: < local_val > ( ) ,
4355
4349
llupvars : new_int_hash :: < ValueRef > ( ) ,
4356
4350
mutable lltydescs : [ ] ,
4357
- derived_tydescs : map :: mk_hashmap ( ty:: hash_ty , ty :: eq_ty ) ,
4351
+ derived_tydescs : ty:: new_ty_hash ( ) ,
4358
4352
id : id,
4359
4353
ret_style : rstyle,
4360
4354
sp : sp,
@@ -4728,16 +4722,6 @@ fn trans_impl(cx: @local_ctxt, name: ast::ident, methods: [@ast::method],
4728
4722
// that does so later on?
4729
4723
fn trans_const_expr ( cx : @crate_ctxt , e : @ast:: expr ) -> ValueRef {
4730
4724
alt e. node {
4731
- ast:: expr_cast ( e1, _) {
4732
- alt ccx_tcx ( cx) . cast_map . find ( e. id ) {
4733
- some ( ty:: triv_cast. ) { trans_const_expr ( cx, e1) }
4734
- _ {
4735
- cx. sess . span_err ( e. span ,
4736
- "non-trivial cast in constant expression" ) ;
4737
- fail;
4738
- }
4739
- }
4740
- }
4741
4725
ast:: expr_lit ( lit) { ret trans_crate_lit ( cx, * lit) ; }
4742
4726
ast:: expr_binary ( b, e1, e2) {
4743
4727
let te1 = trans_const_expr ( cx, e1) ;
@@ -5658,13 +5642,6 @@ fn trans_crate(sess: session::session, crate: @ast::crate, tcx: ty::ctxt,
5658
5642
tn. associate ( "taskptr" , taskptr_type) ;
5659
5643
let tydesc_type = T_tydesc ( targ_cfg) ;
5660
5644
tn. associate ( "tydesc" , tydesc_type) ;
5661
- let hasher = ty:: hash_ty;
5662
- let eqer = ty:: eq_ty;
5663
- let tag_sizes = map:: mk_hashmap :: < ty:: t , uint > ( hasher, eqer) ;
5664
- let tydescs = map:: mk_hashmap :: < ty:: t , @tydesc_info > ( hasher, eqer) ;
5665
- let lltypes = map:: mk_hashmap :: < ty:: t , TypeRef > ( hasher, eqer) ;
5666
- let sha1s = map:: mk_hashmap :: < ty:: t , str > ( hasher, eqer) ;
5667
- let short_names = map:: mk_hashmap :: < ty:: t , str > ( hasher, eqer) ;
5668
5645
let crate_map = decl_crate_map ( sess, link_meta. name , llmod) ;
5669
5646
let dbg_cx = if sess. get_opts ( ) . debuginfo {
5670
5647
option:: some ( @{ llmetadata: map:: new_int_hash ( ) ,
@@ -5685,18 +5662,18 @@ fn trans_crate(sess: session::session, crate: @ast::crate, tcx: ty::ctxt,
5685
5662
item_symbols: new_int_hash :: < str > ( ) ,
5686
5663
mutable main_fn: none :: < ValueRef > ,
5687
5664
link_meta: link_meta,
5688
- tag_sizes: tag_sizes ,
5665
+ tag_sizes: ty :: new_ty_hash ( ) ,
5689
5666
discrims: ast_util:: new_def_id_hash :: < ValueRef > ( ) ,
5690
5667
discrim_symbols: new_int_hash :: < str > ( ) ,
5691
5668
consts: new_int_hash :: < ValueRef > ( ) ,
5692
5669
obj_methods: new_int_hash :: < ( ) > ( ) ,
5693
- tydescs: tydescs ,
5670
+ tydescs: ty :: new_ty_hash ( ) ,
5694
5671
module_data: new_str_hash :: < ValueRef > ( ) ,
5695
- lltypes: lltypes ,
5672
+ lltypes: ty :: new_ty_hash ( ) ,
5696
5673
names: namegen ( 0 ) ,
5697
5674
sha: sha,
5698
- type_sha1s: sha1s ,
5699
- type_short_names: short_names ,
5675
+ type_sha1s: ty :: new_ty_hash ( ) ,
5676
+ type_short_names: ty :: new_ty_hash ( ) ,
5700
5677
tcx: tcx,
5701
5678
mut_map: mut_map,
5702
5679
copy_map: copy_map,
0 commit comments