Browse Source

removed pointless platform check from DCE algorithm

Simon Krajewski 13 years ago
parent
commit
798b627b57
2 changed files with 2 additions and 5 deletions
  1. 1 1
      codegen.ml
  2. 1 4
      dce.ml

+ 1 - 1
codegen.ml

@@ -1370,7 +1370,7 @@ let fix_override com c f fd =
 						{ e with eexpr = TBlock (v :: el) }
 				);
 			} in
-      let targs = List.map (fun(v,c) -> (v.v_name, Option.is_some c, v.v_type)) nargs in
+			let targs = List.map (fun(v,c) -> (v.v_name, Option.is_some c, v.v_type)) nargs in
 			let fde = (match f.cf_expr with None -> assert false | Some e -> e) in
 			{ f with cf_expr = Some { fde with eexpr = TFunction fd2 }; cf_type = TFun(targs,tret) }
 		| Some(f2), None when c.cl_interface ->

+ 1 - 4
dce.ml

@@ -152,10 +152,7 @@ let rec field dce c n stat =
 		if not (has_meta ":used" cf.cf_meta) then begin
 			let keep () =
 				mark_dependent_fields dce c n stat;
- 				match dce.ctx.com.platform with
-					(* these platforms currently need the real property field apparently *)
-					| Js | Neko | Php | Flash8 | Cpp | Java -> field dce c pn stat
-					| _ -> ()
+				field dce c pn stat
 			in
 			(match prefix,cf.cf_kind with
 				| "get_",Var {v_read = AccCall s} when s = n -> keep()