forked from LeenkxTeam/LNXSDK
Update Files
This commit is contained in:
89
Kha/Tools/linux_x64/std/eval/_std/haxe/Exception.hx
Normal file
89
Kha/Tools/linux_x64/std/eval/_std/haxe/Exception.hx
Normal file
@ -0,0 +1,89 @@
|
||||
package haxe;
|
||||
|
||||
@:coreApi
|
||||
class Exception {
|
||||
public var message(get,never):String;
|
||||
public var stack(get,never):CallStack;
|
||||
public var previous(get,never):Null<Exception>;
|
||||
public var native(get,never):Any;
|
||||
|
||||
@:noCompletion var __exceptionMessage:String;
|
||||
@:noCompletion var __exceptionStack:Null<CallStack>;
|
||||
@:noCompletion var __nativeStack:CallStack;
|
||||
@:noCompletion @:ifFeature("haxe.Exception.get_stack") var __skipStack:Int = 0;
|
||||
@:noCompletion var __nativeException:Any;
|
||||
@:noCompletion var __previousException:Null<Exception>;
|
||||
|
||||
static function caught(value:Any):Exception {
|
||||
if(Std.isOfType(value, Exception)) {
|
||||
return value;
|
||||
} else {
|
||||
return new ValueException(value, null, value);
|
||||
}
|
||||
}
|
||||
|
||||
static function thrown(value:Any):Any {
|
||||
if(Std.isOfType(value, Exception)) {
|
||||
return (value:Exception).native;
|
||||
} else {
|
||||
var e = new ValueException(value);
|
||||
e.__shiftStack();
|
||||
return e;
|
||||
}
|
||||
}
|
||||
|
||||
public function new(message:String, ?previous:Exception, ?native:Any) {
|
||||
__exceptionMessage = message;
|
||||
__previousException = previous;
|
||||
if(native != null) {
|
||||
__nativeStack = NativeStackTrace.exceptionStack();
|
||||
__nativeException = native;
|
||||
} else {
|
||||
__nativeStack = NativeStackTrace.callStack();
|
||||
__nativeException = this;
|
||||
}
|
||||
}
|
||||
|
||||
function unwrap():Any {
|
||||
return __nativeException;
|
||||
}
|
||||
|
||||
@:ifFeature("haxe.Exception.thrown")
|
||||
public function toString():String {
|
||||
return message;
|
||||
}
|
||||
|
||||
public function details():String {
|
||||
return inline CallStack.exceptionToString(this);
|
||||
}
|
||||
|
||||
@:noCompletion
|
||||
@:ifFeature("haxe.Exception.get_stack")
|
||||
inline function __shiftStack():Void {
|
||||
__skipStack++;
|
||||
}
|
||||
|
||||
function get_message():String {
|
||||
return __exceptionMessage;
|
||||
}
|
||||
|
||||
function get_previous():Null<Exception> {
|
||||
return __previousException;
|
||||
}
|
||||
|
||||
final function get_native():Any {
|
||||
return __nativeException;
|
||||
}
|
||||
|
||||
function get_stack():CallStack {
|
||||
return switch __exceptionStack {
|
||||
case null:
|
||||
__exceptionStack = if(__skipStack > 0) {
|
||||
__nativeStack.asArray().slice(__skipStack);
|
||||
} else {
|
||||
__nativeStack;
|
||||
}
|
||||
case s: s;
|
||||
}
|
||||
}
|
||||
}
|
32
Kha/Tools/linux_x64/std/eval/_std/haxe/NativeStackTrace.hx
Normal file
32
Kha/Tools/linux_x64/std/eval/_std/haxe/NativeStackTrace.hx
Normal file
@ -0,0 +1,32 @@
|
||||
package haxe;
|
||||
|
||||
import haxe.CallStack.StackItem;
|
||||
|
||||
/**
|
||||
Do not use manually.
|
||||
**/
|
||||
@:dox(hide)
|
||||
@:noCompletion
|
||||
class NativeStackTrace {
|
||||
@:ifFeature('haxe.NativeStackTrace.exceptionStack')
|
||||
static public inline function saveStack(exception:Any):Void {
|
||||
}
|
||||
|
||||
static public function callStack():Array<StackItem> {
|
||||
return _callStack();
|
||||
}
|
||||
|
||||
//implemented in the compiler
|
||||
static function _callStack():Array<StackItem> {
|
||||
return null;
|
||||
}
|
||||
|
||||
//implemented in the compiler
|
||||
static public function exceptionStack():Array<StackItem> {
|
||||
return null;
|
||||
}
|
||||
|
||||
static public inline function toHaxe(stack:Array<StackItem>, skip:Int = 0):Array<StackItem> {
|
||||
return skip > 0 ? stack.slice(skip) : stack;
|
||||
}
|
||||
}
|
30
Kha/Tools/linux_x64/std/eval/_std/haxe/Resource.hx
Normal file
30
Kha/Tools/linux_x64/std/eval/_std/haxe/Resource.hx
Normal file
@ -0,0 +1,30 @@
|
||||
/*
|
||||
* 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;
|
||||
|
||||
@:coreApi
|
||||
extern class Resource {
|
||||
static function listNames():Array<String>;
|
||||
static function getString(name:String):String;
|
||||
static function getBytes(name:String):haxe.io.Bytes;
|
||||
}
|
39
Kha/Tools/linux_x64/std/eval/_std/haxe/Utf8.hx
Normal file
39
Kha/Tools/linux_x64/std/eval/_std/haxe/Utf8.hx
Normal file
@ -0,0 +1,39 @@
|
||||
/*
|
||||
* 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;
|
||||
|
||||
@:coreApi
|
||||
@:deprecated('haxe.Utf8 is deprecated. Use UnicodeString instead.')
|
||||
extern class Utf8 {
|
||||
function new(?size:Int):Void;
|
||||
function addChar(c:Int):Void;
|
||||
function toString():String;
|
||||
static function iter(s:String, chars:Int->Void):Void;
|
||||
static function encode(s:String):String;
|
||||
static function decode(s:String):String;
|
||||
static function charCodeAt(s:String, index:Int):Int;
|
||||
static function validate(s:String):Bool;
|
||||
static function length(s:String):Int;
|
||||
static function compare(a:String, b:String):Int;
|
||||
static function sub(s:String, pos:Int, len:Int):String;
|
||||
}
|
58
Kha/Tools/linux_x64/std/eval/_std/haxe/io/Bytes.hx
Normal file
58
Kha/Tools/linux_x64/std/eval/_std/haxe/io/Bytes.hx
Normal file
@ -0,0 +1,58 @@
|
||||
/*
|
||||
* 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.io;
|
||||
|
||||
// @:coreApi
|
||||
extern class Bytes {
|
||||
function new(length:Int, b:BytesData):Void;
|
||||
var length(default, null):Int;
|
||||
function get(pos:Int):Int;
|
||||
function set(pos:Int, v:Int):Void;
|
||||
function blit(pos:Int, src:Bytes, srcpos:Int, len:Int):Void;
|
||||
function fill(pos:Int, len:Int, value:Int):Void;
|
||||
function sub(pos:Int, len:Int):Bytes;
|
||||
function compare(other:Bytes):Int;
|
||||
function getDouble(pos:Int):Float;
|
||||
function getFloat(pos:Int):Float;
|
||||
function setDouble(pos:Int, v:Float):Void;
|
||||
function setFloat(pos:Int, v:Float):Void;
|
||||
function getUInt16(pos:Int):Int;
|
||||
function setUInt16(pos:Int, v:Int):Void;
|
||||
function getInt32(pos:Int):Int;
|
||||
function getInt64(pos:Int):haxe.Int64;
|
||||
function setInt32(pos:Int, v:Int):Void;
|
||||
function setInt64(pos:Int, v:haxe.Int64):Void;
|
||||
function getString(pos:Int, len:Int, ?encoding:Encoding):String;
|
||||
function toString():String;
|
||||
function toHex():String;
|
||||
function getData():BytesData;
|
||||
static function alloc(length:Int):Bytes;
|
||||
@:pure
|
||||
static function ofString(s:String, ?encoding:Encoding):Bytes;
|
||||
static function ofData(b:BytesData):Bytes;
|
||||
static function ofHex(s:String):Bytes;
|
||||
static function fastGet(b:BytesData, pos:Int):Int;
|
||||
static function __init__():Void {
|
||||
haxe.io.Error;
|
||||
}
|
||||
}
|
39
Kha/Tools/linux_x64/std/eval/_std/haxe/io/BytesBuffer.hx
Normal file
39
Kha/Tools/linux_x64/std/eval/_std/haxe/io/BytesBuffer.hx
Normal file
@ -0,0 +1,39 @@
|
||||
/*
|
||||
* 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.io;
|
||||
|
||||
@:coreApi
|
||||
extern class BytesBuffer {
|
||||
var length(get, never):Int;
|
||||
function new():Void;
|
||||
private function get_length():Int;
|
||||
function addByte(byte:Int):Void;
|
||||
function add(src:Bytes):Void;
|
||||
function addString(v:String, ?encoding:Encoding):Void;
|
||||
function addInt32(v:Int):Void;
|
||||
function addInt64(v:haxe.Int64):Void;
|
||||
function addFloat(v:Float):Void;
|
||||
function addDouble(v:Float):Void;
|
||||
function addBytes(src:Bytes, pos:Int, len:Int):Void;
|
||||
function getBytes():Bytes;
|
||||
}
|
34
Kha/Tools/linux_x64/std/eval/_std/haxe/io/BytesData.hx
Normal file
34
Kha/Tools/linux_x64/std/eval/_std/haxe/io/BytesData.hx
Normal file
@ -0,0 +1,34 @@
|
||||
/*
|
||||
* 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.io;
|
||||
|
||||
@:forward
|
||||
private abstract NativeBytesDataAbstract(Bytes) from Bytes to Bytes {
|
||||
@:arrayAccess public inline function get(i:Int)
|
||||
return this.get(i);
|
||||
|
||||
@:arrayAccess public inline function set(i:Int, v:Dynamic)
|
||||
this.set(i, v);
|
||||
}
|
||||
|
||||
typedef BytesData = NativeBytesDataAbstract;
|
31
Kha/Tools/linux_x64/std/eval/_std/haxe/zip/Compress.hx
Normal file
31
Kha/Tools/linux_x64/std/eval/_std/haxe/zip/Compress.hx
Normal file
@ -0,0 +1,31 @@
|
||||
/*
|
||||
* 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.zip;
|
||||
|
||||
extern class Compress {
|
||||
function new(level:Int):Void;
|
||||
function execute(src:haxe.io.Bytes, srcPos:Int, dst:haxe.io.Bytes, dstPos:Int):{done:Bool, read:Int, wriet:Int};
|
||||
function setFlushMode(f:FlushMode):Void;
|
||||
function close():Void;
|
||||
static function run(s:haxe.io.Bytes, level:Int):haxe.io.Bytes;
|
||||
}
|
31
Kha/Tools/linux_x64/std/eval/_std/haxe/zip/Uncompress.hx
Normal file
31
Kha/Tools/linux_x64/std/eval/_std/haxe/zip/Uncompress.hx
Normal file
@ -0,0 +1,31 @@
|
||||
/*
|
||||
* 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.zip;
|
||||
|
||||
extern class Uncompress {
|
||||
function new(?windowBits:Int):Void;
|
||||
function execute(src:haxe.io.Bytes, srcPos:Int, dst:haxe.io.Bytes, dstPos:Int):{done:Bool, read:Int, write:Int};
|
||||
function setFlushMode(f:FlushMode):Void;
|
||||
function close():Void;
|
||||
static function run(src:haxe.io.Bytes, ?bufsize:Int):haxe.io.Bytes;
|
||||
}
|
Reference in New Issue
Block a user