2
0
Simon Krajewski 1 жил өмнө
parent
commit
541fea71ec

+ 2 - 2
src/compiler/args.ml

@@ -114,12 +114,12 @@ let parse_args com =
 				| None -> com.main_class <- Some cpath);
 				| None -> com.main_class <- Some cpath);
 			actx.classes <- cpath :: actx.classes;
 			actx.classes <- cpath :: actx.classes;
 			Common.define com Define.Interp;
 			Common.define com Define.Interp;
-			set_platform com (!Globals.macro_platform) "";
+			set_platform com Eval "";
 			actx.interp <- true;
 			actx.interp <- true;
 		),"<class>","interpret the program using internal macro system");
 		),"<class>","interpret the program using internal macro system");
 		("Target",["--interp"],[], Arg.Unit (fun() ->
 		("Target",["--interp"],[], Arg.Unit (fun() ->
 			Common.define com Define.Interp;
 			Common.define com Define.Interp;
-			set_platform com (!Globals.macro_platform) "";
+			set_platform com Eval "";
 			actx.interp <- true;
 			actx.interp <- true;
 		),"","interpret the program using internal macro system");
 		),"","interpret the program using internal macro system");
 		("Target",["--run"],[], Arg.Unit (fun() ->
 		("Target",["--run"],[], Arg.Unit (fun() ->

+ 1 - 1
src/context/common.ml

@@ -1288,7 +1288,7 @@ let adapt_defines_to_macro_context defines =
 		defines_signature = None
 		defines_signature = None
 	} in
 	} in
 	Define.define macro_defines Define.Macro;
 	Define.define macro_defines Define.Macro;
-	Define.raw_define macro_defines (platform_name !Globals.macro_platform);
+	Define.raw_define macro_defines (platform_name Eval);
 	macro_defines
 	macro_defines
 
 
 let adapt_defines_to_display_context defines =
 let adapt_defines_to_display_context defines =

+ 0 - 2
src/core/globals.ml

@@ -68,8 +68,6 @@ let trace_call_stack ?(n:int = 5) () =
 		Option.may (fun loc -> print_endline (Printf.sprintf "  called from %s" (loc_to_string loc))) loc;
 		Option.may (fun loc -> print_endline (Printf.sprintf "  called from %s" (loc_to_string loc))) loc;
 	done
 	done
 
 
-let macro_platform = ref Neko
-
 let is_windows = Sys.os_type = "Win32" || Sys.os_type = "Cygwin"
 let is_windows = Sys.os_type = "Win32" || Sys.os_type = "Cygwin"
 
 
 let max_custom_target_len = 16
 let max_custom_target_len = 16

+ 1 - 2
src/macro/eval/evalMain.ml

@@ -379,8 +379,7 @@ let setup get_api =
 	let api = get_api (fun() -> (get_ctx()).curapi.get_com()) (fun() -> (get_ctx()).curapi) in
 	let api = get_api (fun() -> (get_ctx()).curapi.get_com()) (fun() -> (get_ctx()).curapi) in
 	List.iter (fun (n,v) ->
 	List.iter (fun (n,v) ->
 		Hashtbl.replace GlobalState.macro_lib n v
 		Hashtbl.replace GlobalState.macro_lib n v
-	) api;
-	Globals.macro_platform := Globals.Eval
+	) api
 
 
 let do_reuse ctx api =
 let do_reuse ctx api =
 	ctx.curapi <- api;
 	ctx.curapi <- api;

+ 2 - 2
src/typing/macroContext.ml

@@ -706,12 +706,12 @@ let create_macro_context com =
 	(* Inherit most display settings, but require normal typing. *)
 	(* Inherit most display settings, but require normal typing. *)
 	com2.display <- {com.display with dms_kind = DMNone; dms_full_typing = true; dms_force_macro_typing = true; dms_inline = true; };
 	com2.display <- {com.display with dms_kind = DMNone; dms_full_typing = true; dms_force_macro_typing = true; dms_inline = true; };
 	com2.class_path <- List.filter (fun s -> not (ExtString.String.exists s "/_std/")) com2.class_path;
 	com2.class_path <- List.filter (fun s -> not (ExtString.String.exists s "/_std/")) com2.class_path;
-	let name = platform_name !Globals.macro_platform in
+	let name = platform_name Eval in
 	com2.class_path <- List.map (fun p -> p ^ name ^ "/_std/") com2.std_path @ com2.class_path;
 	com2.class_path <- List.map (fun p -> p ^ name ^ "/_std/") com2.std_path @ com2.class_path;
 	let defines = adapt_defines_to_macro_context com2.defines; in
 	let defines = adapt_defines_to_macro_context com2.defines; in
 	com2.defines.values <- defines.values;
 	com2.defines.values <- defines.values;
 	com2.defines.defines_signature <- None;
 	com2.defines.defines_signature <- None;
-	com2.platform <- !Globals.macro_platform;
+	com2.platform <- Eval;
 	Common.init_platform com2;
 	Common.init_platform com2;
 	let mctx = !create_context_ref com2 None in
 	let mctx = !create_context_ref com2 None in
 	mctx.is_display_file <- false;
 	mctx.is_display_file <- false;