Browse Source

disable cast reducing (#8777)

Aleksandr Kuzmenko 6 years ago
parent
commit
6350ebc1be
1 changed files with 0 additions and 9 deletions
  1. 0 9
      src/optimization/optimizer.ml

+ 0 - 9
src/optimization/optimizer.ml

@@ -264,15 +264,6 @@ let reduce_control_flow ctx e = match e.eexpr with
 	| TEnumParameter({eexpr = TParenthesis {eexpr = TCall({eexpr = TField(_,FEnum(_,ef1))},el)}},ef2,i)
 		when ef1 == ef2 && check_enum_construction_args el i ->
 		(try List.nth el i with Failure _ -> e)
-	| TCast(e1,None) ->
-		(* TODO: figure out what's wrong with these targets *)
-		let require_cast = match ctx.com.platform with
-			| Cpp | Flash -> true
-			| Java -> defined ctx.com Define.Jvm
-			| Cs -> defined ctx.com Define.EraseGenerics || defined ctx.com Define.FastCast
-			| _ -> false
-		in
-		Texpr.reduce_unsafe_casts ~require_cast e e.etype
 	| _ ->
 		e