浏览代码

[java/cs] Minor fixes and add the arguments in the correct order

Cauê Waneck 10 年之前
父节点
当前提交
b4eb144c5b
共有 4 个文件被更改,包括 7 次插入7 次删除
  1. 2 2
      common.ml
  2. 2 2
      gencommon.ml
  3. 2 2
      interp.ml
  4. 1 1
      main.ml

+ 2 - 2
common.ml

@@ -151,7 +151,7 @@ type context = {
 	mutable net_std : string list;
 	mutable net_std : string list;
 	net_path_map : (path,string list * string list * string) Hashtbl.t;
 	net_path_map : (path,string list * string list * string) Hashtbl.t;
 	mutable javac_args : string list;
 	mutable javac_args : string list;
-	mutable cs_args : string list;
+	mutable csc_args : string list;
 	mutable js_gen : (unit -> unit) option;
 	mutable js_gen : (unit -> unit) option;
 	(* typing *)
 	(* typing *)
 	mutable basic : basic_types;
 	mutable basic : basic_types;
@@ -711,7 +711,7 @@ let create v args =
 		net_std = [];
 		net_std = [];
 		net_path_map = Hashtbl.create 0;
 		net_path_map = Hashtbl.create 0;
 		javac_args = [];
 		javac_args = [];
-		cs_args = [];
+		csc_args = [];
 		neko_libs = [];
 		neko_libs = [];
 		php_prefix = None;
 		php_prefix = None;
 		js_gen = None;
 		js_gen = None;

+ 2 - 2
gencommon.ml

@@ -1086,14 +1086,14 @@ let dump_descriptor gen name path_s module_s =
 		| Java ->
 		| Java ->
 			gen.gcon.javac_args
 			gen.gcon.javac_args
 		| Cs ->
 		| Cs ->
-			gen.gcon.csc_arg
+			gen.gcon.csc_args
 		| _ ->
 		| _ ->
 			[]
 			[]
 	in
 	in
 	if args <> [] then begin
 	if args <> [] then begin
 		SourceWriter.write w "begin opts";
 		SourceWriter.write w "begin opts";
 		SourceWriter.newline w;
 		SourceWriter.newline w;
-		List.iter (fun opt -> SourceWriter.write w opt; SourceWriter.newline w) args;
+		List.iter (fun opt -> SourceWriter.write w opt; SourceWriter.newline w) (List.rev args);
 		SourceWriter.write w "end opts";
 		SourceWriter.write w "end opts";
 		SourceWriter.newline w;
 		SourceWriter.newline w;
 	end;
 	end;

+ 2 - 2
interp.ml

@@ -2553,9 +2553,9 @@ let macro_lib =
 				let com = ccom() in
 				let com = ccom() in
 				(match com.platform with
 				(match com.platform with
 				| Java ->
 				| Java ->
-					com.javac_args := arg :: com.javac_args
+					com.javac_args <- arg :: com.javac_args
 				| Cs ->
 				| Cs ->
-					com.csc_arg := arg :: com.csc_arg
+					com.csc_args <- arg :: com.csc_args
 				| _ -> failwith "Unsupported platform");
 				| _ -> failwith "Unsupported platform");
 				VNull
 				VNull
 			| _ ->
 			| _ ->

+ 1 - 1
main.ml

@@ -1143,7 +1143,7 @@ try
 			com.javac_args <- arg :: com.javac_args
 			com.javac_args <- arg :: com.javac_args
 		),"<arg> : pass argument <arg> to the Java compiler");
 		),"<arg> : pass argument <arg> to the Java compiler");
 		("-csc-arg",Arg.String (fun arg ->
 		("-csc-arg",Arg.String (fun arg ->
-			com.csc_arg <- arg :: com.csc_arg
+			com.csc_args <- arg :: com.csc_args
 		),"<arg> : pass option <arg> to the C# compiler");
 		),"<arg> : pass option <arg> to the C# compiler");
 		("-x", Arg.String (fun file ->
 		("-x", Arg.String (fun file ->
 			let neko_file = file ^ ".n" in
 			let neko_file = file ^ ".n" in