Browse Source

new semicolon and isNAN inlining fixes

PeyTy 10 years ago
parent
commit
04168b6ce5
2 changed files with 3 additions and 1 deletions
  1. 2 0
      genlua.ml
  2. 1 1
      std/lua/_std/Math.hx

+ 2 - 0
genlua.ml

@@ -772,6 +772,7 @@ and gen_block_element ?(after=false) ctx e =
 	| TBinop (op,e1,e2) when op <> Ast.OpAssign ->
 		let f () = gen_tbinop ctx op e1 e2 in
 		gen_iife_assign ctx f;
+		semicolon ctx;
 	| TUnop ((Increment|Decrement) as op,_,e) ->
 		newline ctx;
 		gen_expr ctx e;
@@ -791,6 +792,7 @@ and gen_block_element ?(after=false) ctx e =
 	| TField _ ->
 		let f () = gen_expr ctx e in
 		gen_iife_assign ctx f;
+		semicolon ctx;
 	| TConst _ | TLocal _ -> ()
 	| TBlock el ->
 		List.iter (gen_block_element ~after ctx) el

+ 1 - 1
std/lua/_std/Math.hx

@@ -35,7 +35,7 @@ class Math
 	public static var NaN(get, null) : Float;
 	static inline function get_NaN () : Float return 0/0; 
 
-	public static inline function isNaN( f : Float ) : Bool return (f != f);
+	public static function isNaN( f : Float ) : Bool return (f != f);
 	public static inline function isFinite( f : Float ) : Bool {
 		return (f > Math.NEGATIVE_INFINITY && f < Math.POSITIVE_INFINITY);
 	}