Browse Source

revert UInt changes

Simon Krajewski 11 years ago
parent
commit
7f0c2700db
2 changed files with 8 additions and 14 deletions
  1. 6 8
      std/UInt.hx
  2. 2 6
      typeload.ml

+ 6 - 8
std/UInt.hx

@@ -20,7 +20,7 @@
  * DEALINGS IN THE SOFTWARE.
  */
 
-#if (flash9 || flash9doc || cs || doc_gen)
+#if ((flash9 || flash9doc || cs) && !doc_gen)
 /**
 	The unsigned Int type is only defined for Flash9 and C#. It's currently
 	handled the same as a normal Int.
@@ -31,8 +31,7 @@
 	The unsigned Int type is only defined for Flash9 and C#.
 	Simulate it for other platforms.
 **/
-@:coreType
-abstract UInt from Int to Int {
+abstract UInt(Int) from Int to Int {
 
 	@:op(A + B) private static inline function add(a:UInt, b:UInt):UInt {
 		return a.toInt() + b.toInt();
@@ -201,6 +200,10 @@ abstract UInt from Int to Int {
 		return Std.string(toFloat());
 	}
 
+	private inline function toInt():Int {
+		return this;
+	}
+
 	@:to private inline function toFloat():Float {
 		var int = toInt();
 		if (int < 0) {
@@ -212,10 +215,5 @@ abstract UInt from Int to Int {
 			return int + 0.0;
 		}
 	}
-
-	private inline function toInt():Int {
-		return cast this;
-	}
-
 }
 #end

+ 2 - 6
typeload.ml

@@ -2104,12 +2104,8 @@ let init_class ctx c p context_init herits fields =
 	) fields;
 	(match c.cl_kind with
 	| KAbstractImpl a ->
-		a.a_to <- List.stable_sort (fun (_,cfo1) (_,cfo2) ->
-			if cfo1 = None then 1 else if cfo2 = None then -1 else 0
-		) (List.rev a.a_to);
-		a.a_from <- List.stable_sort (fun (_,cfo1) (_,cfo2) ->
-			if cfo1 = None then 1 else if cfo2 = None then -1 else 0
-		) (List.rev a.a_from);
+		a.a_to <- List.rev a.a_to;
+		a.a_from <- List.rev a.a_from;
 		a.a_ops <- List.rev a.a_ops;
 		a.a_unops <- List.rev a.a_unops;
 	| _ -> ());