@@ -2218,23 +2218,14 @@ pub fn trans_mod(ccx: @mut CrateContext, m: &ast::_mod) {
2218
2218
pub fn register_fn ( ccx : @mut CrateContext ,
2219
2219
sp : span ,
2220
2220
sym : ~str ,
2221
- node_id : ast:: NodeId )
2222
- -> ValueRef {
2223
- let t = ty:: node_id_to_type ( ccx. tcx , node_id) ;
2224
- register_fn_full ( ccx, sp, sym, node_id, t)
2225
- }
2226
-
2227
- pub fn register_fn_full ( ccx : @mut CrateContext ,
2228
- sp : span ,
2229
- sym : ~str ,
2230
- node_id : ast:: NodeId ,
2231
- node_type : ty:: t )
2232
- -> ValueRef {
2221
+ node_id : ast:: NodeId ,
2222
+ node_type : ty:: t )
2223
+ -> ValueRef {
2233
2224
let llfty = type_of_fn_from_ty ( ccx, node_type) ;
2234
- register_fn_fuller ( ccx, sp, sym, node_id, lib:: llvm:: CCallConv , llfty)
2225
+ register_fn_llvmty ( ccx, sp, sym, node_id, lib:: llvm:: CCallConv , llfty)
2235
2226
}
2236
2227
2237
- pub fn register_fn_fuller ( ccx : @mut CrateContext ,
2228
+ pub fn register_fn_llvmty ( ccx : @mut CrateContext ,
2238
2229
sp : span ,
2239
2230
sym : ~str ,
2240
2231
node_id : ast:: NodeId ,
@@ -2449,7 +2440,7 @@ pub fn get_item_val(ccx: @mut CrateContext, id: ast::NodeId) -> ValueRef {
2449
2440
2450
2441
ast:: item_fn( _, purity, _, _, _) => {
2451
2442
let llfn = if purity != ast:: extern_fn {
2452
- register_fn_full ( ccx, i. span , sym, i. id , ty)
2443
+ register_fn ( ccx, i. span , sym, i. id , ty)
2453
2444
} else {
2454
2445
foreign:: register_foreign_fn ( ccx, i. span , sym, i. id )
2455
2446
} ;
@@ -2499,7 +2490,7 @@ pub fn get_item_val(ccx: @mut CrateContext, id: ast::NodeId) -> ValueRef {
2499
2490
let path = vec:: append ( ( * pth) . clone ( ) , [ path_name ( ni. ident ) ] ) ;
2500
2491
let sym = exported_name ( ccx, path, ty, ni. attrs ) ;
2501
2492
2502
- register_fn_full ( ccx, ni. span , sym, ni. id , ty)
2493
+ register_fn ( ccx, ni. span , sym, ni. id , ty)
2503
2494
}
2504
2495
ast:: foreign_item_static( * ) => {
2505
2496
let ident = token:: ident_to_str ( & ni. ident ) ;
@@ -2527,7 +2518,7 @@ pub fn get_item_val(ccx: @mut CrateContext, id: ast::NodeId) -> ValueRef {
2527
2518
2528
2519
llfn = match enm. node {
2529
2520
ast:: item_enum( _, _) => {
2530
- register_fn_full ( ccx, ( * v) . span , sym, id, ty)
2521
+ register_fn ( ccx, ( * v) . span , sym, id, ty)
2531
2522
}
2532
2523
_ => fail ! ( "node_variant, shouldn't happen" )
2533
2524
} ;
@@ -2551,7 +2542,8 @@ pub fn get_item_val(ccx: @mut CrateContext, id: ast::NodeId) -> ValueRef {
2551
2542
let ty = ty:: node_id_to_type ( ccx. tcx , ctor_id) ;
2552
2543
let sym = exported_name ( ccx, ( * struct_path) . clone ( ) , ty,
2553
2544
struct_item. attrs ) ;
2554
- let llfn = register_fn_full ( ccx, struct_item. span , sym, ctor_id, ty) ;
2545
+ let llfn = register_fn ( ccx, struct_item. span ,
2546
+ sym, ctor_id, ty) ;
2555
2547
set_inline_hint ( llfn) ;
2556
2548
llfn
2557
2549
}
@@ -2586,7 +2578,7 @@ pub fn register_method(ccx: @mut CrateContext,
2586
2578
2587
2579
let sym = exported_name ( ccx, path, mty, m. attrs ) ;
2588
2580
2589
- let llfn = register_fn_full ( ccx, m. span , sym, id, mty) ;
2581
+ let llfn = register_fn ( ccx, m. span , sym, id, mty) ;
2590
2582
set_inline_hint_if_appr ( m. attrs , llfn) ;
2591
2583
llfn
2592
2584
}
0 commit comments