Bläddra i källkod

[js] Don't inline complex UInt methods to avoid creating closures.

Dan Korostelev 11 år sedan
förälder
incheckning
05c88e218d
1 ändrade filer med 3 tillägg och 3 borttagningar
  1. 3 3
      std/UInt.hx

+ 3 - 3
std/UInt.hx

@@ -49,7 +49,7 @@ abstract UInt(Int) from Int to Int {
 		return a.toInt() - b.toInt();
 	}
 
-	@:op(A > B) private static inline function gt(a:UInt, b:UInt):Bool {
+	@:op(A > B) private static #if !js inline #end function gt(a:UInt, b:UInt):Bool {
 		var aNeg = a.toInt() < 0;
 		var bNeg = b.toInt() < 0;
 		return
@@ -57,7 +57,7 @@ abstract UInt(Int) from Int to Int {
 			else a.toInt() > b.toInt();
 	}
 
-	@:op(A >= B) private static inline function gte(a:UInt, b:UInt):Bool {
+	@:op(A >= B) private static #if !js inline #end function gte(a:UInt, b:UInt):Bool {
 		var aNeg = a.toInt() < 0;
 		var bNeg = b.toInt() < 0;
 		return
@@ -211,7 +211,7 @@ abstract UInt(Int) from Int to Int {
 		return this;
 	}
 
-	@:to private inline function toFloat():Float {
+	@:to private #if !js inline #end function toFloat():Float {
 		var int = toInt();
 		if (int < 0) {
 			return 4294967296.0 + int;