Skip to content

Commit e3c7ec1

Browse files
committed
---
yaml --- r: 1449 b: refs/heads/master c: 4ac4d03 h: refs/heads/master i: 1447: 28a4c4c v: v3
1 parent e6b7b4f commit e3c7ec1

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 0120571e90a68befb03892c63c470d0923d425c4
2+
refs/heads/master: 4ac4d03f0cac829650f7a297162d070de53c6455

trunk/src/comp/middle/trans.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,18 @@ fn type_of_fn(@crate_ctxt cx,
513513
fn type_of_native_fn(@crate_ctxt cx, ast.native_abi abi,
514514
vec[ty.arg] inputs,
515515
@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 = 0u;
522+
while (i < ty_param_count) {
523+
atys += T_ptr(T_tydesc(cx.tn));
524+
i += 1u;
525+
}
526+
}
527+
atys += type_of_explicit_args(cx, inputs);
517528
ret T_fn(atys, type_of_inner(cx, output));
518529
}
519530

0 commit comments

Comments
 (0)