Nicolas Cannasse hace 8 años
padre
commit
30bb723a5b
Se han modificado 3 ficheros con 4 adiciones y 3 borrados
  1. 2 1
      .gitignore
  2. 1 1
      Makefile
  3. 1 1
      src/generators/genjs.ml

+ 2 - 1
.gitignore

@@ -92,4 +92,5 @@ tests/misc/projects/Issue4070/cpp/
 /tests/misc/eventLoop/php
 *.vscode/
 
-/tests/sys/temp
+/tests/sys/temp
+*.dll

+ 1 - 1
Makefile

@@ -184,7 +184,7 @@ src/generators/hlinterp.$(MODULE_EXT): src/context/common.$(MODULE_EXT) src/gene
 
 src/generators/genphp7.$(MODULE_EXT): src/typing/abstract.$(MODULE_EXT) src/globals.$(MODULE_EXT) src/context/meta.$(MODULE_EXT) src/path.$(MODULE_EXT) src/typing/type.$(MODULE_EXT) src/syntax/lexer.$(MODULE_EXT) src/context/common.$(MODULE_EXT) src/generators/codegen.$(MODULE_EXT) src/syntax/ast.$(MODULE_EXT)
 
-src/generators/hl2c.$(MODULE_EXT): src/generators/hlcode.$(MODULE_EXT)
+src/generators/hl2c.$(MODULE_EXT): src/generators/hlcode.$(MODULE_EXT) src/context/common.$(MODULE_EXT)
 
 src/generators/hlopt.$(MODULE_EXT): src/generators/hlcode.$(MODULE_EXT)
 

+ 1 - 1
src/generators/genjs.ml

@@ -1282,7 +1282,7 @@ let alloc_ctx com =
 		smap = smap;
 		js_modern = not (Common.defined com Define.JsClassic);
 		js_flatten = not (Common.defined com Define.JsUnflatten);
-		es_version = int_of_string (Common.defined_value com Define.JsEs);
+		es_version = (try int_of_string (Common.defined_value com Define.JsEs) with _ -> 0);
 		store_exception_stack = if Common.has_dce com then (Common.has_feature com "haxe.CallStack.exceptionStack") else List.exists (function TClassDecl { cl_path=["haxe"],"CallStack" } -> true | _ -> false) com.types;
 		statics = [];
 		inits = [];