Ver código fonte

More special handling removal

Rudy Ges 1 ano atrás
pai
commit
211dffbf2b

+ 1 - 1
src/context/common.ml

@@ -474,7 +474,7 @@ let external_defined_value ctx k =
 	Define.raw_defined_value ctx.defines (convert_define k)
 
 let reserved_flags = [
-	"true";"false";"null";"cross";"js";"lua";"neko";"flash";"php";"cpp";"cs";"java";"python";"hl";"hlc";
+	"true";"false";"null";"cross";"js";"lua";"neko";"flash";"php";"cpp";"java";"python";"hl";"hlc";
 	"swc";"macro";"sys";"static";"utf16";"haxe";"haxe_ver"
 ]
 

+ 2 - 2
src/filters/capturedVars.ml

@@ -43,11 +43,11 @@ let captured_vars com e =
 	let t = com.basic in
 
 	let impl = match com.platform with
-	(* optimized version for C#/Java - use native arrays *)
+	(* optimized version for Java - use native arrays *)
 	| Jvm ->
 		let cnativearray =
 			match (List.find (fun md -> match md with
-					| TClassDecl ({ cl_path = ["cs"|"java"],"NativeArray" }) -> true
+					| TClassDecl ({ cl_path = ["java"],"NativeArray" }) -> true
 					| _ -> false
 				) com.types)
 			with TClassDecl cl -> cl | _ -> die "" __LOC__

+ 0 - 10
src/filters/filters.ml

@@ -251,16 +251,6 @@ let mark_switch_break_loops e =
 	in
 	run e
 
-let check_unification ctx e t =
-	begin match e.eexpr,t with
-		| TLocal v,TType({t_path = ["cs"],("Ref" | "Out")},_) ->
-			(* TODO: this smells of hack, but we have to deal with it somehow *)
-			add_var_flag v VCaptured;
-		| _ ->
-			()
-	end;
-	e
-
 let rec fix_return_dynamic_from_void_function return_is_void e =
 	match e.eexpr with
 	| TFunction fn ->

+ 0 - 4
src/optimization/inline.ml

@@ -88,10 +88,6 @@ let api_inline2 com c field params p =
 			None (* out range, keep platform-specific behavior *)
 		| _ ->
 			Some { eexpr = TConst (TInt (Int32.of_float (floor f))); etype = com.basic.tint; epos = p })
-	| (["cs"],"Lib"),("fixed" | "checked" | "unsafe"),[e] ->
-			Some (mk_untyped_call ("__" ^ field ^ "__") p [e])
-	| (["cs"],"Lib"),("lock"),[obj;block] ->
-			Some (mk_untyped_call ("__lock__") p [obj;mk_block block])
 	| (["java"],"Lib"),("lock"),[obj;block] ->
 			Some (mk_untyped_call ("__lock__") p [obj;mk_block block])
 	| _ ->