diff options
| author | Rafael Ávila de Espíndola <[email protected]> | 2011-02-25 15:58:08 -0500 |
|---|---|---|
| committer | Rafael Ávila de Espíndola <[email protected]> | 2011-02-25 15:58:08 -0500 |
| commit | 081c3aa76dd0805767e0233c0cc6ccf313cf44ba (patch) | |
| tree | 59b76080da8a103b3a8dd7306ffbf2e4d4ed86f2 /src/comp/middle/trans.rs | |
| parent | There are no native iterators (or at least they are not going to be supported (diff) | |
| download | rust-081c3aa76dd0805767e0233c0cc6ccf313cf44ba.tar.xz rust-081c3aa76dd0805767e0233c0cc6ccf313cf44ba.zip | |
Pass the abi of native functions all the way to codegen.
Diffstat (limited to 'src/comp/middle/trans.rs')
| -rw-r--r-- | src/comp/middle/trans.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs index 33693835..d175432d 100644 --- a/src/comp/middle/trans.rs +++ b/src/comp/middle/trans.rs @@ -516,7 +516,8 @@ fn type_of_fn(@crate_ctxt cx, ret type_of_fn_full(cx, proto, none[TypeRef], inputs, output); } -fn type_of_native_fn(@crate_ctxt cx, vec[ty.arg] inputs, +fn type_of_native_fn(@crate_ctxt cx, ast.native_abi abi, + vec[ty.arg] inputs, @ty.t output) -> TypeRef { let vec[TypeRef] atys = type_of_explicit_args(cx, inputs); ret T_fn(atys, type_of(cx, output)); @@ -571,8 +572,8 @@ fn type_of_inner(@crate_ctxt cx, @ty.t t) -> TypeRef { case (ty.ty_fn(?proto, ?args, ?out)) { ret T_fn_pair(cx.tn, type_of_fn(cx, proto, args, out)); } - case (ty.ty_native_fn(?args, ?out)) { - ret T_fn_pair(cx.tn, type_of_native_fn(cx, args, out)); + case (ty.ty_native_fn(?abi, ?args, ?out)) { + ret T_fn_pair(cx.tn, type_of_native_fn(cx, abi, args, out)); } case (ty.ty_obj(?meths)) { auto th = mk_type_handle(); |