@@ -955,15 +955,16 @@ fn trans_upcall(@block_ctxt cx, str name, vec[ValueRef] args) -> result {
955
955
auto cxx = cx. fcx . ccx ;
956
956
auto lltaskptr = cx. build . PtrToInt ( cx. fcx . lltaskptr , T_int ( ) ) ;
957
957
auto args2 = vec ( lltaskptr) + args;
958
- auto t = trans_native ( cx. build , cxx. glues , lltaskptr,
959
- cxx. externs , cxx. tn , cxx. llmod , name, true , args2) ;
958
+ auto t = trans_native_call ( cx. build , cxx. glues , lltaskptr,
959
+ cxx. externs , cxx. tn , cxx. llmod , name,
960
+ true , args2) ;
960
961
ret res( cx, t) ;
961
962
}
962
963
963
- fn trans_native ( builder b, @glue_fns glues , ValueRef lltaskptr ,
964
- & hashmap[ str, ValueRef ] externs ,
965
- type_names tn, ModuleRef llmod, str name ,
966
- bool pass_task , vec[ ValueRef ] args ) -> ValueRef {
964
+ fn trans_native_call ( builder b, @glue_fns glues , ValueRef lltaskptr ,
965
+ & hashmap[ str, ValueRef ] externs ,
966
+ type_names tn, ModuleRef llmod, str name ,
967
+ bool pass_task , vec[ ValueRef ] args ) -> ValueRef {
967
968
let int n = ( _vec. len [ ValueRef ] ( args) as int ) ;
968
969
let ValueRef llnative = get_simple_extern_fn ( externs, llmod, name, n) ;
969
970
llnative = llvm. LLVMConstPointerCast ( llnative, T_int ( ) ) ;
@@ -6023,7 +6024,7 @@ fn decl_native_fn_and_pair(@crate_ctxt cx,
6023
6024
arg_n += 1 u;
6024
6025
}
6025
6026
6026
- r = trans_native ( bcx. build, cx. glues, lltaskptr, cx. externs,
6027
+ r = trans_native_call ( bcx. build, cx. glues, lltaskptr, cx. externs,
6027
6028
cx. tn, cx. llmod, name, pass_task, call_args) ;
6028
6029
rptr = bcx. build. BitCast ( fcx. llretptr, T_ptr ( T_i32 ( ) ) ) ;
6029
6030
}
@@ -6173,7 +6174,6 @@ fn collect_tag_ctors(@crate_ctxt cx, @ast.crate crate) {
6173
6174
fold. fold_crate [ @crate_ctxt] ( cx, fld, crate ) ;
6174
6175
}
6175
6176
6176
-
6177
6177
// The constant translation pass.
6178
6178
6179
6179
fn trans_constant ( & @crate_ctxt cx , @ast. item it ) -> @crate_ctxt {
@@ -6263,8 +6263,8 @@ fn trans_exit_task_glue(@glue_fns glues,
6263
6263
auto build = new_builder ( entrybb) ;
6264
6264
auto tptr = build. PtrToInt ( lltaskptr, T_int ( ) ) ;
6265
6265
auto V_args2 = vec ( tptr) + V_args ;
6266
- trans_native ( build, glues, lltaskptr,
6267
- externs, tn, llmod, "upcall_exit" , true , V_args2 ) ;
6266
+ trans_native_call ( build, glues, lltaskptr,
6267
+ externs, tn, llmod, "upcall_exit" , true , V_args2 ) ;
6268
6268
build. RetVoid ( ) ;
6269
6269
}
6270
6270
0 commit comments