Parcourir la source

clean up after Caue

Simon Krajewski il y a 11 ans
Parent
commit
bd3b9db7a8
3 fichiers modifiés avec 8 ajouts et 8 suppressions
  1. 3 3
      gencommon.ml
  2. 3 3
      gencs.ml
  3. 2 2
      genjava.ml

+ 3 - 3
gencommon.ml

@@ -2788,7 +2788,7 @@ struct
         (* if a TClosure is being call immediately, there's no need to convert it to a TClosure *)
         | TCall(( { eexpr = TField(ecl,f) } as e1), params) ->
           (* check to see if called field is known and if it is a MethNormal (only MethNormal fields can be called directly) *)
-          let name = field_name f in
+          (* let name = field_name f in *)
           (match field_access_esp gen (gen.greal_type ecl.etype) f with
             | FClassField(_,_,_,cf,_,_,_) ->
               (match cf.cf_kind with
@@ -2894,7 +2894,7 @@ struct
   						check_params v.v_type);
 					Hashtbl.add ignored v.v_id v;
 					ignore(Option.map traverse opt)
-        | TLocal { v_extra = Some( (_ :: _ as tparams),_) } ->
+        | TLocal { v_extra = Some( (_ :: _ ),_) } ->
           ()
         | TLocal(( { v_capture = true } ) as v) ->
           (if not (Hashtbl.mem ignored v.v_id || Hashtbl.mem ret v.v_id) then begin check_params v.v_type; Hashtbl.replace ret v.v_id expr end);
@@ -3409,7 +3409,7 @@ struct
 
         let mk_invoke_complete_i i is_float =
 
-          let arity = i in
+          (* let arity = i in *)
           let args = func_args_i i in
 
           (* api fn *)

+ 3 - 3
gencs.ml

@@ -402,7 +402,7 @@ struct
         | TCall( { eexpr = TField(ef, FInstance({ cl_path = [], "String" }, { cf_name = ("substring" as field) })) }, args )
         | TCall( { eexpr = TField(ef, FInstance({ cl_path = [], "String" }, { cf_name = ("substr" as field) })) }, args ) ->
           { e with eexpr = TCall(mk_static_field_access_infer string_ext field e.epos [], [run ef] @ (List.map run args)) }
-        | TCall( { eexpr = TField(ef, FInstance({ cl_path = [], "String" }, { cf_name = ("toString" as field) })) }, [] ) ->
+        | TCall( { eexpr = TField(ef, FInstance({ cl_path = [], "String" }, { cf_name = ("toString") })) }, [] ) ->
           run ef
         | TNew( { cl_path = ([], "String") }, [], [p] ) -> run p (* new String(myString) -> myString *)
 
@@ -3052,7 +3052,7 @@ let is_static = function
      | None -> false
      | Some (_,m) -> List.mem CMStatic m.mf_contract
     ) [p.pget;p.pset]
-	| _ -> false
+	(* | _ -> false *)
 
 let change_name name = function
 	| IlField f -> IlField { f with fname = name }
@@ -3204,7 +3204,7 @@ let normalize_ilcls ctx cls =
 			let static = is_static (IlProp p) in
 			let name = p.pname in
 			not (List.exists (function (IlProp _,_,n,s) -> s = static && name = n | _ -> false) !all_fields)
-		| _ -> false
+		(* | _ -> false *)
 	) cls.cprops in
 	let cls = { cls with cmethods = List.map (fun v -> !v) meths; cprops = props } in
 

+ 2 - 2
genjava.ml

@@ -562,8 +562,8 @@ struct
             | _ ->
               { e with eexpr = TCall(run efield, List.map run args) }
           )
-        | TCall( { eexpr = TField(ef, FInstance({ cl_path = [], "String" }, { cf_name = ("toString" as field) })) }, [] ) ->
-          run ef
+(*         | TCall( { eexpr = TField(ef, FInstance({ cl_path = [], "String" }, { cf_name = ("toString") })) }, [] ) ->
+          run ef *)
 
         | TCast(expr, m) when is_boxed_type e.etype ->
           (* let unboxed_type gen t tbyte tshort tchar tfloat = match follow t with *)