File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 0120571e90a68befb03892c63c470d0923d425c4
2
+ refs/heads/master: 4ac4d03f0cac829650f7a297162d070de53c6455
Original file line number Diff line number Diff line change @@ -513,7 +513,18 @@ fn type_of_fn(@crate_ctxt cx,
513
513
fn type_of_native_fn ( @crate_ctxt cx , ast. native_abi abi ,
514
514
vec[ ty. arg] inputs ,
515
515
@ty. t output ) -> TypeRef {
516
- let vec[ TypeRef ] atys = type_of_explicit_args ( cx, inputs) ;
516
+ let vec[ TypeRef ] atys = vec ( ) ;
517
+ if ( abi == ast. native_abi_rust ) {
518
+ atys += T_taskptr ( cx. tn ) ;
519
+ auto t = ty. ty_native_fn ( abi, inputs, output) ;
520
+ auto ty_param_count = ty. count_ty_params ( plain_ty ( t) ) ;
521
+ auto i = 0 u;
522
+ while ( i < ty_param_count) {
523
+ atys += T_ptr ( T_tydesc ( cx. tn ) ) ;
524
+ i += 1 u;
525
+ }
526
+ }
527
+ atys += type_of_explicit_args ( cx, inputs) ;
517
528
ret T_fn ( atys, type_of_inner ( cx, output) ) ;
518
529
}
519
530
You can’t perform that action at this time.
0 commit comments