Simplify types before analyzing call structure; 2 more tests compile.
This commit is contained in:
parent
a0c9d4fe9a
commit
a61e85ca34
|
@ -1951,7 +1951,7 @@ let call_args_referent_type
|
||||||
Il.ScalarTy (Il.AddrTy Il.OpaqueTy)
|
Il.ScalarTy (Il.AddrTy Il.OpaqueTy)
|
||||||
|]
|
|]
|
||||||
in
|
in
|
||||||
match callee_ty with
|
match simplified_ty callee_ty with
|
||||||
Ast.TY_fn (tsig, taux) ->
|
Ast.TY_fn (tsig, taux) ->
|
||||||
call_args_referent_type_full
|
call_args_referent_type_full
|
||||||
cx.ctxt_abi
|
cx.ctxt_abi
|
||||||
|
@ -1961,7 +1961,9 @@ let call_args_referent_type
|
||||||
(if taux.Ast.fn_is_iter then (iterator_arg_rtys()) else [||])
|
(if taux.Ast.fn_is_iter then (iterator_arg_rtys()) else [||])
|
||||||
indirect_arg_rtys
|
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
|
let indirect_call_args_referent_type
|
||||||
|
|
|
@ -3376,7 +3376,7 @@ let trans_visitor
|
||||||
(oper_str operand)
|
(oper_str operand)
|
||||||
|
|
||||||
and ty_arg_slots (ty:Ast.ty) : Ast.slot array =
|
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
|
Ast.TY_fn (tsig, _) -> tsig.Ast.sig_input_slots
|
||||||
| _ -> bug () "Trans.ty_arg_slots on non-callable type: %a"
|
| _ -> bug () "Trans.ty_arg_slots on non-callable type: %a"
|
||||||
Ast.sprintf_ty ty
|
Ast.sprintf_ty ty
|
||||||
|
@ -4047,7 +4047,7 @@ let trans_visitor
|
||||||
Some params -> params
|
Some params -> params
|
||||||
| None -> [| |]
|
| None -> [| |]
|
||||||
in
|
in
|
||||||
match ty with
|
match simplified_ty ty with
|
||||||
Ast.TY_fn _ ->
|
Ast.TY_fn _ ->
|
||||||
let (dst_cell, _) = trans_lval_maybe_init init dst in
|
let (dst_cell, _) = trans_lval_maybe_init init dst in
|
||||||
let fn_ptr =
|
let fn_ptr =
|
||||||
|
|
Loading…
Reference in New Issue