浏览代码

Remove unused std files

Or at least shouldn't be used...
Rudy Ges 1 年之前
父节点
当前提交
a1c9f0b1ef

+ 0 - 344
std/cs/_std/Type.hx

@@ -1,344 +0,0 @@
-/*
- * Copyright (C)2005-2019 Haxe Foundation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-
-import cs.Lib;
-import cs.internal.HxObject;
-import cs.internal.Runtime;
-import cs.internal.Function;
-import cs.Flags;
-import cs.system.Object;
-import cs.system.reflection.*;
-
-using StringTools;
-
-enum ValueType {
-	TNull;
-	TInt;
-	TFloat;
-	TBool;
-	TObject;
-	TFunction;
-	TClass(c:Class<Dynamic>);
-	TEnum(e:Enum<Dynamic>);
-	TUnknown;
-}
-
-@:coreApi class Type {
-	public static function getClass<T>(o:T):Null<Class<T>> {
-		if (Object.ReferenceEquals(o, null) || Std.isOfType(o, DynamicObject) || Std.isOfType(o, cs.system.Type))
-			return null;
-
-		return cast cs.Lib.getNativeType(o);
-	}
-
-	public static function getEnum(o:EnumValue):Enum<Dynamic> {
-		if (Std.isOfType(o, HxEnum))
-			return cast cs.Lib.getNativeType(o).BaseType; // enum constructors are subclasses of an enum type
-		else if (Std.isOfType(o, cs.system.Enum))
-			return cast cs.Lib.getNativeType(o);
-		return null;
-	}
-
-	public static function getSuperClass(c:Class<Dynamic>):Class<Dynamic> {
-		var base = Lib.toNativeType(c).BaseType;
-		if (Object.ReferenceEquals(base, null) || base.ToString() == "haxe.lang.HxObject" || base.ToString() == "System.Object")
-			return null;
-		return Lib.fromNativeType(base);
-	}
-
-	public static function getClassName(c:Class<Dynamic>):String {
-		var ret = Lib.toNativeType(c).ToString();
-		#if no_root
-		if (ret.length > 10 && StringTools.startsWith(ret, "haxe.root."))
-			ret = ret.substr(10);
-		#end
-
-		return switch (ret) {
-			// TODO: are those really needed?
-			case "System.Int32": "Int";
-			case "System.Double": "Float";
-			case "System.String": "String";
-			case "System.Boolean": "Bool";
-			case "System.Object": "Dynamic";
-			case "System.Type": "Class";
-			default: cast(ret, cs.system.String).Split(cs.NativeArray.make(("`".code : cs.StdTypes.Char16)))[0];
-		}
-	}
-
-	public static function getEnumName(e:Enum<Dynamic>):String {
-		var ret = Lib.toNativeType(cast e).ToString();
-		#if no_root
-		if (ret.length > 10 && StringTools.startsWith(ret, "haxe.root."))
-			ret = ret.substr(10);
-		#end
-		return ret;
-	}
-
-	public static function resolveClass(name:String):Class<Dynamic> {
-		#if no_root
-		if (name.indexOf(".") == -1)
-			name = "haxe.root." + name;
-		#end
-		var t = cs.system.Type._GetType(name);
-		#if !CF
-		if (Object.ReferenceEquals(t, null)) {
-			var all = cs.system.AppDomain.CurrentDomain.GetAssemblies().GetEnumerator();
-			while (all.MoveNext()) {
-				var t2:cs.system.reflection.Assembly = all.Current;
-				t = t2.GetType(name);
-				if (!Object.ReferenceEquals(t, null))
-					break;
-			}
-		}
-		#end
-		if (Object.ReferenceEquals(t, null)) {
-			switch (name) {
-				case #if no_root "haxe.root.Int" #else "Int" #end:
-					return cast Int;
-				case #if no_root "haxe.root.Float" #else "Float" #end:
-					return cast Float;
-				case #if no_root "haxe.root.Class" #else "Class" #end:
-					return cast Class;
-				case #if no_root "haxe.root.Dynamic" #else "Dynamic" #end:
-					return cast Dynamic;
-				case #if no_root "haxe.root.String" #else "String" #end:
-					return cast String;
-				case #if no_root "haxe.root.Bool" #else "Bool" #end:
-					return cast Bool;
-				default:
-					return null;
-			}
-		#if !erase_generics
-		}
-		else if (t.IsInterface && cast(IGenericObject, cs.system.Type).IsAssignableFrom(t)) {
-			for (attr in t.GetCustomAttributes(true)) {
-				var g = cs.Lib.as(attr, cs.internal.HxObject.GenericInterface);
-				if (g != null)
-					return Lib.fromNativeType(g.generic);
-			}
-
-			return Lib.fromNativeType(t);
-		#end
-		} else {
-			return Lib.fromNativeType(t);
-		}
-	}
-
-	public static function resolveEnum(name:String):Enum<Dynamic> {
-		var t = Lib.toNativeType(resolveClass(name));
-		if (!Object.ReferenceEquals(t, null)
-			&& untyped t.BaseType.Equals(Lib.toNativeType(cs.system.Enum)) || Lib.toNativeType(HxEnum).IsAssignableFrom(t))
-			return cast t;
-		return null;
-	}
-
-	public static function createInstance<T>(cl:Class<T>, args:Array<Dynamic>):T {
-		if (Object.ReferenceEquals(cl, String))
-			return args[0];
-		var t = Lib.toNativeType(cl);
-		if (t.IsInterface) {
-			// may be generic
-			t = Lib.toNativeType(resolveClass(getClassName(cl)));
-		}
-		var ctors = t.GetConstructors();
-		return Runtime.callMethod(null, cast ctors, ctors.Length, cs.Lib.nativeArray(args, true));
-	}
-
-	// cache empty constructor arguments so we don't allocate it on each createEmptyInstance call
-	@:protected @:readOnly static var __createEmptyInstance_EMPTY_ARGS = cs.NativeArray.make((cs.internal.Runtime.EmptyObject.EMPTY : Any));
-
-	public static function createEmptyInstance<T>(cl:Class<T>):T {
-		var t = Lib.toNativeType(cl);
-
-		if (cs.system.Object.ReferenceEquals(t, String))
-			#if erase_generics
-			return untyped "";
-			#else
-			return untyped __cs__("(T)(object){0}", "");
-			#end
-
-		var res = try cs.system.Activator.CreateInstance(t,
-			__createEmptyInstance_EMPTY_ARGS) catch (_:cs.system.MissingMemberException) cs.system.Activator.CreateInstance(t);
-
-		#if erase_generics
-		return res;
-		#else
-		return untyped __cs__("(T){0}", res);
-		#end
-	}
-
-	public static function createEnum<T>(e:Enum<T>, constr:String, ?params:Array<Dynamic>):T {
-		if (params == null || params.length == 0) {
-			var ret = cs.internal.Runtime.slowGetField(e, constr, true);
-			if (Reflect.isFunction(ret))
-				throw 'Constructor $constr needs parameters';
-			return ret;
-		} else {
-			return cs.internal.Runtime.slowCallField(e, constr, cs.Lib.nativeArray(params, true));
-		}
-	}
-
-	public static function createEnumIndex<T>(e:Enum<T>, index:Int, ?params:Array<Dynamic>):T {
-		var constr = getEnumConstructs(e);
-		return createEnum(e, constr[index], params);
-	}
-
-	public static function getInstanceFields(c:Class<Dynamic>):Array<String> {
-		if (c == String)
-			return cs.internal.StringExt.StringRefl.fields;
-
-		var c = cs.Lib.toNativeType(c);
-		var ret = [];
-		var mis = c.GetMembers(new cs.Flags(BindingFlags.Public) | BindingFlags.Instance | BindingFlags.FlattenHierarchy);
-		for (i in 0...mis.Length) {
-			var i = mis[i];
-			if (Std.isOfType(i, PropertyInfo))
-				continue;
-			var n = i.Name;
-			if (!n.startsWith('__hx_') && n.fastCodeAt(0) != '.'.code) {
-				switch (n) {
-					case 'Equals' | 'ToString' | 'GetHashCode' | 'GetType':
-					case _:
-						ret.push(n);
-				}
-			}
-		}
-		return ret;
-	}
-
-	public static function getClassFields(c:Class<Dynamic>):Array<String> {
-		if (Object.ReferenceEquals(c, String)) {
-			return ['fromCharCode'];
-		}
-
-		var ret = [];
-		var infos = Lib.toNativeType(c).GetMembers(new Flags(BindingFlags.Public) | BindingFlags.Static);
-		for (i in 0...infos.Length) {
-			var name = infos[i].Name;
-			if (!name.startsWith('__hx_')) {
-				ret.push(name);
-			}
-		}
-		return ret;
-	}
-
-	public static function getEnumConstructs(e:Enum<Dynamic>):Array<String> {
-		var t = cs.Lib.as(e, cs.system.Type);
-		var f = t.GetField("__hx_constructs", new cs.Flags(BindingFlags.Static) | BindingFlags.NonPublic);
-		if (f != null) {
-			var values:cs.system.Array = f.GetValue(null);
-			var copy = new cs.NativeArray(values.Length);
-			cs.system.Array.Copy(values, copy, values.Length);
-			return cs.Lib.array(copy);
-		} else
-			return cs.Lib.array(cs.system.Enum.GetNames(t));
-	}
-
-	public static function typeof(v:Dynamic):ValueType {
-		if (v == null)
-			return ValueType.TNull;
-
-		var t = cs.Lib.as(v, cs.system.Type);
-		if (!Object.ReferenceEquals(t, null)) {
-			// class type
-			return ValueType.TObject;
-		}
-
-		t = v.GetType();
-		if (t.IsEnum)
-			return ValueType.TEnum(cast t);
-		if (Std.isOfType(v, HxEnum))
-			return ValueType.TEnum(cast t.BaseType); // enum constructors are subclasses of an enum type
-		if (t.IsValueType) {
-			var vc = Std.downcast(v, cs.system.IConvertible);
-			if (vc != null) {
-				switch (vc.GetTypeCode()) {
-					case cs.system.TypeCode.Boolean:
-						return ValueType.TBool;
-					case cs.system.TypeCode.Double:
-						var d:Float = vc.ToDouble(null);
-						if (d >= cs.system.Int32.MinValue && d <= cs.system.Int32.MaxValue && d == vc.ToInt32(null))
-							return ValueType.TInt;
-						else
-							return ValueType.TFloat;
-					case cs.system.TypeCode.Int32:
-						return ValueType.TInt;
-					default:
-						return ValueType.TClass(cast t);
-				}
-			} else {
-				return ValueType.TClass(cast t);
-			}
-		}
-
-		if (Std.isOfType(v, IHxObject)) {
-			if (Std.isOfType(v, DynamicObject))
-				return ValueType.TObject;
-			return ValueType.TClass(cast t);
-		} else if (Std.isOfType(v, Function)) {
-			return ValueType.TFunction;
-		} else {
-			return ValueType.TClass(cast t);
-		}
-	}
-
-	@:ifFeature("has_enum")
-	public static function enumEq<T>(a:T, b:T):Bool {
-		if (a == null)
-			return b == null;
-		else if (b == null)
-			return false;
-		else
-			return untyped a.Equals(b);
-	}
-
-	public static function enumConstructor(e:EnumValue):String {
-		return Std.isOfType(e, cs.system.Enum) ? cast(e, cs.system.Enum).ToString() : cast(e, HxEnum).getTag();
-	}
-
-	public static function enumParameters(e:EnumValue):Array<Dynamic> {
-		return Std.isOfType(e, cs.system.Enum) ? [] : cast(e, HxEnum).getParams();
-	}
-
-	@:ifFeature("has_enum")
-	@:pure
-	public static function enumIndex(e:EnumValue):Int {
-		if (Std.isOfType(e, cs.system.Enum)) {
-			var values = cs.system.Enum.GetValues(Lib.getNativeType(e));
-			return cs.system.Array.IndexOf(values, e);
-		} else {
-			return @:privateAccess cast(e, HxEnum)._hx_index;
-		}
-	}
-
-	public static function allEnums<T>(e:Enum<T>):Array<T> {
-		var ctors = getEnumConstructs(e);
-		var ret = [];
-		for (ctor in ctors) {
-			var v = Reflect.field(e, ctor);
-			if (Std.isOfType(v, e))
-				ret.push(v);
-		}
-
-		return ret;
-	}
-}

+ 0 - 192
std/java/_std/EReg.hx

@@ -1,192 +0,0 @@
-/*
- * Copyright (C)2005-2019 Haxe Foundation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-
-import java.util.regex.*;
-
-using StringTools;
-
-@:coreApi class EReg {
-	private var pattern:String;
-	private var matcher:Matcher;
-	private var cur:String;
-	private var isGlobal:Bool;
-
-	public function new(r:String, opt:String) {
-		var flags = 0;
-		for (i in 0...opt.length) {
-			switch (StringTools.fastCodeAt(opt, i)) {
-				case 'i'.code:
-					flags |= Pattern.CASE_INSENSITIVE;
-				case 'm'.code:
-					flags |= Pattern.MULTILINE;
-				case 's'.code:
-					flags |= Pattern.DOTALL;
-				case 'g'.code:
-					isGlobal = true;
-			}
-		}
-
-		flags |= Pattern.UNICODE_CASE;
-		#if !android // see https://github.com/HaxeFoundation/haxe/issues/7632
-		flags |= Pattern.UNICODE_CHARACTER_CLASS;
-		#end
-		matcher = Pattern.compile(convert(r), flags).matcher("");
-		pattern = r;
-	}
-
-	private static function convert(r:String):String {
-		// some references of the implementation:
-		// http://stackoverflow.com/questions/809647/java-vs-javascript-regex-problem
-		// http://stackoverflow.com/questions/4788413/how-to-convert-javascript-regex-to-safe-java-regex
-		// Some necessary changes:
-		//
-		// \0  -> \x00
-		// \v  -> \x0b
-		// [^] -> [\s\S]
-		// unescaped ', " -> \', \"
-		/* FIXME
-			var pat = new StringBuf();
-			var len = r.length;
-			var i = 0;
-			while (i < len)
-			{
-				var c = StringTools.fastCodeAt(r, i++);
-				switch(c)
-				{
-					case '\\'.code: //escape-sequence
-
-				}
-			}
-		 */
-
-		return r;
-	}
-
-	public function match(s:String):Bool {
-		cur = s;
-		matcher = matcher.reset(s);
-		return matcher.find();
-	}
-
-	public function matched(n:Int):String {
-		if (n == 0)
-			return matcher.group();
-		else
-			return matcher.group(n);
-	}
-
-	public function matchedLeft():String {
-		return untyped cur.substring(0, matcher.start());
-	}
-
-	public function matchedRight():String {
-		return untyped cur.substring(matcher.end(), cur.length);
-	}
-
-	public function matchedPos():{pos:Int, len:Int} {
-		var start = matcher.start();
-		return {pos: start, len: matcher.end() - start};
-	}
-
-	public function matchSub(s:String, pos:Int, len:Int = -1):Bool {
-		matcher = matcher.reset(len < 0 ? s : s.substr(0, pos + len));
-		cur = s;
-		return matcher.find(pos);
-	}
-
-	public function split(s:String):Array<String> {
-		if (isGlobal) {
-			var ret = [];
-			matcher.reset(s);
-			matcher = matcher.useAnchoringBounds(false).useTransparentBounds(true);
-			var copyOffset = 0;
-			while (true) {
-				if (!matcher.find()) {
-					ret.push(s.substring(copyOffset, s.length));
-					break;
-				}
-				ret.push(s.substring(copyOffset, matcher.start()));
-				var nextStart = matcher.end();
-				copyOffset = nextStart;
-				if (nextStart == matcher.regionStart()) {
-					nextStart++; // zero-length match - shift region one forward
-				}
-				if (nextStart >= s.length) {
-					ret.push("");
-					break;
-				}
-				matcher.region(nextStart, s.length);
-			}
-			return ret;
-		} else {
-			var m = matcher;
-			m.reset(s);
-			if (m.find()) {
-				return untyped [s.substring(0, m.start()), s.substring(m.end(), s.length)];
-			} else {
-				return [s];
-			}
-		}
-	}
-
-	inline function start(group:Int):Int {
-		return matcher.start(group);
-	}
-
-	inline function len(group:Int):Int {
-		return matcher.end(group) - matcher.start(group);
-	}
-
-	public function replace(s:String, by:String):String {
-		matcher.reset(s);
-		by = by.replace("\\", "\\\\").replace("$$", "\\$");
-		return isGlobal ? matcher.replaceAll(by) : matcher.replaceFirst(by);
-	}
-
-	public function map(s:String, f:EReg->String):String {
-		var offset = 0;
-		var buf = new StringBuf();
-		do {
-			if (offset >= s.length)
-				break;
-			else if (!matchSub(s, offset)) {
-				buf.add(s.substr(offset));
-				break;
-			}
-			var p = matchedPos();
-			buf.add(s.substr(offset, p.pos - offset));
-			buf.add(f(this));
-			if (p.len == 0) {
-				buf.add(s.substr(p.pos, 1));
-				offset = p.pos + 1;
-			} else
-				offset = p.pos + p.len;
-		} while (isGlobal);
-		if (!isGlobal && offset > 0 && offset < s.length)
-			buf.add(s.substr(offset));
-		return buf.toString();
-	}
-
-	public static inline function escape(s:String):String {
-		return Pattern.quote(s);
-	}
-}

+ 0 - 145
std/java/_std/Reflect.hx

@@ -1,145 +0,0 @@
-/*
- * Copyright (C)2005-2019 Haxe Foundation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-
-import java.internal.Function;
-import java.internal.HxObject;
-import java.internal.Runtime;
-import java.Boot;
-
-@:coreApi class Reflect {
-	public static function hasField(o:Dynamic, field:String):Bool {
-		if (Std.isOfType(o, IHxObject)) {
-			return untyped (o : IHxObject).__hx_getField(field, false, true, false) != Runtime.undefined;
-		}
-		return Runtime.slowHasField(o, field);
-	}
-
-	@:keep
-	public static function field(o:Dynamic, field:String):Dynamic {
-		if (Std.isOfType(o, IHxObject)) {
-			return untyped (o : IHxObject).__hx_getField(field, false, false, false);
-		}
-		return Runtime.slowGetField(o, field, false);
-	}
-
-	@:keep
-	public static function setField(o:Dynamic, field:String, value:Dynamic):Void {
-		if (Std.isOfType(o, IHxObject)) {
-			untyped (o : IHxObject).__hx_setField(field, value, false);
-		} else {
-			Runtime.slowSetField(o, field, value);
-		}
-	}
-
-	public static function getProperty(o:Dynamic, field:String):Dynamic {
-		if (o == null || field == null) {
-			return null;
-		}
-		if (Std.isOfType(o, IHxObject)) {
-			return untyped (o : IHxObject).__hx_getField(field, false, false, true);
-		}
-		if (Runtime.slowHasField(o, "get_" + field)) {
-			return Runtime.slowCallField(o, "get_" + field, null);
-		}
-		return Runtime.slowGetField(o, field, false);
-	}
-
-	public static function setProperty(o:Dynamic, field:String, value:Dynamic):Void {
-		if (Std.isOfType(o, IHxObject)) {
-			untyped (o : IHxObject).__hx_setField(field, value, true);
-		} else if (Runtime.slowHasField(o, "set_" + field)) {
-			Runtime.slowCallField(o, "set_" + field, java.NativeArray.make(value));
-		} else {
-			Runtime.slowSetField(o, field, value);
-		}
-	}
-
-	public static function callMethod(o:Dynamic, func:haxe.Constraints.Function, args:Array<Dynamic>):Dynamic {
-		var args = java.Lib.nativeArray(args, true);
-		return untyped (func : Function).__hx_invokeDynamic(args);
-	}
-
-	@:keep
-	public static function fields(o:Dynamic):Array<String> {
-		if (Std.isOfType(o, IHxObject)) {
-			var ret:Array<String> = [];
-			untyped (o : IHxObject).__hx_getFields(ret);
-			return ret;
-		} else if (Std.isOfType(o, java.lang.Class)) {
-			return Type.getClassFields(cast o);
-		} else {
-			return [];
-		}
-	}
-
-	public static function isFunction(f:Dynamic):Bool {
-		return Std.isOfType(f, Function);
-	}
-
-	public static function compare<T>(a:T, b:T):Int {
-		return Runtime.compare(a, b);
-	}
-
-	@:access(java.internal.Closure)
-	public static function compareMethods(f1:Dynamic, f2:Dynamic):Bool {
-		if (f1 == f2) {
-			return true;
-		}
-		if (Std.isOfType(f1, Closure) && Std.isOfType(f2, Closure)) {
-			var f1c:Closure = cast f1;
-			var f2c:Closure = cast f2;
-			return Runtime.refEq(f1c.obj, f2c.obj) && f1c.field == f2c.field;
-		}
-		return false;
-	}
-
-	public static function isObject(v:Dynamic):Bool {
-		return v != null
-			&& !(Std.isOfType(v, HxEnum)
-				|| Std.isOfType(v, Function)
-				|| Std.isOfType(v, java.lang.Enum)
-				|| Std.isOfType(v, java.lang.Number)
-				|| Std.isOfType(v, java.lang.Boolean.BooleanClass));
-	}
-
-	public static function isEnumValue(v:Dynamic):Bool {
-		return v != null && (Std.isOfType(v, HxEnum) || Std.isOfType(v, java.lang.Enum));
-	}
-
-	public static function deleteField(o:Dynamic, field:String):Bool {
-		return (Std.isOfType(o, DynamicObject) && (o : DynamicObject).__hx_deleteField(field));
-	}
-
-	public static function copy<T>(o:Null<T>):Null<T> {
-		if (o == null)
-			return null;
-		var o2:Dynamic = {};
-		for (f in Reflect.fields(o))
-			Reflect.setField(o2, f, Reflect.field(o, f));
-		return cast o2;
-	}
-
-	@:overload(function(f:Array<Dynamic>->Void):Dynamic {})
-	public static function makeVarArgs(f:Array<Dynamic>->Dynamic):Dynamic {
-		return new VarArgsFunction(f);
-	}
-}

+ 0 - 199
std/java/_std/Std.hx

@@ -1,199 +0,0 @@
-/*
- * Copyright (C)2005-2019 Haxe Foundation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-
-import java.Boot;
-import java.Lib;
-
-using StringTools;
-
-@:coreApi @:nativeGen class Std {
-	@:deprecated('Std.is is deprecated. Use Std.isOfType instead.')
-	public static inline function is(v:Dynamic, t:Dynamic):Bool {
-		return isOfType(v, t);
-	}
-
-	public static function isOfType(v:Dynamic, t:Dynamic):Bool {
-		if (v == null)
-			return false;
-		if (t == null)
-			return false;
-		var clt:java.lang.Class<Dynamic> = cast t;
-		if (clt == null)
-			return false;
-		var name:String = clt.getName();
-
-		switch (name) {
-			case "double", "java.lang.Double":
-				return untyped __java__('haxe.lang.Runtime.isDouble(v)');
-			case "int", "java.lang.Integer":
-				return untyped __java__('haxe.lang.Runtime.isInt(v)');
-			case "boolean", "java.lang.Boolean":
-				return untyped __java__('v instanceof java.lang.Boolean');
-			case "java.lang.Object":
-				return true;
-		}
-
-		var clv:java.lang.Class<Dynamic> = untyped __java__('v.getClass()');
-
-		return clt.isAssignableFrom(clv);
-	}
-
-	public static function string(s:Dynamic):String {
-		return cast(s, String) + "";
-	}
-
-	public static function int(x:Float):Int {
-		return cast x;
-	}
-
-	static inline function isSpaceChar(code:Int):Bool
-		return (code > 8 && code < 14) || code == 32;
-
-	static inline function isHexPrefix(cur:Int, next:Int):Bool
-		return cur == '0'.code && (next == 'x'.code || next == 'X'.code);
-
-	static inline function isDecimalDigit(code:Int):Bool
-		return '0'.code <= code && code <= '9'.code;
-
-	static inline function isHexadecimalDigit(code:Int):Bool
-		return isDecimalDigit(code) || ('a'.code <= code && code <= 'f'.code) || ('A'.code <= code && code <= 'F'.code);
-
-	public static function parseInt(x:String):Null<Int> {
-		if (x == null)
-			return null;
-
-		final len = x.length;
-		var index = 0;
-
-		inline function hasIndex(index:Int)
-			return index < len;
-
-		// skip whitespace
-		while (hasIndex(index)) {
-			if (!isSpaceChar(x.unsafeCodeAt(index)))
-				break;
-			++index;
-		}
-
-		// handle sign
-		final isNegative = hasIndex(index) && {
-			final sign = x.unsafeCodeAt(index);
-			if (sign == '-'.code || sign == '+'.code) {
-				++index;
-			}
-			sign == '-'.code;
-		}
-
-		// handle base
-		final isHexadecimal = hasIndex(index + 1) && isHexPrefix(x.unsafeCodeAt(index), x.unsafeCodeAt(index + 1));
-		if (isHexadecimal)
-			index += 2; // skip prefix
-
-		// handle digits
-		final firstInvalidIndex = {
-			var cur = index;
-			if (isHexadecimal) {
-				while (hasIndex(cur)) {
-					if (!isHexadecimalDigit(x.unsafeCodeAt(cur)))
-						break;
-					++cur;
-				}
-			} else {
-				while (hasIndex(cur)) {
-					if (!isDecimalDigit(x.unsafeCodeAt(cur)))
-						break;
-					++cur;
-				}
-			}
-			cur;
-		}
-
-		// no valid digits
-		if (index == firstInvalidIndex)
-			return null;
-
-		final result = java.lang.Integer.parseInt(x.substring(index, firstInvalidIndex), if (isHexadecimal) 16 else 10);
-		return if (isNegative) -result else result;
-	}
-
-	public static function parseFloat(x:String):Float {
-		if (x == null)
-			return Math.NaN;
-		x = StringTools.ltrim(x);
-		var found = false,
-			hasDot = false,
-			hasSign = false,
-			hasE = false,
-			hasESign = false,
-			hasEData = false;
-		var i = -1;
-		inline function getch(i:Int):Int
-			return cast(untyped x._charAt(i) : java.StdTypes.Char16);
-
-		while (++i < x.length) {
-			var chr = getch(i);
-			if (chr >= '0'.code && chr <= '9'.code) {
-				if (hasE) {
-					hasEData = true;
-				}
-				found = true;
-			} else
-				switch (chr) {
-					case 'e'.code | 'E'.code if (!hasE):
-						hasE = true;
-					case '.'.code if (!hasDot):
-						hasDot = true;
-					case '-'.code, '+'.code if (!found && !hasSign):
-						hasSign = true;
-					case '-'.code | '+'.code if (found && !hasESign && hasE && !hasEData):
-						hasESign = true;
-					case _:
-						break;
-				}
-		}
-		if (hasE && !hasEData) {
-			i--;
-			if (hasESign)
-				i--;
-		}
-
-		if (i != x.length) {
-			x = x.substr(0, i);
-		}
-		return try java.lang.Double.DoubleClass.parseDouble(x) catch (e:Dynamic) Math.NaN;
-	}
-
-	inline public static function downcast<T:{}, S:T>(value:T, c:Class<S>):S {
-		return Std.isOfType(value, c) ? cast value : null;
-	}
-
-	@:deprecated('Std.instance() is deprecated. Use Std.downcast() instead.')
-	inline public static function instance<T:{}, S:T>(value:T, c:Class<S>):S {
-		return downcast(value, c);
-	}
-
-	public static function random(x:Int):Int {
-		if (x <= 0)
-			return 0;
-		return Std.int(Math.random() * x);
-	}
-}

+ 0 - 58
std/java/_std/String.hx

@@ -1,58 +0,0 @@
-/*
- * Copyright (C)2005-2019 Haxe Foundation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-@:coreApi extern class String implements java.lang.CharSequence {
-	var length(default, null):Int;
-
-	@:overload(function(b:haxe.io.BytesData, offset:Int, length:Int, charsetName:String):Void {})
-	@:overload(function(b:haxe.io.BytesData, offset:Int, length:Int):Void {})
-	@:overload(function(b:java.NativeArray<java.StdTypes.Char16>):Void {})
-	function new(string:String):Void;
-
-	function toUpperCase():String;
-
-	function toLowerCase():String;
-
-	function charAt(index:Int):String;
-
-	function charCodeAt(index:Int):Null<Int>;
-
-	function indexOf(str:String, ?startIndex:Int):Int;
-
-	function lastIndexOf(str:String, ?startIndex:Int):Int;
-
-	function split(delimiter:String):Array<String>;
-
-	function substr(pos:Int, ?len:Int):String;
-
-	function substring(startIndex:Int, ?endIndex:Int):String;
-
-	function toString():String;
-
-	private function compareTo(anotherString:String):Int;
-
-	private function codePointAt(idx:Int):Int;
-
-	@:overload(function():haxe.io.BytesData {})
-	private function getBytes(encoding:String):haxe.io.BytesData;
-
-	static function fromCharCode(code:Int):String;
-}

+ 0 - 59
std/java/_std/StringBuf.hx

@@ -1,59 +0,0 @@
-/*
- * Copyright (C)2005-2019 Haxe Foundation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-@:coreApi
-class StringBuf {
-	private var b:java.lang.StringBuilder;
-
-	public var length(get, never):Int;
-
-	public function new():Void {
-		b = new java.lang.StringBuilder();
-	}
-
-	inline function get_length():Int {
-		return b.length();
-	}
-
-	public function add<T>(x:T):Void {
-		if (Std.isOfType(x, Int)) {
-			var x:Int = cast x;
-			var xd:Dynamic = x;
-			b.append(xd);
-		} else {
-			b.append(x);
-		}
-	}
-
-	public function addSub(s:String, pos:Int, ?len:Int):Void {
-		var l:Int = (len == null) ? s.length - pos : len;
-		b.append(s, pos, pos + l);
-	}
-
-	public function addChar(c:Int):Void
-		untyped {
-			b.appendCodePoint(c);
-		}
-
-	public function toString():String {
-		return b.toString();
-	}
-}

+ 0 - 370
std/java/_std/Type.hx

@@ -1,370 +0,0 @@
-/*
- * Copyright (C)2005-2019 Haxe Foundation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-
-import java.internal.HxObject;
-
-using StringTools;
-
-enum ValueType {
-	TNull;
-	TInt;
-	TFloat;
-	TBool;
-	TObject;
-	TFunction;
-	TClass(c:Class<Dynamic>);
-	TEnum(e:Enum<Dynamic>);
-	TUnknown;
-}
-
-@:coreApi class Type {
-	public static function getClass<T>(o:T):Null<Class<T>> {
-		if (o == null || Std.isOfType(o, DynamicObject) || Std.isOfType(o, java.lang.Class)) {
-			return null;
-		}
-		return cast java.Lib.getNativeType(o);
-	}
-
-	public static function getEnum(o:EnumValue):Enum<Dynamic> {
-		if (Std.isOfType(o, java.lang.Enum) || Std.isOfType(o, HxEnum)) {
-			return untyped o.getClass();
-		}
-		return null;
-	}
-
-	public static function getSuperClass(c:Class<Dynamic>):Class<Dynamic> {
-		var c = java.Lib.toNativeType(c);
-		var cl:java.lang.Class<Dynamic> = c == null ? null : untyped c.getSuperclass();
-		if (cl != null && cl.getName() != "haxe.lang.HxObject" && cl.getName() != "java.lang.Object") {
-			return cast cl;
-		}
-		return null;
-	}
-
-	public static function getClassName(c:Class<Dynamic>):String {
-		var c:java.lang.Class<Dynamic> = cast c;
-		var name:String = c.getName();
-		if (name.startsWith("haxe.root."))
-			return name.substr(10);
-		if (name.startsWith("java.lang"))
-			name = name.substr(10);
-
-		return switch (name) {
-			case "int", "Integer": "Int";
-			case "double", "Double": "Float";
-			case "Object": "Dynamic";
-			default: name;
-		}
-	}
-
-	public static function getEnumName(e:Enum<Dynamic>):String {
-		var c:java.lang.Class<Dynamic> = cast e;
-		var ret:String = c.getName();
-		if (ret.startsWith("haxe.root."))
-			return ret.substr(10);
-
-		return ret;
-	}
-
-	public static function resolveClass(name:String):Class<Dynamic> {
-		try {
-			if (name.indexOf(".") == -1) {
-				name = "haxe.root." + name;
-			}
-			return cast java.lang.Class.forName(name);
-		} catch (e:java.lang.ClassNotFoundException) {
-			return untyped switch (name) {
-				case "haxe.root.Int": Int;
-				case "haxe.root.Float": Float;
-				case "haxe.root.String": String;
-				case "haxe.root.Math": java.lang.Math;
-				case "haxe.root.Class": java.lang.Class;
-				case "haxe.root.Dynamic": java.lang.Object;
-				case _: null;
-			}
-		}
-	}
-
-	@:functionCode('
-		if ("Bool".equals(name)) return boolean.class;
-		Class r = resolveClass(name);
-		if (r != null && (r.getSuperclass() == java.lang.Enum.class || haxe.lang.Enum.class.isAssignableFrom(r)))
-			return r;
-		return null;
-	')
-	public static function resolveEnum(name:String):Enum<Dynamic>
-		untyped {
-			if (name == "Bool")
-				return Bool;
-			return resolveClass(name);
-		}
-
-	public static function createInstance<T>(cl:Class<T>, args:Array<Dynamic>):T {
-		var nargs = args.length,
-			callArguments = new java.NativeArray<Dynamic>(nargs);
-
-		var ctors = java.Lib.toNativeType(cl).getConstructors(),
-			totalCtors = ctors.length,
-			validCtors = 0;
-
-		for (i in 0...totalCtors) {
-			var ctor = ctors[i];
-			var ptypes = ctor.getParameterTypes();
-			if (ptypes.length != nargs && !ctor.isVarArgs()) {
-				continue;
-			}
-
-			var argNum = -1, valid = true;
-			for (arg in args) {
-				argNum++;
-				var expectedType = argNum < ptypes.length ? ptypes[argNum] : ptypes[ptypes.length - 1]; // varags
-				var isDynamic = Std.isOfType(arg, DynamicObject) && expectedType.isAssignableFrom(java.Lib.getNativeType(arg));
-				var argType = Type.getClass(arg);
-
-				if (arg == null || isDynamic || (argType != null && expectedType.isAssignableFrom(java.Lib.toNativeType(argType)))) {
-					callArguments[argNum] = arg;
-				} else if(expectedType.getName() == 'boolean' && (cast argType:java.lang.Class<Dynamic>).getName() == 'java.lang.Boolean') {
-					callArguments[argNum] = (cast arg : java.lang.Boolean).booleanValue();
-				} else if (Std.isOfType(arg, java.lang.Number)) {
-					var name = expectedType.getName();
-					switch (name) {
-						case 'double' | 'java.lang.Double':
-							callArguments[argNum] = (cast arg : java.lang.Number).doubleValue();
-						case 'int' | 'java.lang.Integer':
-							callArguments[argNum] = (cast arg : java.lang.Number).intValue();
-						case 'float' | 'java.lang.Float':
-							callArguments[argNum] = (cast arg : java.lang.Number).floatValue();
-						case 'byte' | 'java.lang.Byte':
-							callArguments[argNum] = (cast arg : java.lang.Number).byteValue();
-						case 'short' | 'java.lang.Short':
-							callArguments[argNum] = (cast arg : java.lang.Number).shortValue();
-						case _:
-							valid = false;
-							break;
-					}
-				} else {
-					valid = false;
-					break;
-				}
-			}
-			if (!valid) {
-				continue;
-			}
-
-			// the current constructor was found and it is valid - call it
-			ctor.setAccessible(true);
-			return cast ctor.newInstance(callArguments);
-		}
-
-		throw 'Could not find any constructor that matches the provided arguments for class $cl';
-	}
-
-	// cache empty constructor arguments so we don't allocate it on each createEmptyInstance call
-	@:protected @:readOnly static var __createEmptyInstance_EMPTY_TYPES = java.Lib.toNativeEnum(java.internal.Runtime.EmptyObject);
-	@:protected @:readOnly static var __createEmptyInstance_EMPTY_ARGS = java.internal.Runtime.EmptyObject.EMPTY;
-
-	public static function createEmptyInstance<T>(cl:Class<T>):T {
-		var t = java.Lib.toNativeType(cl);
-		try {
-			var ctor = t.getConstructor(__createEmptyInstance_EMPTY_TYPES);
-			return ctor.newInstance(__createEmptyInstance_EMPTY_ARGS);
-		} catch (_:java.lang.NoSuchMethodException) {
-			return t.newInstance();
-		}
-	}
-
-	public static function createEnum<T>(e:Enum<T>, constr:String, ?params:Array<Dynamic>):T {
-		if (params == null || params.length == 0) {
-			var ret:Dynamic = java.internal.Runtime.slowGetField(e, constr, true);
-			if (Std.isOfType(ret, java.internal.Function)) {
-				throw "Constructor " + constr + " needs parameters";
-			}
-			return ret;
-		} else {
-			var params = java.Lib.nativeArray(params, true);
-			return java.internal.Runtime.slowCallField(e, constr, params);
-		}
-	}
-
-	public static function createEnumIndex<T>(e:Enum<T>, index:Int, ?params:Array<Dynamic>):T {
-		var constr = getEnumConstructs(e);
-		return createEnum(e, constr[index], params);
-	}
-
-	@:functionCode('
-		if (c == java.lang.String.class)
-		{
-			return haxe.lang.StringRefl.fields;
-		}
-
-		Array<String> ret = new Array<String>();
-		for (java.lang.reflect.Field f : c.getFields())
-		{
-			java.lang.String fname = f.getName();
-			if (!java.lang.reflect.Modifier.isStatic(f.getModifiers()) && !fname.startsWith("__hx_"))
-				ret.push(fname);
-		}
-
-		for (java.lang.reflect.Method m : c.getMethods())
-		{
-			if (m.getDeclaringClass() == java.lang.Object.class)
-				continue;
-			java.lang.String mname = m.getName();
-			if (!java.lang.reflect.Modifier.isStatic(m.getModifiers()) && !mname.startsWith("__hx_"))
-				ret.push(mname);
-		}
-
-		return ret;
-	')
-	public static function getInstanceFields(c:Class<Dynamic>):Array<String> {
-		return null;
-	}
-
-	@:functionCode('
-		Array<String> ret = new Array<String>();
-		if (c == java.lang.String.class)
-		{
-			ret.push("fromCharCode");
-			return ret;
-		}
-
-		for (java.lang.reflect.Field f : c.getDeclaredFields())
-		{
-			java.lang.String fname = f.getName();
-			if (java.lang.reflect.Modifier.isStatic(f.getModifiers()) && !fname.startsWith("__hx_"))
-			ret.push(fname);
-		}
-
-		for (java.lang.reflect.Method m : c.getDeclaredMethods())
-		{
-			if (m.getDeclaringClass() == java.lang.Object.class)
-				continue;
-			java.lang.String mname = m.getName();
-			if (java.lang.reflect.Modifier.isStatic(m.getModifiers()) && !mname.startsWith("__hx_"))
-				ret.push(mname);
-		}
-
-		return ret;
-	')
-	public static function getClassFields(c:Class<Dynamic>):Array<String> {
-		return null;
-	}
-
-	public static function getEnumConstructs(e:Enum<Dynamic>):Array<String> {
-		if (Reflect.hasField(e, "__hx_constructs")) {
-			var ret:Array<String> = java.Lib.array(untyped e.__hx_constructs);
-			return ret.copy();
-		}
-		var vals:java.NativeArray<java.lang.Enum<Dynamic>> = untyped e.values(),
-			ret = [];
-		for (i in 0...vals.length)
-			ret[i] = vals[i].name();
-		return ret;
-	}
-
-	@:functionCode('
-		if (v == null) return ValueType.TNull;
-
-		if (v instanceof haxe.lang.IHxObject) {
-			haxe.lang.IHxObject vobj = (haxe.lang.IHxObject) v;
-			java.lang.Class cl = vobj.getClass();
-			if (v instanceof haxe.lang.DynamicObject)
-				return ValueType.TObject;
-			else
-				return ValueType.TClass(cl);
-		} else if (v instanceof java.lang.Number) {
-			java.lang.Number n = (java.lang.Number) v;
-			if (n.intValue() == n.doubleValue())
-				return ValueType.TInt;
-			else
-				return ValueType.TFloat;
-		} else if (v instanceof haxe.lang.Function) {
-			return ValueType.TFunction;
-		} else if (v instanceof java.lang.Enum || v instanceof haxe.lang.Enum) {
-			return ValueType.TEnum(v.getClass());
-		} else if (v instanceof java.lang.Boolean) {
-			return ValueType.TBool;
-		} else if (v instanceof java.lang.Class) {
-			return ValueType.TObject;
-		} else {
-			return ValueType.TClass(v.getClass());
-		}
-	')
-	public static function typeof(v:Dynamic):ValueType
-		untyped {
-			return null;
-		}
-
-	@:functionCode('
-			if (a instanceof haxe.lang.Enum)
-				return a.equals(b);
-			else
-				return haxe.lang.Runtime.eq(a, b);
-	')
-	public static function enumEq<T>(a:T, b:T):Bool
-		untyped {
-			return a == b;
-		}
-
-	@:functionCode('
-		if (e instanceof java.lang.Enum)
-			return ((java.lang.Enum) e).name();
-		else
-			return ((haxe.lang.Enum) e).getTag();
-	')
-	public static function enumConstructor(e:EnumValue):String
-		untyped {
-			return null;
-		}
-
-	@:functionCode('
-		return ( e instanceof java.lang.Enum ) ? new haxe.root.Array() : ((haxe.lang.Enum) e).getParams();
-	')
-	public static function enumParameters(e:EnumValue):Array<Dynamic>
-		untyped {
-			return null;
-		}
-
-	@:ifFeature("has_enum")
-	@:functionCode('
-		if (e instanceof java.lang.Enum)
-			return ((java.lang.Enum) e).ordinal();
-		else
-			return ((haxe.lang.Enum) e).index;
-	')
-	public static function enumIndex(e:EnumValue):Int
-		untyped {
-			return e.index;
-		}
-
-	public static function allEnums<T>(e:Enum<T>):Array<T> {
-		var ctors = getEnumConstructs(e);
-		var ret = [];
-		for (ctor in ctors) {
-			var v = Reflect.field(e, ctor);
-			if (Std.isOfType(v, e))
-				ret.push(v);
-		}
-
-		return ret;
-	}
-}

+ 0 - 118
std/java/_std/haxe/Rest.hx

@@ -1,118 +0,0 @@
-package haxe;
-
-import haxe.iterators.RestIterator;
-import haxe.iterators.RestKeyValueIterator;
-import java.NativeArray;
-import java.StdTypes;
-import java.lang.Object;
-import java.lang.System;
-import java.util.Arrays;
-
-private typedef NativeRest<T> = NativeArray<T>;
-
-@:coreApi
-abstract Rest<T>(NativeRest<T>) {
-	public var length(get, never):Int;
-
-	inline function get_length():Int
-		return this.length;
-
-	@:from extern inline static public function of<T>(array:Array<T>):Rest<T> {
-		var result = createNative(array.length);
-		var src:NativeArray<Object> = cast @:privateAccess array.__a;
-		for (i in 0...result.length)
-			result[i] = cast src[i];
-		return new Rest(result);
-	}
-
-	@:noDoc
-	@:generic
-	static function ofNativePrimitive<TBoxed, TRest>(result:NativeRest<TBoxed>, collection:NativeArray<TRest>):Rest<TRest> {
-		for (i in 0...collection.length)
-			result[i] = cast collection[i];
-		return new Rest(cast result);
-	}
-
-	@:noDoc
-	@:from static function ofNativeInt(collection:NativeArray<Int>):Rest<Int>
-		return ofNativePrimitive(new NativeRest<java.lang.Integer>(collection.length), collection);
-
-	@:noDoc
-	@:from static function ofNativeFloat(collection:NativeArray<Float>):Rest<Float>
-		return ofNativePrimitive(new NativeRest<java.lang.Double>(collection.length), collection);
-
-	@:noDoc
-	@:from static function ofNativeBool(collection:NativeArray<Bool>):Rest<Bool>
-		return ofNativePrimitive(new NativeRest<java.lang.Boolean>(collection.length), collection);
-
-	@:noDoc
-	@:from static function ofNativeInt8(collection:NativeArray<Int8>):Rest<Int8>
-		return ofNativePrimitive(new NativeRest<java.lang.Byte>(collection.length), collection);
-
-	@:noDoc
-	@:from static function ofNativeInt16(collection:NativeArray<Int16>):Rest<Int16>
-		return ofNativePrimitive(new NativeRest<java.lang.Short>(collection.length), collection);
-
-	@:noDoc
-	@:from static function ofNativeChar16(collection:NativeArray<Char16>):Rest<Char16>
-		return ofNativePrimitive(new NativeRest<java.lang.Character>(collection.length), collection);
-
-	@:noDoc
-	@:from static function ofNativeHaxeInt64(collection:NativeArray<haxe.Int64>):Rest<haxe.Int64>
-		return ofNativePrimitive(new NativeRest<java.lang.Long>(collection.length), collection);
-
-	@:noDoc
-	@:from static function ofNativeInt64(collection:NativeArray<Int64>):Rest<Int64>
-		return ofNativePrimitive(new NativeRest<java.lang.Long>(collection.length), collection);
-
-	@:noDoc
-	@:from static function ofNative<T>(collection:NativeArray<T>):Rest<T> {
-		return new Rest(collection);
-	}
-
-	inline function new(a:NativeRest<T>):Void
-		this = a;
-
-	/**
-	 * Implemented in genjvm (to auto-box primitive types) and genjava
-	 */
-	static function createNative<T>(length:Int):NativeRest<T>
-		return new NativeRest<T>(length);
-
-	@:arrayAccess inline function get(index:Int):T
-		return this[index];
-
-	@:to public function toArray():Array<T> {
-		return [for (i in 0...this.length) this[i]];
-	}
-
-	public inline function iterator():RestIterator<T>
-		return new RestIterator<T>(this);
-
-	public inline function keyValueIterator():RestKeyValueIterator<T>
-		return new RestKeyValueIterator<T>(this);
-
-	extern inline public function append(item:T):Rest<T> {
-		return _append(createNative(this.length + 1), item);
-	}
-
-	function _append(result:NativeRest<T>, item:T):Rest<T> {
-		System.arraycopy(this, 0, result, 0, this.length);
-		result[this.length] = cast item;
-		return new Rest(result);
-	}
-
-	extern inline public function prepend(item:T):Rest<T> {
-		return _prepend(createNative(this.length + 1), item);
-	}
-
-	function _prepend(result:NativeRest<T>, item:T):Rest<T> {
-		System.arraycopy(this, 0, result, 1, this.length);
-		result[0] = cast item;
-		return new Rest(result);
-	}
-
-	public function toString():String {
-		return toArray().toString();
-	}
-}

+ 0 - 533
std/java/_std/haxe/ds/StringMap.hx

@@ -1,533 +0,0 @@
-/*
- * Copyright (C)2005-2019 Haxe Foundation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-
-package haxe.ds;
-
-import java.NativeArray;
-
-@:coreApi class StringMap<T> implements haxe.Constraints.IMap<String, T> {
-	extern private static inline var HASH_UPPER = 0.77;
-	extern private static inline var FLAG_EMPTY = 0;
-	extern private static inline var FLAG_DEL = 1;
-
-	/**
-	 * This is the most important structure here and the reason why it's so fast.
-	 * It's an array of all the hashes contained in the table. These hashes cannot be 0 nor 1,
-	 * which stand for "empty" and "deleted" states.
-	 *
-	 * The lookup algorithm will keep looking until a 0 or the key wanted is found;
-	 * The insertion algorithm will do the same but will also break when FLAG_DEL is found;
-	 */
-	private var hashes:NativeArray<HashType>;
-
-	private var _keys:NativeArray<String>;
-	private var vals:NativeArray<T>;
-
-	private var nBuckets:Int;
-	private var size:Int;
-	private var nOccupied:Int;
-	private var upperBound:Int;
-
-	#if !no_map_cache
-	private var cachedKey:String;
-	private var cachedIndex:Int;
-	#end
-
-	#if DEBUG_HASHTBL
-	private var totalProbes:Int;
-	private var probeTimes:Int;
-	private var sameHash:Int;
-	private var maxProbe:Int;
-	#end
-
-	public function new():Void {
-		#if !no_map_cache
-		cachedIndex = -1;
-		#end
-	}
-
-	public function set(key:String, value:T):Void {
-		var x:Int, k:Int;
-		if (nOccupied >= upperBound) {
-			if (nBuckets > (size << 1)) {
-				resize(nBuckets - 1); // clear "deleted" elements
-			} else {
-				resize(nBuckets + 2);
-			}
-		}
-
-		var hashes = hashes, keys = _keys, hashes = hashes;
-		{
-			var mask = (nBuckets == 0) ? 0 : nBuckets - 1;
-			var site = x = nBuckets;
-			k = hash(key);
-			var i = k & mask, nProbes = 0;
-
-			var delKey = -1;
-			// to speed things up, don't loop if the first bucket is already free
-			if (isEmpty(hashes[i])) {
-				x = i;
-			} else {
-				var last = i, flag;
-				while (!(isEmpty(flag = hashes[i]) || (flag == k && _keys[i] == key))) {
-					if (isDel(flag) && delKey == -1) {
-						delKey = i;
-					}
-					i = (i + ++nProbes) & mask;
-					#if DEBUG_HASHTBL
-					probeTimes++;
-					if (i == last)
-						throw "assert";
-					#end
-				}
-
-				if (isEmpty(flag) && delKey != -1) {
-					x = delKey;
-				} else {
-					x = i;
-				}
-			}
-
-			#if DEBUG_HASHTBL
-			if (nProbes > maxProbe)
-				maxProbe = nProbes;
-			totalProbes++;
-			#end
-		}
-
-		var flag = hashes[x];
-		if (isEmpty(flag)) {
-			keys[x] = key;
-			vals[x] = value;
-			hashes[x] = k;
-			size++;
-			nOccupied++;
-		} else if (isDel(flag)) {
-			keys[x] = key;
-			vals[x] = value;
-			hashes[x] = k;
-			size++;
-		} else {
-			assert(_keys[x] == key);
-			vals[x] = value;
-		}
-
-		#if !no_map_cache
-		cachedIndex = x;
-		cachedKey = key;
-		#end
-	}
-
-	private final function lookup(key:String):Int {
-		if (nBuckets != 0) {
-			var hashes = hashes, keys = _keys;
-
-			var mask = nBuckets - 1, hash = hash(key), k = hash, nProbes = 0;
-			var i = k & mask;
-			var last = i, flag;
-			// if we hit an empty bucket, it means we're done
-			while (!isEmpty(flag = hashes[i]) && (isDel(flag) || flag != k || keys[i] != key)) {
-				i = (i + ++nProbes) & mask;
-				#if DEBUG_HASHTBL
-				probeTimes++;
-				if (i == last)
-					throw "assert";
-				#end
-			}
-
-			#if DEBUG_HASHTBL
-			if (nProbes > maxProbe)
-				maxProbe = nProbes;
-			totalProbes++;
-			#end
-			return isEither(flag) ? -1 : i;
-		}
-
-		return -1;
-	}
-
-	@:private final function resize(newNBuckets:Int):Void {
-		// This function uses 0.25*n_bucktes bytes of working space instead of [sizeof(key_t+val_t)+.25]*n_buckets.
-		var newHash = null;
-		var j = 1;
-		{
-			newNBuckets = roundUp(newNBuckets);
-			if (newNBuckets < 4)
-				newNBuckets = 4;
-			if (size >= (newNBuckets * HASH_UPPER + 0.5))
-				/* requested size is too small */ {
-				j = 0;
-			} else { /* hash table size to be changed (shrink or expand); rehash */
-				var nfSize = newNBuckets;
-				newHash = new NativeArray(nfSize);
-				if (nBuckets < newNBuckets) // expand
-				{
-					var k = new NativeArray(newNBuckets);
-					if (_keys != null)
-						arrayCopy(_keys, 0, k, 0, nBuckets);
-					_keys = k;
-
-					var v = new NativeArray(newNBuckets);
-					if (vals != null)
-						arrayCopy(vals, 0, v, 0, nBuckets);
-					vals = v;
-				} // otherwise shrink
-			}
-		}
-
-		if (j != 0) { // rehashing is required
-			// resetting cache
-			#if !no_map_cache
-			cachedKey = null;
-			cachedIndex = -1;
-			#end
-
-			j = -1;
-			var nBuckets = nBuckets,
-				_keys = _keys,
-				vals = vals,
-				hashes = hashes;
-
-			var newMask = newNBuckets - 1;
-			while (++j < nBuckets) {
-				var k;
-				if (!isEither(k = hashes[j])) {
-					var key = _keys[j];
-					var val = vals[j];
-
-					_keys[j] = null;
-					vals[j] = cast null;
-					hashes[j] = FLAG_DEL;
-					while (true)
-						/* kick-out process; sort of like in Cuckoo hashing */ {
-						var nProbes = 0;
-						var i = k & newMask;
-
-						while (!isEmpty(newHash[i])) {
-							i = (i + ++nProbes) & newMask;
-						}
-
-						newHash[i] = k;
-
-						if (i < nBuckets && !isEither(k = hashes[i]))
-							/* kick out the existing element */ {
-							{
-								var tmp = _keys[i];
-								_keys[i] = key;
-								key = tmp;
-							} {
-								var tmp = vals[i];
-								vals[i] = val;
-								val = tmp;
-							}
-
-							hashes[i] = FLAG_DEL; /* mark it as deleted in the old hash table */
-						} else { /* write the element and jump out of the loop */
-							_keys[i] = key;
-							vals[i] = val;
-							break;
-						}
-					}
-				}
-			}
-
-			if (nBuckets > newNBuckets)
-				/* shrink the hash table */ {
-				{
-					var k = new NativeArray(newNBuckets);
-					arrayCopy(_keys, 0, k, 0, newNBuckets);
-					this._keys = k;
-				} {
-					var v = new NativeArray(newNBuckets);
-					arrayCopy(vals, 0, v, 0, newNBuckets);
-					this.vals = v;
-				}
-			}
-
-			this.hashes = newHash;
-			this.nBuckets = newNBuckets;
-			this.nOccupied = size;
-			this.upperBound = Std.int(newNBuckets * HASH_UPPER + .5);
-		}
-	}
-
-	public function get(key:String):Null<T> {
-		var idx = -1;
-		#if !no_map_cache
-		if (cachedKey == key && ((idx = cachedIndex) != -1)) {
-			return vals[idx];
-		}
-		#end
-		idx = lookup(key);
-		if (idx != -1) {
-			#if !no_map_cache
-			cachedKey = key;
-			cachedIndex = idx;
-			#end
-			return vals[idx];
-		}
-
-		return null;
-	}
-
-	private function getDefault(key:String, def:T):T {
-		var idx = -1;
-		#if !no_map_cache
-		if (cachedKey == key && ((idx = cachedIndex) != -1)) {
-			return vals[idx];
-		}
-		#end
-
-		idx = lookup(key);
-		if (idx != -1) {
-			#if !no_map_cache
-			cachedKey = key;
-			cachedIndex = idx;
-			#end
-
-			return vals[idx];
-		}
-
-		return def;
-	}
-
-	public function exists(key:String):Bool {
-		var idx = -1;
-		#if !no_map_cache
-		if (cachedKey == key && ((idx = cachedIndex) != -1)) {
-			return true;
-		}
-		#end
-
-		idx = lookup(key);
-		if (idx != -1) {
-			#if !no_map_cache
-			cachedKey = key;
-			cachedIndex = idx;
-			#end
-			return true;
-		}
-
-		return false;
-	}
-
-	public function remove(key:String):Bool {
-		var idx = -1;
-		#if !no_map_cache
-		if (!(cachedKey == key && ((idx = cachedIndex) != -1)))
-		#end
-		{
-			idx = lookup(key);
-		}
-
-		if (idx == -1) {
-			return false;
-		} else {
-			#if !no_map_cache
-			if (cachedKey == key) {
-				cachedIndex = -1;
-			}
-			#end
-			hashes[idx] = FLAG_DEL;
-			_keys[idx] = null;
-			vals[idx] = null;
-			--size;
-
-			return true;
-		}
-	}
-
-	public inline function keys():Iterator<String> {
-		return new StringMapKeyIterator(this);
-	}
-
-	@:runtime public inline function keyValueIterator():KeyValueIterator<String, T> {
-		return new haxe.iterators.MapKeyValueIterator(this);
-	}
-
-	public inline function iterator():Iterator<T> {
-		return new StringMapValueIterator(this);
-	}
-
-	public function copy():StringMap<T> {
-		var copied = new StringMap();
-		for (key in keys())
-			copied.set(key, get(key));
-		return copied;
-	}
-
-	public function toString():String {
-		var s = new StringBuf();
-		s.add("[");
-		var it = keys();
-		for (i in it) {
-			s.add(i);
-			s.add(" => ");
-			s.add(Std.string(get(i)));
-			if (it.hasNext())
-				s.add(", ");
-		}
-		s.add("]");
-		return s.toString();
-	}
-
-	public function clear():Void {
-		hashes = null;
-		_keys = null;
-		vals = null;
-		nBuckets = 0;
-		size = 0;
-		nOccupied = 0;
-		upperBound = 0;
-		#if !no_map_cache
-		cachedKey = null;
-		cachedIndex = -1;
-		#end
-		#if DEBUG_HASHTBL
-		totalProbes = 0;
-		probeTimes = 0;
-		sameHash = 0;
-		maxProbe = 0;
-		#end
-	}
-
-	extern private static inline function roundUp(x:Int):Int {
-		--x;
-		x |= (x) >>> 1;
-		x |= (x) >>> 2;
-		x |= (x) >>> 4;
-		x |= (x) >>> 8;
-		x |= (x) >>> 16;
-		return ++x;
-	}
-
-	extern private static inline function getInc(k:Int, mask:Int):Int // return 1 for linear probing
-		return (((k) >> 3 ^ (k) << 3) | 1) & (mask);
-
-	extern private static inline function isEither(v:HashType):Bool
-		return (v & 0xFFFFFFFE) == 0;
-
-	extern private static inline function isEmpty(v:HashType):Bool
-		return v == FLAG_EMPTY;
-
-	extern private static inline function isDel(v:HashType):Bool
-		return v == FLAG_DEL;
-
-	// guarantee: Whatever this function is, it will never return 0 nor 1
-	extern private static inline function hash(s:String):HashType {
-		var k:Int = (cast s : java.NativeString).hashCode();
-		// k *= 357913941;
-		// k ^= k << 24;
-		// k += ~357913941;
-		// k ^= k >> 31;
-		// k ^= k << 31;
-
-		k = (k + 0x7ed55d16) + (k << 12);
-		k = (k ^ 0xc761c23c) ^ (k >> 19);
-		k = (k + 0x165667b1) + (k << 5);
-		k = (k + 0xd3a2646c) ^ (k << 9);
-		k = (k + 0xfd7046c5) + (k << 3);
-		k = (k ^ 0xb55a4f09) ^ (k >> 16);
-
-		var ret = k;
-		if (isEither(ret)) {
-			if (ret == 0)
-				ret = 2;
-			else
-				ret = 0xFFFFFFFF;
-		}
-
-		return ret;
-	}
-
-	extern private static inline function arrayCopy(sourceArray:Dynamic, sourceIndex:Int, destinationArray:Dynamic, destinationIndex:Int, length:Int):Void
-		java.lang.System.arraycopy(sourceArray, sourceIndex, destinationArray, destinationIndex, length);
-
-	extern private static inline function assert(x:Bool):Void {
-		#if DEBUG_HASHTBL
-		if (!x)
-			throw "assert failed";
-		#end
-	}
-}
-
-private typedef HashType = Int;
-
-@:access(haxe.ds.StringMap)
-private final class StringMapKeyIterator<T> {
-	var m:StringMap<T>;
-	var i:Int;
-	var len:Int;
-
-	public function new(m:StringMap<T>) {
-		this.m = m;
-		this.i = 0;
-		this.len = m.nBuckets;
-	}
-
-	public function hasNext():Bool {
-		for (j in i...len) {
-			if (!StringMap.isEither(m.hashes[j])) {
-				i = j;
-				return true;
-			}
-		}
-		return false;
-	}
-
-	public function next():String {
-		var ret = m._keys[i];
-		#if !no_map_cache
-		m.cachedIndex = i;
-		m.cachedKey = ret;
-		#end
-		i++;
-		return ret;
-	}
-}
-
-@:access(haxe.ds.StringMap)
-private final class StringMapValueIterator<T> {
-	var m:StringMap<T>;
-	var i:Int;
-	var len:Int;
-
-	public function new(m:StringMap<T>) {
-		this.m = m;
-		this.i = 0;
-		this.len = m.nBuckets;
-	}
-
-	public function hasNext():Bool {
-		for (j in i...len) {
-			if (!StringMap.isEither(m.hashes[j])) {
-				i = j;
-				return true;
-			}
-		}
-		return false;
-	}
-
-	public inline function next():T {
-		return m.vals[i++];
-	}
-}

+ 0 - 78
std/java/_std/sys/thread/Lock.hx

@@ -1,78 +0,0 @@
-/*
- * Copyright (C)2005-2019 Haxe Foundation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-
-package sys.thread;
-
-import java.Lib;
-import java.lang.System;
-
-using haxe.Int64;
-
-@:coreApi
-@:native('haxe.java.vm.Lock') class Lock {
-	@:private @:volatile var releasedCount = 0;
-
-	public function new() {}
-
-	public function wait(?timeout:Float):Bool {
-		var ret = false;
-		java.Lib.lock(this, {
-			if (--releasedCount < 0) {
-				if (timeout == null) {
-					// since .notify() is asynchronous, this `while` is needed
-					// because there is a very remote possibility of release() awaking a thread,
-					// but before it releases, another thread calls wait - and since the release count
-					// is still positive, it will get the lock.
-					while (releasedCount < 0) {
-						try {
-							(cast this : java.lang.Object).wait();
-						} catch (e:java.lang.InterruptedException) {}
-					}
-				} else {
-					var timeout:haxe.Int64 = cast timeout * 1000;
-					var cur = System.currentTimeMillis(),
-						max = cur.add(timeout);
-					// see above comment about this while loop
-					while (releasedCount < 0 && cur.compare(max) < 0) {
-						try {
-							var t = max.sub(cur);
-							(cast this : java.lang.Object).wait(t);
-							cur = System.currentTimeMillis();
-						} catch (e:java.lang.InterruptedException) {}
-					}
-				}
-			}
-			ret = this.releasedCount >= 0;
-			if (!ret)
-				this.releasedCount++; // timed out
-		});
-		return ret;
-	}
-
-	public function release():Void {
-		untyped __lock__(this, {
-			if (++releasedCount >= 0) {
-				untyped this.notify();
-			}
-		});
-	}
-}