Explorar el Código

[jvm] respect com.main for Haxe.MainLoop support

Simon Krajewski hace 5 años
padre
commit
6fc1d608f4
Se han modificado 1 ficheros con 6 adiciones y 1 borrados
  1. 6 1
      src/generators/genjvm.ml

+ 6 - 1
src/generators/genjvm.ml

@@ -2515,7 +2515,12 @@ class tclass_to_jvm gctx c = object(self)
 			jm#putstatic (["haxe";"root"],"Sys") "_args" (TArray(string_sig,None))
 		end;
 		jm#invokestatic (["haxe"; "java"], "Init") "init" (method_sig [] None);
-		jm#invokestatic jc#get_this_path "main" (method_sig [] None);
+		begin match gctx.com.main with
+		| Some e ->
+			self#generate_expr gctx jc jm e true SCNone MStatic
+		| None ->
+			()
+		end;
 		jm#return
 
 	method private generate_fields =