Fixed some TODOs
This commit is contained in:
parent
69a5ad8df8
commit
a52e80bcad
3 changed files with 7 additions and 7 deletions
|
@ -442,7 +442,8 @@ and check_type cenv = function
|
|||
| Tarray(ty, e) ->
|
||||
let typed_e = expect_static_exp cenv (Tid Initial.pint) e in
|
||||
Tarray(check_type cenv ty, typed_e)
|
||||
| Tid ty_name -> Tid ty_name (* TODO bug ? should check that ty_name exists ? *)
|
||||
(* No need to check that the type is defined as it is done by the scoping. *)
|
||||
| Tid ty_name -> Tid ty_name
|
||||
| Tprod l -> Tprod (List.map (check_type cenv) l)
|
||||
| Tinvalid -> Tinvalid
|
||||
|
||||
|
|
|
@ -260,7 +260,7 @@ let rec cexpr_of_static_exp se =
|
|||
Error.message se.se_loc Error.Estatic_exp_compute_failed
|
||||
else
|
||||
cexpr_of_static_exp se'
|
||||
| Stuple _ -> assert false (** TODO *)
|
||||
| Stuple _ -> Misc.internal_error "cgen: static tuple"
|
||||
|
||||
|
||||
(** [cexpr_of_exp exp] translates the Obj action [exp] to a C expression. *)
|
||||
|
@ -707,11 +707,12 @@ let out_decl_of_class_def cd =
|
|||
tasked to reset the class [cd]. *)
|
||||
let reset_fun_def_of_class_def cd =
|
||||
let body =
|
||||
try
|
||||
if cd.cd_stateful then
|
||||
let var_env = List.map cvar_of_vd cd.cd_mems in
|
||||
let reset = find_reset_method cd in
|
||||
cstm_of_act_list IdentSet.empty var_env cd.cd_objs reset.m_body
|
||||
with Not_found -> [] (* TODO C : nicely deal with stateless objects *)
|
||||
else
|
||||
[]
|
||||
in
|
||||
Cfundef {
|
||||
f_name = (cname_of_qn cd.cd_name) ^ "_reset";
|
||||
|
|
|
@ -86,9 +86,7 @@ let rec find c = function
|
|||
let is_deadcode = function
|
||||
| Aassgn (lhs, e) ->
|
||||
(match e.e_desc with
|
||||
| Eextvalue w ->
|
||||
let w' = ext_value_of_pattern lhs in
|
||||
w = w' (* TODO: proper compare *)
|
||||
| Eextvalue w -> Obc_compare.compare_lhs_extvalue lhs w = 0
|
||||
| _ -> false
|
||||
)
|
||||
| Acase (_, []) -> true
|
||||
|
|
Loading…
Reference in a new issue