Parcourir la source

renamed to --dead-code-elimination

Franco Ponticelli il y a 14 ans
Parent
commit
3d5be67975
4 fichiers modifiés avec 9 ajouts et 8 suppressions
  1. 2 2
      common.ml
  2. 4 3
      doc/CHANGES.txt
  3. 2 2
      main.ml
  4. 1 1
      typeload.ml

+ 2 - 2
common.ml

@@ -50,7 +50,7 @@ type context = {
 	mutable debug : bool;
 	mutable verbose : bool;
 	mutable foptimize : bool;
-	mutable dead_code_removal : bool;
+	mutable dead_code_elimination : bool;
 	mutable platform : platform;
 	mutable std_path : string list;
 	mutable class_path : string list;
@@ -86,7 +86,7 @@ let create v =
 		debug = false;
 		verbose = false;
 		foptimize = true;
-		dead_code_removal = false;
+		dead_code_elimination = false;
 		platform = Cross;
 		std_path = [];
 		class_path = [];

+ 4 - 3
doc/CHANGES.txt

@@ -33,9 +33,10 @@
 	all : lookup unqualified types in all package hierarchy and not only in current package
 	flash : set default flash version to 10 (-swf9 deprecated, use -swf-version 8 for avm1)
 	php : added --php-lib to allow to rename the destination path of the generated lib
-	all : added --dead-code-removal, removes unused functions from the output (beta feature could 
-	         not make in the final release)
-	all : added @:keep, forces a class/method to be not descarded when used with --dead-code-removal
+	all : added --dead-code-elimination, removes unused functions from the output (beta feature
+			could not make in the final release)
+	all : added @:keep, forces a class/method to be not descarded when used with 
+	        --dead-code-elimination
 
 2010-08-14: 2.06
 	neko : change serializer to be able to handle instances of basic classes from other modules

+ 2 - 2
main.ml

@@ -462,8 +462,8 @@ try
 		("--macro", Arg.String (fun e ->
 			config_macros := e :: !config_macros
 		)," : call the given macro before typing anything else");
-		("--dead-code-removal", Arg.Unit (fun () ->
-			com.dead_code_removal <- true
+		("--dead-code-elimination", Arg.Unit (fun () ->
+			com.dead_code_elimination <- true
 		)," : remove unused methods");
 		("-swf9",Arg.String (fun file ->
 			set_platform Flash file;

+ 1 - 1
typeload.ml

@@ -799,7 +799,7 @@ let init_class ctx c p herits fields =
 				cf.cf_expr <- Some (mk (TFunction f) t p);
 				t
 			) in
-			let delay = if (ctx.com.dead_code_removal && not !Common.display) then begin
+			let delay = if (ctx.com.dead_code_elimination && not !Common.display) then begin
 				let is_main = (match ctx.com.main_class with | Some cl when c.cl_path = cl -> true | _ -> false) && name = "main" in
 				let keep = core_api || is_main || has_meta ":keep" c.cl_meta || has_meta ":keep" f.cff_meta || (stat && name = "__init__") in
 				let remove item lst = List.filter (fun i -> item <> i.cf_name) lst in