aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-07-01 10:09:04 -0700
committerGraydon Hoare <[email protected]>2010-07-01 10:09:04 -0700
commita61e85ca348e1c024b694b61be22ce3e7809d1d8 (patch)
tree6760fe8c3ddc04f5769eee01d2cdb8c03c24393b
parentStrip out over-aggressive pagination in manual. (diff)
downloadrust-a61e85ca348e1c024b694b61be22ce3e7809d1d8.tar.xz
rust-a61e85ca348e1c024b694b61be22ce3e7809d1d8.zip
Simplify types before analyzing call structure; 2 more tests compile.
-rw-r--r--src/boot/me/semant.ml6
-rw-r--r--src/boot/me/trans.ml4
2 files changed, 6 insertions, 4 deletions
diff --git a/src/boot/me/semant.ml b/src/boot/me/semant.ml
index e70fd55f..1e6c462c 100644
--- a/src/boot/me/semant.ml
+++ b/src/boot/me/semant.ml
@@ -1951,7 +1951,7 @@ let call_args_referent_type
Il.ScalarTy (Il.AddrTy Il.OpaqueTy)
|]
in
- match callee_ty with
+ match simplified_ty callee_ty with
Ast.TY_fn (tsig, taux) ->
call_args_referent_type_full
cx.ctxt_abi
@@ -1961,7 +1961,9 @@ let call_args_referent_type
(if taux.Ast.fn_is_iter then (iterator_arg_rtys()) else [||])
indirect_arg_rtys
- | _ -> bug cx "Semant.call_args_referent_type on non-callable type"
+ | _ -> bug cx
+ "Semant.call_args_referent_type on non-callable type %a"
+ Ast.sprintf_ty callee_ty
;;
let indirect_call_args_referent_type
diff --git a/src/boot/me/trans.ml b/src/boot/me/trans.ml
index 4b6eb19b..830cf1ee 100644
--- a/src/boot/me/trans.ml
+++ b/src/boot/me/trans.ml
@@ -3376,7 +3376,7 @@ let trans_visitor
(oper_str operand)
and ty_arg_slots (ty:Ast.ty) : Ast.slot array =
- match ty with
+ match simplified_ty ty with
Ast.TY_fn (tsig, _) -> tsig.Ast.sig_input_slots
| _ -> bug () "Trans.ty_arg_slots on non-callable type: %a"
Ast.sprintf_ty ty
@@ -4047,7 +4047,7 @@ let trans_visitor
Some params -> params
| None -> [| |]
in
- match ty with
+ match simplified_ty ty with
Ast.TY_fn _ ->
let (dst_cell, _) = trans_lval_maybe_init init dst in
let fn_ptr =