Aleksandr Kuzmenko 5 лет назад
Родитель
Сommit
bc1bf57b02
49 измененных файлов с 34 добавлено и 275 удалено
  1. 1 1
      std/DateTools.hx
  2. 1 1
      std/Math.hx
  3. 0 6
      std/Reflect.hx
  4. 0 4
      std/Type.hx
  5. 2 4
      std/flash/Boot.hx
  6. 1 2
      std/flash/NativeXml.hx
  7. 0 15
      std/flash/_std/Reflect.hx
  8. 0 13
      std/flash/_std/Type.hx
  9. 0 32
      std/flash/_std/haxe/Resource.hx
  10. 0 24
      std/flash/_std/haxe/ds/IntMap.hx
  11. 0 15
      std/flash/_std/haxe/ds/ObjectMap.hx
  12. 0 25
      std/flash/_std/haxe/ds/StringMap.hx
  13. 0 24
      std/flash/_std/haxe/ds/UnsafeStringMap.hx
  14. 0 15
      std/flash/_std/haxe/ds/WeakMap.hx
  15. 0 2
      std/haxe/CallStack.hx
  16. 2 2
      std/haxe/Int32.hx
  17. 1 1
      std/haxe/Int64.hx
  18. 0 2
      std/haxe/Resource.hx
  19. 0 3
      std/haxe/ds/BalancedTree.hx
  20. 0 3
      std/haxe/ds/Vector.hx
  21. 2 2
      std/haxe/format/JsonPrinter.hx
  22. 1 3
      std/haxe/rtti/Meta.hx
  23. 2 7
      tests/unit/src/unit/MyClass.hx
  24. 1 1
      tests/unit/src/unit/MySubClass.hx
  25. 0 3
      tests/unit/src/unit/Test.hx
  26. 0 3
      tests/unit/src/unit/TestArrowFunctions.hx
  27. 3 4
      tests/unit/src/unit/TestBasetypes.hx
  28. 1 1
      tests/unit/src/unit/TestMain.hx
  29. 1 1
      tests/unit/src/unit/TestMeta.hx
  30. 0 4
      tests/unit/src/unit/TestMisc.hx
  31. 0 5
      tests/unit/src/unit/TestReflect.hx
  32. 1 10
      tests/unit/src/unit/TestType.hx
  33. 1 1
      tests/unit/src/unit/issues/Issue4988.hx
  34. 1 1
      tests/unit/src/unit/issues/Issue5025.hx
  35. 0 2
      tests/unit/src/unit/issues/Issue5039.hx
  36. 0 2
      tests/unit/src/unit/issues/Issue5351.hx
  37. 0 2
      tests/unit/src/unit/issues/Issue6059.hx
  38. 1 1
      tests/unit/src/unit/issues/Issue6325.hx
  39. 2 4
      tests/unit/src/unit/issues/Issue6801.hx
  40. 1 1
      tests/unit/src/unit/issues/Issue6942.hx
  41. 0 2
      tests/unit/src/unit/issues/Issue8075.hx
  42. 2 2
      tests/unit/src/unit/issues/Issue8227.hx
  43. 2 2
      tests/unit/src/unit/issues/Issue8241.hx
  44. 2 2
      tests/unit/src/unit/issues/Issue8248.hx
  45. 0 2
      tests/unit/src/unit/issues/Issue8930.hx
  46. 0 2
      tests/unit/src/unitstd/Array.unit.hx
  47. 1 5
      tests/unit/src/unitstd/Reflect.unit.hx
  48. 1 1
      tests/unit/src/unitstd/Type.unit.hx
  49. 0 5
      tests/unit/src/unitstd/haxe/ds/Vector.unit.hx

+ 1 - 1
std/DateTools.hx

@@ -194,7 +194,7 @@ class DateTools {
 	/**
 		Converts a number of minutes to a timestamp.
 	**/
-	#if as3 extern #end public static inline function minutes(n:Float):Float {
+	public static inline function minutes(n:Float):Float {
 		return n * 60.0 * 1000.0;
 	}
 

+ 1 - 1
std/Math.hx

@@ -233,7 +233,7 @@ extern class Math {
 	**/
 	static function random():Float;
 
-	#if ((flash && !as3) || cpp || eval)
+	#if (flash || cpp || eval)
 	/**
 		Returns the largest integer value that is not greater than `v`, as a `Float`.
 

+ 0 - 6
std/Reflect.hx

@@ -47,9 +47,6 @@ extern class Reflect {
 		to `Reflect.getProperty` for a function supporting property accessors.
 
 		If `field` is null, the result is unspecified.
-
-		(As3) If used on a property field, the getter will be invoked. It is
-		not possible to obtain the value directly.
 	**/
 	public static function field(o:Dynamic, field:String):Dynamic;
 
@@ -60,9 +57,6 @@ extern class Reflect {
 		work for anonymous structures.
 
 		If `o` or `field` are null, the result is unspecified.
-
-		(As3) If used on a property field, the setter will be invoked. It is
-		not possible to set the value directly.
 	**/
 	public static function setField(o:Dynamic, field:String, value:Dynamic):Void;
 

+ 0 - 4
std/Type.hx

@@ -189,8 +189,6 @@ extern class Type {
 		The order of the fields in the returned Array is unspecified.
 
 		If `c` is null, the result is unspecified.
-
-		(As3) This method only returns instance fields that are public.
 	**/
 	public static function getInstanceFields(c:Class<Dynamic>):Array<String>;
 
@@ -202,8 +200,6 @@ extern class Type {
 		The order of the fields in the returned Array is unspecified.
 
 		If `c` is null, the result is unspecified.
-
-		(As3) This method only returns class fields that are public.
 	**/
 	public static function getClassFields(c:Class<Dynamic>):Array<String>;
 

+ 2 - 4
std/flash/Boot.hx

@@ -22,7 +22,6 @@
 
 package flash;
 
-#if !as3
 @:keep private class RealBoot extends Boot {
 	#if swc
 	public function new() {
@@ -42,7 +41,6 @@ package flash;
 	}
 	#end
 }
-#end
 
 @:dox(hide)
 @:keep
@@ -282,7 +280,7 @@ class Boot extends flash.display.MovieClip {
 						throw "Invalid date format : " + s;
 				}
 			};
-			d.prototype[#if (as3 || no_flash_override) "toStringHX" #else "toString" #end] = function() {
+			d.prototype[#if no_flash_override "toStringHX" #else "toString" #end] = function() {
 				var date:Date = __this__;
 				var m = date.getMonth() + 1;
 				var d = date.getDate();
@@ -332,7 +330,7 @@ class Boot extends flash.display.MovieClip {
 			aproto.setPropertyIsEnumerable("remove", false);
 			aproto.setPropertyIsEnumerable("iterator", false);
 			aproto.setPropertyIsEnumerable("resize", false);
-			#if (as3 || no_flash_override)
+			#if no_flash_override
 			aproto.filterHX = function(f) {
 				var ret = [];
 				var i = 0;

+ 1 - 2
std/flash/NativeXml.hx

@@ -66,8 +66,7 @@ class Xml {
 		return wrap(root, Xml.Document);
 	}
 
-	@:keep #if as3 @:hack
-	public #end static function compare(a:Xml, b:Xml):Bool {
+	@:keep static function compare(a:Xml, b:Xml):Bool {
 		return a == null ? b == null : (b == null ? false : a._node == b._node);
 	}
 

+ 0 - 15
std/flash/_std/Reflect.hx

@@ -65,16 +65,6 @@
 		untyped {
 			if (o == null)
 				return new Array();
-			#if as3
-			var a:Array<String> = __keys__(o);
-			var i = 0;
-			while (i < a.length) {
-				if (!o.hasOwnProperty(a[i]))
-					a.splice(i, 1);
-				else
-					++i;
-			}
-			#else
 			var i = 0;
 			var a = [];
 			while (untyped __has_next__(o, i)) {
@@ -82,7 +72,6 @@
 				if (o.hasOwnProperty(prop))
 					a.push(prop);
 			}
-			#end
 			return a;
 		}
 
@@ -113,11 +102,7 @@
 		}
 
 	public static function isEnumValue(v:Dynamic):Bool {
-		#if as3
-		return try Type.getEnum(v) != null catch (e:Dynamic) false;
-		#else
 		return try v.__enum__ == true catch (e:Dynamic) false;
-		#end
 	}
 
 	public static function deleteField(o:Dynamic, field:String):Bool

+ 0 - 13
std/flash/_std/Type.hx

@@ -78,18 +78,9 @@ enum ValueType {
 				return "Float";
 			case "Boolean":
 				return "Bool";
-			#if as3
-			case "Object":
-				return "Dynamic";
-			#end
 			default:
 		}
 		var parts = str.split("::");
-		#if as3
-		if (parts[parts.length - 1] == "_Object") {
-			parts[parts.length - 1] = "Object";
-		}
-		#end
 		return parts.join(".");
 	}
 
@@ -111,10 +102,6 @@ enum ValueType {
 						return Int;
 					case "Float":
 						return Float;
-					#if as3
-					case "Dynamic":
-						return Dynamic;
-					#end
 				}
 				return null;
 			}

+ 0 - 32
std/flash/_std/haxe/Resource.hx

@@ -22,37 +22,6 @@
 
 package haxe;
 
-#if as3
-@:coreApi
-class Resource {
-	public static function listNames():Array<String>
-		untyped {
-			return __keys__(__resources__.list);
-		}
-
-	public static function getString(name:String):String {
-		var b = resolve(name);
-		return b == null ? null : b.readUTFBytes(b.length);
-	}
-
-	public static function getBytes(name:String):haxe.io.Bytes {
-		var b = resolve(name);
-		return b == null ? null : haxe.io.Bytes.ofData(b);
-	}
-
-	static function resolve(name:String):flash.utils.ByteArray
-		untyped {
-			var n = __resources__.list[name];
-			if (n == null)
-				return null;
-			return untyped __new__(n);
-		}
-
-	static function __init__():Void {
-		untyped __resources__.__init__();
-	}
-}
-#else
 @:coreApi
 class Resource {
 	static var content:Array<{name:String}>;
@@ -88,4 +57,3 @@ class Resource {
 		content = untyped __resources__();
 	}
 }
-#end

+ 0 - 24
std/flash/_std/haxe/ds/IntMap.hx

@@ -48,27 +48,6 @@ package haxe.ds;
 		return true;
 	}
 
-	#if as3
-	// unoptimized version
-
-	public function keys():Iterator<Int> {
-		return untyped (__keys__(h)).iterator();
-	}
-
-	@:analyzer(ignore) public function iterator():Iterator<T> {
-		return untyped {
-			ref: h,
-			it: keys(),
-			hasNext: function() {
-				return __this__.it.hasNext();
-			},
-			next: function() {
-				var i = __this__.it.next();
-				return __this__.ref[i];
-			}
-		};
-	}
-	#else
 	public inline function keys():Iterator<Int> {
 		return new IntMapKeysIterator(h);
 	}
@@ -76,7 +55,6 @@ package haxe.ds;
 	public inline function iterator():Iterator<T> {
 		return new IntMapValuesIterator<T>(h);
 	}
-	#end
 
 	@:runtime public inline function keyValueIterator():KeyValueIterator<Int, T> {
 		return new haxe.iterators.MapKeyValueIterator(this);
@@ -109,7 +87,6 @@ package haxe.ds;
 	}
 }
 
-#if !as3
 // this version uses __has_next__/__forin__ special SWF opcodes for iteration with no allocation
 
 @:allow(haxe.ds.IntMap)
@@ -163,4 +140,3 @@ private class IntMapValuesIterator<T> {
 		return r;
 	}
 }
-#end

+ 0 - 15
std/flash/_std/haxe/ds/ObjectMap.hx

@@ -46,18 +46,6 @@ class ObjectMap<K:{}, V> extends flash.utils.Dictionary implements haxe.Constrai
 		return has;
 	}
 
-	#if as3
-	public function keys():Iterator<K> {
-		return untyped __keys__(this).iterator();
-	}
-
-	public function iterator():Iterator<V> {
-		var ret = [];
-		for (i in keys())
-			ret.push(get(i));
-		return ret.iterator();
-	}
-	#else
 	public function keys():Iterator<K> {
 		return NativePropertyIterator.iterator(this);
 	}
@@ -65,7 +53,6 @@ class ObjectMap<K:{}, V> extends flash.utils.Dictionary implements haxe.Constrai
 	public function iterator():Iterator<V> {
 		return NativeValueIterator.iterator(this);
 	}
-	#end
 
 	@:runtime public inline function keyValueIterator():KeyValueIterator<K, V> {
 		return new haxe.iterators.MapKeyValueIterator(this);
@@ -95,7 +82,6 @@ class ObjectMap<K:{}, V> extends flash.utils.Dictionary implements haxe.Constrai
 	}
 }
 
-#if !as3
 private class NativePropertyIterator {
 	var collection:Dynamic;
 	var index:Int = 0;
@@ -153,4 +139,3 @@ private class NativeValueIterator {
 		return result;
 	}
 }
-#end

+ 0 - 25
std/flash/_std/haxe/ds/StringMap.hx

@@ -86,28 +86,6 @@ package haxe.ds;
 		}
 	}
 
-	#if as3
-	// unoptimized version
-
-	public function keys():Iterator<String> {
-		var out:Array<String> = untyped __keys__(h);
-		if (rh != null)
-			out = out.concat(untyped __hkeys__(rh));
-		return out.iterator();
-	}
-
-	public function iterator():Iterator<T> {
-		return untyped {
-			it: keys(),
-			hasNext: function() {
-				return __this__.it.hasNext();
-			},
-			next: function() {
-				return get(__this__.it.next());
-			}
-		};
-	}
-	#else
 	public inline function keys():Iterator<String> {
 		return new StringMapKeysIterator(h, rh);
 	}
@@ -115,7 +93,6 @@ package haxe.ds;
 	public inline function iterator():Iterator<T> {
 		return new StringMapValuesIterator<T>(h, rh);
 	}
-	#end
 
 	@:runtime public inline function keyValueIterator():KeyValueIterator<String, T> {
 		return new haxe.iterators.MapKeyValueIterator(this);
@@ -149,7 +126,6 @@ package haxe.ds;
 	}
 }
 
-#if !as3
 // this version uses __has_next__/__forin__ special SWF opcodes for iteration with no allocation
 
 @:allow(haxe.ds.StringMap)
@@ -224,4 +200,3 @@ private class StringMapValuesIterator<T> {
 		return r;
 	}
 }
-#end

+ 0 - 24
std/flash/_std/haxe/ds/UnsafeStringMap.hx

@@ -53,27 +53,6 @@ class UnsafeStringMap<T> implements haxe.Constraints.IMap<String, T> {
 		return true;
 	}
 
-	#if as3
-	// unoptimized version
-
-	public function keys():Iterator<String> {
-		return untyped (__keys__(h)).iterator();
-	}
-
-	public function iterator():Iterator<T> {
-		return untyped {
-			ref: h,
-			it: __keys__(h).iterator(),
-			hasNext: function() {
-				return __this__.it.hasNext();
-			},
-			next: function() {
-				var i:Dynamic = __this__.it.next();
-				return __this__.ref[i];
-			}
-		};
-	}
-	#else
 	public inline function keys():Iterator<String> {
 		return new UnsafeStringMapKeysIterator(h);
 	}
@@ -81,7 +60,6 @@ class UnsafeStringMap<T> implements haxe.Constraints.IMap<String, T> {
 	public inline function iterator():Iterator<T> {
 		return new UnsafeStringMapValuesIterator<T>(h);
 	}
-	#end
 
 	public inline function keyValueIterator():KeyValueIterator<String, T> {
 		return new haxe.iterators.MapKeyValueIterator(this);
@@ -114,7 +92,6 @@ class UnsafeStringMap<T> implements haxe.Constraints.IMap<String, T> {
 	}
 }
 
-#if !as3
 // this version uses __has_next__/__forin__ special SWF opcodes for iteration with no allocation
 
 @:allow(haxe.ds.UnsafeStringMap)
@@ -168,4 +145,3 @@ private class UnsafeStringMapValuesIterator<T> {
 		return r;
 	}
 }
-#end

+ 0 - 15
std/flash/_std/haxe/ds/WeakMap.hx

@@ -46,18 +46,6 @@ class WeakMap<K:{}, V> extends flash.utils.Dictionary implements haxe.Constraint
 		return has;
 	}
 
-	#if as3
-	public function keys():Iterator<K> {
-		return untyped __keys__(this).iterator();
-	}
-
-	public function iterator():Iterator<V> {
-		var ret = [];
-		for (i in keys())
-			ret.push(get(i));
-		return ret.iterator();
-	}
-	#else
 	public function keys():Iterator<K> {
 		return NativePropertyIterator.iterator(this);
 	}
@@ -65,7 +53,6 @@ class WeakMap<K:{}, V> extends flash.utils.Dictionary implements haxe.Constraint
 	public function iterator():Iterator<V> {
 		return NativeValueIterator.iterator(this);
 	}
-	#end
 
 	public inline function keyValueIterator():KeyValueIterator<K, V> {
 		return new haxe.iterators.MapKeyValueIterator(this);
@@ -95,7 +82,6 @@ class WeakMap<K:{}, V> extends flash.utils.Dictionary implements haxe.Constraint
 	}
 }
 
-#if !as3
 private class NativePropertyIterator {
 	var collection:Dynamic;
 	var index:Int = 0;
@@ -153,4 +139,3 @@ private class NativeValueIterator {
 		return result;
 	}
 }
-#end

+ 0 - 2
std/haxe/CallStack.hx

@@ -191,8 +191,6 @@ class CallStack {
 	public static function exceptionStack():Array<StackItem> {
 		#if neko
 		return makeStack(untyped __dollar__excstack());
-		#elseif as3
-		return new Array();
 		#elseif hl
 		return makeStack(_getExceptionStack());
 		#elseif flash

+ 2 - 2
std/haxe/Int32.hx

@@ -69,7 +69,7 @@ abstract Int32(Int) from Int to Int {
 
 	@:op(A - B) public static function floatSub(a:Float, b:Int32):Float;
 
-	#if (as3 || js || php || python || lua)
+	#if (js || php || python || lua)
 	#if js
 	// on JS we want to try using Math.imul, but we have to assign that function to Int32.mul only once,
 	// or else V8 will deoptimize it, so we need to be a bit funky with this.
@@ -265,7 +265,7 @@ abstract Int32(Int) from Int to Int {
 	#end
 	static function clamp(x:Int):Int {
 		// force to-int conversion on platforms that require it
-		#if (as3 || js)
+		#if js
 		return x | 0;
 		#elseif php
 		// we might be on 64-bit php, so sign extend from 32-bit

+ 1 - 1
std/haxe/Int64.hx

@@ -124,7 +124,7 @@ abstract Int64(__Int64) from __Int64 to __Int64 {
 	public static inline function toStr(x:Int64):String
 		return x.toString();
 
-	#if as3 public #else private #end function toString():String {
+	function toString():String {
 		var i:Int64 = cast this;
 		if (i == 0)
 			return "0";

+ 0 - 2
std/haxe/Resource.hx

@@ -86,8 +86,6 @@ class Resource {
 		#if neko
 		var tmp = untyped __resources__();
 		content = untyped Array.new1(tmp, __dollar__asize(tmp));
-		#elseif as3
-		null;
 		#else
 		content = untyped __resources__();
 		#end

+ 0 - 3
std/haxe/ds/BalancedTree.hx

@@ -247,9 +247,6 @@ class TreeNode<K, V> {
 	public var key:K;
 	public var value:V;
 
-	#if as3
-	public
-	#end
 	var _height:Int;
 
 	public function new(l, k, v, r, h = -1) {

+ 0 - 3
std/haxe/ds/Vector.hx

@@ -241,9 +241,6 @@ abstract Vector<T>(VectorData<T>) {
 
 		If `array` is null, the result is unspecified.
 	**/
-	#if as3
-	extern
-	#end
 	static public inline function fromArrayCopy<T>(array:Array<T>):Vector<T> {
 		#if python
 		return cast array.copy();

+ 2 - 2
std/haxe/format/JsonPrinter.hx

@@ -87,7 +87,7 @@ class JsonPrinter {
 			case TObject:
 				objString(v);
 			case TInt:
-				add(#if (as3 || jvm) Std.string(v) #else v #end);
+				add(#if jvm Std.string(v) #else v #end);
 			case TFloat:
 				add(Math.isFinite(v) ? Std.string(v) : 'null');
 			case TFunction:
@@ -131,7 +131,7 @@ class JsonPrinter {
 				var i:Dynamic = Type.enumIndex(v);
 				add(i);
 			case TBool:
-				add(#if (php || as3 || jvm) (v ? 'true' : 'false') #else v #end);
+				add(#if (php || jvm) (v ? 'true' : 'false') #else v #end);
 			case TNull:
 				add('null');
 		}

+ 1 - 3
std/haxe/rtti/Meta.hx

@@ -48,8 +48,6 @@ class Meta {
 		return java.Lib.toNativeType(t).isInterface();
 		#elseif cs
 		return cs.Lib.toNativeType(t).IsInterface;
-		#elseif (flash && as3)
-		return untyped flash.Lib.describeType(t).factory.extendsClass.length() == 0;
 		#else
 		throw "Something went wrong";
 		#end
@@ -58,7 +56,7 @@ class Meta {
 	private static function getMeta(t:Dynamic):MetaObject {
 		#if php
 		return php.Boot.getMeta(t.phpClassName);
-		#elseif (java || cs || (flash && as3))
+		#elseif (java || cs)
 		var ret = Reflect.field(t, "__meta__");
 		if (ret == null && Std.is(t, Class)) {
 			if (isInterface(t)) {

+ 2 - 7
tests/unit/src/unit/MyClass.hx

@@ -11,7 +11,7 @@ interface IMyChild extends IMyParent {}
 
 class MyClass {
 
-	#if as3 public #end var val : Int;
+	var val : Int;
 
 	public var ref : MyClass;
 	public var intValue : Int;
@@ -46,11 +46,10 @@ class MyChild1 extends MyParent implements IMyChild {
 	override function b() return 21;
 	function c() return 19;
 }
-#if !as3
+
 class MyChild2 extends MyParent {
 	public function test1(mc1:MyChild1) return mc1.b();
 }
-#end
 
 interface I1 { }
 class Base { public var s:String; public function new() { } }
@@ -290,11 +289,7 @@ class InlineCastB extends InlineCastA {
 	public function new() { }
 
 	public inline function test() : InlineCastB {
-		#if as3
-		return cast (self(), InlineCastB);
-		#else
 		return cast self();
-		#end
 	}
 
 	public function quote() {

+ 1 - 1
tests/unit/src/unit/MySubClass.hx

@@ -6,6 +6,6 @@ class MySubClass extends MyClass {
 		return val * 2;
 	}
 
-	@:keep #if as3 public #end static var XXX = 3;
+	@:keep static var XXX = 3;
 
 }

+ 0 - 3
tests/unit/src/unit/Test.hx

@@ -10,9 +10,6 @@ import cpp.link.StaticZlib;
 #end
 
 @:keepSub
-#if as3
-@:publicFields
-#end
 class Test implements utest.ITest {
 
 	public function new() {

+ 0 - 3
tests/unit/src/unit/TestArrowFunctions.hx

@@ -34,8 +34,6 @@ class TestArrowFunctions extends Test {
 
 	var maybe : Void -> Bool;
 
-	#if !as3
-
 	function testSyntax(){
 		maybe = () -> Math.random() > 0.5;
 
@@ -145,5 +143,4 @@ class TestArrowFunctions extends Test {
 
 		obj = { f : a -> a + a };
 	}
-	#end
 }

+ 3 - 4
tests/unit/src/unit/TestBasetypes.hx

@@ -182,7 +182,7 @@ class TestBasetypes extends Test {
 		eq( Std.int( 2147483647.001), 0x7FFFFFFF );
 
 
-		#if (flash && !as3)
+		#if flash
 		eq( Math.floor( -10000000000.7), 0xABF41BFF);
 		eq( Math.ceil( -10000000000.7), 0xABF41C00);
 		eq( Math.round( -10000000000.7), 0xABF41BFF);
@@ -279,13 +279,12 @@ class TestBasetypes extends Test {
 	function testObjectKeyword() {
 		// new is a keyword in Haxe
 		var l = { "new": "test" };
-		var prefix = #if as3 "_" #else "" #end;
-		eq(Reflect.field(l, prefix + "new"), "test");
+		eq(Reflect.field(l, "new"), "test");
 		// const is a keyword on some platforms but not in Haxe
 		// check that with can still access it normally
 		var o = { const : 6 }
 		eq(o.const, 6);
-		eq(Reflect.field(o, prefix+"const"), 6);
+		eq(Reflect.field(o, "const"), 6);
 	}
 
 	function testFormat() {

+ 1 - 1
tests/unit/src/unit/TestMain.hx

@@ -101,7 +101,7 @@ class TestMain {
 			#end
 			new TestInterface(),
 			new TestNaN(),
-			#if ((dce == "full") && !interp && !as3)
+			#if ((dce == "full") && !interp)
 			new TestDCE(),
 			#end
 			new TestMapComprehension(),

+ 1 - 1
tests/unit/src/unit/TestMeta.hx

@@ -40,7 +40,7 @@ import unit.HelperMacros.getMeta;
 
 		var m = haxe.rtti.Meta.getFields(TestMeta);
 		eq( fields(m), "_" );
-		eq( fields(m._), #if as3 "_"+#end "new" );
+		eq( fields(m._), "new" );
 
 		var m = haxe.rtti.Meta.getStatics(TestMeta);
 		eq( fields(m), "foo" );

+ 0 - 4
tests/unit/src/unit/TestMisc.hx

@@ -449,11 +449,9 @@ class TestMisc extends Test {
 		eq( x, 1 );
 		eq( arr[0].v, 4 );
 
-		#if !as3
 		x = 0;
 		eq( arr[x++].v += 3, 7 );
 		eq( arr[0].v, 7 );
-		#end
 
 		x = 0;
 		var arr:Dynamic = [{ v : 3 }];
@@ -461,11 +459,9 @@ class TestMisc extends Test {
 		eq( x, 1 );
 		eq( arr[0].v, 4 );
 
-		#if !as3
 		x = 0;
 		eq( arr[x++].v += 3, 7 );
 		eq( arr[0].v, 7 );
-		#end
 	}
 
 	function testInitOrder() {

+ 0 - 5
tests/unit/src/unit/TestReflect.hx

@@ -77,12 +77,7 @@ class TestReflect extends Test {
 	}
 
 	static inline function u2( s : String, s2 ) : String {
-		#if as3
-		return s + "." +s2;
-		#else
-		// this causes a null pointer exception on as3 for whatever reason
 		return u(s) + "." + u(s2);
-		#end
 	}
 
 	static var TNAMES = [

+ 1 - 10
tests/unit/src/unit/TestType.hx

@@ -35,9 +35,6 @@ class TestType extends Test {
 		fl.sort(Reflect.compare);
 		eq( fl.join("|"), fields.join("|") );
 
-		// AS3 generator will create native properties
-		#if !as3
-
 		// x should not be listed since it's not a variable
 		var fl = Type.getInstanceFields(VarProps);
 		var fields = ["get_x","get_y","set_x","set_y","set_z","y","z"];
@@ -49,8 +46,6 @@ class TestType extends Test {
 		var fields = ["SY", "get_SX", "get_SY", "set_SX", "set_SY"];
 		fl.sort(Reflect.compare);
 		eq( fl.join("|"), fields.join("|"));
-
-		#end
 	}
 
 	public function testEnumEq() {
@@ -99,11 +94,8 @@ class TestType extends Test {
 		var c = new MyClass.MyChild1();
 		eq(12, c.a());
 
-		// TODO: this is also a problem
-		#if !as3
 		var mc2 = new MyChild2();
 		eq(21, mc2.test1(new MyChild1()));
-		#end
 	}
 
 	function testUnifyMin() {
@@ -779,8 +771,7 @@ class TestType extends Test {
 		eq(mr["hhh"], 2);
 		eq(v, "hhhh");
 
-		// note for later: As3 compilation fails if the function name is removed
-		mr["101"] = function n(x) return 9 + x;
+		mr["101"] = function(x) return 9 + x;
 		eq(mr["101"](1), 10);
 	}
 

+ 1 - 1
tests/unit/src/unit/issues/Issue4988.hx

@@ -9,7 +9,7 @@ class Issue4988 extends Test {
 			try {
 				var d:{i:Null<Int>} = null;
 				value = (d.i > 0);
-				#if !(lua || as3)
+				#if !lua
 				(null:Dynamic).nonExistent();
 				null.nonExistent();
 				#end

+ 1 - 1
tests/unit/src/unit/issues/Issue5025.hx

@@ -6,7 +6,7 @@ class Issue5025 extends Test {
 	}
 
 	function shouldCompile() {
-		#if !(java || cs || as3 || lua)
+		#if !(java || cs || lua)
 		try {
 			switch (null) {
 				case Value(i):

+ 0 - 2
tests/unit/src/unit/issues/Issue5039.hx

@@ -43,9 +43,7 @@ class Issue5039 extends Test {
 		f(setterCalled);
 
 		t(Std.is(@:bypassAccessor c, C));
-		#if !as3 // because as3 generates underlying field as protected, we cannot access it from outside :-/
 		eq(42, @:bypassAccessor (@:bypassAccessor c).prop);
 		eq(42, @:bypassAccessor @:bypassAccessor c.prop);
-		#end
 	}
 }

+ 0 - 2
tests/unit/src/unit/issues/Issue5351.hx

@@ -2,7 +2,6 @@ package unit.issues;
 import scripthost.Issue5351;
 
 class Issue5351 extends Test {
-#if !as3
 	public function test() {
 		var t3:Issue5351_2 = Type.createInstance(Type.resolveClass('unit.issues.Issue5351_3'), []);
 		eq(t3.doTest1(), 'doTest1 override');
@@ -28,7 +27,6 @@ class Issue5351 extends Test {
 
 		eq(t3.doTest4(), 'doTest4');
 	}
-#end
 }
 
 @:keep class Issue5351_3 extends Issue5351_2 {

+ 0 - 2
tests/unit/src/unit/issues/Issue6059.hx

@@ -1,14 +1,12 @@
 package unit.issues;
 
 class Issue6059 extends Test {
-#if !as3 // See #6891
 	public static inline function foo (name : B, ?id : B, data : Array<String>) : Void { }
 
 	public static function test () : Void {
 		Issue6059.foo ("", []); // -> stackoverflow
 		Issue6059.foo ("", null, []); // ok
 	}
-#end
 }
 
 private abstract A (String) {

+ 1 - 1
tests/unit/src/unit/issues/Issue6325.hx

@@ -1,7 +1,7 @@
 package unit.issues;
 
 class Issue6325 extends Test {
-#if (!hl && !flash && !cpp && !as3)
+#if (!hl && !flash && !cpp)
   public function test() {
     var base = new Base();
     base.someInt = 42;

+ 2 - 4
tests/unit/src/unit/issues/Issue6801.hx

@@ -4,7 +4,6 @@ import haxe.Json;
 import haxe.format.JsonPrinter;
 
 class Issue6801 extends unit.Test {
-#if !as3
 	function test() {
 		var o = new Child();
         var json = haxe.format.JsonPrinter.print(o);
@@ -17,19 +16,18 @@ class Issue6801 extends unit.Test {
         eq(expected.p, actual.p);
         eq(expected.p2, actual.p2);
 	}
-#end
 }
 
 @:keep
 private class Parent {
-    public var p:Int = 1;    
+    public var p:Int = 1;
     public function new() {}
 }
 
 @:keep
 private class Child extends Parent{
     var c:String = 'hello';
-    
+
     public var prop(get,set):Int;
     function get_prop() return 0;
     function set_prop(v) return v;

+ 1 - 1
tests/unit/src/unit/issues/Issue6942.hx

@@ -9,7 +9,7 @@ class Issue6942 extends unit.Test {
 		eq(2, 1 - IntEnum);
 
 		//these targets have actual UInt type at runtime
-		#if (flash || cs || as3)
+		#if (flash || cs)
 		eq(-4294967295, -UIntEnum);
 		eq(2, 1 - UIntEnum);
 		#else

+ 0 - 2
tests/unit/src/unit/issues/Issue8075.hx

@@ -1,7 +1,6 @@
 package unit.issues;
 
 class Issue8075 extends unit.Test {
-#if !as3
 	function test() {
 		var expect = #if static 0 #else null #end;
 		var a = [];
@@ -10,5 +9,4 @@ class Issue8075 extends unit.Test {
 		a[2] = 2;
 		eq(expect, a[0]);
 	}
-#end
 }

+ 2 - 2
tests/unit/src/unit/issues/Issue8227.hx

@@ -1,7 +1,7 @@
 package unit.issues;
 
 class Issue8227 extends unit.Test {
-	#if (flash && !as3)
+	#if flash
 	function test() {
 		var ns = new NsCls();
 		eq(ns.ns1v, 1);
@@ -17,7 +17,7 @@ class Issue8227 extends unit.Test {
 	#end
 }
 
-#if (flash && !as3)
+#if flash
 @:access(unit.Test)
 private class Child extends NsCls {
 	public function new(test:unit.Test) {

+ 2 - 2
tests/unit/src/unit/issues/Issue8241.hx

@@ -1,6 +1,6 @@
 package unit.issues;
 
-#if (flash && !as3)
+#if flash
 private class PropClassChild extends PropClass {
 	override function get_x():Int {
 		return super.get_x() + 1;
@@ -28,7 +28,7 @@ private class HaxePropIfaceImpl extends PropClass implements HaxePropIface {}
 #end
 
 class Issue8241 extends unit.Test {
-	#if (flash && !as3)
+	#if flash
 	function test() {
 		var p = new PropClass();
 		eq(42, p.x);

+ 2 - 2
tests/unit/src/unit/issues/Issue8248.hx

@@ -1,6 +1,6 @@
 package unit.issues;
 
-#if (flash && !as3)
+#if flash
 private class NoProtected {}
 
 private class Base extends NoProtected {
@@ -30,7 +30,7 @@ private class ExternGrandChild extends ExternChild {
 #end
 
 class Issue8248 extends unit.Test {
-	#if (flash && !as3)
+	#if flash
 	function test() {
 		eq(new GrandChild().x, 2);
 		eq(new ExternGrandChild().getF(), "bye");

+ 0 - 2
tests/unit/src/unit/issues/Issue8930.hx

@@ -14,7 +14,6 @@ class Issue8930 extends Test {
 		eq(11, v.x--);
 		eq(10, v.x);
 
-		#if !as3
 		var cnt = 0;
 		function sideEffect() {
 			cnt++;
@@ -23,7 +22,6 @@ class Issue8930 extends Test {
 		++sideEffect().x;
 		sideEffect().x++;
 		eq(2, cnt);
-		#end
 	}
 }
 

+ 0 - 2
tests/unit/src/unitstd/Array.unit.hx

@@ -273,14 +273,12 @@ var values = [];
 for (a in arr) values.push(a.id);
 values == [1, 3, 5];
 
-#if !as3
 // check that map and filter work well on Dynamic as well
 var a : Dynamic = [0,1,2];
 var b : Dynamic = a.filter(function(x) return x & 1 == 0).map(function(x) return x * 10);
 b.length == 2;
 b[0] == 0;
 b[1] == 20;
-#end
 
 // resize
 var a : Array<Int> = [1,2,3];

+ 1 - 5
tests/unit/src/unitstd/Reflect.unit.hx

@@ -12,8 +12,7 @@ var c = new C2();
 Reflect.field(c, "v") == "var";
 Reflect.field(c, "prop") == "prop";
 Reflect.field(c, "func")() == "foo";
-// As3 invokes the getter
-Reflect.field(c, "propAcc") == #if as3 "1" #else "0" #end;
+Reflect.field(c, "propAcc") == "0";
 var n = null;
 Reflect.field(n, n) == null;
 Reflect.field(1, "foo") == null;
@@ -49,10 +48,7 @@ var c = new C2();
 Reflect.setProperty(c, "v", "bar");
 c.v == "bar";
 Reflect.setProperty(c, "propAcc", "abc");
-#if !as3
-// not supported on AS3
 Reflect.field(c, "propAcc") == "ABC";
-#end
 
 // fields
 var names = ["a", "b", "c"];

+ 1 - 1
tests/unit/src/unitstd/Type.unit.hx

@@ -108,7 +108,7 @@ for (f in fields)
 	t(requiredFields.remove(f));
 requiredFields == [];
 var fields = Type.getClassFields(C);
-var requiredFields = #if as3 ["staticVar"] #else ["staticFunc", "staticVar", "staticProp"] #end;
+var requiredFields = ["staticFunc", "staticVar", "staticProp"];
 for (f in fields)
 	t(requiredFields.remove(f));
 requiredFields == [];

+ 0 - 5
tests/unit/src/unitstd/haxe/ds/Vector.unit.hx

@@ -19,13 +19,10 @@ vec.get(1) == vNullFloat;
 vec.get(2) == vNullFloat;
 
 // bool init
-// Adobe's compilers seem to have a bug here that gives null instead of false
-#if !as3
 var vec = new haxe.ds.Vector<Bool>(3);
 vec.get(0) == vNullBool;
 vec.get(1) == vNullBool;
 vec.get(2) == vNullBool;
-#end
 
 // fromArray
 var arr = ["1", "2", "3"];
@@ -44,9 +41,7 @@ vec.set(1, 2);
 var arr = vec.toArray();
 arr[0] == vNullInt;
 arr[1] == 2;
-#if !as3
 arr[3] == vNullInt;
-#end
 
 // objects
 var tpl = new C();