FreeBSD Bugzilla – Attachment 185523 Details for
Bug 221588
clang crashes when compiling cad/openvsp
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
clang crash debug file
as_callfunc_x86-46c39e.cpp (text/x-c++src), 962.40 KB, created by
Fernando ApesteguĂa
on 2017-08-17 13:11:55 UTC
(
hide
)
Description:
clang crash debug file
Filename:
MIME Type:
Creator:
Fernando ApesteguĂa
Created:
2017-08-17 13:11:55 UTC
Size:
962.40 KB
patch
obsolete
># 1 "<built-in>" ># 1 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_callfunc_x86.cpp" >/* > AngelCode Scripting Library > Copyright (c) 2003-2016 Andreas Jonsson > > This software is provided 'as-is', without any express or implied > warranty. In no event will the authors be held liable for any > damages arising from the use of this software. > > Permission is granted to anyone to use this software for any > purpose, including commercial applications, and to alter it and > redistribute it freely, subject to the following restrictions: > > 1. The origin of this software must not be misrepresented; you > must not claim that you wrote the original software. If you use > this software in a product, an acknowledgment in the product > documentation would be appreciated but is not required. > > 2. Altered source versions must be plainly marked as such, and > must not be misrepresented as being the original software. > > 3. This notice may not be removed or altered from any source > distribution. > > The original version of this library can be located at: > http://www.angelcode.com/angelscript/ > > Andreas Jonsson > andreas@angelcode.com >*/ > > >// >// as_callfunc_x86.cpp >// >// These functions handle the actual calling of system functions >// >// Added support for functor methods by Jordi Oliveras Rovira in April, 2014. >// > > > >#if 0 /* expanded by -frewrite-includes */ >#include "as_config.h" >#endif /* expanded by -frewrite-includes */ ># 42 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_callfunc_x86.cpp" ># 1 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" 1 >/* > AngelCode Scripting Library > Copyright (c) 2003-2016 Andreas Jonsson > > This software is provided 'as-is', without any express or implied > warranty. In no event will the authors be held liable for any > damages arising from the use of this software. > > Permission is granted to anyone to use this software for any > purpose, including commercial applications, and to alter it and > redistribute it freely, subject to the following restrictions: > > 1. The origin of this software must not be misrepresented; you > must not claim that you wrote the original software. If you use > this software in a product, an acknowledgment in the product > documentation would be appreciated but is not required. > > 2. Altered source versions must be plainly marked as such, and > must not be misrepresented as being the original software. > > 3. This notice may not be removed or altered from any source > distribution. > > The original version of this library can be located at: > http://www.angelcode.com/angelscript/ > > Andreas Jonsson > andreas@angelcode.com >*/ > > > >// >// as_config.h >// >// this file is used for configuring the compilation of the library >// > >#ifndef AS_CONFIG_H >#define AS_CONFIG_H > > > >// >// Features >//----------------------------------------- > >// AS_NO_THREADS >// Turns off support for multithreading. By turning off >// this when it's not needed a bit of performance is gained. > >// AS_WINDOWS_THREADS >// If the library should be compiled using windows threads. > >// AS_POSIX_THREADS >// If the library should be compiled using posix threads. > >// AS_NO_ATOMIC >// If the compiler/platform doesn't support atomic instructions >// then this should be defined to use critical sections instead. > >// AS_DEBUG >// This flag can be defined to make the library write some extra output when >// compiling and executing scripts. > >// AS_DEPRECATED >// If this flag is defined then some backwards compatibility is maintained. >// There is no guarantee for how well deprecated functionality will work though >// so it is best to exchange it for the new functionality as soon as possible. > >// AS_NO_CLASS_METHODS >// Disables the possibility to add class methods. Can increase the >// portability of the library. > >// AS_MAX_PORTABILITY >// Disables all platform specific code. Only the asCALL_GENERIC calling >// convention will be available in with this flag set. > >// AS_DOUBLEBYTE_CHARSET >// When this flag is defined, the parser will treat all characters in strings >// that are greater than 127 as lead characters and automatically include the >// next character in the script without checking its value. This should be >// compatible with common encoding schemes, e.g. Big5. Shift-JIS is not compatible >// though as it encodes some single byte characters above 127. >// >// If support for international text is desired, it is recommended that UTF-8 >// is used as this is supported natively by the compiler without the use for this >// preprocessor flag. > >// AS_NO_COMPILER >// Compiles the library without support for compiling scripts. This is intended >// for those applications that will load pre-compiled bytecode and wants to decrease >// the size of the executable. > >// AS_NO_EXCEPTIONS >// Define this if exception handling is turned off or not available on the target platform. > >// AS_NO_MEMBER_INIT >// Disable the support for initialization of class members directly in the declaration. >// This was as a form to maintain backwards compatibility with versions before 2.26.0 >// if the new order of the member initialization caused null pointer exceptions in older >// scripts (e.g. if a base class accessed members of a derived class through a virtual method). > >// AS_USE_NAMESPACE >// Adds the AngelScript namespace on the declarations. > > > >// >// Library usage >//------------------------------------------ > >// ANGELSCRIPT_EXPORT >// This flag should be defined when compiling the library as a lib or dll. > >// ANGELSCRIPT_DLL_LIBRARY_IMPORT >// This flag should be defined when using AngelScript as a dll with automatic >// library import. > >// ANGELSCRIPT_DLL_MANUAL_IMPORT >// This flag should be defined when using AngelScript as a dll with manual >// loading of the library. > > > > >// >// Compiler differences >//----------------------------------------- > >// asVSNPRINTF(a,b,c,d) >// Some compilers use different names for this function. You must >// define this macro to map to the proper function. > >// ASM_AT_N_T or ASM_INTEL >// You should choose what inline assembly syntax to use when compiling. > >// VALUE_OF_BOOLEAN_TRUE >// This flag allows to customize the exact value of boolean true. > >// AS_SIZEOF_BOOL >// On some target platforms the sizeof(bool) is 4, but on most it is 1. > >// STDCALL >// This is used to declare a function to use the stdcall calling convention. > >// AS_NO_MEMORY_H >// Some compilers don't come with the memory.h header file. > >// AS_NO_THISCALL_FUNCTOR_METHOD >// Defined if the support for functor methods hasn't been implemented on the platform. > > > >// >// How to identify different compilers >//----------------------------------------- >// Ref: http://nadeausoftware.com/articles/2012/10/c_c_tip_how_detect_compiler_name_and_version_using_compiler_predefined_macros > >// MS Visual C++ >// _MSC_VER is defined >// __MWERKS__ is not defined > >// Metrowerks >// _MSC_VER is defined >// __MWERKS__ is defined > >// GNU C based compilers >// __GNUC__ is defined > >// CLang/LLVM >// __clang__ is defined > >// Embarcadero C++Builder >// __BORLANDC__ is defined > >// Oracle Solaris Studio (previously known as Sun CC compiler) >// __SUNPRO_CC is defined > > > >// >// CPU differences >//--------------------------------------- > >// AS_USE_DOUBLE_AS_FLOAT >// If there is no 64 bit floating point type, then this constant can be defined >// to treat double like normal floats. > >// AS_X86 >// Use assembler code for the x86 CPU family > >// AS_SH4 >// Use assembler code for the SH4 CPU family > >// AS_MIPS >// Use assembler code for the MIPS CPU family > >// AS_PPC >// Use assembler code for the 32bit PowerPC CPU family > >// AS_PPC_64 >// Use assembler code for the 64bit PowerPC CPU family > >// AS_XENON >// Use assembler code for the Xenon (XBOX360) CPU family > >// AS_ARM >// Use assembler code for the ARM CPU family > >// AS_SOFTFP >// Use to tell compiler that ARM soft-float ABI >// should be used instead of ARM hard-float ABI > >// AS_X64_GCC >// Use GCC assembler code for the X64 AMD/Intel CPU family > >// AS_X64_MSVC >// Use MSVC assembler code for the X64 AMD/Intel CPU family > >// AS_64BIT_PTR >// Define this to make the engine store all pointers in 64bit words. > >// AS_BIG_ENDIAN >// Define this for CPUs that use big endian memory layout, e.g. PPC > >// AS_SPARC >// Define this for SPARC CPU family > > > >// >// Target systems >//-------------------------------- >// This group shows a few of the flags used to identify different target systems. >// Sometimes there are differences on different target systems, while both CPU and >// compiler is the same for both, when this is so these flags are used to produce the >// right code. > >// AS_WIN - Microsoft Windows >// AS_LINUX - Linux >// AS_MAC - Apple Macintosh >// AS_BSD - BSD based OS (FreeBSD, DragonFly, OpenBSD, etc) >// AS_XBOX - Microsoft XBox >// AS_XBOX360 - Microsoft XBox 360 >// AS_PSP - Sony Playstation Portable >// AS_PSVITA - Sony Playstation Vita >// AS_PS2 - Sony Playstation 2 >// AS_PS3 - Sony Playstation 3 >// AS_DC - Sega Dreamcast >// AS_GC - Nintendo GameCube >// AS_WII - Nintendo Wii >// AS_WIIU - Nintendo Wii U >// AS_IPHONE - Apple IPhone >// AS_ANDROID - Android >// AS_HAIKU - Haiku >// AS_ILLUMOS - Illumos like (OpenSolaris, OpenIndiana, NCP, etc) >// AS_MARMALADE - Marmalade cross platform SDK (a layer on top of the OS) >// AS_SUN - Sun UNIX > > > > >// >// Calling conventions >//----------------------------------------- > >// GNU_STYLE_VIRTUAL_METHOD >// This constant should be defined if method pointers store index for virtual >// functions in the same location as the function pointer. In such cases the method >// is identified as virtual if the least significant bit is set. > >// MULTI_BASE_OFFSET(x) >// This macro is used to retrieve the offset added to the object pointer in order to >// implicitly cast the object to the base object. x is the method pointer received by >// the register function. > >// HAVE_VIRTUAL_BASE_OFFSET >// Define this constant if the compiler stores the virtual base offset in the method >// pointers. If it is not stored in the pointers then AngelScript have no way of >// identifying a method as coming from a class with virtual inheritance. > >// VIRTUAL_BASE_OFFSET(x) >// This macro is used to retrieve the offset added to the object pointer in order to >// find the virtual base object. x is the method pointer received by the register >// function; > >// COMPLEX_RETURN_MASK >// This constant shows what attributes determine if an object is returned in memory >// or in the registers as normal structures > >// COMPLEX_MASK >// This constant shows what attributes determine if an object is implicitly passed >// by reference or not, even if the argument is declared by value > >// THISCALL_RETURN_SIMPLE_IN_MEMORY >// CDECL_RETURN_SIMPLE_IN_MEMORY >// STDCALL_RETURN_SIMPLE_IN_MEMORY >// When these constants are defined then the corresponding calling convention always >// return classes/structs in memory regardless of size or complexity. > >// THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE >// STDCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE >// CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE >// Specifies the minimum size in dwords a class/struct needs to be to be passed in memory > >// CALLEE_POPS_HIDDEN_RETURN_POINTER >// This constant should be defined if the callee pops the hidden return pointer, >// used when returning an object in memory. > >// THISCALL_CALLEE_POPS_HIDDEN_RETURN_POINTER >// This constant should be defined if the callee pops the hidden return pointer >// for thiscall functions; used when returning an object in memory. > >// THISCALL_PASS_OBJECT_POINTER_ON_THE_STACK >// With this constant defined AngelScript will pass the object pointer on the stack > >// THISCALL_CALLEE_POPS_ARGUMENTS >// If the callee pops arguments for class methods then define this constant > >// COMPLEX_OBJS_PASSED_BY_REF >// Some compilers always pass certain objects by reference. GNUC for example does >// this if the the class has a defined destructor. > >// AS_LARGE_OBJS_PASSED_BY_REF >// If this is defined large objects are passed by reference, whether they are complex or not > >// AS_LARGE_OBJ_MIN_SIZE >// This is the size of objects determined as large ones > >// AS_CALLEE_DESTROY_OBJ_BY_VAL >// When an object is passed by value the called function is the one responsible >// for calling the destructor before returning. > >// HAS_128_BIT_PRIMITIVES >// 64bit processors often support 128bit primitives. These may require special >// treatment when passed in function arguments or returned by functions. > >// SPLIT_OBJS_BY_MEMBER_TYPES >// On some platforms objects with primitive members are split over different >// register types when passed by value to functions. > > > > > >// >// Detect compiler >//------------------------------------------------ > > >#define VALUE_OF_BOOLEAN_TRUE 1 >#define STDCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 0 >#define CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 0 >#define THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 0 >#define THISCALL_CALLEE_POPS_HIDDEN_RETURN_POINTER > >// Not implemented by default. Undefined with tested platforms. >#define AS_NO_THISCALL_FUNCTOR_METHOD > > >// Embarcadero C++Builder >#if defined(__BORLANDC__) > #ifndef _Windows > #error "Configuration doesn't yet support BCC for Linux or Mac OS." > #endif ># 367 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #if defined(_M_X64) > #error "Configuration doesn't yet support BCC for AMD64." > #endif ># 370 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #define MULTI_BASE_OFFSET(x) (*((asDWORD*)(&x)+1)) > #define HAVE_VIRTUAL_BASE_OFFSET > #define VIRTUAL_BASE_OFFSET(x) (*((asDWORD*)(&x)+2)) > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > #define CDECL_RETURN_SIMPLE_IN_MEMORY > #define STDCALL_RETURN_SIMPLE_IN_MEMORY > #undef STDCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE > #undef CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE > #undef THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE > #define STDCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > #define CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > #define THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > > #define THISCALL_PASS_OBJECT_POINTER_ON_THE_STACK > #define COMPLEX_MASK (asOBJ_APP_CLASS_CONSTRUCTOR | asOBJ_APP_CLASS_DESTRUCTOR) > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_CONSTRUCTOR | asOBJ_APP_CLASS_DESTRUCTOR) > #define STDCALL __stdcall > #define AS_SIZEOF_BOOL 1 > #define AS_WINDOWS_THREADS > #undef THISCALL_CALLEE_POPS_HIDDEN_RETURN_POINTER > > #define AS_WIN > #define AS_X86 > #define ASM_INTEL > > #define asVSNPRINTF(a, b, c, d) _vsnprintf(a, b, c, d) > > #define fmodf(a,b) fmod(a,b) > > #define UNREACHABLE_RETURN >#endif ># 402 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > >// Microsoft Visual C++ >// Ref: http://msdn.microsoft.com/en-us/library/b0084kay.aspx >#if defined(_MSC_VER) && !defined(__MWERKS__) > > #if _MSC_VER <= 1200 // MSVC6 > // Disable the useless warnings about truncated symbol names for template instances > #pragma warning( disable : 4786 ) > #endif ># 411 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #ifdef _M_X64 > #define MULTI_BASE_OFFSET(x) (*((asDWORD*)(&x)+2)) > #define VIRTUAL_BASE_OFFSET(x) (*((asDWORD*)(&x)+4)) > #else ># 416 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define MULTI_BASE_OFFSET(x) (*((asDWORD*)(&x)+1)) > #define VIRTUAL_BASE_OFFSET(x) (*((asDWORD*)(&x)+3)) > #endif ># 419 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define HAVE_VIRTUAL_BASE_OFFSET > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > #define THISCALL_PASS_OBJECT_POINTER_IN_ECX > > // http://www.madewithmarmalade.com/ > #if defined(__S3E__) > #ifndef AS_MARMALADE > // From now on we'll use the below define > #define AS_MARMALADE > #endif ># 429 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > // Marmalade doesn't use the Windows libraries > #define asVSNPRINTF(a, b, c, d) vsnprintf(a, b, c, d) > > // Marmalade doesn't seem to have proper support for > // atomic instructions or read/write locks, so we turn off > // multithread support > //#define AS_POSIX_THREADS > #define AS_NO_THREADS > #define AS_NO_ATOMIC > > // Marmalade has it's own way of identifying the CPU target > // Note, when building for ARM, the gnuc compiler will always > // be used so we don't need to check for it here > #if defined(I3D_ARCH_X86) > #define AS_X86 > #endif ># 446 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #else ># 447 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #if _MSC_VER < 1500 // MSVC++ 9 (aka MSVC++ .NET 2008) > #define asVSNPRINTF(a, b, c, d) _vsnprintf(a, b, c, d) > #else ># 450 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define asVSNPRINTF(a, b, c, d) vsnprintf_s(a, b, _TRUNCATE, c, d) > #endif ># 452 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #define AS_WINDOWS_THREADS > #endif ># 455 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #define THISCALL_CALLEE_POPS_ARGUMENTS > #define STDCALL __stdcall > #define AS_SIZEOF_BOOL 1 > #define COMPLEX_OBJS_PASSED_BY_REF > > #define ASM_INTEL // Intel style for inline assembly on microsoft compilers > > #if defined(WIN32) || defined(_WIN32) || defined(_WIN64) > #define AS_WIN > #endif ># 466 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #if _XBOX_VER >= 200 > // 360 uses a Xenon processor (which is a modified 64bit PPC) > #define AS_XBOX360 > #define AS_XENON > #define AS_BIG_ENDIAN > #else ># 473 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #if defined(_XBOX) || (defined(_M_IX86) && !defined(__LP64__)) > #define AS_X86 > #ifndef _XBOX > // Not tested with xbox (only enabled if is Windows) > #undef AS_NO_THISCALL_FUNCTOR_METHOD > #endif ># 479 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #elif defined(_M_X64) ># 480 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_X64_MSVC > #undef AS_NO_THISCALL_FUNCTOR_METHOD > #define AS_CALLEE_DESTROY_OBJ_BY_VAL > #define AS_LARGE_OBJS_PASSED_BY_REF > #define AS_LARGE_OBJ_MIN_SIZE 3 > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_CONSTRUCTOR | asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_ASSIGNMENT | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > #define COMPLEX_MASK (asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > #endif ># 488 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #endif ># 489 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #if defined(_ARM_) || defined(_M_ARM) > #define AS_ARM > #define AS_CALLEE_DESTROY_OBJ_BY_VAL > #define CDECL_RETURN_SIMPLE_IN_MEMORY > #define STDCALL_RETURN_SIMPLE_IN_MEMORY > #define COMPLEX_MASK (asOBJ_APP_CLASS_ASSIGNMENT | asOBJ_APP_ARRAY) > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_ASSIGNMENT | asOBJ_APP_ARRAY) > > // Windows CE uses softfp calling convention, while Windows RT uses hardfp calling convention > // ref: http://stackoverflow.com/questions/16375355/what-is-the-windows-rt-on-arm-native-code-calling-convention > #if defined(_WIN32_WCE) > #define AS_SOFTFP > #endif ># 503 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #endif ># 504 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #ifndef COMPLEX_MASK > #define COMPLEX_MASK (asOBJ_APP_ARRAY) > #endif ># 508 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #ifndef COMPLEX_RETURN_MASK > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_CONSTRUCTOR | asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_ASSIGNMENT | asOBJ_APP_ARRAY) > #endif ># 512 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #define UNREACHABLE_RETURN >#endif ># 515 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > >// Metrowerks CodeWarrior (experimental, let me know if something isn't working) >#if defined(__MWERKS__) && !defined(EPPC) // JWC -- If Wii DO NOT use this even when using Metrowerks Compiler. Even though they are called Freescale... > #define MULTI_BASE_OFFSET(x) (*((asDWORD*)(&x)+1)) > #define HAVE_VIRTUAL_BASE_OFFSET > #define VIRTUAL_BASE_OFFSET(x) (*((asDWORD*)(&x)+3)) > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > #define THISCALL_PASS_OBJECT_POINTER_IN_ECX > #define asVSNPRINTF(a, b, c, d) _vsnprintf(a, b, c, d) > #define THISCALL_CALLEE_POPS_ARGUMENTS > #define COMPLEX_MASK (asOBJ_APP_CLASS_CONSTRUCTOR | asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_ASSIGNMENT) > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_CONSTRUCTOR | asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_ASSIGNMENT) > #define AS_SIZEOF_BOOL 1 > #define AS_WINDOWS_THREADS > #define STDCALL __stdcall > > // Support native calling conventions on x86, but not 64bit yet > #if defined(_M_IX86) && !defined(__LP64__) > #define AS_X86 > #define ASM_INTEL // Intel style for inline assembly > #endif ># 536 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #define UNREACHABLE_RETURN >#endif ># 539 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > >// SN Systems ProDG >#if defined(__SNC__) || defined(SNSYS) > #define MULTI_BASE_OFFSET(x) (*((asDWORD*)(&x)+1)) > #define CALLEE_POPS_HIDDEN_RETURN_POINTER > #define COMPLEX_OBJS_PASSED_BY_REF > > #ifdef __psp2__ > #define COMPLEX_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR) > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR) > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > #define CDECL_RETURN_SIMPLE_IN_MEMORY > #define STDCALL_RETURN_SIMPLE_IN_MEMORY > #define THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > #define CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > #define STDCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > #else ># 556 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define GNU_STYLE_VIRTUAL_METHOD > #define ASM_AT_N_T // AT&T style inline assembly > #define COMPLEX_MASK (asOBJ_APP_CLASS_DESTRUCTOR) > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_DESTRUCTOR) > #endif ># 561 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #define AS_SIZEOF_BOOL 1 > #define asVSNPRINTF(a, b, c, d) vsnprintf(a, b, c, d) > > // SN doesnt seem to like STDCALL. > // Maybe it can work with some fiddling, but I can't imagine linking to > // any STDCALL functions with a console anyway... > #define STDCALL > > // Linux specific > #ifdef __linux__ > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > #define CDECL_RETURN_SIMPLE_IN_MEMORY > #define STDCALL_RETURN_SIMPLE_IN_MEMORY > #endif ># 576 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > // Support native calling conventions on x86, but not 64bit yet > #if (defined(i386) || defined(__i386) || defined(__i386__)) && !defined(__LP64__) > #define AS_X86 > // PS3 > #elif (defined(__PPC__) || defined(__ppc__)) && defined(__PPU__) ># 582 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // Support native calling conventions on PS3 > #define AS_PS3 > #define AS_PPC_64 > #define AS_NO_MEMORY_H > #define AS_NO_EXCEPTIONS > #if 0 /* expanded by -frewrite-includes */ >#include <stdlib.h> >#endif /* expanded by -frewrite-includes */ ># 587 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" ># 588 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // PSP > #elif defined(__psp__) ># 590 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_NO_MEMORY_H > #define AS_MIPS > #define AS_PSP > #define AS_USE_DOUBLE_AS_FLOAT > // PSVita > #elif defined(__psp2__) ># 596 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_PSVITA > #define AS_ARM > #define AS_NO_MEMORY_H > #define AS_NO_EXCEPTIONS > #define AS_CALLEE_DESTROY_OBJ_BY_VAL > #undef AS_NO_THISCALL_FUNCTOR_METHOD > #endif ># 603 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #define UNREACHABLE_RETURN >#endif ># 606 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > >// GNU C (and MinGW or Cygwin on Windows) >// Use the following command to determine predefined macros: echo . | g++ -dM -E - >// MSVC2015 can now use CLang too, but it shouldn't go in here >#if (defined(__GNUC__) && !defined(__SNC__) && !defined(_MSC_VER)) || defined(EPPC) || defined(__CYGWIN__) // JWC -- use this instead for Wii > #define GNU_STYLE_VIRTUAL_METHOD > #define MULTI_BASE_OFFSET(x) (*((asPWORD*)(&x)+1)) > #define asVSNPRINTF(a, b, c, d) vsnprintf(a, b, c, d) > #define CALLEE_POPS_HIDDEN_RETURN_POINTER > #define COMPLEX_OBJS_PASSED_BY_REF > #define COMPLEX_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_ARRAY) > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_ARRAY) > #define AS_NO_MEMORY_H > #define AS_SIZEOF_BOOL 1 > #define STDCALL __attribute__((stdcall)) > #define ASM_AT_N_T > > // WII U > #if defined(__ghs__) > #define AS_WIIU > > // Native calling conventions are not yet supported > #define AS_MAX_PORTABILITY > > // Marmalade is a cross platform SDK. It uses g++ to compile for iOS and Android > #elif defined(__S3E__) ># 632 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #ifndef AS_MARMALADE > // From now on we'll use the below define > #define AS_MARMALADE > #endif ># 636 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > // STDCALL is not available on Marmalade when compiled for iOS or Android > #undef STDCALL > #define STDCALL > > // Marmalade doesn't seem to have proper support for > // atomic instructions or read/write locks > #define AS_NO_THREADS > #define AS_NO_ATOMIC > > // Identify for which CPU the library is being built > #if defined(I3D_ARCH_X86) > #define AS_X86 > #elif defined(I3D_ARCH_ARM) ># 650 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_ARM > > #define AS_SOFTFP > > // Marmalade appear to use the same ABI as Android when built for ARM > #define CDECL_RETURN_SIMPLE_IN_MEMORY > #define STDCALL_RETURN_SIMPLE_IN_MEMORY > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > > #undef THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE > #define THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > > #undef CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE > #define CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > > #undef STDCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE > #define STDCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > > #undef GNU_STYLE_VIRTUAL_METHOD > > #undef COMPLEX_MASK > #define COMPLEX_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > #undef COMPLEX_RETURN_MASK > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > > #define AS_CALLEE_DESTROY_OBJ_BY_VAL > #endif ># 677 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > // MacOSX and IPhone > #elif defined(__APPLE__) ># 680 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #if 0 /* expanded by -frewrite-includes */ >#include <TargetConditionals.h> >#endif /* expanded by -frewrite-includes */ ># 681 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" ># 682 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > // Is this a Mac or an IPhone (or other iOS device)? > #if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE == 1 > #define AS_IPHONE > #else ># 687 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_MAC > #endif ># 689 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > // The sizeof bool is different depending on the target CPU > #undef AS_SIZEOF_BOOL > #if defined(__ppc__) > #define AS_SIZEOF_BOOL 4 > // STDCALL is not available on PPC > #undef STDCALL > #define STDCALL > #else ># 698 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_SIZEOF_BOOL 1 > #endif ># 700 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #if (defined(_ARM_) || defined(__arm__)) > // iOS use ARM processor > #define AS_ARM > #undef AS_NO_THISCALL_FUNCTOR_METHOD > #define CDECL_RETURN_SIMPLE_IN_MEMORY > #define STDCALL_RETURN_SIMPLE_IN_MEMORY > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > > #undef GNU_STYLE_VIRTUAL_METHOD > > #undef THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE > #undef CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE > #undef STDCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE > > #define THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > #define CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > #define STDCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > #define COMPLEX_OBJS_PASSED_BY_REF > #undef COMPLEX_MASK > #define COMPLEX_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > #undef COMPLEX_RETURN_MASK > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > > // iOS uses soft-float ABI > #define AS_SOFTFP > > // STDCALL is not available on ARM > #undef STDCALL > #define STDCALL > > #elif (defined(__arm64__)) ># 732 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // The IPhone 5S+ uses an ARM64 processor > > // AngelScript currently doesn't support native calling > // for 64bit ARM processors so it's necessary to turn on > // portability mode > #define AS_MAX_PORTABILITY > > // STDCALL is not available on ARM > #undef STDCALL > #define STDCALL > > #elif (defined(i386) || defined(__i386) || defined(__i386__)) && !defined(__LP64__) ># 744 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // Support native calling conventions on Mac OS X + Intel 32bit CPU > #define AS_X86 > #undef AS_NO_THISCALL_FUNCTOR_METHOD > #define THISCALL_PASS_OBJECT_POINTER_ON_THE_STACK > #undef COMPLEX_MASK > #define COMPLEX_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > #undef COMPLEX_RETURN_MASK > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > > #elif defined(__LP64__) && !defined(__ppc__) && !defined(__PPC__) && !defined(__arm64__) ># 754 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // http://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/LowLevelABI/140-x86-64_Function_Calling_Conventions/x86_64.html#//apple_ref/doc/uid/TP40005035-SW1 > #define AS_X64_GCC > #undef AS_NO_THISCALL_FUNCTOR_METHOD > #define HAS_128_BIT_PRIMITIVES > #define SPLIT_OBJS_BY_MEMBER_TYPES > #undef COMPLEX_MASK > #define COMPLEX_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > #undef COMPLEX_RETURN_MASK > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > #define AS_LARGE_OBJS_PASSED_BY_REF > #define AS_LARGE_OBJ_MIN_SIZE 5 > // STDCALL is not available on 64bit Mac > #undef STDCALL > #define STDCALL > > #elif (defined(__ppc__) || defined(__PPC__)) && !defined(__LP64__) ># 770 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // Support native calling conventions on Mac OS X + PPC 32bit CPU > #define AS_PPC > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > #define CDECL_RETURN_SIMPLE_IN_MEMORY > #define STDCALL_RETURN_SIMPLE_IN_MEMORY > #undef COMPLEX_MASK > #define COMPLEX_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > #undef COMPLEX_RETURN_MASK > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > > #elif (defined(__ppc__) || defined(__PPC__)) && defined(__LP64__) ># 781 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_PPC_64 > #else ># 783 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // Unknown CPU type > #define AS_MAX_PORTABILITY > #endif ># 786 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_POSIX_THREADS > > // Windows > #elif defined(WIN32) || defined(_WIN32) || defined(_WIN64) || defined(__CYGWIN__) ># 790 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // On Windows the simple classes are returned in the EAX:EDX registers > //#define THISCALL_RETURN_SIMPLE_IN_MEMORY > //#define CDECL_RETURN_SIMPLE_IN_MEMORY > //#define STDCALL_RETURN_SIMPLE_IN_MEMORY > > #undef COMPLEX_MASK > #define COMPLEX_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > #undef COMPLEX_RETURN_MASK > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > > #if (defined(i386) || defined(__i386) || defined(__i386__)) && !defined(__LP64__) > // Support native calling conventions on Intel 32bit CPU > #define AS_X86 > #undef AS_NO_THISCALL_FUNCTOR_METHOD > > // As of version 4.7 MinGW changed the ABI, presumably > // to be better aligned with how MSVC works > #if (__GNUC__ == 4 && __GNUC_MINOR__ >= 7) || __GNUC__ > 4 > #define AS_MINGW47 > #endif ># 810 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #if (__clang_major__ == 3 && __clang_minor__ > 4) || __clang_major > 3 > #define AS_MINGW47 > #endif ># 814 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #ifdef AS_MINGW47 > #undef CALLEE_POPS_HIDDEN_RETURN_POINTER > #define THISCALL_CALLEE_POPS_ARGUMENTS > #else ># 819 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // Earlier versions than 4.7 > #define THISCALL_PASS_OBJECT_POINTER_ON_THE_STACK > #endif ># 822 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #elif defined(__x86_64__) ># 824 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_X64_MINGW > #undef AS_NO_THISCALL_FUNCTOR_METHOD > #define AS_LARGE_OBJS_PASSED_BY_REF > #define AS_LARGE_OBJ_MIN_SIZE 3 > #define COMPLEX_OBJS_PASSED_BY_REF > #else ># 830 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_MAX_PORTABILITY > #endif ># 832 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_WIN > #define AS_WINDOWS_THREADS > > // Linux > #elif defined(__linux__) && !defined(ANDROID) && !defined(__ANDROID__) ># 837 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #undef COMPLEX_MASK > #define COMPLEX_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > #undef COMPLEX_RETURN_MASK > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > > #if (defined(i386) || defined(__i386) || defined(__i386__)) && !defined(__LP64__) > // x86 32bit > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > #define CDECL_RETURN_SIMPLE_IN_MEMORY > #define STDCALL_RETURN_SIMPLE_IN_MEMORY > > // Support native calling conventions on Intel 32bit CPU > #define THISCALL_PASS_OBJECT_POINTER_ON_THE_STACK > #define AS_X86 > #undef AS_NO_THISCALL_FUNCTOR_METHOD > #elif defined(__x86_64__) ># 854 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // x86 64bit > #define AS_X64_GCC > #undef AS_NO_THISCALL_FUNCTOR_METHOD > #define HAS_128_BIT_PRIMITIVES > #define SPLIT_OBJS_BY_MEMBER_TYPES > #define AS_LARGE_OBJS_PASSED_BY_REF > #define AS_LARGE_OBJ_MIN_SIZE 5 > // STDCALL is not available on 64bit Linux > #undef STDCALL > #define STDCALL > #elif defined(__ARMEL__) || defined(__arm__) || defined(__aarch64__) || defined(__AARCH64EL__) ># 865 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // arm > > // The assembler code currently doesn't support arm v4, nor 64bit (v8) > #if !defined(__ARM_ARCH_4__) && !defined(__ARM_ARCH_4T__) && !defined(__LP64__) > #define AS_ARM > > // TODO: The stack unwind on exceptions currently fails due to the assembler code in as_callfunc_arm_gcc.S > #define AS_NO_EXCEPTIONS > > #undef STDCALL > #define STDCALL > > #define CDECL_RETURN_SIMPLE_IN_MEMORY > #define STDCALL_RETURN_SIMPLE_IN_MEMORY > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > > #undef THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE > #undef CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE > #undef STDCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE > > #define THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > #define CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > #define STDCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > > #ifndef AS_MAX_PORTABILITY > // Make a few checks against incompatible ABI combinations > #if defined(__FAST_MATH__) && __FAST_MATH__ == 1 > #error -ffast-math is not supported with native calling conventions > #endif ># 894 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #endif ># 895 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > // Verify if soft-float or hard-float ABI is used > #if defined(__SOFTFP__) && __SOFTFP__ == 1 > // -ffloat-abi=softfp or -ffloat-abi=soft > #define AS_SOFTFP > #endif ># 901 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > // Tested with both hard float and soft float abi > #undef AS_NO_THISCALL_FUNCTOR_METHOD > #endif ># 905 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #elif defined(__mips__) ># 907 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // mips > #define AS_MIPS > #undef STDCALL > #define STDCALL > > #ifdef _ABIO32 > // 32bit O32 ABI > #define AS_MIPS > > // All structures are returned in memory regardless of size or complexity > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > #define THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 0 > #define CDECL_RETURN_SIMPLE_IN_MEMORY > #define CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 0 > #define STDCALL_RETURN_SIMPLE_IN_MEMORY > #define CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 0 > #undef AS_NO_THISCALL_FUNCTOR_METHOD > #else ># 925 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // For other ABIs the native calling convention is not available (yet) > #define AS_MAX_PORTABILITY > #endif ># 928 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #elif defined(__PPC64__) ># 929 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // PPC 64bit > > // The code in as_callfunc_ppc_64.cpp was built for PS3 and XBox 360, that > // although use 64bit PPC only uses 32bit pointers. > // TODO: Add support for native calling conventions on Linux with PPC 64bit > #define AS_MAX_PORTABILITY > #else ># 936 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_MAX_PORTABILITY > #endif ># 938 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_LINUX > #define AS_POSIX_THREADS > > #if !( ( (__GNUC__ == 4) && (__GNUC_MINOR__ >= 1) || __GNUC__ > 4) ) > // Only with GCC 4.1 was the atomic instructions available > #define AS_NO_ATOMIC > #endif ># 945 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > // Free BSD > #elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(__OpenBSD__) ># 948 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_BSD > #if (defined(i386) || defined(__i386) || defined(__i386__)) && !defined(__LP64__) > #undef COMPLEX_MASK > #define COMPLEX_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > #undef COMPLEX_RETURN_MASK > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > #define THISCALL_PASS_OBJECT_POINTER_ON_THE_STACK > #define AS_X86 > #elif defined(__LP64__) ># 957 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_X64_GCC > #define HAS_128_BIT_PRIMITIVES > #define SPLIT_OBJS_BY_MEMBER_TYPES > #undef COMPLEX_MASK > #define COMPLEX_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > #undef COMPLEX_RETURN_MASK > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > #define AS_LARGE_OBJS_PASSED_BY_REF > #define AS_LARGE_OBJ_MIN_SIZE 5 > #undef STDCALL > #define STDCALL > #else ># 969 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_MAX_PORTABILITY > #endif ># 971 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_POSIX_THREADS > #if !( ( (__GNUC__ == 4) && (__GNUC_MINOR__ >= 1) || __GNUC__ > 4) ) > // Only with GCC 4.1 was the atomic instructions available > #define AS_NO_ATOMIC > #endif ># 976 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > // PSP and PS2 > #elif defined(__PSP__) || defined(__psp__) || defined(_EE_) || defined(_PSP) || defined(_PS2) ># 979 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // Support native calling conventions on MIPS architecture > #if (defined(_MIPS_ARCH) || defined(_mips) || defined(__MIPSEL__)) && !defined(__LP64__) > #define AS_MIPS > #define AS_USE_DOUBLE_AS_FLOAT > #else ># 984 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_MAX_PORTABILITY > #endif ># 986 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > // PS3 > #elif (defined(__PPC__) || defined(__ppc__)) && defined(__PPU__) ># 989 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // Support native calling conventions on PS3 > #define AS_PS3 > #define AS_PPC_64 > #define SPLIT_OBJS_BY_MEMBER_TYPES > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > #define CDECL_RETURN_SIMPLE_IN_MEMORY > #define STDCALL_RETURN_SIMPLE_IN_MEMORY > // PS3 doesn't have STDCALL > #undef STDCALL > #define STDCALL > > // Dreamcast > #elif __SH4_SINGLE_ONLY__ ># 1002 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // Support native calling conventions on Dreamcast > #define AS_DC > #define AS_SH4 > > // Wii JWC - Close to PS3 just no PPC_64 and AS_PS3 > #elif defined(EPPC) ># 1008 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_WII > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > #define CDECL_RETURN_SIMPLE_IN_MEMORY > #define STDCALL_RETURN_SIMPLE_IN_MEMORY > #undef STDCALL > #define STDCALL > > // Android > #elif defined(ANDROID) || defined(__ANDROID__) ># 1017 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_ANDROID > > // Android 2.3+ supports posix threads > #define AS_POSIX_THREADS > > // Common configuration with Android arm and x86 > #define CDECL_RETURN_SIMPLE_IN_MEMORY > #define STDCALL_RETURN_SIMPLE_IN_MEMORY > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > > #undef COMPLEX_MASK > #define COMPLEX_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > #undef COMPLEX_RETURN_MASK > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > > #if (defined(_ARM_) || defined(__arm__)) > // Android ARM > > // TODO: The stack unwind on exceptions currently fails due to the assembler code in as_callfunc_arm_gcc.S > #define AS_NO_EXCEPTIONS > > #undef THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE > #undef CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE > #undef STDCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE > > #define THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > #define CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > #define STDCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > > // The stdcall calling convention is not used on the arm cpu > #undef STDCALL > #define STDCALL > > #undef GNU_STYLE_VIRTUAL_METHOD > > #define AS_ARM > #undef AS_NO_THISCALL_FUNCTOR_METHOD > #define AS_SOFTFP > #define AS_CALLEE_DESTROY_OBJ_BY_VAL > #elif (defined(i386) || defined(__i386) || defined(__i386__)) && !defined(__LP64__) ># 1057 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // Android Intel x86 (same config as Linux x86). Tested with Intel x86 Atom System Image. > > // Support native calling conventions on Intel 32bit CPU > #define THISCALL_PASS_OBJECT_POINTER_ON_THE_STACK > #define AS_X86 > #undef AS_NO_THISCALL_FUNCTOR_METHOD > #elif defined(__mips__) ># 1064 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_MIPS > #undef STDCALL > #define STDCALL > > #ifdef _ABIO32 > #define AS_MIPS > > // All structures are returned in memory regardless of size or complexity > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > #define THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 0 > #define CDECL_RETURN_SIMPLE_IN_MEMORY > #define CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 0 > #define STDCALL_RETURN_SIMPLE_IN_MEMORY > #define CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 0 > #undef AS_NO_THISCALL_FUNCTOR_METHOD > #else ># 1080 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // For other ABIs the native calling convention is not available (yet) > #define AS_MAX_PORTABILITY > #endif ># 1083 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #endif ># 1084 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > // Haiku OS > #elif __HAIKU__ ># 1087 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_HAIKU > // Only x86-32 is currently supported by Haiku, but they do plan to support > // x86-64 and PowerPC in the future, so should go ahead and check the platform > // for future compatibility > #if (defined(i386) || defined(__i386) || defined(__i386__)) && !defined(__LP64__) > #define AS_X86 > #define THISCALL_PASS_OBJECT_POINTER_ON_THE_STACK > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > #define CDECL_RETURN_SIMPLE_IN_MEMORY > #define STDCALL_RETURN_SIMPLE_IN_MEMORY > #else ># 1098 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_MAX_PORTABILITY > #endif ># 1100 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #define AS_POSIX_THREADS > #if !( ( (__GNUC__ == 4) && (__GNUC_MINOR__ >= 1) || __GNUC__ > 4) ) > // Only with GCC 4.1 was the atomic instructions available > #define AS_NO_ATOMIC > #endif ># 1106 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > // Illumos > #elif defined(__sun) ># 1109 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #if (defined(i386) || defined(__i386) || defined(__i386__)) && !defined(__LP64__) > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > #define CDECL_RETURN_SIMPLE_IN_MEMORY > #define STDCALL_RETURN_SIMPLE_IN_MEMORY > > // Support native calling conventions on Intel 32bit CPU > #define THISCALL_PASS_OBJECT_POINTER_ON_THE_STACK > #define AS_X86 > #elif defined(__x86_64__) ># 1118 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_X64_GCC > #define HAS_128_BIT_PRIMITIVES > #define SPLIT_OBJS_BY_MEMBER_TYPES > // STDCALL is not available on 64bit Linux > #undef STDCALL > #define STDCALL > #else ># 1125 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_MAX_PORTABILITY > #endif ># 1127 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_ILLUMOS > #define AS_POSIX_THREADS > > #if !( ( (__GNUC__ == 4) && (__GNUC_MINOR__ >= 1) || __GNUC__ > 4) ) > // Only with GCC 4.1 was the atomic instructions available > #define AS_NO_ATOMIC > #endif ># 1134 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #endif ># 1135 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #define UNREACHABLE_RETURN >#endif ># 1138 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > >// Sun CC >// Initial information provided by Andrey Bergman >#if defined(__SUNPRO_CC) > #if defined(__sparc) > #define AS_SPARC > #endif ># 1145 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #if defined(__sun) > #define AS_SUN > #endif ># 1149 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > // Native calling conventions is not yet supported for Sun CC > #if !defined(AS_MAX_PORTABILITY) > #define AS_MAX_PORTABILITY > #endif ># 1154 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > // I presume Sun CC uses a similar structure of method pointers as gnuc > #define MULTI_BASE_OFFSET(x) (*((asPWORD*)(&x)+1)) > > #if !defined(AS_SIZEOF_BOOL) > #define AS_SIZEOF_BOOL 1 // sizeof(bool) == 1 > #endif ># 1161 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #if !defined(UNREACHABLE_RETURN) > #define UNREACHABLE_RETURN > #endif ># 1164 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #if !defined(STDCALL) > #define STDCALL // There is no stdcall on Solaris/SunPro/SPARC > #endif ># 1167 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #if !defined(asVSNPRINTF) > #define asVSNPRINTF(a, b, c, d) vsnprintf(a, b, c, d) > #endif ># 1170 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" >#endif ># 1171 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > >// >// Detect target hardware >//------------------------------------------------ > >// Big endian CPU target? >// see: http://sourceforge.net/p/predef/wiki/Endianness/ >#if !defined(AS_BIG_ENDIAN) && \ > defined(__BYTE_ORDER) && __BYTE_ORDER == __BIG_ENDIAN || \ > defined(__BIG_ENDIAN__) || \ > defined(__ARMEB__) || \ > defined(__THUMBEB__) || \ > defined(__AARCH64EB__) || \ > defined(_MIBSEB) || defined(__MIBSEB) || defined(__MIBSEB__) > #define AS_BIG_ENDIAN >#endif ># 1188 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > >// Dreamcast and Gamecube use only 32bit floats, so treat doubles as floats >#if defined(__SH4_SINGLE_ONLY__) || defined(_GC) > #define AS_USE_DOUBLE_AS_FLOAT // use 32bit floats instead of doubles >#endif ># 1193 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > >// If there are no current support for native calling >// conventions, then compile with AS_MAX_PORTABILITY >#if (!defined(AS_X86) && !defined(AS_SH4) && !defined(AS_MIPS) && !defined(AS_PPC) && !defined(AS_PPC_64) && !defined(AS_XENON) && !defined(AS_X64_GCC) && !defined(AS_X64_MSVC) && !defined(AS_ARM) && !defined(AS_X64_MINGW)) > #ifndef AS_MAX_PORTABILITY > #define AS_MAX_PORTABILITY > #endif ># 1200 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" >#endif ># 1201 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > >// If the platform doesn't support atomic instructions we can't allow >// multithreading as the reference counters won't be threadsafe >#if defined(AS_NO_ATOMIC) && !defined(AS_NO_THREADS) > #define AS_NO_THREADS >#endif ># 1207 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > >// If the form of threads to use hasn't been chosen >// then the library will be compiled without support >// for multithreading >#if !defined(AS_POSIX_THREADS) && !defined(AS_WINDOWS_THREADS) > #define AS_NO_THREADS >#endif ># 1214 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > >// The assert macro >#if defined(ANDROID) > #if defined(AS_DEBUG) > #if 0 /* expanded by -frewrite-includes */ >#include <android/log.h> >#endif /* expanded by -frewrite-includes */ ># 1219 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" ># 1220 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #if 0 /* expanded by -frewrite-includes */ >#include <stdlib.h> >#endif /* expanded by -frewrite-includes */ ># 1220 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" ># 1221 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define asASSERT(x) \ > do { \ > if (!(x)) { \ > __android_log_print(ANDROID_LOG_ERROR, "AngelScript", "Assert failed at %s:%d - %s", __FILE__, __LINE__, #x); \ > exit(1); \ > } \ > } while (0) > #else ># 1229 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define asASSERT(x) > #endif ># 1231 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" >#else ># 1232 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #if 0 /* expanded by -frewrite-includes */ >#include <assert.h> >#endif /* expanded by -frewrite-includes */ ># 1232 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" ># 1 "/usr/include/assert.h" 1 3 4 >/*- > * Copyright (c) 1992, 1993 > * The Regents of the University of California. All rights reserved. > * (c) UNIX System Laboratories, Inc. > * All or some portions of this file are derived from material licensed > * to the University of California by American Telephone and Telegraph > * Co. or Unix System Laboratories, Inc. and are reproduced herein with > * the permission of UNIX System Laboratories, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)assert.h 8.2 (Berkeley) 1/21/94 > * $FreeBSD: head/include/assert.h 228955 2011-12-29 14:41:17Z ed $ > */ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 38 "/usr/include/assert.h" 3 4 ># 1 "/usr/include/sys/cdefs.h" 1 3 4 >/*- > * Copyright (c) 1991, 1993 > * The Regents of the University of California. All rights reserved. > * > * This code is derived from software contributed to Berkeley by > * Berkeley Software Design, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)cdefs.h 8.8 (Berkeley) 1/9/95 > * $FreeBSD: head/sys/sys/cdefs.h 316213 2017-03-30 04:57:26Z kib $ > */ > >#ifndef _SYS_CDEFS_H_ >#define _SYS_CDEFS_H_ > >/* > * Testing against Clang-specific extensions. > */ >#ifndef __has_attribute >#define __has_attribute(x) 0 >#endif ># 45 "/usr/include/sys/cdefs.h" 3 4 >#ifndef __has_extension >#define __has_extension __has_feature >#endif ># 48 "/usr/include/sys/cdefs.h" 3 4 >#ifndef __has_feature >#define __has_feature(x) 0 >#endif ># 51 "/usr/include/sys/cdefs.h" 3 4 >#ifndef __has_include >#define __has_include(x) 0 >#endif ># 54 "/usr/include/sys/cdefs.h" 3 4 >#ifndef __has_builtin >#define __has_builtin(x) 0 >#endif ># 57 "/usr/include/sys/cdefs.h" 3 4 > >#if defined(__cplusplus) >#define __BEGIN_DECLS extern "C" { >#define __END_DECLS } >#else ># 62 "/usr/include/sys/cdefs.h" 3 4 >#define __BEGIN_DECLS >#define __END_DECLS >#endif ># 65 "/usr/include/sys/cdefs.h" 3 4 > >/* > * This code has been put in place to help reduce the addition of > * compiler specific defines in FreeBSD code. It helps to aid in > * having a compiler-agnostic source tree. > */ > >#if defined(__GNUC__) || defined(__INTEL_COMPILER) > >#if __GNUC__ >= 3 || defined(__INTEL_COMPILER) >#define __GNUCLIKE_ASM 3 >#define __GNUCLIKE_MATH_BUILTIN_CONSTANTS >#else ># 78 "/usr/include/sys/cdefs.h" 3 4 >#define __GNUCLIKE_ASM 2 >#endif ># 80 "/usr/include/sys/cdefs.h" 3 4 >#define __GNUCLIKE___TYPEOF 1 >#define __GNUCLIKE___OFFSETOF 1 >#define __GNUCLIKE___SECTION 1 > >#ifndef __INTEL_COMPILER >#define __GNUCLIKE_CTOR_SECTION_HANDLING 1 >#endif ># 87 "/usr/include/sys/cdefs.h" 3 4 > >#define __GNUCLIKE_BUILTIN_CONSTANT_P 1 >#if defined(__INTEL_COMPILER) && defined(__cplusplus) && \ > __INTEL_COMPILER < 800 >#undef __GNUCLIKE_BUILTIN_CONSTANT_P >#endif ># 93 "/usr/include/sys/cdefs.h" 3 4 > >#if (__GNUC_MINOR__ > 95 || __GNUC__ >= 3) >#define __GNUCLIKE_BUILTIN_VARARGS 1 >#define __GNUCLIKE_BUILTIN_STDARG 1 >#define __GNUCLIKE_BUILTIN_VAALIST 1 >#endif ># 99 "/usr/include/sys/cdefs.h" 3 4 > >#if defined(__GNUC__) >#define __GNUC_VA_LIST_COMPATIBILITY 1 >#endif ># 103 "/usr/include/sys/cdefs.h" 3 4 > >/* > * Compiler memory barriers, specific to gcc and clang. > */ >#if defined(__GNUC__) >#define __compiler_membar() __asm __volatile(" " : : : "memory") >#endif ># 110 "/usr/include/sys/cdefs.h" 3 4 > >#ifndef __INTEL_COMPILER >#define __GNUCLIKE_BUILTIN_NEXT_ARG 1 >#define __GNUCLIKE_MATH_BUILTIN_RELOPS >#endif ># 115 "/usr/include/sys/cdefs.h" 3 4 > >#define __GNUCLIKE_BUILTIN_MEMCPY 1 > >/* XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced */ >#define __CC_SUPPORTS_INLINE 1 >#define __CC_SUPPORTS___INLINE 1 >#define __CC_SUPPORTS___INLINE__ 1 > >#define __CC_SUPPORTS___FUNC__ 1 >#define __CC_SUPPORTS_WARNING 1 > >#define __CC_SUPPORTS_VARADIC_XXX 1 /* see varargs.h */ > >#define __CC_SUPPORTS_DYNAMIC_ARRAY_INIT 1 > >#endif /* __GNUC__ || __INTEL_COMPILER */ ># 131 "/usr/include/sys/cdefs.h" 3 4 > >/* > * Macro to test if we're using a specific version of gcc or later. > */ >#if defined(__GNUC__) && !defined(__INTEL_COMPILER) >#define __GNUC_PREREQ__(ma, mi) \ > (__GNUC__ > (ma) || __GNUC__ == (ma) && __GNUC_MINOR__ >= (mi)) >#else ># 139 "/usr/include/sys/cdefs.h" 3 4 >#define __GNUC_PREREQ__(ma, mi) 0 >#endif ># 141 "/usr/include/sys/cdefs.h" 3 4 > >/* > * The __CONCAT macro is used to concatenate parts of symbol names, e.g. > * with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. > * The __CONCAT macro is a bit tricky to use if it must work in non-ANSI > * mode -- there must be no spaces between its arguments, and for nested > * __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also > * concatenate double-quoted strings produced by the __STRING macro, but > * this only works with ANSI C. > * > * __XSTRING is like __STRING, but it expands any macros in its argument > * first. It is only available with ANSI C. > */ >#if defined(__STDC__) || defined(__cplusplus) >#define __P(protos) protos /* full-blown ANSI C */ >#define __CONCAT1(x,y) x ## y >#define __CONCAT(x,y) __CONCAT1(x,y) >#define __STRING(x) #x /* stringify without expanding x */ >#define __XSTRING(x) __STRING(x) /* expand x, then stringify */ > >#define __const const /* define reserved names to standard */ >#define __signed signed >#define __volatile volatile >#if defined(__cplusplus) >#define __inline inline /* convert to C++ keyword */ >#else ># 167 "/usr/include/sys/cdefs.h" 3 4 >#if !(defined(__CC_SUPPORTS___INLINE)) >#define __inline /* delete GCC keyword */ >#endif /* ! __CC_SUPPORTS___INLINE */ ># 170 "/usr/include/sys/cdefs.h" 3 4 >#endif /* !__cplusplus */ ># 171 "/usr/include/sys/cdefs.h" 3 4 > >#else /* !(__STDC__ || __cplusplus) */ ># 173 "/usr/include/sys/cdefs.h" 3 4 >#define __P(protos) () /* traditional C preprocessor */ >#define __CONCAT(x,y) x/**/y >#define __STRING(x) "x" > >#if !defined(__CC_SUPPORTS___INLINE) >#define __const /* delete pseudo-ANSI C keywords */ >#define __inline >#define __signed >#define __volatile >/* > * In non-ANSI C environments, new programs will want ANSI-only C keywords > * deleted from the program and old programs will want them left alone. > * When using a compiler other than gcc, programs using the ANSI C keywords > * const, inline etc. as normal identifiers should define -DNO_ANSI_KEYWORDS. > * When using "gcc -traditional", we assume that this is the intent; if > * __GNUC__ is defined but __STDC__ is not, we leave the new keywords alone. > */ >#ifndef NO_ANSI_KEYWORDS >#define const /* delete ANSI C keywords */ >#define inline >#define signed >#define volatile >#endif /* !NO_ANSI_KEYWORDS */ ># 196 "/usr/include/sys/cdefs.h" 3 4 >#endif /* !__CC_SUPPORTS___INLINE */ ># 197 "/usr/include/sys/cdefs.h" 3 4 >#endif /* !(__STDC__ || __cplusplus) */ ># 198 "/usr/include/sys/cdefs.h" 3 4 > >/* > * Compiler-dependent macros to help declare dead (non-returning) and > * pure (no side effects) functions, and unused variables. They are > * null except for versions of gcc that are known to support the features > * properly (old versions of gcc-2 supported the dead and pure features > * in a different (wrong) way). If we do not provide an implementation > * for a given compiler, let the compile fail if it is told to use > * a feature that we cannot live without. > */ >#ifdef lint >#define __dead2 >#define __pure2 >#define __unused >#define __packed >#define __aligned(x) >#define __alloc_align(x) >#define __alloc_size(x) >#define __section(x) >#define __weak_symbol >#else ># 219 "/usr/include/sys/cdefs.h" 3 4 >#define __weak_symbol __attribute__((__weak__)) >#if !__GNUC_PREREQ__(2, 5) && !defined(__INTEL_COMPILER) >#define __dead2 >#define __pure2 >#define __unused >#endif ># 225 "/usr/include/sys/cdefs.h" 3 4 >#if __GNUC__ == 2 && __GNUC_MINOR__ >= 5 && __GNUC_MINOR__ < 7 && !defined(__INTEL_COMPILER) >#define __dead2 __attribute__((__noreturn__)) >#define __pure2 __attribute__((__const__)) >#define __unused >/* XXX Find out what to do for __packed, __aligned and __section */ >#endif ># 231 "/usr/include/sys/cdefs.h" 3 4 >#if __GNUC_PREREQ__(2, 7) || defined(__INTEL_COMPILER) >#define __dead2 __attribute__((__noreturn__)) >#define __pure2 __attribute__((__const__)) >#define __unused __attribute__((__unused__)) >#define __used __attribute__((__used__)) >#define __packed __attribute__((__packed__)) >#define __aligned(x) __attribute__((__aligned__(x))) >#define __section(x) __attribute__((__section__(x))) >#endif ># 240 "/usr/include/sys/cdefs.h" 3 4 >#if __GNUC_PREREQ__(4, 3) || __has_attribute(__alloc_size__) >#define __alloc_size(x) __attribute__((__alloc_size__(x))) >#else ># 243 "/usr/include/sys/cdefs.h" 3 4 >#define __alloc_size(x) >#endif ># 245 "/usr/include/sys/cdefs.h" 3 4 >#if __GNUC_PREREQ__(4, 9) || __has_attribute(__alloc_align__) >#define __alloc_align(x) __attribute__((__alloc_align__(x))) >#else ># 248 "/usr/include/sys/cdefs.h" 3 4 >#define __alloc_align(x) >#endif ># 250 "/usr/include/sys/cdefs.h" 3 4 >#endif /* lint */ ># 251 "/usr/include/sys/cdefs.h" 3 4 > >#if !__GNUC_PREREQ__(2, 95) >#define __alignof(x) __offsetof(struct { char __a; x __b; }, __b) >#endif ># 255 "/usr/include/sys/cdefs.h" 3 4 > >/* > * Keywords added in C11. > */ > >#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L || defined(lint) > >#if !__has_extension(c_alignas) >#if (defined(__cplusplus) && __cplusplus >= 201103L) || \ > __has_extension(cxx_alignas) >#define _Alignas(x) alignas(x) >#else ># 267 "/usr/include/sys/cdefs.h" 3 4 >/* XXX: Only emulates _Alignas(constant-expression); not _Alignas(type-name). */ >#define _Alignas(x) __aligned(x) >#endif ># 270 "/usr/include/sys/cdefs.h" 3 4 >#endif ># 271 "/usr/include/sys/cdefs.h" 3 4 > >#if defined(__cplusplus) && __cplusplus >= 201103L >#define _Alignof(x) alignof(x) >#else ># 275 "/usr/include/sys/cdefs.h" 3 4 >#define _Alignof(x) __alignof(x) >#endif ># 277 "/usr/include/sys/cdefs.h" 3 4 > >#if !defined(__cplusplus) && !__has_extension(c_atomic) && \ > !__has_extension(cxx_atomic) >/* > * No native support for _Atomic(). Place object in structure to prevent > * most forms of direct non-atomic access. > */ >#define _Atomic(T) struct { T volatile __val; } >#endif ># 286 "/usr/include/sys/cdefs.h" 3 4 > >#if defined(__cplusplus) && __cplusplus >= 201103L >#define _Noreturn [[noreturn]] >#else ># 290 "/usr/include/sys/cdefs.h" 3 4 >#define _Noreturn __dead2 >#endif ># 292 "/usr/include/sys/cdefs.h" 3 4 > >#if !__has_extension(c_static_assert) >#if (defined(__cplusplus) && __cplusplus >= 201103L) || \ > __has_extension(cxx_static_assert) >#define _Static_assert(x, y) static_assert(x, y) >#elif __GNUC_PREREQ__(4,6) ># 298 "/usr/include/sys/cdefs.h" 3 4 >/* Nothing, gcc 4.6 and higher has _Static_assert built-in */ >#elif defined(__COUNTER__) ># 300 "/usr/include/sys/cdefs.h" 3 4 >#define _Static_assert(x, y) __Static_assert(x, __COUNTER__) >#define __Static_assert(x, y) ___Static_assert(x, y) >#define ___Static_assert(x, y) typedef char __assert_ ## y[(x) ? 1 : -1] \ > __unused >#else ># 305 "/usr/include/sys/cdefs.h" 3 4 >#define _Static_assert(x, y) struct __hack >#endif ># 307 "/usr/include/sys/cdefs.h" 3 4 >#endif ># 308 "/usr/include/sys/cdefs.h" 3 4 > >#if !__has_extension(c_thread_local) >/* > * XXX: Some compilers (Clang 3.3, GCC 4.7) falsely announce C++11 mode > * without actually supporting the thread_local keyword. Don't check for > * the presence of C++11 when defining _Thread_local. > */ >#if /* (defined(__cplusplus) && __cplusplus >= 201103L) || */ \ > __has_extension(cxx_thread_local) >#define _Thread_local thread_local >#else ># 319 "/usr/include/sys/cdefs.h" 3 4 >#define _Thread_local __thread >#endif ># 321 "/usr/include/sys/cdefs.h" 3 4 >#endif ># 322 "/usr/include/sys/cdefs.h" 3 4 > >#endif /* __STDC_VERSION__ || __STDC_VERSION__ < 201112L */ ># 324 "/usr/include/sys/cdefs.h" 3 4 > >/* > * Emulation of C11 _Generic(). Unlike the previously defined C11 > * keywords, it is not possible to implement this using exactly the same > * syntax. Therefore implement something similar under the name > * __generic(). Unlike _Generic(), this macro can only distinguish > * between a single type, so it requires nested invocations to > * distinguish multiple cases. > */ > >#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \ > __has_extension(c_generic_selections) >#define __generic(expr, t, yes, no) \ > _Generic(expr, t: yes, default: no) >#elif __GNUC_PREREQ__(3, 1) && !defined(__cplusplus) ># 339 "/usr/include/sys/cdefs.h" 3 4 >#define __generic(expr, t, yes, no) \ > __builtin_choose_expr( \ > __builtin_types_compatible_p(__typeof(expr), t), yes, no) >#endif ># 343 "/usr/include/sys/cdefs.h" 3 4 > >/* > * C99 Static array indices in function parameter declarations. Syntax such as: > * void bar(int myArray[static 10]); > * is allowed in C99 but not in C++. Define __min_size appropriately so > * headers using it can be compiled in either language. Use like this: > * void bar(int myArray[__min_size(10)]); > */ >#if !defined(__cplusplus) && \ > (defined(__clang__) || __GNUC_PREREQ__(4, 6)) && \ > (!defined(__STDC_VERSION__) || (__STDC_VERSION__ >= 199901)) >#define __min_size(x) static (x) >#else ># 356 "/usr/include/sys/cdefs.h" 3 4 >#define __min_size(x) (x) >#endif ># 358 "/usr/include/sys/cdefs.h" 3 4 > >#if __GNUC_PREREQ__(2, 96) >#define __malloc_like __attribute__((__malloc__)) >#define __pure __attribute__((__pure__)) >#else ># 363 "/usr/include/sys/cdefs.h" 3 4 >#define __malloc_like >#define __pure >#endif ># 366 "/usr/include/sys/cdefs.h" 3 4 > >#if __GNUC_PREREQ__(3, 1) || (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 800) >#define __always_inline __attribute__((__always_inline__)) >#else ># 370 "/usr/include/sys/cdefs.h" 3 4 >#define __always_inline >#endif ># 372 "/usr/include/sys/cdefs.h" 3 4 > >#if __GNUC_PREREQ__(3, 1) >#define __noinline __attribute__ ((__noinline__)) >#else ># 376 "/usr/include/sys/cdefs.h" 3 4 >#define __noinline >#endif ># 378 "/usr/include/sys/cdefs.h" 3 4 > >#if __GNUC_PREREQ__(3, 4) >#define __fastcall __attribute__((__fastcall__)) >#define __result_use_check __attribute__((__warn_unused_result__)) >#else ># 383 "/usr/include/sys/cdefs.h" 3 4 >#define __fastcall >#define __result_use_check >#endif ># 386 "/usr/include/sys/cdefs.h" 3 4 > >#if __GNUC_PREREQ__(4, 1) >#define __returns_twice __attribute__((__returns_twice__)) >#else ># 390 "/usr/include/sys/cdefs.h" 3 4 >#define __returns_twice >#endif ># 392 "/usr/include/sys/cdefs.h" 3 4 > >#if __GNUC_PREREQ__(4, 6) || __has_builtin(__builtin_unreachable) >#define __unreachable() __builtin_unreachable() >#else ># 396 "/usr/include/sys/cdefs.h" 3 4 >#define __unreachable() ((void)0) >#endif ># 398 "/usr/include/sys/cdefs.h" 3 4 > >/* XXX: should use `#if __STDC_VERSION__ < 199901'. */ >#if !__GNUC_PREREQ__(2, 7) && !defined(__INTEL_COMPILER) >#define __func__ NULL >#endif ># 403 "/usr/include/sys/cdefs.h" 3 4 > >#if (defined(__INTEL_COMPILER) || (defined(__GNUC__) && __GNUC__ >= 2)) && !defined(__STRICT_ANSI__) || __STDC_VERSION__ >= 199901 >#define __LONG_LONG_SUPPORTED >#endif ># 407 "/usr/include/sys/cdefs.h" 3 4 > >/* C++11 exposes a load of C99 stuff */ >#if defined(__cplusplus) && __cplusplus >= 201103L >#define __LONG_LONG_SUPPORTED >#ifndef __STDC_LIMIT_MACROS >#define __STDC_LIMIT_MACROS >#endif ># 414 "/usr/include/sys/cdefs.h" 3 4 >#ifndef __STDC_CONSTANT_MACROS >#define __STDC_CONSTANT_MACROS >#endif ># 417 "/usr/include/sys/cdefs.h" 3 4 >#endif ># 418 "/usr/include/sys/cdefs.h" 3 4 > >/* > * GCC 2.95 provides `__restrict' as an extension to C90 to support the > * C99-specific `restrict' type qualifier. We happen to use `__restrict' as > * a way to define the `restrict' type qualifier without disturbing older > * software that is unaware of C99 keywords. > */ >#if !(__GNUC__ == 2 && __GNUC_MINOR__ == 95) >#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901 || defined(lint) >#define __restrict >#else ># 429 "/usr/include/sys/cdefs.h" 3 4 >#define __restrict restrict >#endif ># 431 "/usr/include/sys/cdefs.h" 3 4 >#endif ># 432 "/usr/include/sys/cdefs.h" 3 4 > >/* > * GNU C version 2.96 adds explicit branch prediction so that > * the CPU back-end can hint the processor and also so that > * code blocks can be reordered such that the predicted path > * sees a more linear flow, thus improving cache behavior, etc. > * > * The following two macros provide us with a way to utilize this > * compiler feature. Use __predict_true() if you expect the expression > * to evaluate to true, and __predict_false() if you expect the > * expression to evaluate to false. > * > * A few notes about usage: > * > * * Generally, __predict_false() error condition checks (unless > * you have some _strong_ reason to do otherwise, in which case > * document it), and/or __predict_true() `no-error' condition > * checks, assuming you want to optimize for the no-error case. > * > * * Other than that, if you don't know the likelihood of a test > * succeeding from empirical or other `hard' evidence, don't > * make predictions. > * > * * These are meant to be used in places that are run `a lot'. > * It is wasteful to make predictions in code that is run > * seldomly (e.g. at subsystem initialization time) as the > * basic block reordering that this affects can often generate > * larger code. > */ >#if __GNUC_PREREQ__(2, 96) >#define __predict_true(exp) __builtin_expect((exp), 1) >#define __predict_false(exp) __builtin_expect((exp), 0) >#else ># 465 "/usr/include/sys/cdefs.h" 3 4 >#define __predict_true(exp) (exp) >#define __predict_false(exp) (exp) >#endif ># 468 "/usr/include/sys/cdefs.h" 3 4 > >#if __GNUC_PREREQ__(4, 0) >#define __null_sentinel __attribute__((__sentinel__)) >#define __exported __attribute__((__visibility__("default"))) >#define __hidden __attribute__((__visibility__("hidden"))) >#else ># 474 "/usr/include/sys/cdefs.h" 3 4 >#define __null_sentinel >#define __exported >#define __hidden >#endif ># 478 "/usr/include/sys/cdefs.h" 3 4 > >/* > * We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h> > * require it. > */ >#if __GNUC_PREREQ__(4, 1) >#define __offsetof(type, field) __builtin_offsetof(type, field) >#else ># 486 "/usr/include/sys/cdefs.h" 3 4 >#ifndef __cplusplus >#define __offsetof(type, field) \ > ((__size_t)(__uintptr_t)((const volatile void *)&((type *)0)->field)) >#else ># 490 "/usr/include/sys/cdefs.h" 3 4 >#define __offsetof(type, field) \ > (__offsetof__ (reinterpret_cast <__size_t> \ > (&reinterpret_cast <const volatile char &> \ > (static_cast<type *> (0)->field)))) >#endif ># 495 "/usr/include/sys/cdefs.h" 3 4 >#endif ># 496 "/usr/include/sys/cdefs.h" 3 4 >#define __rangeof(type, start, end) \ > (__offsetof(type, end) - __offsetof(type, start)) > >/* > * Given the pointer x to the member m of the struct s, return > * a pointer to the containing structure. When using GCC, we first > * assign pointer x to a local variable, to check that its type is > * compatible with member m. > */ >#if __GNUC_PREREQ__(3, 1) >#define __containerof(x, s, m) ({ \ > const volatile __typeof(((s *)0)->m) *__x = (x); \ > __DEQUALIFY(s *, (const volatile char *)__x - __offsetof(s, m));\ >}) >#else ># 511 "/usr/include/sys/cdefs.h" 3 4 >#define __containerof(x, s, m) \ > __DEQUALIFY(s *, (const volatile char *)(x) - __offsetof(s, m)) >#endif ># 514 "/usr/include/sys/cdefs.h" 3 4 > >/* > * Compiler-dependent macros to declare that functions take printf-like > * or scanf-like arguments. They are null except for versions of gcc > * that are known to support the features properly (old versions of gcc-2 > * didn't permit keeping the keywords out of the application namespace). > */ >#if !__GNUC_PREREQ__(2, 7) && !defined(__INTEL_COMPILER) >#define __printflike(fmtarg, firstvararg) >#define __scanflike(fmtarg, firstvararg) >#define __format_arg(fmtarg) >#define __strfmonlike(fmtarg, firstvararg) >#define __strftimelike(fmtarg, firstvararg) >#else ># 528 "/usr/include/sys/cdefs.h" 3 4 >#define __printflike(fmtarg, firstvararg) \ > __attribute__((__format__ (__printf__, fmtarg, firstvararg))) >#define __scanflike(fmtarg, firstvararg) \ > __attribute__((__format__ (__scanf__, fmtarg, firstvararg))) >#define __format_arg(fmtarg) __attribute__((__format_arg__ (fmtarg))) >#define __strfmonlike(fmtarg, firstvararg) \ > __attribute__((__format__ (__strfmon__, fmtarg, firstvararg))) >#define __strftimelike(fmtarg, firstvararg) \ > __attribute__((__format__ (__strftime__, fmtarg, firstvararg))) >#endif ># 538 "/usr/include/sys/cdefs.h" 3 4 > >/* Compiler-dependent macros that rely on FreeBSD-specific extensions. */ >#if defined(__FreeBSD_cc_version) && __FreeBSD_cc_version >= 300001 && \ > defined(__GNUC__) && !defined(__INTEL_COMPILER) >#define __printf0like(fmtarg, firstvararg) \ > __attribute__((__format__ (__printf0__, fmtarg, firstvararg))) >#else ># 545 "/usr/include/sys/cdefs.h" 3 4 >#define __printf0like(fmtarg, firstvararg) >#endif ># 547 "/usr/include/sys/cdefs.h" 3 4 > >#if defined(__GNUC__) || defined(__INTEL_COMPILER) >#ifndef __INTEL_COMPILER >#define __strong_reference(sym,aliassym) \ > extern __typeof (sym) aliassym __attribute__ ((__alias__ (#sym))) >#endif ># 553 "/usr/include/sys/cdefs.h" 3 4 >#ifdef __STDC__ >#define __weak_reference(sym,alias) \ > __asm__(".weak " #alias); \ > __asm__(".equ " #alias ", " #sym) >#define __warn_references(sym,msg) \ > __asm__(".section .gnu.warning." #sym); \ > __asm__(".asciz \"" msg "\""); \ > __asm__(".previous") >#define __sym_compat(sym,impl,verid) \ > __asm__(".symver " #impl ", " #sym "@" #verid) >#define __sym_default(sym,impl,verid) \ > __asm__(".symver " #impl ", " #sym "@@" #verid) >#else ># 566 "/usr/include/sys/cdefs.h" 3 4 >#define __weak_reference(sym,alias) \ > __asm__(".weak alias"); \ > __asm__(".equ alias, sym") >#define __warn_references(sym,msg) \ > __asm__(".section .gnu.warning.sym"); \ > __asm__(".asciz \"msg\""); \ > __asm__(".previous") >#define __sym_compat(sym,impl,verid) \ > __asm__(".symver impl, sym@verid") >#define __sym_default(impl,sym,verid) \ > __asm__(".symver impl, sym@@verid") >#endif /* __STDC__ */ ># 578 "/usr/include/sys/cdefs.h" 3 4 >#endif /* __GNUC__ || __INTEL_COMPILER */ ># 579 "/usr/include/sys/cdefs.h" 3 4 > >#define __GLOBL1(sym) __asm__(".globl " #sym) >#define __GLOBL(sym) __GLOBL1(sym) > >#if defined(__GNUC__) || defined(__INTEL_COMPILER) >#define __IDSTRING(name,string) __asm__(".ident\t\"" string "\"") >#else ># 586 "/usr/include/sys/cdefs.h" 3 4 >/* > * The following definition might not work well if used in header files, > * but it should be better than nothing. If you want a "do nothing" > * version, then it should generate some harmless declaration, such as: > * #define __IDSTRING(name,string) struct __hack > */ >#define __IDSTRING(name,string) static const char name[] __unused = string >#endif ># 594 "/usr/include/sys/cdefs.h" 3 4 > >/* > * Embed the rcs id of a source file in the resulting library. Note that in > * more recent ELF binutils, we use .ident allowing the ID to be stripped. > * Usage: > * __FBSDID("$FreeBSD: head/sys/sys/cdefs.h 316213 2017-03-30 04:57:26Z kib $"); > */ >#ifndef __FBSDID >#if !defined(lint) && !defined(STRIP_FBSDID) >#define __FBSDID(s) __IDSTRING(__CONCAT(__rcsid_,__LINE__),s) >#else ># 605 "/usr/include/sys/cdefs.h" 3 4 >#define __FBSDID(s) struct __hack >#endif ># 607 "/usr/include/sys/cdefs.h" 3 4 >#endif ># 608 "/usr/include/sys/cdefs.h" 3 4 > >#ifndef __RCSID >#ifndef NO__RCSID >#define __RCSID(s) __IDSTRING(__CONCAT(__rcsid_,__LINE__),s) >#else ># 613 "/usr/include/sys/cdefs.h" 3 4 >#define __RCSID(s) struct __hack >#endif ># 615 "/usr/include/sys/cdefs.h" 3 4 >#endif ># 616 "/usr/include/sys/cdefs.h" 3 4 > >#ifndef __RCSID_SOURCE >#ifndef NO__RCSID_SOURCE >#define __RCSID_SOURCE(s) __IDSTRING(__CONCAT(__rcsid_source_,__LINE__),s) >#else ># 621 "/usr/include/sys/cdefs.h" 3 4 >#define __RCSID_SOURCE(s) struct __hack >#endif ># 623 "/usr/include/sys/cdefs.h" 3 4 >#endif ># 624 "/usr/include/sys/cdefs.h" 3 4 > >#ifndef __SCCSID >#ifndef NO__SCCSID >#define __SCCSID(s) __IDSTRING(__CONCAT(__sccsid_,__LINE__),s) >#else ># 629 "/usr/include/sys/cdefs.h" 3 4 >#define __SCCSID(s) struct __hack >#endif ># 631 "/usr/include/sys/cdefs.h" 3 4 >#endif ># 632 "/usr/include/sys/cdefs.h" 3 4 > >#ifndef __COPYRIGHT >#ifndef NO__COPYRIGHT >#define __COPYRIGHT(s) __IDSTRING(__CONCAT(__copyright_,__LINE__),s) >#else ># 637 "/usr/include/sys/cdefs.h" 3 4 >#define __COPYRIGHT(s) struct __hack >#endif ># 639 "/usr/include/sys/cdefs.h" 3 4 >#endif ># 640 "/usr/include/sys/cdefs.h" 3 4 > >#ifndef __DECONST >#define __DECONST(type, var) ((type)(__uintptr_t)(const void *)(var)) >#endif ># 644 "/usr/include/sys/cdefs.h" 3 4 > >#ifndef __DEVOLATILE >#define __DEVOLATILE(type, var) ((type)(__uintptr_t)(volatile void *)(var)) >#endif ># 648 "/usr/include/sys/cdefs.h" 3 4 > >#ifndef __DEQUALIFY >#define __DEQUALIFY(type, var) ((type)(__uintptr_t)(const volatile void *)(var)) >#endif ># 652 "/usr/include/sys/cdefs.h" 3 4 > >/*- > * The following definitions are an extension of the behavior originally > * implemented in <sys/_posix.h>, but with a different level of granularity. > * POSIX.1 requires that the macros we test be defined before any standard > * header file is included. > * > * Here's a quick run-down of the versions: > * defined(_POSIX_SOURCE) 1003.1-1988 > * _POSIX_C_SOURCE == 1 1003.1-1990 > * _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option > * _POSIX_C_SOURCE == 199309 1003.1b-1993 > * _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, > * and the omnibus ISO/IEC 9945-1: 1996 > * _POSIX_C_SOURCE == 200112 1003.1-2001 > * _POSIX_C_SOURCE == 200809 1003.1-2008 > * > * In addition, the X/Open Portability Guide, which is now the Single UNIX > * Specification, defines a feature-test macro which indicates the version of > * that specification, and which subsumes _POSIX_C_SOURCE. > * > * Our macros begin with two underscores to avoid namespace screwage. > */ > >/* Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. */ >#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE == 1 >#undef _POSIX_C_SOURCE /* Probably illegal, but beyond caring now. */ >#define _POSIX_C_SOURCE 199009 >#endif ># 681 "/usr/include/sys/cdefs.h" 3 4 > >/* Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. */ >#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE == 2 >#undef _POSIX_C_SOURCE >#define _POSIX_C_SOURCE 199209 >#endif ># 687 "/usr/include/sys/cdefs.h" 3 4 > >/* Deal with various X/Open Portability Guides and Single UNIX Spec. */ >#ifdef _XOPEN_SOURCE >#if _XOPEN_SOURCE - 0 >= 700 >#define __XSI_VISIBLE 700 >#undef _POSIX_C_SOURCE >#define _POSIX_C_SOURCE 200809 >#elif _XOPEN_SOURCE - 0 >= 600 ># 695 "/usr/include/sys/cdefs.h" 3 4 >#define __XSI_VISIBLE 600 >#undef _POSIX_C_SOURCE >#define _POSIX_C_SOURCE 200112 >#elif _XOPEN_SOURCE - 0 >= 500 ># 699 "/usr/include/sys/cdefs.h" 3 4 >#define __XSI_VISIBLE 500 >#undef _POSIX_C_SOURCE >#define _POSIX_C_SOURCE 199506 >#endif ># 703 "/usr/include/sys/cdefs.h" 3 4 >#endif ># 704 "/usr/include/sys/cdefs.h" 3 4 > >/* > * Deal with all versions of POSIX. The ordering relative to the tests above is > * important. > */ >#if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) >#define _POSIX_C_SOURCE 198808 >#endif ># 712 "/usr/include/sys/cdefs.h" 3 4 >#ifdef _POSIX_C_SOURCE >#if _POSIX_C_SOURCE >= 200809 >#define __POSIX_VISIBLE 200809 >#define __ISO_C_VISIBLE 1999 >#elif _POSIX_C_SOURCE >= 200112 ># 717 "/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 200112 >#define __ISO_C_VISIBLE 1999 >#elif _POSIX_C_SOURCE >= 199506 ># 720 "/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 199506 >#define __ISO_C_VISIBLE 1990 >#elif _POSIX_C_SOURCE >= 199309 ># 723 "/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 199309 >#define __ISO_C_VISIBLE 1990 >#elif _POSIX_C_SOURCE >= 199209 ># 726 "/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 199209 >#define __ISO_C_VISIBLE 1990 >#elif _POSIX_C_SOURCE >= 199009 ># 729 "/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 199009 >#define __ISO_C_VISIBLE 1990 >#else ># 732 "/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 198808 >#define __ISO_C_VISIBLE 0 >#endif /* _POSIX_C_SOURCE */ ># 735 "/usr/include/sys/cdefs.h" 3 4 >#else ># 736 "/usr/include/sys/cdefs.h" 3 4 >/*- > * Deal with _ANSI_SOURCE: > * If it is defined, and no other compilation environment is explicitly > * requested, then define our internal feature-test macros to zero. This > * makes no difference to the preprocessor (undefined symbols in preprocessing > * expressions are defined to have value zero), but makes it more convenient for > * a test program to print out the values. > * > * If a program mistakenly defines _ANSI_SOURCE and some other macro such as > * _POSIX_C_SOURCE, we will assume that it wants the broader compilation > * environment (and in fact we will never get here). > */ >#if defined(_ANSI_SOURCE) /* Hide almost everything. */ >#define __POSIX_VISIBLE 0 >#define __XSI_VISIBLE 0 >#define __BSD_VISIBLE 0 >#define __ISO_C_VISIBLE 1990 >#define __EXT1_VISIBLE 0 >#elif defined(_C99_SOURCE) /* Localism to specify strict C99 env. */ ># 755 "/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 0 >#define __XSI_VISIBLE 0 >#define __BSD_VISIBLE 0 >#define __ISO_C_VISIBLE 1999 >#define __EXT1_VISIBLE 0 >#elif defined(_C11_SOURCE) /* Localism to specify strict C11 env. */ ># 761 "/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 0 >#define __XSI_VISIBLE 0 >#define __BSD_VISIBLE 0 >#define __ISO_C_VISIBLE 2011 >#define __EXT1_VISIBLE 0 >#else /* Default environment: show everything. */ ># 767 "/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 200809 >#define __XSI_VISIBLE 700 >#define __BSD_VISIBLE 1 >#define __ISO_C_VISIBLE 2011 >#define __EXT1_VISIBLE 1 >#endif ># 773 "/usr/include/sys/cdefs.h" 3 4 >#endif ># 774 "/usr/include/sys/cdefs.h" 3 4 > >/* User override __EXT1_VISIBLE */ >#if defined(__STDC_WANT_LIB_EXT1__) >#undef __EXT1_VISIBLE >#if __STDC_WANT_LIB_EXT1__ >#define __EXT1_VISIBLE 1 >#else ># 781 "/usr/include/sys/cdefs.h" 3 4 >#define __EXT1_VISIBLE 0 >#endif ># 783 "/usr/include/sys/cdefs.h" 3 4 >#endif /* __STDC_WANT_LIB_EXT1__ */ ># 784 "/usr/include/sys/cdefs.h" 3 4 > >#if defined(__mips) || defined(__powerpc64__) || defined(__riscv__) >#define __NO_TLS 1 >#endif ># 788 "/usr/include/sys/cdefs.h" 3 4 > >/* > * Old versions of GCC use non-standard ARM arch symbols; acle-compat.h > * translates them to __ARM_ARCH and the modern feature symbols defined by ARM. > */ >#if defined(__arm__) && !defined(__ARM_ARCH) >#if 0 /* expanded by -frewrite-includes */ >#include <machine/acle-compat.h> >#endif /* expanded by -frewrite-includes */ ># 794 "/usr/include/sys/cdefs.h" 3 4 ># 795 "/usr/include/sys/cdefs.h" 3 4 >#endif ># 796 "/usr/include/sys/cdefs.h" 3 4 > >/* > * Nullability qualifiers: currently only supported by Clang. > */ >#if !(defined(__clang__) && __has_feature(nullability)) >#define _Nonnull >#define _Nullable >#define _Null_unspecified >#define __NULLABILITY_PRAGMA_PUSH >#define __NULLABILITY_PRAGMA_POP >#else ># 807 "/usr/include/sys/cdefs.h" 3 4 >#define __NULLABILITY_PRAGMA_PUSH _Pragma("clang diagnostic push") \ > _Pragma("clang diagnostic ignored \"-Wnullability-completeness\"") >#define __NULLABILITY_PRAGMA_POP _Pragma("clang diagnostic pop") >#endif ># 811 "/usr/include/sys/cdefs.h" 3 4 > >/* > * Type Safety Checking > * > * Clang provides additional attributes to enable checking type safety > * properties that cannot be enforced by the C type system. > */ > >#if __has_attribute(__argument_with_type_tag__) && \ > __has_attribute(__type_tag_for_datatype__) && !defined(lint) >#define __arg_type_tag(arg_kind, arg_idx, type_tag_idx) \ > __attribute__((__argument_with_type_tag__(arg_kind, arg_idx, type_tag_idx))) >#define __datatype_type_tag(kind, type) \ > __attribute__((__type_tag_for_datatype__(kind, type))) >#else ># 826 "/usr/include/sys/cdefs.h" 3 4 >#define __arg_type_tag(arg_kind, arg_idx, type_tag_idx) >#define __datatype_type_tag(kind, type) >#endif ># 829 "/usr/include/sys/cdefs.h" 3 4 > >/* > * Lock annotations. > * > * Clang provides support for doing basic thread-safety tests at > * compile-time, by marking which locks will/should be held when > * entering/leaving a functions. > * > * Furthermore, it is also possible to annotate variables and structure > * members to enforce that they are only accessed when certain locks are > * held. > */ > >#if __has_extension(c_thread_safety_attributes) >#define __lock_annotate(x) __attribute__((x)) >#else ># 845 "/usr/include/sys/cdefs.h" 3 4 >#define __lock_annotate(x) >#endif ># 847 "/usr/include/sys/cdefs.h" 3 4 > >/* Structure implements a lock. */ >#define __lockable __lock_annotate(lockable) > >/* Function acquires an exclusive or shared lock. */ >#define __locks_exclusive(...) \ > __lock_annotate(exclusive_lock_function(__VA_ARGS__)) >#define __locks_shared(...) \ > __lock_annotate(shared_lock_function(__VA_ARGS__)) > >/* Function attempts to acquire an exclusive or shared lock. */ >#define __trylocks_exclusive(...) \ > __lock_annotate(exclusive_trylock_function(__VA_ARGS__)) >#define __trylocks_shared(...) \ > __lock_annotate(shared_trylock_function(__VA_ARGS__)) > >/* Function releases a lock. */ >#define __unlocks(...) __lock_annotate(unlock_function(__VA_ARGS__)) > >/* Function asserts that an exclusive or shared lock is held. */ >#define __asserts_exclusive(...) \ > __lock_annotate(assert_exclusive_lock(__VA_ARGS__)) >#define __asserts_shared(...) \ > __lock_annotate(assert_shared_lock(__VA_ARGS__)) > >/* Function requires that an exclusive or shared lock is or is not held. */ >#define __requires_exclusive(...) \ > __lock_annotate(exclusive_locks_required(__VA_ARGS__)) >#define __requires_shared(...) \ > __lock_annotate(shared_locks_required(__VA_ARGS__)) >#define __requires_unlocked(...) \ > __lock_annotate(locks_excluded(__VA_ARGS__)) > >/* Function should not be analyzed. */ >#define __no_lock_analysis __lock_annotate(no_thread_safety_analysis) > >/* Guard variables and structure members by lock. */ >#define __guarded_by(x) __lock_annotate(guarded_by(x)) >#define __pt_guarded_by(x) __lock_annotate(pt_guarded_by(x)) > >#endif /* !_SYS_CDEFS_H_ */ ># 888 "/usr/include/sys/cdefs.h" 3 4 ># 39 "/usr/include/assert.h" 2 3 4 > >/* > * Unlike other ANSI header files, <assert.h> may usefully be included > * multiple times, with and without NDEBUG defined. > */ > >#undef assert >#undef _assert > >#ifdef NDEBUG >#define assert(e) ((void)0) >#define _assert(e) ((void)0) >#else ># 52 "/usr/include/assert.h" 3 4 >#define _assert(e) assert(e) > >#define assert(e) ((e) ? (void)0 : __assert(__func__, __FILE__, \ > __LINE__, #e)) >#endif /* NDEBUG */ ># 57 "/usr/include/assert.h" 3 4 > >#ifndef _ASSERT_H_ >#define _ASSERT_H_ > >/* > * Static assertions. In principle we could define static_assert for > * C++ older than C++11, but this breaks if _Static_assert is > * implemented as a macro. > * > * C++ template parameters may contain commas, even if not enclosed in > * parentheses, causing the _Static_assert macro to be invoked with more > * than two parameters. > */ >#if __ISO_C_VISIBLE >= 2011 && !defined(__cplusplus) >#define static_assert _Static_assert >#endif ># 73 "/usr/include/assert.h" 3 4 > >__BEGIN_DECLS >void __assert(const char *, const char *, int, const char *) __dead2; >__END_DECLS > >#endif /* !_ASSERT_H_ */ ># 79 "/usr/include/assert.h" 3 4 ># 1233 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" 2 > #define asASSERT(x) assert(x) >#endif ># 1235 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > > >// >// Internal defines (do not change these) >//---------------------------------------------------------------- > >#define ARG_W(b) ((asWORD*)&b) >#define ARG_DW(b) ((asDWORD*)&b) >#define ARG_QW(b) ((asQWORD*)&b) >#define ARG_PTR(b) ((asPWORD*)&b) >#define BCARG_W(b) ((asWORD*)&(b)[1]) >#define BCARG_DW(b) ((asDWORD*)&(b)[1]) >#define BCARG_QW(b) ((asQWORD*)&(b)[1]) >#define BCARG_PTR(b) ((asPWORD*)&(b)[1]) > >// This macro is used to avoid warnings about unused variables. >// Usually where the variables are only used in debug mode. >#define UNUSED_VAR(x) (void)(x) > >#if 0 /* expanded by -frewrite-includes */ >#include "../include/angelscript.h" >#endif /* expanded by -frewrite-includes */ ># 1255 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" ># 1 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" 1 >/* > AngelCode Scripting Library > Copyright (c) 2003-2016 Andreas Jonsson > > This software is provided 'as-is', without any express or implied > warranty. In no event will the authors be held liable for any > damages arising from the use of this software. > > Permission is granted to anyone to use this software for any > purpose, including commercial applications, and to alter it and > redistribute it freely, subject to the following restrictions: > > 1. The origin of this software must not be misrepresented; you > must not claim that you wrote the original software. If you use > this software in a product, an acknowledgment in the product > documentation would be appreciated but is not required. > > 2. Altered source versions must be plainly marked as such, and > must not be misrepresented as being the original software. > > 3. This notice may not be removed or altered from any source > distribution. > > The original version of this library can be located at: > http://www.angelcode.com/angelscript/ > > Andreas Jonsson > andreas@angelcode.com >*/ > > >// >// angelscript.h >// >// The script engine interface >// > > >#ifndef ANGELSCRIPT_H >#define ANGELSCRIPT_H > >#if 0 /* expanded by -frewrite-includes */ >#include <stddef.h> >#endif /* expanded by -frewrite-includes */ ># 42 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" ># 1 "/usr/include/c++/v1/stddef.h" 1 3 >// -*- C++ -*- >//===--------------------------- stddef.h ---------------------------------===// >// >// The LLVM Compiler Infrastructure >// >// This file is dual licensed under the MIT and the University of Illinois Open >// Source Licenses. See LICENSE.TXT for details. >// >//===----------------------------------------------------------------------===// > >#if defined(__need_ptrdiff_t) || defined(__need_size_t) || \ > defined(__need_wchar_t) || defined(__need_NULL) || defined(__need_wint_t) > >#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) >#if 0 /* expanded by -frewrite-includes */ >#pragma GCC system_header >#endif /* expanded by -frewrite-includes */ ># 16 "/usr/include/c++/v1/stddef.h" 3 >#endif ># 17 "/usr/include/c++/v1/stddef.h" 3 > >#if 0 /* expanded by -frewrite-includes */ >#include_next <stddef.h> >#endif /* expanded by -frewrite-includes */ ># 18 "/usr/include/c++/v1/stddef.h" 3 ># 19 "/usr/include/c++/v1/stddef.h" 3 > >#elif !defined(_LIBCPP_STDDEF_H) ># 21 "/usr/include/c++/v1/stddef.h" 3 >#define _LIBCPP_STDDEF_H > >/* > stddef.h synopsis > >Macros: > > offsetof(type,member-designator) > NULL > >Types: > > ptrdiff_t > size_t > max_align_t > nullptr_t > >*/ > >#if 0 /* expanded by -frewrite-includes */ >#include <__config> >#endif /* expanded by -frewrite-includes */ ># 40 "/usr/include/c++/v1/stddef.h" 3 ># 1 "/usr/include/c++/v1/__config" 1 3 >// -*- C++ -*- >//===--------------------------- __config ---------------------------------===// >// >// The LLVM Compiler Infrastructure >// >// This file is dual licensed under the MIT and the University of Illinois Open >// Source Licenses. See LICENSE.TXT for details. >// >//===----------------------------------------------------------------------===// > >#ifndef _LIBCPP_CONFIG >#define _LIBCPP_CONFIG > >#if defined(_MSC_VER) && !defined(__clang__) >#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) >#define _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER >#endif ># 18 "/usr/include/c++/v1/__config" 3 >#endif ># 19 "/usr/include/c++/v1/__config" 3 > >#ifndef _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER >#if 0 /* expanded by -frewrite-includes */ >#pragma GCC system_header >#endif /* expanded by -frewrite-includes */ ># 22 "/usr/include/c++/v1/__config" 3 >#endif ># 23 "/usr/include/c++/v1/__config" 3 > >#ifdef __cplusplus > >#ifdef __GNUC__ >#define _GNUC_VER (__GNUC__ * 100 + __GNUC_MINOR__) >// The _GNUC_VER_NEW macro better represents the new GCC versioning scheme >// introduced in GCC 5.0. >#define _GNUC_VER_NEW (_GNUC_VER * 10 + __GNUC_PATCHLEVEL__) >#else ># 32 "/usr/include/c++/v1/__config" 3 >#define _GNUC_VER 0 >#define _GNUC_VER_NEW 0 >#endif ># 35 "/usr/include/c++/v1/__config" 3 > >#define _LIBCPP_VERSION 5000 > >#ifndef _LIBCPP_ABI_VERSION >#define _LIBCPP_ABI_VERSION 1 >#endif ># 41 "/usr/include/c++/v1/__config" 3 > >#if defined(__ELF__) >#define _LIBCPP_OBJECT_FORMAT_ELF 1 >#elif defined(__MACH__) ># 45 "/usr/include/c++/v1/__config" 3 >#define _LIBCPP_OBJECT_FORMAT_MACHO 1 >#elif defined(_WIN32) ># 47 "/usr/include/c++/v1/__config" 3 >#define _LIBCPP_OBJECT_FORMAT_COFF 1 >#else ># 49 "/usr/include/c++/v1/__config" 3 >#error Unknown object file format >#endif ># 51 "/usr/include/c++/v1/__config" 3 > >#if defined(_LIBCPP_ABI_UNSTABLE) || _LIBCPP_ABI_VERSION >= 2 >// Change short string representation so that string data starts at offset 0, >// improving its alignment in some cases. >#define _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT >// Fix deque iterator type in order to support incomplete types. >#define _LIBCPP_ABI_INCOMPLETE_TYPES_IN_DEQUE >// Fix undefined behavior in how std::list stores it's linked nodes. >#define _LIBCPP_ABI_LIST_REMOVE_NODE_POINTER_UB >// Fix undefined behavior in how __tree stores its end and parent nodes. >#define _LIBCPP_ABI_TREE_REMOVE_NODE_POINTER_UB >// Fix undefined behavior in how __hash_table stores it's pointer types >#define _LIBCPP_ABI_FIX_UNORDERED_NODE_POINTER_UB >#define _LIBCPP_ABI_FORWARD_LIST_REMOVE_NODE_POINTER_UB >#define _LIBCPP_ABI_FIX_UNORDERED_CONTAINER_SIZE_TYPE >// Don't use a nullptr_t simulation type in C++03 instead using C++11 nullptr >// provided under the alternate keyword __nullptr, which changes the mangling >// of nullptr_t. This option is ABI incompatible with GCC in C++03 mode. >#define _LIBCPP_ABI_ALWAYS_USE_CXX11_NULLPTR >// Define the `pointer_safety` enum as a C++11 strongly typed enumeration >// instead of as a class simulating an enum. If this option is enabled >// `pointer_safety` and `get_pointer_safety()` will no longer be available >// in C++03. >#define _LIBCPP_ABI_POINTER_SAFETY_ENUM_TYPE >// Define a key function for `bad_function_call` in the library, to centralize >// its vtable and typeinfo to libc++ rather than having all other libraries >// using that class define their own copies. >#define _LIBCPP_ABI_BAD_FUNCTION_CALL_KEY_FUNCTION > >// Enable optimized version of __do_get_(un)signed which avoids redundant copies. >#define _LIBCPP_ABI_OPTIMIZED_LOCALE_NUM_GET >#elif _LIBCPP_ABI_VERSION == 1 ># 83 "/usr/include/c++/v1/__config" 3 >#if !defined(_LIBCPP_OBJECT_FORMAT_COFF) >// Enable compiling copies of now inline methods into the dylib to support >// applications compiled against older libraries. This is unnecessary with >// COFF dllexport semantics, since dllexport forces a non-inline definition >// of inline functions to be emitted anyway. Our own non-inline copy would >// conflict with the dllexport-emitted copy, so we disable it. >#define _LIBCPP_DEPRECATED_ABI_LEGACY_LIBRARY_DEFINITIONS_FOR_INLINE_FUNCTIONS >#endif ># 91 "/usr/include/c++/v1/__config" 3 >// Feature macros for disabling pre ABI v1 features. All of these options >// are deprecated. >#if defined(__FreeBSD__) >#define _LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR >#endif ># 96 "/usr/include/c++/v1/__config" 3 >#endif ># 97 "/usr/include/c++/v1/__config" 3 > >#ifdef _LIBCPP_TRIVIAL_PAIR_COPY_CTOR >#error "_LIBCPP_TRIVIAL_PAIR_COPY_CTOR" is no longer supported. \ > use _LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR instead >#endif ># 102 "/usr/include/c++/v1/__config" 3 > >#define _LIBCPP_CONCAT1(_LIBCPP_X,_LIBCPP_Y) _LIBCPP_X##_LIBCPP_Y >#define _LIBCPP_CONCAT(_LIBCPP_X,_LIBCPP_Y) _LIBCPP_CONCAT1(_LIBCPP_X,_LIBCPP_Y) > >#define _LIBCPP_NAMESPACE _LIBCPP_CONCAT(__,_LIBCPP_ABI_VERSION) > >#if __cplusplus < 201103L >#define _LIBCPP_CXX03_LANG >#endif ># 111 "/usr/include/c++/v1/__config" 3 > >#ifndef __has_attribute >#define __has_attribute(__x) 0 >#endif ># 115 "/usr/include/c++/v1/__config" 3 >#ifndef __has_builtin >#define __has_builtin(__x) 0 >#endif ># 118 "/usr/include/c++/v1/__config" 3 >#ifndef __has_extension >#define __has_extension(__x) 0 >#endif ># 121 "/usr/include/c++/v1/__config" 3 >#ifndef __has_feature >#define __has_feature(__x) 0 >#endif ># 124 "/usr/include/c++/v1/__config" 3 >// '__is_identifier' returns '0' if '__x' is a reserved identifier provided by >// the compiler and '1' otherwise. >#ifndef __is_identifier >#define __is_identifier(__x) 1 >#endif ># 129 "/usr/include/c++/v1/__config" 3 >#ifndef __has_declspec_attribute >#define __has_declspec_attribute(__x) 0 >#endif ># 132 "/usr/include/c++/v1/__config" 3 > >#define __has_keyword(__x) !(__is_identifier(__x)) > >#ifdef __has_include >#define __libcpp_has_include(__x) __has_include(__x) >#else ># 138 "/usr/include/c++/v1/__config" 3 >#define __libcpp_has_include(__x) 0 >#endif ># 140 "/usr/include/c++/v1/__config" 3 > >#if defined(__clang__) >#define _LIBCPP_COMPILER_CLANG ># ifndef __apple_build_version__ ># define _LIBCPP_CLANG_VER (__clang_major__ * 100 + __clang_minor__) ># endif ># 146 "/usr/include/c++/v1/__config" 3 >#elif defined(__GNUC__) ># 147 "/usr/include/c++/v1/__config" 3 >#define _LIBCPP_COMPILER_GCC >#elif defined(_MSC_VER) ># 149 "/usr/include/c++/v1/__config" 3 >#define _LIBCPP_COMPILER_MSVC >#elif defined(__IBMCPP__) ># 151 "/usr/include/c++/v1/__config" 3 >#define _LIBCPP_COMPILER_IBM >#endif ># 153 "/usr/include/c++/v1/__config" 3 > >#ifndef _LIBCPP_CLANG_VER >#define _LIBCPP_CLANG_VER 0 >#endif ># 157 "/usr/include/c++/v1/__config" 3 > >// FIXME: ABI detection should be done via compiler builtin macros. This >// is just a placeholder until Clang implements such macros. For now assume >// that Windows compilers pretending to be MSVC++ target the microsoft ABI. >#if defined(_WIN32) && defined(_MSC_VER) ># define _LIBCPP_ABI_MICROSOFT >#else ># 164 "/usr/include/c++/v1/__config" 3 ># define _LIBCPP_ABI_ITANIUM >#endif ># 166 "/usr/include/c++/v1/__config" 3 > >// Need to detect which libc we're using if we're on Linux. >#if defined(__linux__) >#if 0 /* expanded by -frewrite-includes */ >#include <features.h> >#endif /* expanded by -frewrite-includes */ ># 169 "/usr/include/c++/v1/__config" 3 ># 170 "/usr/include/c++/v1/__config" 3 >#if !defined(__GLIBC_PREREQ) >#define __GLIBC_PREREQ(a, b) 0 >#endif // !defined(__GLIBC_PREREQ) ># 173 "/usr/include/c++/v1/__config" 3 >#endif // defined(__linux__) ># 174 "/usr/include/c++/v1/__config" 3 > >#ifdef __LITTLE_ENDIAN__ >#if __LITTLE_ENDIAN__ >#define _LIBCPP_LITTLE_ENDIAN 1 >#define _LIBCPP_BIG_ENDIAN 0 >#endif // __LITTLE_ENDIAN__ ># 180 "/usr/include/c++/v1/__config" 3 >#endif // __LITTLE_ENDIAN__ ># 181 "/usr/include/c++/v1/__config" 3 > >#ifdef __BIG_ENDIAN__ >#if __BIG_ENDIAN__ >#define _LIBCPP_LITTLE_ENDIAN 0 >#define _LIBCPP_BIG_ENDIAN 1 >#endif // __BIG_ENDIAN__ ># 187 "/usr/include/c++/v1/__config" 3 >#endif // __BIG_ENDIAN__ ># 188 "/usr/include/c++/v1/__config" 3 > >#ifdef __BYTE_ORDER__ >#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ >#define _LIBCPP_LITTLE_ENDIAN 1 >#define _LIBCPP_BIG_ENDIAN 0 >#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ ># 194 "/usr/include/c++/v1/__config" 3 >#define _LIBCPP_LITTLE_ENDIAN 0 >#define _LIBCPP_BIG_ENDIAN 1 >#endif // __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ ># 197 "/usr/include/c++/v1/__config" 3 >#endif // __BYTE_ORDER__ ># 198 "/usr/include/c++/v1/__config" 3 > >#ifdef __FreeBSD__ >#if 0 /* expanded by -frewrite-includes */ ># include <sys/endian.h> >#endif /* expanded by -frewrite-includes */ ># 200 "/usr/include/c++/v1/__config" 3 ># 1 "/usr/include/sys/endian.h" 1 3 4 >/*- > * Copyright (c) 2002 Thomas Moestl <tmm@FreeBSD.org> > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: head/sys/sys/endian.h 208331 2010-05-20 06:16:13Z phk $ > */ > >#ifndef _SYS_ENDIAN_H_ >#define _SYS_ENDIAN_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 32 "/usr/include/sys/endian.h" 3 4 ># 33 "/usr/include/sys/endian.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 33 "/usr/include/sys/endian.h" 3 4 ># 1 "/usr/include/sys/_types.h" 1 3 4 >/*- > * Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: head/sys/sys/_types.h 318959 2017-05-26 16:29:55Z dim $ > */ > >#ifndef _SYS__TYPES_H_ >#define _SYS__TYPES_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 32 "/usr/include/sys/_types.h" 3 4 ># 33 "/usr/include/sys/_types.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <machine/_types.h> >#endif /* expanded by -frewrite-includes */ ># 33 "/usr/include/sys/_types.h" 3 4 ># 1 "/usr/include/machine/_types.h" 1 3 4 >/*- > * This file is in the public domain. > */ >/* $FreeBSD: head/sys/i386/include/_types.h 232261 2012-02-28 18:15:28Z tijl $ */ > >#if 0 /* expanded by -frewrite-includes */ >#include <x86/_types.h> >#endif /* expanded by -frewrite-includes */ ># 6 "/usr/include/machine/_types.h" 3 4 ># 1 "/usr/include/x86/_types.h" 1 3 4 >/*- > * Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> > * Copyright (c) 1990, 1993 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. All advertising materials mentioning features or use of this software > * must display the following acknowledgement: > * This product includes software developed by the University of > * California, Berkeley and its contributors. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 > * From: @(#)types.h 8.3 (Berkeley) 1/5/94 > * $FreeBSD: head/sys/x86/include/_types.h 313194 2017-02-04 12:26:38Z kib $ > */ > >#ifndef _MACHINE__TYPES_H_ >#define _MACHINE__TYPES_H_ > >#ifndef _SYS_CDEFS_H_ >#error this file needs sys/cdefs.h as a prerequisite >#endif ># 45 "/usr/include/x86/_types.h" 3 4 > >#if 0 /* expanded by -frewrite-includes */ >#include <machine/_limits.h> >#endif /* expanded by -frewrite-includes */ ># 46 "/usr/include/x86/_types.h" 3 4 ># 1 "/usr/include/machine/_limits.h" 1 3 4 >/*- > * This file is in the public domain. > */ >/* $FreeBSD: head/sys/i386/include/_limits.h 232262 2012-02-28 18:24:28Z tijl $ */ > >#if 0 /* expanded by -frewrite-includes */ >#include <x86/_limits.h> >#endif /* expanded by -frewrite-includes */ ># 6 "/usr/include/machine/_limits.h" 3 4 ># 1 "/usr/include/x86/_limits.h" 1 3 4 >/*- > * Copyright (c) 1988, 1993 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)limits.h 8.3 (Berkeley) 1/4/94 > * $FreeBSD: head/sys/x86/include/_limits.h 314436 2017-02-28 23:42:47Z imp $ > */ > >#ifndef _MACHINE__LIMITS_H_ >#define _MACHINE__LIMITS_H_ > >/* > * According to ANSI (section 2.2.4.2), the values below must be usable by > * #if preprocessing directives. Additionally, the expression must have the > * same type as would an expression that is an object of the corresponding > * type converted according to the integral promotions. The subtraction for > * INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an > * unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). > */ > >#define __CHAR_BIT 8 /* number of bits in a char */ > >#define __SCHAR_MAX 0x7f /* max value for a signed char */ >#define __SCHAR_MIN (-0x7f - 1) /* min value for a signed char */ > >#define __UCHAR_MAX 0xff /* max value for an unsigned char */ > >#define __USHRT_MAX 0xffff /* max value for an unsigned short */ >#define __SHRT_MAX 0x7fff /* max value for a short */ >#define __SHRT_MIN (-0x7fff - 1) /* min value for a short */ > >#define __UINT_MAX 0xffffffff /* max value for an unsigned int */ >#define __INT_MAX 0x7fffffff /* max value for an int */ >#define __INT_MIN (-0x7fffffff - 1) /* min value for an int */ > >#ifdef __LP64__ >#define __ULONG_MAX 0xffffffffffffffff /* max for an unsigned long */ >#define __LONG_MAX 0x7fffffffffffffff /* max for a long */ >#define __LONG_MIN (-0x7fffffffffffffff - 1) /* min for a long */ >#else ># 65 "/usr/include/x86/_limits.h" 3 4 >#define __ULONG_MAX 0xffffffffUL >#define __LONG_MAX 0x7fffffffL >#define __LONG_MIN (-0x7fffffffL - 1) >#endif ># 69 "/usr/include/x86/_limits.h" 3 4 > > /* max value for an unsigned long long */ >#define __ULLONG_MAX 0xffffffffffffffffULL >#define __LLONG_MAX 0x7fffffffffffffffLL /* max value for a long long */ >#define __LLONG_MIN (-0x7fffffffffffffffLL - 1) /* min for a long long */ > >#ifdef __LP64__ >#define __SSIZE_MAX __LONG_MAX /* max value for a ssize_t */ >#define __SIZE_T_MAX __ULONG_MAX /* max value for a size_t */ >#define __OFF_MAX __LONG_MAX /* max value for an off_t */ >#define __OFF_MIN __LONG_MIN /* min value for an off_t */ >/* Quads and longs are the same on the amd64. Ensure they stay in sync. */ >#define __UQUAD_MAX __ULONG_MAX /* max value for a uquad_t */ >#define __QUAD_MAX __LONG_MAX /* max value for a quad_t */ >#define __QUAD_MIN __LONG_MIN /* min value for a quad_t */ >#define __LONG_BIT 64 >#else ># 86 "/usr/include/x86/_limits.h" 3 4 >#define __SSIZE_MAX __INT_MAX >#define __SIZE_T_MAX __UINT_MAX >#define __OFF_MAX __LLONG_MAX >#define __OFF_MIN __LLONG_MIN >#define __UQUAD_MAX __ULLONG_MAX >#define __QUAD_MAX __LLONG_MAX >#define __QUAD_MIN __LLONG_MIN >#define __LONG_BIT 32 >#endif ># 95 "/usr/include/x86/_limits.h" 3 4 > >#define __WORD_BIT 32 > >/* Minimum signal stack size. */ >#define __MINSIGSTKSZ (512 * 4) > >#endif /* !_MACHINE__LIMITS_H_ */ ># 102 "/usr/include/x86/_limits.h" 3 4 ># 7 "/usr/include/machine/_limits.h" 2 3 4 ># 47 "/usr/include/x86/_types.h" 2 3 4 > >#define __NO_STRICT_ALIGNMENT > >/* > * Basic types upon which most other types are built. > */ >typedef signed char __int8_t; >typedef unsigned char __uint8_t; >typedef short __int16_t; >typedef unsigned short __uint16_t; >typedef int __int32_t; >typedef unsigned int __uint32_t; >#ifdef __LP64__ >typedef long __int64_t; >typedef unsigned long __uint64_t; >#else ># 63 "/usr/include/x86/_types.h" 3 4 >#ifndef lint >__extension__ >#endif ># 66 "/usr/include/x86/_types.h" 3 4 >/* LONGLONG */ >typedef long long __int64_t; >#ifndef lint >__extension__ >#endif ># 71 "/usr/include/x86/_types.h" 3 4 >/* LONGLONG */ >typedef unsigned long long __uint64_t; >#endif ># 74 "/usr/include/x86/_types.h" 3 4 > >/* > * Standard type definitions. > */ >#ifdef __LP64__ >typedef __int32_t __clock_t; /* clock()... */ >typedef __int64_t __critical_t; >typedef double __double_t; >typedef float __float_t; >typedef __int64_t __intfptr_t; >typedef __int64_t __intptr_t; >#else ># 86 "/usr/include/x86/_types.h" 3 4 >typedef unsigned long __clock_t; >typedef __int32_t __critical_t; >typedef long double __double_t; >typedef long double __float_t; >typedef __int32_t __intfptr_t; >typedef __int32_t __intptr_t; >#endif ># 93 "/usr/include/x86/_types.h" 3 4 >typedef __int64_t __intmax_t; >typedef __int32_t __int_fast8_t; >typedef __int32_t __int_fast16_t; >typedef __int32_t __int_fast32_t; >typedef __int64_t __int_fast64_t; >typedef __int8_t __int_least8_t; >typedef __int16_t __int_least16_t; >typedef __int32_t __int_least32_t; >typedef __int64_t __int_least64_t; >#ifdef __LP64__ >typedef __int64_t __ptrdiff_t; /* ptr1 - ptr2 */ >typedef __int64_t __register_t; >typedef __int64_t __segsz_t; /* segment size (in pages) */ >typedef __uint64_t __size_t; /* sizeof() */ >typedef __int64_t __ssize_t; /* byte count or error */ >typedef __int64_t __time_t; /* time()... */ >typedef __uint64_t __uintfptr_t; >typedef __uint64_t __uintptr_t; >#else ># 112 "/usr/include/x86/_types.h" 3 4 >typedef __int32_t __ptrdiff_t; >typedef __int32_t __register_t; >typedef __int32_t __segsz_t; >typedef __uint32_t __size_t; >typedef __int32_t __ssize_t; >typedef __int32_t __time_t; >typedef __uint32_t __uintfptr_t; >typedef __uint32_t __uintptr_t; >#endif ># 121 "/usr/include/x86/_types.h" 3 4 >typedef __uint64_t __uintmax_t; >typedef __uint32_t __uint_fast8_t; >typedef __uint32_t __uint_fast16_t; >typedef __uint32_t __uint_fast32_t; >typedef __uint64_t __uint_fast64_t; >typedef __uint8_t __uint_least8_t; >typedef __uint16_t __uint_least16_t; >typedef __uint32_t __uint_least32_t; >typedef __uint64_t __uint_least64_t; >#ifdef __LP64__ >typedef __uint64_t __u_register_t; >typedef __uint64_t __vm_offset_t; >typedef __uint64_t __vm_paddr_t; >typedef __uint64_t __vm_size_t; >#else ># 136 "/usr/include/x86/_types.h" 3 4 >typedef __uint32_t __u_register_t; >typedef __uint32_t __vm_offset_t; >#ifdef PAE >typedef __uint64_t __vm_paddr_t; >#else ># 141 "/usr/include/x86/_types.h" 3 4 >typedef __uint32_t __vm_paddr_t; >#endif ># 143 "/usr/include/x86/_types.h" 3 4 >typedef __uint32_t __vm_size_t; >#endif ># 145 "/usr/include/x86/_types.h" 3 4 >typedef int ___wchar_t; > >#define __WCHAR_MIN __INT_MIN /* min value for a wchar_t */ >#define __WCHAR_MAX __INT_MAX /* max value for a wchar_t */ > >/* > * Unusual type definitions. > */ >#ifdef __GNUCLIKE_BUILTIN_VARARGS >typedef __builtin_va_list __va_list; /* internally known to gcc */ >#else ># 156 "/usr/include/x86/_types.h" 3 4 >#ifdef __LP64__ >struct __s_va_list { > __uint32_t _pad1[2]; /* gp_offset, fp_offset */ > __uint64_t _pad2[2]; /* overflow_arg_area, reg_save_area */ >}; >typedef struct __s_va_list __va_list; >#else ># 163 "/usr/include/x86/_types.h" 3 4 >typedef char * __va_list; >#endif ># 165 "/usr/include/x86/_types.h" 3 4 >#endif ># 166 "/usr/include/x86/_types.h" 3 4 >#if defined(__GNUC_VA_LIST_COMPATIBILITY) && !defined(__GNUC_VA_LIST) \ > && !defined(__NO_GNUC_VA_LIST) >#define __GNUC_VA_LIST >typedef __va_list __gnuc_va_list; /* compatibility w/GNU headers*/ >#endif ># 171 "/usr/include/x86/_types.h" 3 4 > >#endif /* !_MACHINE__TYPES_H_ */ ># 173 "/usr/include/x86/_types.h" 3 4 ># 7 "/usr/include/machine/_types.h" 2 3 4 ># 34 "/usr/include/sys/_types.h" 2 3 4 > >/* > * Standard type definitions. > */ >typedef __int32_t __blksize_t; /* file block size */ >typedef __int64_t __blkcnt_t; /* file block count */ >typedef __int32_t __clockid_t; /* clock_gettime()... */ >typedef __uint32_t __fflags_t; /* file flags */ >typedef __uint64_t __fsblkcnt_t; >typedef __uint64_t __fsfilcnt_t; >typedef __uint32_t __gid_t; >typedef __int64_t __id_t; /* can hold a gid_t, pid_t, or uid_t */ >typedef __uint64_t __ino_t; /* inode number */ >typedef long __key_t; /* IPC key (for Sys V IPC) */ >typedef __int32_t __lwpid_t; /* Thread ID (a.k.a. LWP) */ >typedef __uint16_t __mode_t; /* permissions */ >typedef int __accmode_t; /* access permissions */ >typedef int __nl_item; >typedef __uint64_t __nlink_t; /* link count */ >typedef __int64_t __off_t; /* file offset */ >typedef __int64_t __off64_t; /* file offset (alias) */ >typedef __int32_t __pid_t; /* process [group] */ >typedef __int64_t __rlim_t; /* resource limit - intentionally */ > /* signed, because of legacy code */ > /* that uses -1 for RLIM_INFINITY */ >typedef __uint8_t __sa_family_t; >typedef __uint32_t __socklen_t; >typedef long __suseconds_t; /* microseconds (signed) */ >typedef struct __timer *__timer_t; /* timer_gettime()... */ >typedef struct __mq *__mqd_t; /* mq_open()... */ >typedef __uint32_t __uid_t; >typedef unsigned int __useconds_t; /* microseconds (unsigned) */ >typedef int __cpuwhich_t; /* which parameter for cpuset. */ >typedef int __cpulevel_t; /* level parameter for cpuset. */ >typedef int __cpusetid_t; /* cpuset identifier. */ > >/* > * Unusual type definitions. > */ >/* > * rune_t is declared to be an ``int'' instead of the more natural > * ``unsigned long'' or ``long''. Two things are happening here. It is not > * unsigned so that EOF (-1) can be naturally assigned to it and used. Also, > * it looks like 10646 will be a 31 bit standard. This means that if your > * ints cannot hold 32 bits, you will be in trouble. The reason an int was > * chosen over a long is that the is*() and to*() routines take ints (says > * ANSI C), but they use __ct_rune_t instead of int. > * > * NOTE: rune_t is not covered by ANSI nor other standards, and should not > * be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and > * rune_t must be the same type. Also, wint_t should be able to hold all > * members of the largest character set plus one extra value (WEOF), and > * must be at least 16 bits. > */ >typedef int __ct_rune_t; /* arg type for ctype funcs */ >typedef __ct_rune_t __rune_t; /* rune_t (see above) */ >typedef __ct_rune_t __wint_t; /* wint_t (see above) */ > >/* Clang already provides these types as built-ins, but only in C++ mode. */ >#if !defined(__clang__) || !defined(__cplusplus) >typedef __uint_least16_t __char16_t; >typedef __uint_least32_t __char32_t; >#endif ># 97 "/usr/include/sys/_types.h" 3 4 >/* In C++11, char16_t and char32_t are built-in types. */ >#if defined(__cplusplus) && __cplusplus >= 201103L >#define _CHAR16_T_DECLARED >#define _CHAR32_T_DECLARED >#endif ># 102 "/usr/include/sys/_types.h" 3 4 > >typedef struct { > long long __max_align1 __aligned(_Alignof(long long)); > long double __max_align2 __aligned(_Alignof(long double)); >} __max_align_t; > >typedef __uint64_t __dev_t; /* device number */ > >typedef __uint32_t __fixpt_t; /* fixed point number */ > >/* > * mbstate_t is an opaque object to keep conversion state during multibyte > * stream conversions. > */ >typedef union { > char __mbstate8[128]; > __int64_t _mbstateL; /* for alignment */ >} __mbstate_t; > >typedef __uintmax_t __rman_res_t; > >/* > * When the following macro is defined, the system uses 64-bit inode numbers. > * Programs can use this to avoid including <sys/param.h>, with its associated > * namespace pollution. > */ >#define __INO64 > >#endif /* !_SYS__TYPES_H_ */ ># 131 "/usr/include/sys/_types.h" 3 4 ># 34 "/usr/include/sys/endian.h" 2 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <machine/endian.h> >#endif /* expanded by -frewrite-includes */ ># 34 "/usr/include/sys/endian.h" 3 4 ># 1 "/usr/include/machine/endian.h" 1 3 4 >/*- > * This file is in the public domain. > */ >/* $FreeBSD: head/sys/i386/include/endian.h 232266 2012-02-28 19:39:54Z tijl $ */ > >#if 0 /* expanded by -frewrite-includes */ >#include <x86/endian.h> >#endif /* expanded by -frewrite-includes */ ># 6 "/usr/include/machine/endian.h" 3 4 ># 1 "/usr/include/x86/endian.h" 1 3 4 >/*- > * Copyright (c) 1987, 1991 Regents of the University of California. > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)endian.h 7.8 (Berkeley) 4/3/91 > * $FreeBSD: head/sys/x86/include/endian.h 314436 2017-02-28 23:42:47Z imp $ > */ > >#ifndef _MACHINE_ENDIAN_H_ >#define _MACHINE_ENDIAN_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 36 "/usr/include/x86/endian.h" 3 4 ># 37 "/usr/include/x86/endian.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 37 "/usr/include/x86/endian.h" 3 4 ># 38 "/usr/include/x86/endian.h" 3 4 > >/* > * Define the order of 32-bit words in 64-bit words. > */ >#define _QUAD_HIGHWORD 1 >#define _QUAD_LOWWORD 0 > >/* > * Definitions for byte order, according to byte significance from low > * address to high. > */ >#define _LITTLE_ENDIAN 1234 /* LSB first: i386, vax */ >#define _BIG_ENDIAN 4321 /* MSB first: 68000, ibm, net */ >#define _PDP_ENDIAN 3412 /* LSB first in word, MSW first in long */ > >#define _BYTE_ORDER _LITTLE_ENDIAN > >/* > * Deprecated variants that don't have enough underscores to be useful in more > * strict namespaces. > */ >#if __BSD_VISIBLE >#define LITTLE_ENDIAN _LITTLE_ENDIAN >#define BIG_ENDIAN _BIG_ENDIAN >#define PDP_ENDIAN _PDP_ENDIAN >#define BYTE_ORDER _BYTE_ORDER >#endif ># 65 "/usr/include/x86/endian.h" 3 4 > >#define __bswap16_gen(x) (__uint16_t)((x) << 8 | (x) >> 8) >#define __bswap32_gen(x) \ > (((__uint32_t)__bswap16((x) & 0xffff) << 16) | __bswap16((x) >> 16)) >#define __bswap64_gen(x) \ > (((__uint64_t)__bswap32((x) & 0xffffffff) << 32) | __bswap32((x) >> 32)) > >#ifdef __GNUCLIKE_BUILTIN_CONSTANT_P >#define __bswap16(x) \ > ((__uint16_t)(__builtin_constant_p(x) ? \ > __bswap16_gen((__uint16_t)(x)) : __bswap16_var(x))) >#define __bswap32(x) \ > (__builtin_constant_p(x) ? \ > __bswap32_gen((__uint32_t)(x)) : __bswap32_var(x)) >#define __bswap64(x) \ > (__builtin_constant_p(x) ? \ > __bswap64_gen((__uint64_t)(x)) : __bswap64_var(x)) >#else ># 83 "/usr/include/x86/endian.h" 3 4 >/* XXX these are broken for use in static initializers. */ >#define __bswap16(x) __bswap16_var(x) >#define __bswap32(x) __bswap32_var(x) >#define __bswap64(x) __bswap64_var(x) >#endif ># 88 "/usr/include/x86/endian.h" 3 4 > >/* These are defined as functions to avoid multiple evaluation of x. */ > >static __inline __uint16_t >__bswap16_var(__uint16_t _x) >{ > > return (__bswap16_gen(_x)); >} > >static __inline __uint32_t >__bswap32_var(__uint32_t _x) >{ > >#ifdef __GNUCLIKE_ASM > __asm("bswap %0" : "+r" (_x)); > return (_x); >#else ># 106 "/usr/include/x86/endian.h" 3 4 > return (__bswap32_gen(_x)); >#endif ># 108 "/usr/include/x86/endian.h" 3 4 >} > >static __inline __uint64_t >__bswap64_var(__uint64_t _x) >{ > >#if defined(__amd64__) && defined(__GNUCLIKE_ASM) > __asm("bswap %0" : "+r" (_x)); > return (_x); >#else ># 118 "/usr/include/x86/endian.h" 3 4 > /* > * It is important for the optimizations that the following is not > * really generic, but expands to 2 __bswap32_var()'s. > */ > return (__bswap64_gen(_x)); >#endif ># 124 "/usr/include/x86/endian.h" 3 4 >} > >#define __htonl(x) __bswap32(x) >#define __htons(x) __bswap16(x) >#define __ntohl(x) __bswap32(x) >#define __ntohs(x) __bswap16(x) > >#endif /* !_MACHINE_ENDIAN_H_ */ ># 132 "/usr/include/x86/endian.h" 3 4 ># 7 "/usr/include/machine/endian.h" 2 3 4 ># 35 "/usr/include/sys/endian.h" 2 3 4 > >#ifndef _UINT8_T_DECLARED >typedef __uint8_t uint8_t; >#define _UINT8_T_DECLARED >#endif ># 40 "/usr/include/sys/endian.h" 3 4 > >#ifndef _UINT16_T_DECLARED >typedef __uint16_t uint16_t; >#define _UINT16_T_DECLARED >#endif ># 45 "/usr/include/sys/endian.h" 3 4 > >#ifndef _UINT32_T_DECLARED >typedef __uint32_t uint32_t; >#define _UINT32_T_DECLARED >#endif ># 50 "/usr/include/sys/endian.h" 3 4 > >#ifndef _UINT64_T_DECLARED >typedef __uint64_t uint64_t; >#define _UINT64_T_DECLARED >#endif ># 55 "/usr/include/sys/endian.h" 3 4 > >/* > * General byte order swapping functions. > */ >#define bswap16(x) __bswap16(x) >#define bswap32(x) __bswap32(x) >#define bswap64(x) __bswap64(x) > >/* > * Host to big endian, host to little endian, big endian to host, and little > * endian to host byte order functions as detailed in byteorder(9). > */ >#if _BYTE_ORDER == _LITTLE_ENDIAN >#define htobe16(x) bswap16((x)) >#define htobe32(x) bswap32((x)) >#define htobe64(x) bswap64((x)) >#define htole16(x) ((uint16_t)(x)) >#define htole32(x) ((uint32_t)(x)) >#define htole64(x) ((uint64_t)(x)) > >#define be16toh(x) bswap16((x)) >#define be32toh(x) bswap32((x)) >#define be64toh(x) bswap64((x)) >#define le16toh(x) ((uint16_t)(x)) >#define le32toh(x) ((uint32_t)(x)) >#define le64toh(x) ((uint64_t)(x)) >#else /* _BYTE_ORDER != _LITTLE_ENDIAN */ ># 82 "/usr/include/sys/endian.h" 3 4 >#define htobe16(x) ((uint16_t)(x)) >#define htobe32(x) ((uint32_t)(x)) >#define htobe64(x) ((uint64_t)(x)) >#define htole16(x) bswap16((x)) >#define htole32(x) bswap32((x)) >#define htole64(x) bswap64((x)) > >#define be16toh(x) ((uint16_t)(x)) >#define be32toh(x) ((uint32_t)(x)) >#define be64toh(x) ((uint64_t)(x)) >#define le16toh(x) bswap16((x)) >#define le32toh(x) bswap32((x)) >#define le64toh(x) bswap64((x)) >#endif /* _BYTE_ORDER == _LITTLE_ENDIAN */ ># 96 "/usr/include/sys/endian.h" 3 4 > >/* Alignment-agnostic encode/decode bytestream to/from little/big endian. */ > >static __inline uint16_t >be16dec(const void *pp) >{ > uint8_t const *p = (uint8_t const *)pp; > > return ((p[0] << 8) | p[1]); >} > >static __inline uint32_t >be32dec(const void *pp) >{ > uint8_t const *p = (uint8_t const *)pp; > > return (((unsigned)p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3]); >} > >static __inline uint64_t >be64dec(const void *pp) >{ > uint8_t const *p = (uint8_t const *)pp; > > return (((uint64_t)be32dec(p) << 32) | be32dec(p + 4)); >} > >static __inline uint16_t >le16dec(const void *pp) >{ > uint8_t const *p = (uint8_t const *)pp; > > return ((p[1] << 8) | p[0]); >} > >static __inline uint32_t >le32dec(const void *pp) >{ > uint8_t const *p = (uint8_t const *)pp; > > return (((unsigned)p[3] << 24) | (p[2] << 16) | (p[1] << 8) | p[0]); >} > >static __inline uint64_t >le64dec(const void *pp) >{ > uint8_t const *p = (uint8_t const *)pp; > > return (((uint64_t)le32dec(p + 4) << 32) | le32dec(p)); >} > >static __inline void >be16enc(void *pp, uint16_t u) >{ > uint8_t *p = (uint8_t *)pp; > > p[0] = (u >> 8) & 0xff; > p[1] = u & 0xff; >} > >static __inline void >be32enc(void *pp, uint32_t u) >{ > uint8_t *p = (uint8_t *)pp; > > p[0] = (u >> 24) & 0xff; > p[1] = (u >> 16) & 0xff; > p[2] = (u >> 8) & 0xff; > p[3] = u & 0xff; >} > >static __inline void >be64enc(void *pp, uint64_t u) >{ > uint8_t *p = (uint8_t *)pp; > > be32enc(p, (uint32_t)(u >> 32)); > be32enc(p + 4, (uint32_t)(u & 0xffffffffU)); >} > >static __inline void >le16enc(void *pp, uint16_t u) >{ > uint8_t *p = (uint8_t *)pp; > > p[0] = u & 0xff; > p[1] = (u >> 8) & 0xff; >} > >static __inline void >le32enc(void *pp, uint32_t u) >{ > uint8_t *p = (uint8_t *)pp; > > p[0] = u & 0xff; > p[1] = (u >> 8) & 0xff; > p[2] = (u >> 16) & 0xff; > p[3] = (u >> 24) & 0xff; >} > >static __inline void >le64enc(void *pp, uint64_t u) >{ > uint8_t *p = (uint8_t *)pp; > > le32enc(p, (uint32_t)(u & 0xffffffffU)); > le32enc(p + 4, (uint32_t)(u >> 32)); >} > >#endif /* _SYS_ENDIAN_H_ */ ># 206 "/usr/include/sys/endian.h" 3 4 ># 201 "/usr/include/c++/v1/__config" 2 3 ># if _BYTE_ORDER == _LITTLE_ENDIAN ># define _LIBCPP_LITTLE_ENDIAN 1 ># define _LIBCPP_BIG_ENDIAN 0 ># else // _BYTE_ORDER == _LITTLE_ENDIAN ># 205 "/usr/include/c++/v1/__config" 3 ># define _LIBCPP_LITTLE_ENDIAN 0 ># define _LIBCPP_BIG_ENDIAN 1 ># endif // _BYTE_ORDER == _LITTLE_ENDIAN ># 208 "/usr/include/c++/v1/__config" 3 ># ifndef __LONG_LONG_SUPPORTED ># define _LIBCPP_HAS_NO_LONG_LONG ># endif // __LONG_LONG_SUPPORTED ># 211 "/usr/include/c++/v1/__config" 3 >#endif // __FreeBSD__ ># 212 "/usr/include/c++/v1/__config" 3 > >#ifdef __NetBSD__ >#if 0 /* expanded by -frewrite-includes */ ># include <sys/endian.h> >#endif /* expanded by -frewrite-includes */ ># 214 "/usr/include/c++/v1/__config" 3 ># 215 "/usr/include/c++/v1/__config" 3 ># if _BYTE_ORDER == _LITTLE_ENDIAN ># define _LIBCPP_LITTLE_ENDIAN 1 ># define _LIBCPP_BIG_ENDIAN 0 ># else // _BYTE_ORDER == _LITTLE_ENDIAN ># 219 "/usr/include/c++/v1/__config" 3 ># define _LIBCPP_LITTLE_ENDIAN 0 ># define _LIBCPP_BIG_ENDIAN 1 ># endif // _BYTE_ORDER == _LITTLE_ENDIAN ># 222 "/usr/include/c++/v1/__config" 3 ># define _LIBCPP_HAS_QUICK_EXIT >#endif // __NetBSD__ ># 224 "/usr/include/c++/v1/__config" 3 > >#if defined(_WIN32) ># define _LIBCPP_WIN32API ># define _LIBCPP_LITTLE_ENDIAN 1 ># define _LIBCPP_BIG_ENDIAN 0 ># define _LIBCPP_SHORT_WCHAR 1 >// Both MinGW and native MSVC provide a "MSVC"-like enviroment ># define _LIBCPP_MSVCRT_LIKE >// If mingw not explicitly detected, assume using MS C runtime only if >// a MS compatibility version is specified. ># if defined(_MSC_VER) && !defined(__MINGW32__) ># define _LIBCPP_MSVCRT // Using Microsoft's C Runtime library ># endif ># 237 "/usr/include/c++/v1/__config" 3 ># if (defined(_M_AMD64) || defined(__x86_64__)) || (defined(_M_ARM) || defined(__arm__)) ># define _LIBCPP_HAS_BITSCAN64 ># endif ># 240 "/usr/include/c++/v1/__config" 3 ># if defined(_LIBCPP_MSVCRT) ># define _LIBCPP_HAS_QUICK_EXIT ># endif ># 243 "/usr/include/c++/v1/__config" 3 > >// Some CRT APIs are unavailable to store apps >#if defined(WINAPI_FAMILY) >#if 0 /* expanded by -frewrite-includes */ >#include <winapifamily.h> >#endif /* expanded by -frewrite-includes */ ># 246 "/usr/include/c++/v1/__config" 3 ># 247 "/usr/include/c++/v1/__config" 3 >#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && \ > (!defined(WINAPI_PARTITION_SYSTEM) || \ > !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_SYSTEM)) >#define _LIBCPP_WINDOWS_STORE_APP >#endif ># 252 "/usr/include/c++/v1/__config" 3 >#endif ># 253 "/usr/include/c++/v1/__config" 3 >#endif // defined(_WIN32) ># 254 "/usr/include/c++/v1/__config" 3 > >#ifdef __sun__ >#if 0 /* expanded by -frewrite-includes */ ># include <sys/isa_defs.h> >#endif /* expanded by -frewrite-includes */ ># 256 "/usr/include/c++/v1/__config" 3 ># 257 "/usr/include/c++/v1/__config" 3 ># ifdef _LITTLE_ENDIAN ># define _LIBCPP_LITTLE_ENDIAN 1 ># define _LIBCPP_BIG_ENDIAN 0 ># else ># 261 "/usr/include/c++/v1/__config" 3 ># define _LIBCPP_LITTLE_ENDIAN 0 ># define _LIBCPP_BIG_ENDIAN 1 ># endif ># 264 "/usr/include/c++/v1/__config" 3 >#endif // __sun__ ># 265 "/usr/include/c++/v1/__config" 3 > >#if defined(__CloudABI__) > // Certain architectures provide arc4random(). Prefer using > // arc4random() over /dev/{u,}random to make it possible to obtain > // random data even when using sandboxing mechanisms such as chroots, > // Capsicum, etc. ># define _LIBCPP_USING_ARC4_RANDOM >#elif defined(__native_client__) ># 273 "/usr/include/c++/v1/__config" 3 > // NaCl's sandbox (which PNaCl also runs in) doesn't allow filesystem access, > // including accesses to the special files under /dev. C++11's > // std::random_device is instead exposed through a NaCl syscall. ># define _LIBCPP_USING_NACL_RANDOM >#elif defined(_LIBCPP_WIN32API) ># 278 "/usr/include/c++/v1/__config" 3 ># define _LIBCPP_USING_WIN32_RANDOM >#else ># 280 "/usr/include/c++/v1/__config" 3 ># define _LIBCPP_USING_DEV_RANDOM >#endif ># 282 "/usr/include/c++/v1/__config" 3 > >#if !defined(_LIBCPP_LITTLE_ENDIAN) || !defined(_LIBCPP_BIG_ENDIAN) >#if 0 /* expanded by -frewrite-includes */ ># include <endian.h> >#endif /* expanded by -frewrite-includes */ ># 284 "/usr/include/c++/v1/__config" 3 ># 285 "/usr/include/c++/v1/__config" 3 ># if __BYTE_ORDER == __LITTLE_ENDIAN ># define _LIBCPP_LITTLE_ENDIAN 1 ># define _LIBCPP_BIG_ENDIAN 0 ># elif __BYTE_ORDER == __BIG_ENDIAN ># 289 "/usr/include/c++/v1/__config" 3 ># define _LIBCPP_LITTLE_ENDIAN 0 ># define _LIBCPP_BIG_ENDIAN 1 ># else // __BYTE_ORDER == __BIG_ENDIAN ># 292 "/usr/include/c++/v1/__config" 3 ># error unable to determine endian ># endif ># 294 "/usr/include/c++/v1/__config" 3 >#endif // !defined(_LIBCPP_LITTLE_ENDIAN) || !defined(_LIBCPP_BIG_ENDIAN) ># 295 "/usr/include/c++/v1/__config" 3 > >#if __has_attribute(__no_sanitize__) && !defined(_LIBCPP_COMPILER_GCC) >#define _LIBCPP_NO_CFI __attribute__((__no_sanitize__("cfi"))) >#else ># 299 "/usr/include/c++/v1/__config" 3 >#define _LIBCPP_NO_CFI >#endif ># 301 "/usr/include/c++/v1/__config" 3 > >#if defined(_LIBCPP_COMPILER_CLANG) > >// _LIBCPP_ALTERNATE_STRING_LAYOUT is an old name for >// _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT left here for backward compatibility. >#if (defined(__APPLE__) && !defined(__i386__) && !defined(__x86_64__) && \ > (!defined(__arm__) || __ARM_ARCH_7K__ >= 2)) || \ > defined(_LIBCPP_ALTERNATE_STRING_LAYOUT) >#define _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT >#endif ># 311 "/usr/include/c++/v1/__config" 3 > >#if __has_feature(cxx_alignas) ># define _ALIGNAS_TYPE(x) alignas(x) ># define _ALIGNAS(x) alignas(x) >#else ># 316 "/usr/include/c++/v1/__config" 3 ># define _ALIGNAS_TYPE(x) __attribute__((__aligned__(__alignof(x)))) ># define _ALIGNAS(x) __attribute__((__aligned__(x))) >#endif ># 319 "/usr/include/c++/v1/__config" 3 > >#if __cplusplus < 201103L >typedef __char16_t char16_t; >typedef __char32_t char32_t; >#endif ># 324 "/usr/include/c++/v1/__config" 3 > >#if !(__has_feature(cxx_exceptions)) && !defined(_LIBCPP_NO_EXCEPTIONS) >#define _LIBCPP_NO_EXCEPTIONS >#endif ># 328 "/usr/include/c++/v1/__config" 3 > >#if !(__has_feature(cxx_rtti)) && !defined(_LIBCPP_NO_RTTI) >#define _LIBCPP_NO_RTTI >#endif ># 332 "/usr/include/c++/v1/__config" 3 > >#if !(__has_feature(cxx_strong_enums)) >#define _LIBCPP_HAS_NO_STRONG_ENUMS >#endif ># 336 "/usr/include/c++/v1/__config" 3 > >#if !(__has_feature(cxx_decltype)) >#define _LIBCPP_HAS_NO_DECLTYPE >#endif ># 340 "/usr/include/c++/v1/__config" 3 > >#if __has_feature(cxx_attributes) ># define _LIBCPP_NORETURN [[noreturn]] >#else ># 344 "/usr/include/c++/v1/__config" 3 ># define _LIBCPP_NORETURN __attribute__ ((noreturn)) >#endif ># 346 "/usr/include/c++/v1/__config" 3 > >#if !(__has_feature(cxx_lambdas)) >#define _LIBCPP_HAS_NO_LAMBDAS >#endif ># 350 "/usr/include/c++/v1/__config" 3 > >#if !(__has_feature(cxx_nullptr)) ># if (__has_extension(cxx_nullptr) || __has_keyword(__nullptr)) && defined(_LIBCPP_ABI_ALWAYS_USE_CXX11_NULLPTR) ># define nullptr __nullptr ># else ># 355 "/usr/include/c++/v1/__config" 3 ># define _LIBCPP_HAS_NO_NULLPTR ># endif ># 357 "/usr/include/c++/v1/__config" 3 >#endif ># 358 "/usr/include/c++/v1/__config" 3 > >#if !(__has_feature(cxx_rvalue_references)) >#define _LIBCPP_HAS_NO_RVALUE_REFERENCES >#endif ># 362 "/usr/include/c++/v1/__config" 3 > >#if !(__has_feature(cxx_auto_type)) >#define _LIBCPP_HAS_NO_AUTO_TYPE >#endif ># 366 "/usr/include/c++/v1/__config" 3 > >#if !(__has_feature(cxx_variadic_templates)) >#define _LIBCPP_HAS_NO_VARIADICS >#endif ># 370 "/usr/include/c++/v1/__config" 3 > >#if !(__has_feature(cxx_generalized_initializers)) >#define _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS >#endif ># 374 "/usr/include/c++/v1/__config" 3 > >#if __has_feature(is_base_of) ># define _LIBCPP_HAS_IS_BASE_OF >#endif ># 378 "/usr/include/c++/v1/__config" 3 > >#if __has_feature(is_final) ># define _LIBCPP_HAS_IS_FINAL >#endif ># 382 "/usr/include/c++/v1/__config" 3 > >// Objective-C++ features (opt-in) >#if __has_feature(objc_arc) >#define _LIBCPP_HAS_OBJC_ARC >#endif ># 387 "/usr/include/c++/v1/__config" 3 > >#if __has_feature(objc_arc_weak) >#define _LIBCPP_HAS_OBJC_ARC_WEAK >#endif ># 391 "/usr/include/c++/v1/__config" 3 > >#if !(__has_feature(cxx_constexpr)) >#define _LIBCPP_HAS_NO_CONSTEXPR >#endif ># 395 "/usr/include/c++/v1/__config" 3 > >#if !(__has_feature(cxx_relaxed_constexpr)) >#define _LIBCPP_HAS_NO_CXX14_CONSTEXPR >#endif ># 399 "/usr/include/c++/v1/__config" 3 > >#if !(__has_feature(cxx_variable_templates)) >#define _LIBCPP_HAS_NO_VARIABLE_TEMPLATES >#endif ># 403 "/usr/include/c++/v1/__config" 3 > >#if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L >#if defined(__FreeBSD__) >#define _LIBCPP_HAS_QUICK_EXIT >#define _LIBCPP_HAS_C11_FEATURES >#elif defined(__Fuchsia__) ># 409 "/usr/include/c++/v1/__config" 3 >#define _LIBCPP_HAS_QUICK_EXIT >#define _LIBCPP_HAS_C11_FEATURES >#elif defined(__linux__) ># 412 "/usr/include/c++/v1/__config" 3 >#if !defined(_LIBCPP_HAS_MUSL_LIBC) >#if __GLIBC_PREREQ(2, 15) || defined(__BIONIC__) >#define _LIBCPP_HAS_QUICK_EXIT >#endif ># 416 "/usr/include/c++/v1/__config" 3 >#if __GLIBC_PREREQ(2, 17) >#define _LIBCPP_HAS_C11_FEATURES >#endif ># 419 "/usr/include/c++/v1/__config" 3 >#else // defined(_LIBCPP_HAS_MUSL_LIBC) ># 420 "/usr/include/c++/v1/__config" 3 >#define _LIBCPP_HAS_QUICK_EXIT >#define _LIBCPP_HAS_C11_FEATURES >#endif ># 423 "/usr/include/c++/v1/__config" 3 >#endif // __linux__ ># 424 "/usr/include/c++/v1/__config" 3 >#endif ># 425 "/usr/include/c++/v1/__config" 3 > >#if !(__has_feature(cxx_noexcept)) >#define _LIBCPP_HAS_NO_NOEXCEPT >#endif ># 429 "/usr/include/c++/v1/__config" 3 > >#if __has_feature(underlying_type) ># define _LIBCPP_UNDERLYING_TYPE(T) __underlying_type(T) >#endif ># 433 "/usr/include/c++/v1/__config" 3 > >#if __has_feature(is_literal) ># define _LIBCPP_IS_LITERAL(T) __is_literal(T) >#endif ># 437 "/usr/include/c++/v1/__config" 3 > >// Inline namespaces are available in Clang regardless of C++ dialect. >#define _LIBCPP_BEGIN_NAMESPACE_STD namespace std {inline namespace _LIBCPP_NAMESPACE { >#define _LIBCPP_END_NAMESPACE_STD } } >#define _VSTD std::_LIBCPP_NAMESPACE > >namespace std { > inline namespace _LIBCPP_NAMESPACE { > } >} > >#if !defined(_LIBCPP_HAS_NO_ASAN) && !__has_feature(address_sanitizer) >#define _LIBCPP_HAS_NO_ASAN >#endif ># 451 "/usr/include/c++/v1/__config" 3 > >// Allow for build-time disabling of unsigned integer sanitization >#if !defined(_LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK) && __has_attribute(no_sanitize) >#define _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK __attribute__((__no_sanitize__("unsigned-integer-overflow"))) >#endif ># 456 "/usr/include/c++/v1/__config" 3 > >#elif defined(_LIBCPP_COMPILER_GCC) ># 458 "/usr/include/c++/v1/__config" 3 > >#define _ALIGNAS(x) __attribute__((__aligned__(x))) >#define _ALIGNAS_TYPE(x) __attribute__((__aligned__(__alignof(x)))) > >#define _LIBCPP_NORETURN __attribute__((noreturn)) > >#if _GNUC_VER >= 407 >#define _LIBCPP_UNDERLYING_TYPE(T) __underlying_type(T) >#define _LIBCPP_IS_LITERAL(T) __is_literal_type(T) >#define _LIBCPP_HAS_IS_FINAL >#endif ># 469 "/usr/include/c++/v1/__config" 3 > >#if defined(__GNUC__) && _GNUC_VER >= 403 ># define _LIBCPP_HAS_IS_BASE_OF >#endif ># 473 "/usr/include/c++/v1/__config" 3 > >#if !__EXCEPTIONS >#define _LIBCPP_NO_EXCEPTIONS >#endif ># 477 "/usr/include/c++/v1/__config" 3 > >// constexpr was added to GCC in 4.6. >#if _GNUC_VER < 406 >#define _LIBCPP_HAS_NO_CONSTEXPR >// Can only use constexpr in c++11 mode. >#elif !defined(__GXX_EXPERIMENTAL_CXX0X__) && __cplusplus < 201103L ># 483 "/usr/include/c++/v1/__config" 3 >#define _LIBCPP_HAS_NO_CONSTEXPR >#endif ># 485 "/usr/include/c++/v1/__config" 3 > >// Determine if GCC supports relaxed constexpr >#if !defined(__cpp_constexpr) || __cpp_constexpr < 201304L >#define _LIBCPP_HAS_NO_CXX14_CONSTEXPR >#endif ># 490 "/usr/include/c++/v1/__config" 3 > >// GCC 5 will support variable templates >#if !defined(__cpp_variable_templates) || __cpp_variable_templates < 201304L >#define _LIBCPP_HAS_NO_VARIABLE_TEMPLATES >#endif ># 495 "/usr/include/c++/v1/__config" 3 > >#ifndef __GXX_EXPERIMENTAL_CXX0X__ >#define _LIBCPP_HAS_NO_DECLTYPE >#define _LIBCPP_HAS_NO_NULLPTR >#define _LIBCPP_HAS_NO_UNICODE_CHARS >#define _LIBCPP_HAS_NO_VARIADICS >#define _LIBCPP_HAS_NO_RVALUE_REFERENCES >#define _LIBCPP_HAS_NO_STRONG_ENUMS >#define _LIBCPP_HAS_NO_NOEXCEPT > >#else // __GXX_EXPERIMENTAL_CXX0X__ ># 506 "/usr/include/c++/v1/__config" 3 > >#if _GNUC_VER < 403 >#define _LIBCPP_HAS_NO_RVALUE_REFERENCES >#endif ># 510 "/usr/include/c++/v1/__config" 3 > > >#if _GNUC_VER < 404 >#define _LIBCPP_HAS_NO_DECLTYPE >#define _LIBCPP_HAS_NO_UNICODE_CHARS >#define _LIBCPP_HAS_NO_VARIADICS >#define _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS >#endif // _GNUC_VER < 404 ># 518 "/usr/include/c++/v1/__config" 3 > >#if _GNUC_VER < 406 >#define _LIBCPP_HAS_NO_NOEXCEPT >#define _LIBCPP_HAS_NO_NULLPTR >#endif ># 523 "/usr/include/c++/v1/__config" 3 > >#endif // __GXX_EXPERIMENTAL_CXX0X__ ># 525 "/usr/include/c++/v1/__config" 3 > >#define _LIBCPP_BEGIN_NAMESPACE_STD namespace std { inline namespace _LIBCPP_NAMESPACE { >#define _LIBCPP_END_NAMESPACE_STD } } >#define _VSTD std::_LIBCPP_NAMESPACE > >namespace std { > inline namespace _LIBCPP_NAMESPACE { > } >} > >#if !defined(_LIBCPP_HAS_NO_ASAN) && !defined(__SANITIZE_ADDRESS__) >#define _LIBCPP_HAS_NO_ASAN >#endif ># 538 "/usr/include/c++/v1/__config" 3 > >#elif defined(_LIBCPP_COMPILER_MSVC) ># 540 "/usr/include/c++/v1/__config" 3 > >#define _LIBCPP_TOSTRING2(x) #x >#define _LIBCPP_TOSTRING(x) _LIBCPP_TOSTRING2(x) >#define _LIBCPP_WARNING(x) __pragma(message(__FILE__ "(" _LIBCPP_TOSTRING(__LINE__) ") : warning note: " x)) > >#if _MSC_VER < 1900 >#error "MSVC versions prior to Visual Studio 2015 are not supported" >#endif ># 548 "/usr/include/c++/v1/__config" 3 > >#define _LIBCPP_HAS_IS_BASE_OF >#define _LIBCPP_HAS_NO_CONSTEXPR >#define _LIBCPP_HAS_NO_CXX14_CONSTEXPR >#define _LIBCPP_HAS_NO_VARIABLE_TEMPLATES >#if _MSC_VER <= 1800 >#define _LIBCPP_HAS_NO_UNICODE_CHARS >#endif ># 556 "/usr/include/c++/v1/__config" 3 >#define _LIBCPP_HAS_NO_NOEXCEPT >#define __alignof__ __alignof >#define _LIBCPP_NORETURN __declspec(noreturn) >#define _ALIGNAS(x) __declspec(align(x)) >#define _LIBCPP_HAS_NO_VARIADICS > >#define _LIBCPP_BEGIN_NAMESPACE_STD namespace std { >#define _LIBCPP_END_NAMESPACE_STD } >#define _VSTD std > ># define _LIBCPP_WEAK >namespace std { >} > >#define _LIBCPP_HAS_NO_ASAN > >#elif defined(_LIBCPP_COMPILER_IBM) ># 573 "/usr/include/c++/v1/__config" 3 > >#define _ALIGNAS(x) __attribute__((__aligned__(x))) >#define _ALIGNAS_TYPE(x) __attribute__((__aligned__(__alignof(x)))) >#define _ATTRIBUTE(x) __attribute__((x)) >#define _LIBCPP_NORETURN __attribute__((noreturn)) > >#define _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS >#define _LIBCPP_HAS_NO_NOEXCEPT >#define _LIBCPP_HAS_NO_NULLPTR >#define _LIBCPP_HAS_NO_UNICODE_CHARS >#define _LIBCPP_HAS_IS_BASE_OF >#define _LIBCPP_HAS_IS_FINAL >#define _LIBCPP_HAS_NO_VARIABLE_TEMPLATES > >#if defined(_AIX) >#define __MULTILOCALE_API >#endif ># 590 "/usr/include/c++/v1/__config" 3 > >#define _LIBCPP_BEGIN_NAMESPACE_STD namespace std {inline namespace _LIBCPP_NAMESPACE { >#define _LIBCPP_END_NAMESPACE_STD } } >#define _VSTD std::_LIBCPP_NAMESPACE > >namespace std { > inline namespace _LIBCPP_NAMESPACE { > } >} > >#define _LIBCPP_HAS_NO_ASAN > >#endif // _LIBCPP_COMPILER_[CLANG|GCC|MSVC|IBM] ># 603 "/usr/include/c++/v1/__config" 3 > >#if defined(_LIBCPP_OBJECT_FORMAT_COFF) >#if defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS) ># define _LIBCPP_DLL_VIS ># define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS ># define _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS ># define _LIBCPP_OVERRIDABLE_FUNC_VIS >#elif defined(_LIBCPP_BUILDING_LIBRARY) ># 611 "/usr/include/c++/v1/__config" 3 ># define _LIBCPP_DLL_VIS __declspec(dllexport) ># define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS ># define _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS _LIBCPP_DLL_VIS ># define _LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_DLL_VIS >#else ># 616 "/usr/include/c++/v1/__config" 3 ># define _LIBCPP_DLL_VIS __declspec(dllimport) ># define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS _LIBCPP_DLL_VIS ># define _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS ># define _LIBCPP_OVERRIDABLE_FUNC_VIS >#endif ># 621 "/usr/include/c++/v1/__config" 3 > >#define _LIBCPP_TYPE_VIS _LIBCPP_DLL_VIS >#define _LIBCPP_FUNC_VIS _LIBCPP_DLL_VIS >#define _LIBCPP_EXTERN_VIS _LIBCPP_DLL_VIS >#define _LIBCPP_EXCEPTION_ABI _LIBCPP_DLL_VIS >#define _LIBCPP_HIDDEN >#define _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS >#define _LIBCPP_TEMPLATE_VIS >#define _LIBCPP_ENUM_VIS > >#if defined(_LIBCPP_COMPILER_MSVC) ># define _LIBCPP_INLINE_VISIBILITY __forceinline ># define _LIBCPP_ALWAYS_INLINE __forceinline ># define _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY __forceinline >#else ># 636 "/usr/include/c++/v1/__config" 3 ># define _LIBCPP_INLINE_VISIBILITY __attribute__ ((__always_inline__)) ># define _LIBCPP_ALWAYS_INLINE __attribute__ ((__always_inline__)) ># define _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY __attribute__ ((__always_inline__)) >#endif ># 640 "/usr/include/c++/v1/__config" 3 >#endif // defined(_LIBCPP_OBJECT_FORMAT_COFF) ># 641 "/usr/include/c++/v1/__config" 3 > >#ifndef _LIBCPP_HIDDEN >#if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS) >#define _LIBCPP_HIDDEN __attribute__ ((__visibility__("hidden"))) >#else ># 646 "/usr/include/c++/v1/__config" 3 >#define _LIBCPP_HIDDEN >#endif ># 648 "/usr/include/c++/v1/__config" 3 >#endif ># 649 "/usr/include/c++/v1/__config" 3 > >#ifndef _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS >#if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS) >// The inline should be removed once PR32114 is resolved >#define _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS inline _LIBCPP_HIDDEN >#else ># 655 "/usr/include/c++/v1/__config" 3 >#define _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS >#endif ># 657 "/usr/include/c++/v1/__config" 3 >#endif ># 658 "/usr/include/c++/v1/__config" 3 > >#ifndef _LIBCPP_FUNC_VIS >#if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS) >#define _LIBCPP_FUNC_VIS __attribute__ ((__visibility__("default"))) >#else ># 663 "/usr/include/c++/v1/__config" 3 >#define _LIBCPP_FUNC_VIS >#endif ># 665 "/usr/include/c++/v1/__config" 3 >#endif ># 666 "/usr/include/c++/v1/__config" 3 > >#ifndef _LIBCPP_TYPE_VIS ># if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS) ># define _LIBCPP_TYPE_VIS __attribute__ ((__visibility__("default"))) ># else ># 671 "/usr/include/c++/v1/__config" 3 ># define _LIBCPP_TYPE_VIS ># endif ># 673 "/usr/include/c++/v1/__config" 3 >#endif ># 674 "/usr/include/c++/v1/__config" 3 > >#ifndef _LIBCPP_TEMPLATE_VIS ># if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS) ># if __has_attribute(__type_visibility__) ># define _LIBCPP_TEMPLATE_VIS __attribute__ ((__type_visibility__("default"))) ># else ># 680 "/usr/include/c++/v1/__config" 3 ># define _LIBCPP_TEMPLATE_VIS __attribute__ ((__visibility__("default"))) ># endif ># 682 "/usr/include/c++/v1/__config" 3 ># else ># 683 "/usr/include/c++/v1/__config" 3 ># define _LIBCPP_TEMPLATE_VIS ># endif ># 685 "/usr/include/c++/v1/__config" 3 >#endif ># 686 "/usr/include/c++/v1/__config" 3 > >#ifndef _LIBCPP_EXTERN_VIS ># define _LIBCPP_EXTERN_VIS >#endif ># 690 "/usr/include/c++/v1/__config" 3 > >#ifndef _LIBCPP_OVERRIDABLE_FUNC_VIS ># define _LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_FUNC_VIS >#endif ># 694 "/usr/include/c++/v1/__config" 3 > >#ifndef _LIBCPP_EXCEPTION_ABI >#if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS) >#define _LIBCPP_EXCEPTION_ABI __attribute__ ((__visibility__("default"))) >#else ># 699 "/usr/include/c++/v1/__config" 3 >#define _LIBCPP_EXCEPTION_ABI >#endif ># 701 "/usr/include/c++/v1/__config" 3 >#endif ># 702 "/usr/include/c++/v1/__config" 3 > >#ifndef _LIBCPP_ENUM_VIS ># if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS) && __has_attribute(__type_visibility__) ># define _LIBCPP_ENUM_VIS __attribute__ ((__type_visibility__("default"))) ># else ># 707 "/usr/include/c++/v1/__config" 3 ># define _LIBCPP_ENUM_VIS ># endif ># 709 "/usr/include/c++/v1/__config" 3 >#endif ># 710 "/usr/include/c++/v1/__config" 3 > >#ifndef _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS ># if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS) && __has_attribute(__type_visibility__) ># define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __attribute__ ((__visibility__("default"))) ># else ># 715 "/usr/include/c++/v1/__config" 3 ># define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS ># endif ># 717 "/usr/include/c++/v1/__config" 3 >#endif ># 718 "/usr/include/c++/v1/__config" 3 > >#ifndef _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS ># define _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS >#endif ># 722 "/usr/include/c++/v1/__config" 3 > >#ifndef _LIBCPP_INLINE_VISIBILITY >#if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS) >#define _LIBCPP_INLINE_VISIBILITY __attribute__ ((__visibility__("hidden"), __always_inline__)) >#else ># 727 "/usr/include/c++/v1/__config" 3 >#define _LIBCPP_INLINE_VISIBILITY __attribute__ ((__always_inline__)) >#endif ># 729 "/usr/include/c++/v1/__config" 3 >#endif ># 730 "/usr/include/c++/v1/__config" 3 > >#ifndef _LIBCPP_ALWAYS_INLINE >#if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS) >#define _LIBCPP_ALWAYS_INLINE __attribute__ ((__visibility__("hidden"), __always_inline__)) >#else ># 735 "/usr/include/c++/v1/__config" 3 >#define _LIBCPP_ALWAYS_INLINE __attribute__ ((__always_inline__)) >#endif ># 737 "/usr/include/c++/v1/__config" 3 >#endif ># 738 "/usr/include/c++/v1/__config" 3 > >#ifndef _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY ># if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS) ># define _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY __attribute__((__visibility__("default"), __always_inline__)) ># else ># 743 "/usr/include/c++/v1/__config" 3 ># define _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY __attribute__((__always_inline__)) ># endif ># 745 "/usr/include/c++/v1/__config" 3 >#endif ># 746 "/usr/include/c++/v1/__config" 3 > >#ifndef _LIBCPP_PREFERRED_OVERLOAD ># if __has_attribute(__enable_if__) ># define _LIBCPP_PREFERRED_OVERLOAD __attribute__ ((__enable_if__(true, ""))) ># endif ># 751 "/usr/include/c++/v1/__config" 3 >#endif ># 752 "/usr/include/c++/v1/__config" 3 > >#ifndef _LIBCPP_HAS_NO_NOEXCEPT ># define _NOEXCEPT noexcept ># define _NOEXCEPT_(x) noexcept(x) >#else ># 757 "/usr/include/c++/v1/__config" 3 ># define _NOEXCEPT throw() ># define _NOEXCEPT_(x) >#endif ># 760 "/usr/include/c++/v1/__config" 3 > >#if defined(_LIBCPP_DEBUG_USE_EXCEPTIONS) ># if !defined(_LIBCPP_DEBUG) ># error cannot use _LIBCPP_DEBUG_USE_EXCEPTIONS unless _LIBCPP_DEBUG is defined ># endif ># 765 "/usr/include/c++/v1/__config" 3 ># define _NOEXCEPT_DEBUG noexcept(false) ># define _NOEXCEPT_DEBUG_(x) noexcept(false) >#else ># 768 "/usr/include/c++/v1/__config" 3 ># define _NOEXCEPT_DEBUG _NOEXCEPT ># define _NOEXCEPT_DEBUG_(x) _NOEXCEPT_(x) >#endif ># 771 "/usr/include/c++/v1/__config" 3 > >#ifdef _LIBCPP_HAS_NO_UNICODE_CHARS >typedef unsigned short char16_t; >typedef unsigned int char32_t; >#endif // _LIBCPP_HAS_NO_UNICODE_CHARS ># 776 "/usr/include/c++/v1/__config" 3 > >#ifndef __SIZEOF_INT128__ >#define _LIBCPP_HAS_NO_INT128 >#endif ># 780 "/usr/include/c++/v1/__config" 3 > >#ifdef _LIBCPP_CXX03_LANG ># if __has_extension(c_static_assert) ># define static_assert(__b, __m) _Static_assert(__b, __m) ># else ># 785 "/usr/include/c++/v1/__config" 3 >extern "C++" { >template <bool> struct __static_assert_test; >template <> struct __static_assert_test<true> {}; >template <unsigned> struct __static_assert_check {}; >} >#define static_assert(__b, __m) \ > typedef __static_assert_check<sizeof(__static_assert_test<(__b)>)> \ > _LIBCPP_CONCAT(__t, __LINE__) ># endif // __has_extension(c_static_assert) ># 794 "/usr/include/c++/v1/__config" 3 >#endif // _LIBCPP_CXX03_LANG ># 795 "/usr/include/c++/v1/__config" 3 > >#ifdef _LIBCPP_HAS_NO_DECLTYPE >// GCC 4.6 provides __decltype in all standard modes. >#if __has_keyword(__decltype) || _LIBCPP_CLANG_VER >= 304 || _GNUC_VER >= 406 ># define decltype(__x) __decltype(__x) >#else ># 801 "/usr/include/c++/v1/__config" 3 ># define decltype(__x) __typeof__(__x) >#endif ># 803 "/usr/include/c++/v1/__config" 3 >#endif ># 804 "/usr/include/c++/v1/__config" 3 > >#ifdef _LIBCPP_HAS_NO_CONSTEXPR >#define _LIBCPP_CONSTEXPR >#else ># 808 "/usr/include/c++/v1/__config" 3 >#define _LIBCPP_CONSTEXPR constexpr >#endif ># 810 "/usr/include/c++/v1/__config" 3 > >#ifdef _LIBCPP_CXX03_LANG >#define _LIBCPP_DEFAULT {} >#else ># 814 "/usr/include/c++/v1/__config" 3 >#define _LIBCPP_DEFAULT = default; >#endif ># 816 "/usr/include/c++/v1/__config" 3 > >#ifdef _LIBCPP_CXX03_LANG >#define _LIBCPP_EQUAL_DELETE >#else ># 820 "/usr/include/c++/v1/__config" 3 >#define _LIBCPP_EQUAL_DELETE = delete >#endif ># 822 "/usr/include/c++/v1/__config" 3 > >#ifdef __GNUC__ >#define _NOALIAS __attribute__((__malloc__)) >#else ># 826 "/usr/include/c++/v1/__config" 3 >#define _NOALIAS >#endif ># 828 "/usr/include/c++/v1/__config" 3 > >#if __has_feature(cxx_explicit_conversions) || defined(__IBMCPP__) || \ > (!defined(_LIBCPP_CXX03_LANG) && defined(__GNUC__)) // All supported GCC versions ># define _LIBCPP_EXPLICIT explicit >#else ># 833 "/usr/include/c++/v1/__config" 3 ># define _LIBCPP_EXPLICIT >#endif ># 835 "/usr/include/c++/v1/__config" 3 > >#if !__has_builtin(__builtin_operator_new) || !__has_builtin(__builtin_operator_delete) ># define _LIBCPP_HAS_NO_BUILTIN_OPERATOR_NEW_DELETE >#endif ># 839 "/usr/include/c++/v1/__config" 3 > >#ifdef _LIBCPP_HAS_NO_STRONG_ENUMS >#define _LIBCPP_DECLARE_STRONG_ENUM(x) struct _LIBCPP_TYPE_VIS x { enum __lx >#define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x) \ > __lx __v_; \ > _LIBCPP_ALWAYS_INLINE x(__lx __v) : __v_(__v) {} \ > _LIBCPP_ALWAYS_INLINE explicit x(int __v) : __v_(static_cast<__lx>(__v)) {} \ > _LIBCPP_ALWAYS_INLINE operator int() const {return __v_;} \ > }; >#else // _LIBCPP_HAS_NO_STRONG_ENUMS ># 849 "/usr/include/c++/v1/__config" 3 >#define _LIBCPP_DECLARE_STRONG_ENUM(x) enum class _LIBCPP_ENUM_VIS x >#define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x) >#endif // _LIBCPP_HAS_NO_STRONG_ENUMS ># 852 "/usr/include/c++/v1/__config" 3 > >#ifdef _LIBCPP_DEBUG ># if _LIBCPP_DEBUG == 0 ># define _LIBCPP_DEBUG_LEVEL 1 ># elif _LIBCPP_DEBUG == 1 ># 857 "/usr/include/c++/v1/__config" 3 ># define _LIBCPP_DEBUG_LEVEL 2 ># else ># 859 "/usr/include/c++/v1/__config" 3 ># error Supported values for _LIBCPP_DEBUG are 0 and 1 ># endif ># 861 "/usr/include/c++/v1/__config" 3 ># if !defined(_LIBCPP_BUILDING_LIBRARY) ># define _LIBCPP_EXTERN_TEMPLATE(...) ># endif ># 864 "/usr/include/c++/v1/__config" 3 >#endif ># 865 "/usr/include/c++/v1/__config" 3 > >#ifdef _LIBCPP_DISABLE_EXTERN_TEMPLATE >#define _LIBCPP_EXTERN_TEMPLATE(...) >#define _LIBCPP_EXTERN_TEMPLATE2(...) >#endif ># 870 "/usr/include/c++/v1/__config" 3 > >#ifndef _LIBCPP_EXTERN_TEMPLATE >#define _LIBCPP_EXTERN_TEMPLATE(...) extern template __VA_ARGS__; >#endif ># 874 "/usr/include/c++/v1/__config" 3 > >#ifndef _LIBCPP_EXTERN_TEMPLATE2 >#define _LIBCPP_EXTERN_TEMPLATE2(...) extern template __VA_ARGS__; >#endif ># 878 "/usr/include/c++/v1/__config" 3 > >#if defined(__APPLE__) && defined(__LP64__) && !defined(__x86_64__) >#define _LIBCPP_NONUNIQUE_RTTI_BIT (1ULL << 63) >#endif ># 882 "/usr/include/c++/v1/__config" 3 > >#if defined(__APPLE__) || defined(__FreeBSD__) || defined(_LIBCPP_MSVCRT) || \ > defined(__sun__) || defined(__NetBSD__) || defined(__CloudABI__) >#define _LIBCPP_LOCALE__L_EXTENSIONS 1 >#endif ># 887 "/usr/include/c++/v1/__config" 3 > >#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) >// Most unix variants have catopen. These are the specific ones that don't. >#if !defined(__BIONIC__) && !defined(_NEWLIB_VERSION) >#define _LIBCPP_HAS_CATOPEN 1 >#endif ># 893 "/usr/include/c++/v1/__config" 3 >#endif ># 894 "/usr/include/c++/v1/__config" 3 > >#ifdef __FreeBSD__ >#define _DECLARE_C99_LDBL_MATH 1 >#endif ># 898 "/usr/include/c++/v1/__config" 3 > >#if defined(__APPLE__) ># if !defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && \ > defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) ># define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ ># endif ># 904 "/usr/include/c++/v1/__config" 3 ># if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) ># if __MAC_OS_X_VERSION_MIN_REQUIRED < 1060 ># define _LIBCPP_HAS_NO_ALIGNED_ALLOCATION ># endif ># 908 "/usr/include/c++/v1/__config" 3 ># endif ># 909 "/usr/include/c++/v1/__config" 3 >#endif // defined(__APPLE__) ># 910 "/usr/include/c++/v1/__config" 3 > >#if defined(__APPLE__) || defined(__FreeBSD__) >#define _LIBCPP_HAS_DEFAULTRUNELOCALE >#endif ># 914 "/usr/include/c++/v1/__config" 3 > >#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun__) >#define _LIBCPP_WCTYPE_IS_MASK >#endif ># 918 "/usr/include/c++/v1/__config" 3 > >#ifndef _LIBCPP_STD_VER ># if __cplusplus <= 201103L ># define _LIBCPP_STD_VER 11 ># elif __cplusplus <= 201402L ># 923 "/usr/include/c++/v1/__config" 3 ># define _LIBCPP_STD_VER 14 ># elif __cplusplus <= 201703L ># 925 "/usr/include/c++/v1/__config" 3 ># define _LIBCPP_STD_VER 17 ># else ># 927 "/usr/include/c++/v1/__config" 3 ># define _LIBCPP_STD_VER 18 // current year, or date of c++2a ratification ># endif ># 929 "/usr/include/c++/v1/__config" 3 >#endif // _LIBCPP_STD_VER ># 930 "/usr/include/c++/v1/__config" 3 > >#if _LIBCPP_STD_VER > 11 >#define _LIBCPP_DEPRECATED [[deprecated]] >#else ># 934 "/usr/include/c++/v1/__config" 3 >#define _LIBCPP_DEPRECATED >#endif ># 936 "/usr/include/c++/v1/__config" 3 > >#if _LIBCPP_STD_VER <= 11 >#define _LIBCPP_EXPLICIT_AFTER_CXX11 >#define _LIBCPP_DEPRECATED_AFTER_CXX11 >#else ># 941 "/usr/include/c++/v1/__config" 3 >#define _LIBCPP_EXPLICIT_AFTER_CXX11 explicit >#define _LIBCPP_DEPRECATED_AFTER_CXX11 [[deprecated]] >#endif ># 944 "/usr/include/c++/v1/__config" 3 > >#if _LIBCPP_STD_VER > 11 && !defined(_LIBCPP_HAS_NO_CXX14_CONSTEXPR) >#define _LIBCPP_CONSTEXPR_AFTER_CXX11 constexpr >#else ># 948 "/usr/include/c++/v1/__config" 3 >#define _LIBCPP_CONSTEXPR_AFTER_CXX11 >#endif ># 950 "/usr/include/c++/v1/__config" 3 > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_CXX14_CONSTEXPR) >#define _LIBCPP_CONSTEXPR_AFTER_CXX14 constexpr >#else ># 954 "/usr/include/c++/v1/__config" 3 >#define _LIBCPP_CONSTEXPR_AFTER_CXX14 >#endif ># 956 "/usr/include/c++/v1/__config" 3 > >// FIXME: Remove all usages of this macro once compilers catch up. >#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606L) ># define _LIBCPP_HAS_NO_INLINE_VARIABLES >#endif ># 961 "/usr/include/c++/v1/__config" 3 > >#ifdef _LIBCPP_HAS_NO_RVALUE_REFERENCES ># define _LIBCPP_EXPLICIT_MOVE(x) _VSTD::move(x) >#else ># 965 "/usr/include/c++/v1/__config" 3 ># define _LIBCPP_EXPLICIT_MOVE(x) (x) >#endif ># 967 "/usr/include/c++/v1/__config" 3 > >#ifndef _LIBCPP_HAS_NO_ASAN >_LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container( > const void *, const void *, const void *, const void *); >#endif ># 972 "/usr/include/c++/v1/__config" 3 > >// Try to find out if RTTI is disabled. >// g++ and cl.exe have RTTI on by default and define a macro when it is. >// g++ only defines the macro in 4.3.2 and onwards. >#if !defined(_LIBCPP_NO_RTTI) ># if defined(__GNUC__) && ((__GNUC__ >= 5) || (__GNUC__ == 4 && \ > (__GNUC_MINOR__ >= 3 || __GNUC_PATCHLEVEL__ >= 2))) && !defined(__GXX_RTTI) ># define _LIBCPP_NO_RTTI ># elif defined(_LIBCPP_COMPILER_MSVC) && !defined(_CPPRTTI) ># 981 "/usr/include/c++/v1/__config" 3 ># define _LIBCPP_NO_RTTI ># endif ># 983 "/usr/include/c++/v1/__config" 3 >#endif ># 984 "/usr/include/c++/v1/__config" 3 > >#ifndef _LIBCPP_WEAK ># define _LIBCPP_WEAK __attribute__((__weak__)) >#endif ># 988 "/usr/include/c++/v1/__config" 3 > >// Thread API >#if !defined(_LIBCPP_HAS_NO_THREADS) && \ > !defined(_LIBCPP_HAS_THREAD_API_PTHREAD) && \ > !defined(_LIBCPP_HAS_THREAD_API_WIN32) && \ > !defined(_LIBCPP_HAS_THREAD_API_EXTERNAL) ># if defined(__FreeBSD__) || \ > defined(__Fuchsia__) || \ > defined(__NetBSD__) || \ > defined(__linux__) || \ > defined(__APPLE__) || \ > defined(__CloudABI__) || \ > defined(__sun__) || \ > (defined(__MINGW32__) && __libcpp_has_include(<pthread.h>)) ># define _LIBCPP_HAS_THREAD_API_PTHREAD ># elif defined(_LIBCPP_WIN32API) ># 1004 "/usr/include/c++/v1/__config" 3 ># define _LIBCPP_HAS_THREAD_API_WIN32 ># else ># 1006 "/usr/include/c++/v1/__config" 3 ># error "No thread API" ># endif // _LIBCPP_HAS_THREAD_API ># 1008 "/usr/include/c++/v1/__config" 3 >#endif // _LIBCPP_HAS_NO_THREADS ># 1009 "/usr/include/c++/v1/__config" 3 > >#if defined(_LIBCPP_HAS_NO_THREADS) && defined(_LIBCPP_HAS_THREAD_API_PTHREAD) ># error _LIBCPP_HAS_THREAD_API_PTHREAD may only be defined when \ > _LIBCPP_HAS_NO_THREADS is not defined. >#endif ># 1014 "/usr/include/c++/v1/__config" 3 > >#if defined(_LIBCPP_HAS_NO_THREADS) && defined(_LIBCPP_HAS_THREAD_API_EXTERNAL) ># error _LIBCPP_HAS_THREAD_API_EXTERNAL may not be defined when \ > _LIBCPP_HAS_NO_THREADS is defined. >#endif ># 1019 "/usr/include/c++/v1/__config" 3 > >#if defined(_LIBCPP_HAS_NO_MONOTONIC_CLOCK) && !defined(_LIBCPP_HAS_NO_THREADS) ># error _LIBCPP_HAS_NO_MONOTONIC_CLOCK may only be defined when \ > _LIBCPP_HAS_NO_THREADS is defined. >#endif ># 1024 "/usr/include/c++/v1/__config" 3 > >// Systems that use capability-based security (FreeBSD with Capsicum, >// Nuxi CloudABI) may only provide local filesystem access (using *at()). >// Functions like open(), rename(), unlink() and stat() should not be >// used, as they attempt to access the global filesystem namespace. >#ifdef __CloudABI__ >#define _LIBCPP_HAS_NO_GLOBAL_FILESYSTEM_NAMESPACE >#endif ># 1032 "/usr/include/c++/v1/__config" 3 > >// CloudABI is intended for running networked services. Processes do not >// have standard input and output channels. >#ifdef __CloudABI__ >#define _LIBCPP_HAS_NO_STDIN >#define _LIBCPP_HAS_NO_STDOUT >#endif ># 1039 "/usr/include/c++/v1/__config" 3 > >#if defined(__BIONIC__) || defined(__CloudABI__) || \ > defined(__Fuchsia__) || defined(_LIBCPP_HAS_MUSL_LIBC) >#define _LIBCPP_PROVIDES_DEFAULT_RUNE_TABLE >#endif ># 1044 "/usr/include/c++/v1/__config" 3 > >// Thread-unsafe functions such as strtok() and localtime() >// are not available. >#ifdef __CloudABI__ >#define _LIBCPP_HAS_NO_THREAD_UNSAFE_C_FUNCTIONS >#endif ># 1050 "/usr/include/c++/v1/__config" 3 > >#if __has_feature(cxx_atomic) || __has_extension(c_atomic) || __has_keyword(_Atomic) >#define _LIBCPP_HAS_C_ATOMIC_IMP >#elif _GNUC_VER > 407 ># 1054 "/usr/include/c++/v1/__config" 3 >#define _LIBCPP_HAS_GCC_ATOMIC_IMP >#endif ># 1056 "/usr/include/c++/v1/__config" 3 > >#if (!defined(_LIBCPP_HAS_C_ATOMIC_IMP) && !defined(_LIBCPP_HAS_GCC_ATOMIC_IMP)) \ > || defined(_LIBCPP_HAS_NO_THREADS) >#define _LIBCPP_HAS_NO_ATOMIC_HEADER >#endif ># 1061 "/usr/include/c++/v1/__config" 3 > >#ifndef _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK >#define _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK >#endif ># 1065 "/usr/include/c++/v1/__config" 3 > >#if defined(_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS) >#if defined(__clang__) && __has_attribute(acquire_capability) >// Work around the attribute handling in clang. When both __declspec and >// __attribute__ are present, the processing goes awry preventing the definition >// of the types. >#if !defined(_LIBCPP_OBJECT_FORMAT_COFF) >#define _LIBCPP_HAS_THREAD_SAFETY_ANNOTATIONS >#endif ># 1074 "/usr/include/c++/v1/__config" 3 >#endif ># 1075 "/usr/include/c++/v1/__config" 3 >#endif ># 1076 "/usr/include/c++/v1/__config" 3 > >#if __has_attribute(require_constant_initialization) >#define _LIBCPP_SAFE_STATIC __attribute__((__require_constant_initialization__)) >#else ># 1080 "/usr/include/c++/v1/__config" 3 >#define _LIBCPP_SAFE_STATIC >#endif ># 1082 "/usr/include/c++/v1/__config" 3 > >#if !__has_builtin(__builtin_addressof) && _GNUC_VER < 700 ># define _LIBCPP_HAS_NO_BUILTIN_ADDRESSOF >#endif ># 1086 "/usr/include/c++/v1/__config" 3 > >#if !defined(_LIBCPP_HAS_NO_OFF_T_FUNCTIONS) >#if defined(_LIBCPP_MSVCRT) || defined(_NEWLIB_VERSION) >#define _LIBCPP_HAS_NO_OFF_T_FUNCTIONS >#endif ># 1091 "/usr/include/c++/v1/__config" 3 >#endif ># 1092 "/usr/include/c++/v1/__config" 3 > >#if __has_attribute(diagnose_if) && !defined(_LIBCPP_DISABLE_ADDITIONAL_DIAGNOSTICS) ># define _LIBCPP_DIAGNOSE_WARNING(...) \ > __attribute__((diagnose_if(__VA_ARGS__, "warning"))) ># define _LIBCPP_DIAGNOSE_ERROR(...) \ > __attribute__((diagnose_if(__VA_ARGS__, "error"))) >#else ># 1099 "/usr/include/c++/v1/__config" 3 ># define _LIBCPP_DIAGNOSE_WARNING(...) ># define _LIBCPP_DIAGNOSE_ERROR(...) >#endif ># 1102 "/usr/include/c++/v1/__config" 3 > >#if __has_attribute(fallthough) || _GNUC_VER >= 700 >// Use a function like macro to imply that it must be followed by a semicolon >#define _LIBCPP_FALLTHROUGH() __attribute__((__fallthrough__)) >#else ># 1107 "/usr/include/c++/v1/__config" 3 >#define _LIBCPP_FALLTHROUGH() ((void)0) >#endif ># 1109 "/usr/include/c++/v1/__config" 3 > >#if defined(_LIBCPP_ABI_MICROSOFT) && \ > (defined(_LIBCPP_COMPILER_MSVC) || __has_declspec_attribute(empty_bases)) ># define _LIBCPP_DECLSPEC_EMPTY_BASES __declspec(empty_bases) >#else ># 1114 "/usr/include/c++/v1/__config" 3 ># define _LIBCPP_DECLSPEC_EMPTY_BASES >#endif ># 1116 "/usr/include/c++/v1/__config" 3 > >#if defined(_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES) ># define _LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR ># define _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS ># define _LIBCPP_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE ># define _LIBCPP_ENABLE_CXX17_REMOVED_BINDERS >#endif // _LIBCPP_ENABLE_CXX17_REMOVED_FEATURES ># 1123 "/usr/include/c++/v1/__config" 3 > >#if !defined(__cpp_deduction_guides) || __cpp_deduction_guides < 201611 ># define _LIBCPP_HAS_NO_DEDUCTION_GUIDES >#endif ># 1127 "/usr/include/c++/v1/__config" 3 > >#if !__has_keyword(__is_aggregate) && (_GNUC_VER_NEW < 7001) ># define _LIBCPP_HAS_NO_IS_AGGREGATE >#endif ># 1131 "/usr/include/c++/v1/__config" 3 > >#if !defined(__cpp_coroutines) || __cpp_coroutines < 201703L ># define _LIBCPP_HAS_NO_COROUTINES >#endif ># 1135 "/usr/include/c++/v1/__config" 3 > >// Decide whether to use availability macros. >#if !defined(_LIBCPP_BUILDING_LIBRARY) && \ > !defined(_LIBCPP_DISABLE_AVAILABILITY) && \ > __has_feature(attribute_availability_with_strict) && \ > __has_feature(attribute_availability_in_templates) >#ifdef __APPLE__ >#define _LIBCPP_USE_AVAILABILITY_APPLE >#endif ># 1144 "/usr/include/c++/v1/__config" 3 >#endif ># 1145 "/usr/include/c++/v1/__config" 3 > >// Define availability macros. >#if defined(_LIBCPP_USE_AVAILABILITY_APPLE) >#define _LIBCPP_AVAILABILITY_SHARED_MUTEX \ > __attribute__((availability(macosx,strict,introduced=10.12))) \ > __attribute__((availability(ios,strict,introduced=10.0))) \ > __attribute__((availability(tvos,strict,introduced=10.0))) \ > __attribute__((availability(watchos,strict,introduced=3.0))) >#define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS __attribute__((unavailable)) >#define _LIBCPP_AVAILABILITY_BAD_ARRAY_LENGTH __attribute__((unavailable)) >#define _LIBCPP_AVAILABILITY_BAD_ANY_CAST __attribute__((unavailable)) >#define _LIBCPP_AVAILABILITY_UNCAUGHT_EXCEPTIONS \ > __attribute__((availability(macosx,strict,introduced=10.12))) \ > __attribute__((availability(ios,strict,introduced=10.0))) \ > __attribute__((availability(tvos,strict,introduced=10.0))) \ > __attribute__((availability(watchos,strict,introduced=3.0))) >#define _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE \ > __attribute__((availability(macosx,strict,introduced=10.12))) \ > __attribute__((availability(ios,strict,introduced=10.0))) \ > __attribute__((availability(tvos,strict,introduced=10.0))) \ > __attribute__((availability(watchos,strict,introduced=3.0))) >#define _LIBCPP_AVAILABILITY_FUTURE_ERROR \ > __attribute__((availability(ios,strict,introduced=6.0))) >#define _LIBCPP_AVAILABILITY_TYPEINFO_VTABLE \ > __attribute__((availability(macosx,strict,introduced=10.9))) \ > __attribute__((availability(ios,strict,introduced=7.0))) >#define _LIBCPP_AVAILABILITY_LOCALE_CATEGORY \ > __attribute__((availability(macosx,strict,introduced=10.9))) \ > __attribute__((availability(ios,strict,introduced=7.0))) >#define _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR \ > __attribute__((availability(macosx,strict,introduced=10.9))) \ > __attribute__((availability(ios,strict,introduced=7.0))) >#else ># 1178 "/usr/include/c++/v1/__config" 3 >#define _LIBCPP_AVAILABILITY_SHARED_MUTEX >#define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS >#define _LIBCPP_AVAILABILITY_BAD_ARRAY_LENGTH >#define _LIBCPP_AVAILABILITY_BAD_ANY_CAST >#define _LIBCPP_AVAILABILITY_UNCAUGHT_EXCEPTIONS >#define _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE >#define _LIBCPP_AVAILABILITY_FUTURE_ERROR >#define _LIBCPP_AVAILABILITY_TYPEINFO_VTABLE >#define _LIBCPP_AVAILABILITY_LOCALE_CATEGORY >#define _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR >#endif ># 1189 "/usr/include/c++/v1/__config" 3 > >// Define availability that depends on _LIBCPP_NO_EXCEPTIONS. >#ifdef _LIBCPP_NO_EXCEPTIONS >#define _LIBCPP_AVAILABILITY_DYNARRAY >#define _LIBCPP_AVAILABILITY_FUTURE >#define _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST >#else ># 1196 "/usr/include/c++/v1/__config" 3 >#define _LIBCPP_AVAILABILITY_DYNARRAY _LIBCPP_AVAILABILITY_BAD_ARRAY_LENGTH >#define _LIBCPP_AVAILABILITY_FUTURE _LIBCPP_AVAILABILITY_FUTURE_ERROR >#define _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST \ > _LIBCPP_AVAILABILITY_BAD_ANY_CAST >#endif ># 1201 "/usr/include/c++/v1/__config" 3 > >// Availability of stream API in the dylib got dropped and re-added. The >// extern template should effectively be available at: >// availability(macosx,introduced=10.9) >// availability(ios,introduced=7.0) >#if defined(_LIBCPP_USE_AVAILABILITY_APPLE) && \ > ((defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && \ > __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1090) || \ > (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && \ > __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 70000)) >#define _LIBCPP_AVAILABILITY_NO_STREAMS_EXTERN_TEMPLATE >#endif ># 1213 "/usr/include/c++/v1/__config" 3 > >#if defined(_LIBCPP_COMPILER_IBM) >#define _LIBCPP_HAS_NO_PRAGMA_PUSH_POP_MACRO >#endif ># 1217 "/usr/include/c++/v1/__config" 3 > >#if defined(_LIBCPP_HAS_NO_PRAGMA_PUSH_POP_MACRO) ># define _LIBCPP_PUSH_MACROS ># define _LIBCPP_POP_MACROS >#else ># 1222 "/usr/include/c++/v1/__config" 3 > // Don't warn about macro conflicts when we can restore them at the > // end of the header. ># ifndef _LIBCPP_DISABLE_MACRO_CONFLICT_WARNINGS ># define _LIBCPP_DISABLE_MACRO_CONFLICT_WARNINGS ># endif ># 1227 "/usr/include/c++/v1/__config" 3 ># if defined(_LIBCPP_COMPILER_MSVC) ># define _LIBCPP_PUSH_MACROS \ > __pragma(push_macro("min")) \ > __pragma(push_macro("max")) ># define _LIBCPP_POP_MACROS \ > __pragma(pop_macro("min")) \ > __pragma(pop_macro("max")) ># else ># 1235 "/usr/include/c++/v1/__config" 3 ># define _LIBCPP_PUSH_MACROS \ > _Pragma("push_macro(\"min\")") \ > _Pragma("push_macro(\"max\")") ># define _LIBCPP_POP_MACROS \ > _Pragma("pop_macro(\"min\")") \ > _Pragma("pop_macro(\"max\")") ># endif ># 1242 "/usr/include/c++/v1/__config" 3 >#endif // defined(_LIBCPP_HAS_NO_PRAGMA_PUSH_POP_MACRO) ># 1243 "/usr/include/c++/v1/__config" 3 > > >#endif // __cplusplus ># 1246 "/usr/include/c++/v1/__config" 3 > >#endif // _LIBCPP_CONFIG ># 1248 "/usr/include/c++/v1/__config" 3 ># 41 "/usr/include/c++/v1/stddef.h" 2 3 > >#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) >#if 0 /* expanded by -frewrite-includes */ >#pragma GCC system_header >#endif /* expanded by -frewrite-includes */ ># 44 "/usr/include/c++/v1/stddef.h" 3 >#endif ># 45 "/usr/include/c++/v1/stddef.h" 3 > >#if 0 /* expanded by -frewrite-includes */ >#include_next <stddef.h> >#endif /* expanded by -frewrite-includes */ ># 46 "/usr/include/c++/v1/stddef.h" 3 ># 1 "/usr/include/stddef.h" 1 3 4 >/*- > * Copyright (c) 1990, 1993 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)stddef.h 8.1 (Berkeley) 6/2/93 > * > * $FreeBSD: head/include/stddef.h 320240 2017-06-22 18:39:52Z ed $ > */ > >#ifndef _STDDEF_H_ >#define _STDDEF_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 37 "/usr/include/stddef.h" 3 4 ># 38 "/usr/include/stddef.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_null.h> >#endif /* expanded by -frewrite-includes */ ># 38 "/usr/include/stddef.h" 3 4 ># 1 "/usr/include/sys/_null.h" 1 3 4 >/*- > * Copyright (c) 2003 Marcel Moolenaar > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR > * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES > * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. > * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, > * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT > * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, > * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY > * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT > * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF > * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > * > * $FreeBSD: head/sys/sys/_null.h 228918 2011-12-27 21:36:31Z theraven $ > */ > >#ifndef NULL > >#if !defined(__cplusplus) >#define NULL ((void *)0) >#else ># 34 "/usr/include/sys/_null.h" 3 4 >#if __cplusplus >= 201103L >#define NULL nullptr >#elif defined(__GNUG__) && defined(__GNUC__) && __GNUC__ >= 4 ># 37 "/usr/include/sys/_null.h" 3 4 >#define NULL __null >#else ># 39 "/usr/include/sys/_null.h" 3 4 >#if defined(__LP64__) >#define NULL (0L) >#else ># 42 "/usr/include/sys/_null.h" 3 4 >#define NULL 0 >#endif /* __LP64__ */ ># 44 "/usr/include/sys/_null.h" 3 4 >#endif /* __GNUG__ */ ># 45 "/usr/include/sys/_null.h" 3 4 >#endif /* !__cplusplus */ ># 46 "/usr/include/sys/_null.h" 3 4 > >#endif ># 48 "/usr/include/sys/_null.h" 3 4 ># 39 "/usr/include/stddef.h" 2 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 39 "/usr/include/stddef.h" 3 4 ># 40 "/usr/include/stddef.h" 3 4 > >#ifndef _PTRDIFF_T_DECLARED >typedef __ptrdiff_t ptrdiff_t; >#define _PTRDIFF_T_DECLARED >#endif ># 45 "/usr/include/stddef.h" 3 4 > >#if __BSD_VISIBLE >#ifndef _RUNE_T_DECLARED >typedef __rune_t rune_t; >#define _RUNE_T_DECLARED >#endif ># 51 "/usr/include/stddef.h" 3 4 >#endif ># 52 "/usr/include/stddef.h" 3 4 > >#ifndef _SIZE_T_DECLARED >typedef __size_t size_t; >#define _SIZE_T_DECLARED >#endif ># 57 "/usr/include/stddef.h" 3 4 > >#ifndef __cplusplus >#ifndef _WCHAR_T_DECLARED >typedef ___wchar_t wchar_t; >#define _WCHAR_T_DECLARED >#endif ># 63 "/usr/include/stddef.h" 3 4 >#endif ># 64 "/usr/include/stddef.h" 3 4 > >#if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L >#ifndef __CLANG_MAX_ALIGN_T_DEFINED >typedef __max_align_t max_align_t; >#define __CLANG_MAX_ALIGN_T_DEFINED >#define _GCC_MAX_ALIGN_T >#endif ># 71 "/usr/include/stddef.h" 3 4 >#endif ># 72 "/usr/include/stddef.h" 3 4 > >#define offsetof(type, member) __offsetof(type, member) > >#if __EXT1_VISIBLE >/* ISO/IEC 9899:2011 K.3.3.2 */ >#ifndef _RSIZE_T_DEFINED >#define _RSIZE_T_DEFINED >typedef size_t rsize_t; >#endif ># 81 "/usr/include/stddef.h" 3 4 >#endif /* __EXT1_VISIBLE */ ># 82 "/usr/include/stddef.h" 3 4 > >#endif /* _STDDEF_H_ */ ># 84 "/usr/include/stddef.h" 3 4 ># 47 "/usr/include/c++/v1/stddef.h" 2 3 > >#ifdef __cplusplus > >extern "C++" { >#if 0 /* expanded by -frewrite-includes */ >#include <__nullptr> >#endif /* expanded by -frewrite-includes */ ># 51 "/usr/include/c++/v1/stddef.h" 3 ># 1 "/usr/include/c++/v1/__nullptr" 1 3 >// -*- C++ -*- >//===--------------------------- __nullptr --------------------------------===// >// >// The LLVM Compiler Infrastructure >// >// This file is dual licensed under the MIT and the University of Illinois Open >// Source Licenses. See LICENSE.TXT for details. >// >//===----------------------------------------------------------------------===// > >#ifndef _LIBCPP_NULLPTR >#define _LIBCPP_NULLPTR > >#if 0 /* expanded by -frewrite-includes */ >#include <__config> >#endif /* expanded by -frewrite-includes */ ># 14 "/usr/include/c++/v1/__nullptr" 3 ># 15 "/usr/include/c++/v1/__nullptr" 3 > >#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) >#if 0 /* expanded by -frewrite-includes */ >#pragma GCC system_header >#endif /* expanded by -frewrite-includes */ ># 18 "/usr/include/c++/v1/__nullptr" 3 >#endif ># 19 "/usr/include/c++/v1/__nullptr" 3 > >#ifdef _LIBCPP_HAS_NO_NULLPTR > >_LIBCPP_BEGIN_NAMESPACE_STD > >struct _LIBCPP_TEMPLATE_VIS nullptr_t >{ > void* __lx; > > struct __nat {int __for_bool_;}; > > _LIBCPP_ALWAYS_INLINE _LIBCPP_CONSTEXPR nullptr_t() : __lx(0) {} > _LIBCPP_ALWAYS_INLINE _LIBCPP_CONSTEXPR nullptr_t(int __nat::*) : __lx(0) {} > > _LIBCPP_ALWAYS_INLINE _LIBCPP_CONSTEXPR operator int __nat::*() const {return 0;} > > template <class _Tp> > _LIBCPP_ALWAYS_INLINE _LIBCPP_CONSTEXPR > operator _Tp* () const {return 0;} > > template <class _Tp, class _Up> > _LIBCPP_ALWAYS_INLINE > operator _Tp _Up::* () const {return 0;} > > friend _LIBCPP_ALWAYS_INLINE _LIBCPP_CONSTEXPR bool operator==(nullptr_t, nullptr_t) {return true;} > friend _LIBCPP_ALWAYS_INLINE _LIBCPP_CONSTEXPR bool operator!=(nullptr_t, nullptr_t) {return false;} >}; > >inline _LIBCPP_ALWAYS_INLINE _LIBCPP_CONSTEXPR nullptr_t __get_nullptr_t() {return nullptr_t(0);} > >#define nullptr _VSTD::__get_nullptr_t() > >_LIBCPP_END_NAMESPACE_STD > >#else // _LIBCPP_HAS_NO_NULLPTR ># 54 "/usr/include/c++/v1/__nullptr" 3 > >namespace std >{ > typedef decltype(nullptr) nullptr_t; >} > >#endif // _LIBCPP_HAS_NO_NULLPTR ># 61 "/usr/include/c++/v1/__nullptr" 3 > >#endif // _LIBCPP_NULLPTR ># 63 "/usr/include/c++/v1/__nullptr" 3 ># 52 "/usr/include/c++/v1/stddef.h" 2 3 >using std::nullptr_t; >} > >// Re-use the compiler's <stddef.h> max_align_t where possible. >#if !defined(__CLANG_MAX_ALIGN_T_DEFINED) && !defined(_GCC_MAX_ALIGN_T) && \ > !defined(__DEFINED_max_align_t) >typedef long double max_align_t; >#endif ># 60 "/usr/include/c++/v1/stddef.h" 3 > >#endif ># 62 "/usr/include/c++/v1/stddef.h" 3 > >#endif // _LIBCPP_STDDEF_H ># 64 "/usr/include/c++/v1/stddef.h" 3 ># 43 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" 2 >#ifndef _MSC_VER >#if 0 /* expanded by -frewrite-includes */ >#include <stdint.h> >#endif /* expanded by -frewrite-includes */ ># 44 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" ># 1 "/usr/include/c++/v1/stdint.h" 1 3 >// -*- C++ -*- >//===---------------------------- stdint.h --------------------------------===// >// >// The LLVM Compiler Infrastructure >// >// This file is distributed under the University of Illinois Open Source >// License. See LICENSE.TXT for details. >// >//===----------------------------------------------------------------------===// > >#ifndef _LIBCPP_STDINT_H >#define _LIBCPP_STDINT_H > >/* > stdint.h synopsis > >Macros: > > INT8_MIN > INT16_MIN > INT32_MIN > INT64_MIN > > INT8_MAX > INT16_MAX > INT32_MAX > INT64_MAX > > UINT8_MAX > UINT16_MAX > UINT32_MAX > UINT64_MAX > > INT_LEAST8_MIN > INT_LEAST16_MIN > INT_LEAST32_MIN > INT_LEAST64_MIN > > INT_LEAST8_MAX > INT_LEAST16_MAX > INT_LEAST32_MAX > INT_LEAST64_MAX > > UINT_LEAST8_MAX > UINT_LEAST16_MAX > UINT_LEAST32_MAX > UINT_LEAST64_MAX > > INT_FAST8_MIN > INT_FAST16_MIN > INT_FAST32_MIN > INT_FAST64_MIN > > INT_FAST8_MAX > INT_FAST16_MAX > INT_FAST32_MAX > INT_FAST64_MAX > > UINT_FAST8_MAX > UINT_FAST16_MAX > UINT_FAST32_MAX > UINT_FAST64_MAX > > INTPTR_MIN > INTPTR_MAX > UINTPTR_MAX > > INTMAX_MIN > INTMAX_MAX > > UINTMAX_MAX > > PTRDIFF_MIN > PTRDIFF_MAX > > SIG_ATOMIC_MIN > SIG_ATOMIC_MAX > > SIZE_MAX > > WCHAR_MIN > WCHAR_MAX > > WINT_MIN > WINT_MAX > > INT8_C(value) > INT16_C(value) > INT32_C(value) > INT64_C(value) > > UINT8_C(value) > UINT16_C(value) > UINT32_C(value) > UINT64_C(value) > > INTMAX_C(value) > UINTMAX_C(value) > >*/ > >#if 0 /* expanded by -frewrite-includes */ >#include <__config> >#endif /* expanded by -frewrite-includes */ ># 102 "/usr/include/c++/v1/stdint.h" 3 ># 103 "/usr/include/c++/v1/stdint.h" 3 > >#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) >#if 0 /* expanded by -frewrite-includes */ >#pragma GCC system_header >#endif /* expanded by -frewrite-includes */ ># 106 "/usr/include/c++/v1/stdint.h" 3 >#endif ># 107 "/usr/include/c++/v1/stdint.h" 3 > >/* C99 stdlib (e.g. glibc < 2.18) does not provide macros needed > for C++11 unless __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS > are defined >*/ >#if defined(__cplusplus) && !defined(__STDC_LIMIT_MACROS) ># define __STDC_LIMIT_MACROS >#endif ># 115 "/usr/include/c++/v1/stdint.h" 3 >#if defined(__cplusplus) && !defined(__STDC_CONSTANT_MACROS) ># define __STDC_CONSTANT_MACROS >#endif ># 118 "/usr/include/c++/v1/stdint.h" 3 > >#if 0 /* expanded by -frewrite-includes */ >#include_next <stdint.h> >#endif /* expanded by -frewrite-includes */ ># 119 "/usr/include/c++/v1/stdint.h" 3 ># 1 "/usr/include/stdint.h" 1 3 4 >/*- > * Copyright (c) 2001 Mike Barcroft <mike@FreeBSD.org> > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: head/sys/sys/stdint.h 316213 2017-03-30 04:57:26Z kib $ > */ > >#ifndef _SYS_STDINT_H_ >#define _SYS_STDINT_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 32 "/usr/include/stdint.h" 3 4 ># 33 "/usr/include/stdint.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 33 "/usr/include/stdint.h" 3 4 ># 34 "/usr/include/stdint.h" 3 4 > >#if 0 /* expanded by -frewrite-includes */ >#include <machine/_stdint.h> >#endif /* expanded by -frewrite-includes */ ># 35 "/usr/include/stdint.h" 3 4 ># 1 "/usr/include/machine/_stdint.h" 1 3 4 >/*- > * This file is in the public domain. > */ >/* $FreeBSD: head/sys/i386/include/_stdint.h 232264 2012-02-28 18:38:33Z tijl $ */ > >#if 0 /* expanded by -frewrite-includes */ >#include <x86/_stdint.h> >#endif /* expanded by -frewrite-includes */ ># 6 "/usr/include/machine/_stdint.h" 3 4 ># 1 "/usr/include/x86/_stdint.h" 1 3 4 >/*- > * Copyright (c) 2001, 2002 Mike Barcroft <mike@FreeBSD.org> > * Copyright (c) 2001 The NetBSD Foundation, Inc. > * All rights reserved. > * > * This code is derived from software contributed to The NetBSD Foundation > * by Klaus Klein. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. All advertising materials mentioning features or use of this software > * must display the following acknowledgement: > * This product includes software developed by the NetBSD > * Foundation, Inc. and its contributors. > * 4. Neither the name of The NetBSD Foundation nor the names of its > * contributors may be used to endorse or promote products derived > * from this software without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS > * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED > * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR > * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS > * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR > * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF > * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS > * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN > * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) > * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE > * POSSIBILITY OF SUCH DAMAGE. > * > * $FreeBSD: head/sys/x86/include/_stdint.h 301030 2016-05-31 08:38:24Z ed $ > */ > >#ifndef _MACHINE__STDINT_H_ >#define _MACHINE__STDINT_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <machine/_limits.h> >#endif /* expanded by -frewrite-includes */ ># 43 "/usr/include/x86/_stdint.h" 3 4 ># 1 "/usr/include/machine/_limits.h" 1 3 4 >/*- > * This file is in the public domain. > */ >/* $FreeBSD: head/sys/i386/include/_limits.h 232262 2012-02-28 18:24:28Z tijl $ */ > >#if 0 /* expanded by -frewrite-includes */ >#include <x86/_limits.h> >#endif /* expanded by -frewrite-includes */ ># 6 "/usr/include/machine/_limits.h" 3 4 ># 7 "/usr/include/machine/_limits.h" 3 4 ># 44 "/usr/include/x86/_stdint.h" 2 3 4 > >#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) > >#define INT8_C(c) (c) >#define INT16_C(c) (c) >#define INT32_C(c) (c) > >#define UINT8_C(c) (c) >#define UINT16_C(c) (c) >#define UINT32_C(c) (c ## U) > >#ifdef __LP64__ >#define INT64_C(c) (c ## L) >#define UINT64_C(c) (c ## UL) >#else ># 59 "/usr/include/x86/_stdint.h" 3 4 >#define INT64_C(c) (c ## LL) >#define UINT64_C(c) (c ## ULL) >#endif ># 62 "/usr/include/x86/_stdint.h" 3 4 > >#define INTMAX_C(c) INT64_C(c) >#define UINTMAX_C(c) UINT64_C(c) > >#endif /* !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) */ ># 67 "/usr/include/x86/_stdint.h" 3 4 > >#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) > >/* > * ISO/IEC 9899:1999 > * 7.18.2.1 Limits of exact-width integer types > */ >#define INT8_MIN (-0x7f-1) >#define INT16_MIN (-0x7fff-1) >#define INT32_MIN (-0x7fffffff-1) > >#define INT8_MAX 0x7f >#define INT16_MAX 0x7fff >#define INT32_MAX 0x7fffffff > >#define UINT8_MAX 0xff >#define UINT16_MAX 0xffff >#define UINT32_MAX 0xffffffffU > >#ifdef __LP64__ >#define INT64_MIN (-0x7fffffffffffffff-1) >#define INT64_MAX 0x7fffffffffffffff >#define UINT64_MAX 0xffffffffffffffff >#else ># 91 "/usr/include/x86/_stdint.h" 3 4 >#define INT64_MIN (-0x7fffffffffffffffLL-1) >#define INT64_MAX 0x7fffffffffffffffLL >#define UINT64_MAX 0xffffffffffffffffULL >#endif ># 95 "/usr/include/x86/_stdint.h" 3 4 > >/* > * ISO/IEC 9899:1999 > * 7.18.2.2 Limits of minimum-width integer types > */ >/* Minimum values of minimum-width signed integer types. */ >#define INT_LEAST8_MIN INT8_MIN >#define INT_LEAST16_MIN INT16_MIN >#define INT_LEAST32_MIN INT32_MIN >#define INT_LEAST64_MIN INT64_MIN > >/* Maximum values of minimum-width signed integer types. */ >#define INT_LEAST8_MAX INT8_MAX >#define INT_LEAST16_MAX INT16_MAX >#define INT_LEAST32_MAX INT32_MAX >#define INT_LEAST64_MAX INT64_MAX > >/* Maximum values of minimum-width unsigned integer types. */ >#define UINT_LEAST8_MAX UINT8_MAX >#define UINT_LEAST16_MAX UINT16_MAX >#define UINT_LEAST32_MAX UINT32_MAX >#define UINT_LEAST64_MAX UINT64_MAX > >/* > * ISO/IEC 9899:1999 > * 7.18.2.3 Limits of fastest minimum-width integer types > */ >/* Minimum values of fastest minimum-width signed integer types. */ >#define INT_FAST8_MIN INT32_MIN >#define INT_FAST16_MIN INT32_MIN >#define INT_FAST32_MIN INT32_MIN >#define INT_FAST64_MIN INT64_MIN > >/* Maximum values of fastest minimum-width signed integer types. */ >#define INT_FAST8_MAX INT32_MAX >#define INT_FAST16_MAX INT32_MAX >#define INT_FAST32_MAX INT32_MAX >#define INT_FAST64_MAX INT64_MAX > >/* Maximum values of fastest minimum-width unsigned integer types. */ >#define UINT_FAST8_MAX UINT32_MAX >#define UINT_FAST16_MAX UINT32_MAX >#define UINT_FAST32_MAX UINT32_MAX >#define UINT_FAST64_MAX UINT64_MAX > >/* > * ISO/IEC 9899:1999 > * 7.18.2.4 Limits of integer types capable of holding object pointers > */ >#ifdef __LP64__ >#define INTPTR_MIN INT64_MIN >#define INTPTR_MAX INT64_MAX >#define UINTPTR_MAX UINT64_MAX >#else ># 149 "/usr/include/x86/_stdint.h" 3 4 >#define INTPTR_MIN INT32_MIN >#define INTPTR_MAX INT32_MAX >#define UINTPTR_MAX UINT32_MAX >#endif ># 153 "/usr/include/x86/_stdint.h" 3 4 > >/* > * ISO/IEC 9899:1999 > * 7.18.2.5 Limits of greatest-width integer types > */ >#define INTMAX_MIN INT64_MIN >#define INTMAX_MAX INT64_MAX >#define UINTMAX_MAX UINT64_MAX > >/* > * ISO/IEC 9899:1999 > * 7.18.3 Limits of other integer types > */ >#ifdef __LP64__ >/* Limits of ptrdiff_t. */ >#define PTRDIFF_MIN INT64_MIN >#define PTRDIFF_MAX INT64_MAX > >/* Limits of sig_atomic_t. */ >#define SIG_ATOMIC_MIN __LONG_MIN >#define SIG_ATOMIC_MAX __LONG_MAX > >/* Limit of size_t. */ >#define SIZE_MAX UINT64_MAX >#else ># 178 "/usr/include/x86/_stdint.h" 3 4 >#define PTRDIFF_MIN INT32_MIN >#define PTRDIFF_MAX INT32_MAX >#define SIG_ATOMIC_MIN INT32_MIN >#define SIG_ATOMIC_MAX INT32_MAX >#define SIZE_MAX UINT32_MAX >#endif ># 184 "/usr/include/x86/_stdint.h" 3 4 > >/* Limits of wint_t. */ >#define WINT_MIN INT32_MIN >#define WINT_MAX INT32_MAX > >#endif /* !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) */ ># 190 "/usr/include/x86/_stdint.h" 3 4 > >#endif /* !_MACHINE__STDINT_H_ */ ># 192 "/usr/include/x86/_stdint.h" 3 4 ># 7 "/usr/include/machine/_stdint.h" 2 3 4 ># 36 "/usr/include/stdint.h" 2 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_stdint.h> >#endif /* expanded by -frewrite-includes */ ># 36 "/usr/include/stdint.h" 3 4 ># 1 "/usr/include/sys/_stdint.h" 1 3 4 >/*- > * Copyright (c) 2011 David E. O'Brien <obrien@FreeBSD.org> > * Copyright (c) 2001 Mike Barcroft <mike@FreeBSD.org> > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: head/sys/sys/_stdint.h 290492 2015-11-07 12:30:43Z kib $ > */ > >#ifndef _SYS__STDINT_H_ >#define _SYS__STDINT_H_ > >#ifndef _INT8_T_DECLARED >typedef __int8_t int8_t; >#define _INT8_T_DECLARED >#endif ># 37 "/usr/include/sys/_stdint.h" 3 4 > >#ifndef _INT16_T_DECLARED >typedef __int16_t int16_t; >#define _INT16_T_DECLARED >#endif ># 42 "/usr/include/sys/_stdint.h" 3 4 > >#ifndef _INT32_T_DECLARED >typedef __int32_t int32_t; >#define _INT32_T_DECLARED >#endif ># 47 "/usr/include/sys/_stdint.h" 3 4 > >#ifndef _INT64_T_DECLARED >typedef __int64_t int64_t; >#define _INT64_T_DECLARED >#endif ># 52 "/usr/include/sys/_stdint.h" 3 4 > >#ifndef _UINT8_T_DECLARED >typedef __uint8_t uint8_t; >#define _UINT8_T_DECLARED >#endif ># 57 "/usr/include/sys/_stdint.h" 3 4 > >#ifndef _UINT16_T_DECLARED >typedef __uint16_t uint16_t; >#define _UINT16_T_DECLARED >#endif ># 62 "/usr/include/sys/_stdint.h" 3 4 > >#ifndef _UINT32_T_DECLARED >typedef __uint32_t uint32_t; >#define _UINT32_T_DECLARED >#endif ># 67 "/usr/include/sys/_stdint.h" 3 4 > >#ifndef _UINT64_T_DECLARED >typedef __uint64_t uint64_t; >#define _UINT64_T_DECLARED >#endif ># 72 "/usr/include/sys/_stdint.h" 3 4 > >#ifndef _INTPTR_T_DECLARED >typedef __intptr_t intptr_t; >#define _INTPTR_T_DECLARED >#endif ># 77 "/usr/include/sys/_stdint.h" 3 4 >#ifndef _UINTPTR_T_DECLARED >typedef __uintptr_t uintptr_t; >#define _UINTPTR_T_DECLARED >#endif ># 81 "/usr/include/sys/_stdint.h" 3 4 >#ifndef _INTMAX_T_DECLARED >typedef __intmax_t intmax_t; >#define _INTMAX_T_DECLARED >#endif ># 85 "/usr/include/sys/_stdint.h" 3 4 >#ifndef _UINTMAX_T_DECLARED >typedef __uintmax_t uintmax_t; >#define _UINTMAX_T_DECLARED >#endif ># 89 "/usr/include/sys/_stdint.h" 3 4 > >#endif /* !_SYS__STDINT_H_ */ ># 91 "/usr/include/sys/_stdint.h" 3 4 ># 37 "/usr/include/stdint.h" 2 3 4 > >typedef __int_least8_t int_least8_t; >typedef __int_least16_t int_least16_t; >typedef __int_least32_t int_least32_t; >typedef __int_least64_t int_least64_t; > >typedef __uint_least8_t uint_least8_t; >typedef __uint_least16_t uint_least16_t; >typedef __uint_least32_t uint_least32_t; >typedef __uint_least64_t uint_least64_t; > >typedef __int_fast8_t int_fast8_t; >typedef __int_fast16_t int_fast16_t; >typedef __int_fast32_t int_fast32_t; >typedef __int_fast64_t int_fast64_t; > >typedef __uint_fast8_t uint_fast8_t; >typedef __uint_fast16_t uint_fast16_t; >typedef __uint_fast32_t uint_fast32_t; >typedef __uint_fast64_t uint_fast64_t; > >/* GNU and Darwin define this and people seem to think it's portable */ >#if defined(UINTPTR_MAX) && defined(UINT64_MAX) && (UINTPTR_MAX == UINT64_MAX) >#define __WORDSIZE 64 >#else ># 62 "/usr/include/stdint.h" 3 4 >#define __WORDSIZE 32 >#endif ># 64 "/usr/include/stdint.h" 3 4 > >/* Limits of wchar_t. */ >#define WCHAR_MIN __WCHAR_MIN >#define WCHAR_MAX __WCHAR_MAX > >#if __EXT1_VISIBLE >/* ISO/IEC 9899:2011 K.3.4.4 */ >#ifndef RSIZE_MAX >#define RSIZE_MAX (SIZE_MAX >> 1) >#endif ># 74 "/usr/include/stdint.h" 3 4 >#endif /* __EXT1_VISIBLE */ ># 75 "/usr/include/stdint.h" 3 4 > >#endif /* !_SYS_STDINT_H_ */ ># 77 "/usr/include/stdint.h" 3 4 ># 120 "/usr/include/c++/v1/stdint.h" 2 3 > >#endif // _LIBCPP_STDINT_H ># 122 "/usr/include/c++/v1/stdint.h" 3 ># 45 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" 2 >#endif ># 46 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" > >#ifdef AS_USE_NAMESPACE > #define BEGIN_AS_NAMESPACE namespace AngelScript { > #define END_AS_NAMESPACE } > #define AS_NAMESPACE_QUALIFIER AngelScript:: >#else ># 52 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" > #define BEGIN_AS_NAMESPACE > #define END_AS_NAMESPACE > #define AS_NAMESPACE_QUALIFIER :: >#endif ># 56 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" > >BEGIN_AS_NAMESPACE > >// AngelScript version > >#define ANGELSCRIPT_VERSION 23102 >#define ANGELSCRIPT_VERSION_STRING "2.31.2" > >// Data types > >class asIScriptEngine; >class asIScriptModule; >class asIScriptContext; >class asIScriptGeneric; >class asIScriptObject; >class asITypeInfo; >#ifdef AS_DEPRECATED >// deprecated since 2.31.0 - 2015/11/18 >typedef asITypeInfo asIObjectType; >#endif ># 76 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" >class asIScriptFunction; >class asIBinaryStream; >class asIJITCompiler; >class asIThreadManager; >class asILockableSharedBool; > >// Enumerations and constants > >// Return codes >enum asERetCodes >{ > asSUCCESS = 0, > asERROR = -1, > asCONTEXT_ACTIVE = -2, > asCONTEXT_NOT_FINISHED = -3, > asCONTEXT_NOT_PREPARED = -4, > asINVALID_ARG = -5, > asNO_FUNCTION = -6, > asNOT_SUPPORTED = -7, > asINVALID_NAME = -8, > asNAME_TAKEN = -9, > asINVALID_DECLARATION = -10, > asINVALID_OBJECT = -11, > asINVALID_TYPE = -12, > asALREADY_REGISTERED = -13, > asMULTIPLE_FUNCTIONS = -14, > asNO_MODULE = -15, > asNO_GLOBAL_VAR = -16, > asINVALID_CONFIGURATION = -17, > asINVALID_INTERFACE = -18, > asCANT_BIND_ALL_FUNCTIONS = -19, > asLOWER_ARRAY_DIMENSION_NOT_REGISTERED = -20, > asWRONG_CONFIG_GROUP = -21, > asCONFIG_GROUP_IS_IN_USE = -22, > asILLEGAL_BEHAVIOUR_FOR_TYPE = -23, > asWRONG_CALLING_CONV = -24, > asBUILD_IN_PROGRESS = -25, > asINIT_GLOBAL_VARS_FAILED = -26, > asOUT_OF_MEMORY = -27, > asMODULE_IS_IN_USE = -28 >}; > >// Engine properties >enum asEEngineProp >{ > asEP_ALLOW_UNSAFE_REFERENCES = 1, > asEP_OPTIMIZE_BYTECODE = 2, > asEP_COPY_SCRIPT_SECTIONS = 3, > asEP_MAX_STACK_SIZE = 4, > asEP_USE_CHARACTER_LITERALS = 5, > asEP_ALLOW_MULTILINE_STRINGS = 6, > asEP_ALLOW_IMPLICIT_HANDLE_TYPES = 7, > asEP_BUILD_WITHOUT_LINE_CUES = 8, > asEP_INIT_GLOBAL_VARS_AFTER_BUILD = 9, > asEP_REQUIRE_ENUM_SCOPE = 10, > asEP_SCRIPT_SCANNER = 11, > asEP_INCLUDE_JIT_INSTRUCTIONS = 12, > asEP_STRING_ENCODING = 13, > asEP_PROPERTY_ACCESSOR_MODE = 14, > asEP_EXPAND_DEF_ARRAY_TO_TMPL = 15, > asEP_AUTO_GARBAGE_COLLECT = 16, > asEP_DISALLOW_GLOBAL_VARS = 17, > asEP_ALWAYS_IMPL_DEFAULT_CONSTRUCT = 18, > asEP_COMPILER_WARNINGS = 19, > asEP_DISALLOW_VALUE_ASSIGN_FOR_REF_TYPE = 20, > asEP_ALTER_SYNTAX_NAMED_ARGS = 21, > asEP_DISABLE_INTEGER_DIVISION = 22, > asEP_DISALLOW_EMPTY_LIST_ELEMENTS = 23, > asEP_PRIVATE_PROP_AS_PROTECTED = 24, > asEP_ALLOW_UNICODE_IDENTIFIERS = 25, > asEP_HEREDOC_TRIM_MODE = 26, > > asEP_LAST_PROPERTY >}; > >// Calling conventions >enum asECallConvTypes >{ > asCALL_CDECL = 0, > asCALL_STDCALL = 1, > asCALL_THISCALL_ASGLOBAL = 2, > asCALL_THISCALL = 3, > asCALL_CDECL_OBJLAST = 4, > asCALL_CDECL_OBJFIRST = 5, > asCALL_GENERIC = 6, > asCALL_THISCALL_OBJLAST = 7, > asCALL_THISCALL_OBJFIRST = 8 >}; > >// Object type flags >enum asEObjTypeFlags >{ > asOBJ_REF = (1<<0), > asOBJ_VALUE = (1<<1), > asOBJ_GC = (1<<2), > asOBJ_POD = (1<<3), > asOBJ_NOHANDLE = (1<<4), > asOBJ_SCOPED = (1<<5), > asOBJ_TEMPLATE = (1<<6), > asOBJ_ASHANDLE = (1<<7), > asOBJ_APP_CLASS = (1<<8), > asOBJ_APP_CLASS_CONSTRUCTOR = (1<<9), > asOBJ_APP_CLASS_DESTRUCTOR = (1<<10), > asOBJ_APP_CLASS_ASSIGNMENT = (1<<11), > asOBJ_APP_CLASS_COPY_CONSTRUCTOR = (1<<12), > asOBJ_APP_CLASS_C = (asOBJ_APP_CLASS + asOBJ_APP_CLASS_CONSTRUCTOR), > asOBJ_APP_CLASS_CD = (asOBJ_APP_CLASS + asOBJ_APP_CLASS_CONSTRUCTOR + asOBJ_APP_CLASS_DESTRUCTOR), > asOBJ_APP_CLASS_CA = (asOBJ_APP_CLASS + asOBJ_APP_CLASS_CONSTRUCTOR + asOBJ_APP_CLASS_ASSIGNMENT), > asOBJ_APP_CLASS_CK = (asOBJ_APP_CLASS + asOBJ_APP_CLASS_CONSTRUCTOR + asOBJ_APP_CLASS_COPY_CONSTRUCTOR), > asOBJ_APP_CLASS_CDA = (asOBJ_APP_CLASS + asOBJ_APP_CLASS_CONSTRUCTOR + asOBJ_APP_CLASS_DESTRUCTOR + asOBJ_APP_CLASS_ASSIGNMENT), > asOBJ_APP_CLASS_CDK = (asOBJ_APP_CLASS + asOBJ_APP_CLASS_CONSTRUCTOR + asOBJ_APP_CLASS_DESTRUCTOR + asOBJ_APP_CLASS_COPY_CONSTRUCTOR), > asOBJ_APP_CLASS_CAK = (asOBJ_APP_CLASS + asOBJ_APP_CLASS_CONSTRUCTOR + asOBJ_APP_CLASS_ASSIGNMENT + asOBJ_APP_CLASS_COPY_CONSTRUCTOR), > asOBJ_APP_CLASS_CDAK = (asOBJ_APP_CLASS + asOBJ_APP_CLASS_CONSTRUCTOR + asOBJ_APP_CLASS_DESTRUCTOR + asOBJ_APP_CLASS_ASSIGNMENT + asOBJ_APP_CLASS_COPY_CONSTRUCTOR), > asOBJ_APP_CLASS_D = (asOBJ_APP_CLASS + asOBJ_APP_CLASS_DESTRUCTOR), > asOBJ_APP_CLASS_DA = (asOBJ_APP_CLASS + asOBJ_APP_CLASS_DESTRUCTOR + asOBJ_APP_CLASS_ASSIGNMENT), > asOBJ_APP_CLASS_DK = (asOBJ_APP_CLASS + asOBJ_APP_CLASS_DESTRUCTOR + asOBJ_APP_CLASS_COPY_CONSTRUCTOR), > asOBJ_APP_CLASS_DAK = (asOBJ_APP_CLASS + asOBJ_APP_CLASS_DESTRUCTOR + asOBJ_APP_CLASS_ASSIGNMENT + asOBJ_APP_CLASS_COPY_CONSTRUCTOR), > asOBJ_APP_CLASS_A = (asOBJ_APP_CLASS + asOBJ_APP_CLASS_ASSIGNMENT), > asOBJ_APP_CLASS_AK = (asOBJ_APP_CLASS + asOBJ_APP_CLASS_ASSIGNMENT + asOBJ_APP_CLASS_COPY_CONSTRUCTOR), > asOBJ_APP_CLASS_K = (asOBJ_APP_CLASS + asOBJ_APP_CLASS_COPY_CONSTRUCTOR), > asOBJ_APP_PRIMITIVE = (1<<13), > asOBJ_APP_FLOAT = (1<<14), > asOBJ_APP_ARRAY = (1<<15), > asOBJ_APP_CLASS_ALLINTS = (1<<16), > asOBJ_APP_CLASS_ALLFLOATS = (1<<17), > asOBJ_NOCOUNT = (1<<18), > asOBJ_APP_CLASS_ALIGN8 = (1<<19), > asOBJ_IMPLICIT_HANDLE = (1<<20), > asOBJ_MASK_VALID_FLAGS = 0x1FFFFF, > // Internal flags > asOBJ_SCRIPT_OBJECT = (1<<21), > asOBJ_SHARED = (1<<22), > asOBJ_NOINHERIT = (1<<23), > asOBJ_FUNCDEF = (1<<24), > asOBJ_LIST_PATTERN = (1<<25), > asOBJ_ENUM = (1<<26), > asOBJ_TEMPLATE_SUBTYPE = (1<<27), > asOBJ_TYPEDEF = (1<<28), > asOBJ_ABSTRACT = (1<<29), > asOBJ_APP_ALIGN16 = (1<<30) >}; > >// Behaviours >enum asEBehaviours >{ > // Value object memory management > asBEHAVE_CONSTRUCT, > asBEHAVE_LIST_CONSTRUCT, > asBEHAVE_DESTRUCT, > > // Reference object memory management > asBEHAVE_FACTORY, > asBEHAVE_LIST_FACTORY, > asBEHAVE_ADDREF, > asBEHAVE_RELEASE, > asBEHAVE_GET_WEAKREF_FLAG, > > // Object operators >#ifdef AS_DEPRECATED > // Deprecated since 2.30.0, 2014-10-24 > asBEHAVE_VALUE_CAST, > asBEHAVE_IMPLICIT_VALUE_CAST, > // Deprecated since 2.30.0, 2014-12-30 > asBEHAVE_REF_CAST, > asBEHAVE_IMPLICIT_REF_CAST, >#endif ># 242 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" > asBEHAVE_TEMPLATE_CALLBACK, > > // Garbage collection behaviours > asBEHAVE_FIRST_GC, > asBEHAVE_GETREFCOUNT = asBEHAVE_FIRST_GC, > asBEHAVE_SETGCFLAG, > asBEHAVE_GETGCFLAG, > asBEHAVE_ENUMREFS, > asBEHAVE_RELEASEREFS, > asBEHAVE_LAST_GC = asBEHAVE_RELEASEREFS, > > asBEHAVE_MAX >}; > >// Context states >enum asEContextState >{ > asEXECUTION_FINISHED = 0, > asEXECUTION_SUSPENDED = 1, > asEXECUTION_ABORTED = 2, > asEXECUTION_EXCEPTION = 3, > asEXECUTION_PREPARED = 4, > asEXECUTION_UNINITIALIZED = 5, > asEXECUTION_ACTIVE = 6, > asEXECUTION_ERROR = 7 >}; > >// Message types >enum asEMsgType >{ > asMSGTYPE_ERROR = 0, > asMSGTYPE_WARNING = 1, > asMSGTYPE_INFORMATION = 2 >}; > >// Garbage collector flags >enum asEGCFlags >{ > asGC_FULL_CYCLE = 1, > asGC_ONE_STEP = 2, > asGC_DESTROY_GARBAGE = 4, > asGC_DETECT_GARBAGE = 8 >}; > >// Token classes >enum asETokenClass >{ > asTC_UNKNOWN = 0, > asTC_KEYWORD = 1, > asTC_VALUE = 2, > asTC_IDENTIFIER = 3, > asTC_COMMENT = 4, > asTC_WHITESPACE = 5 >}; > >// Type id flags >enum asETypeIdFlags >{ > asTYPEID_VOID = 0, > asTYPEID_BOOL = 1, > asTYPEID_INT8 = 2, > asTYPEID_INT16 = 3, > asTYPEID_INT32 = 4, > asTYPEID_INT64 = 5, > asTYPEID_UINT8 = 6, > asTYPEID_UINT16 = 7, > asTYPEID_UINT32 = 8, > asTYPEID_UINT64 = 9, > asTYPEID_FLOAT = 10, > asTYPEID_DOUBLE = 11, > asTYPEID_OBJHANDLE = 0x40000000, > asTYPEID_HANDLETOCONST = 0x20000000, > asTYPEID_MASK_OBJECT = 0x1C000000, > asTYPEID_APPOBJECT = 0x04000000, > asTYPEID_SCRIPTOBJECT = 0x08000000, > asTYPEID_TEMPLATE = 0x10000000, > asTYPEID_MASK_SEQNBR = 0x03FFFFFF >}; > >// Type modifiers >enum asETypeModifiers >{ > asTM_NONE = 0, > asTM_INREF = 1, > asTM_OUTREF = 2, > asTM_INOUTREF = 3, > asTM_CONST = 4 >}; > >// GetModule flags >enum asEGMFlags >{ > asGM_ONLY_IF_EXISTS = 0, > asGM_CREATE_IF_NOT_EXISTS = 1, > asGM_ALWAYS_CREATE = 2 >}; > >// Compile flags >enum asECompileFlags >{ > asCOMP_ADD_TO_MODULE = 1 >}; > >// Function types >enum asEFuncType >{ > asFUNC_DUMMY =-1, > asFUNC_SYSTEM = 0, > asFUNC_SCRIPT = 1, > asFUNC_INTERFACE = 2, > asFUNC_VIRTUAL = 3, > asFUNC_FUNCDEF = 4, > asFUNC_IMPORTED = 5, > asFUNC_DELEGATE = 6 >}; > >// >// asBYTE = 8 bits >// asWORD = 16 bits >// asDWORD = 32 bits >// asQWORD = 64 bits >// asPWORD = size of pointer >// >typedef unsigned char asBYTE; >typedef unsigned short asWORD; >typedef unsigned int asUINT; >#if (defined(_MSC_VER) && _MSC_VER <= 1200) || defined(__S3E__) || (defined(_MSC_VER) && defined(__clang__)) > // size_t is not really correct, since it only guaranteed to be large enough to hold the segment size. > // For example, on 16bit systems the size_t may be 16bits only even if pointers are 32bit. But nobody > // is likely to use MSVC6 to compile for 16bit systems anymore, so this should be ok. > typedef size_t asPWORD; >#else ># 374 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" > typedef uintptr_t asPWORD; >#endif ># 376 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" >#ifdef __LP64__ > typedef unsigned int asDWORD; > typedef unsigned long asQWORD; > typedef long asINT64; >#else ># 381 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" > typedef unsigned long asDWORD; > #if !defined(_MSC_VER) && (defined(__GNUC__) || defined(__MWERKS__) || defined(__SUNPRO_CC) || defined(__psp2__)) > typedef uint64_t asQWORD; > typedef int64_t asINT64; > #else ># 386 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" > typedef unsigned __int64 asQWORD; > typedef __int64 asINT64; > #endif ># 389 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" >#endif ># 390 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" > >// Is the target a 64bit system? >#if defined(__LP64__) || defined(__amd64__) || defined(__x86_64__) || defined(_M_X64) > #ifndef AS_64BIT_PTR > #define AS_64BIT_PTR > #endif ># 396 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" >#endif ># 397 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" > >typedef void (*asFUNCTION_t)(); >typedef void (*asGENFUNC_t)(asIScriptGeneric *); >typedef void *(*asALLOCFUNC_t)(size_t); >typedef void (*asFREEFUNC_t)(void *); >typedef void (*asCLEANENGINEFUNC_t)(asIScriptEngine *); >typedef void (*asCLEANMODULEFUNC_t)(asIScriptModule *); >typedef void (*asCLEANCONTEXTFUNC_t)(asIScriptContext *); >typedef void (*asCLEANFUNCTIONFUNC_t)(asIScriptFunction *); >typedef void (*asCLEANTYPEINFOFUNC_t)(asITypeInfo *); >#ifdef AS_DEPRECATED >// deprecated since 2.31.0 - 2015/11/18 >typedef asCLEANTYPEINFOFUNC_t asCLEANOBJECTTYPEFUNC_t; >#endif ># 411 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" >typedef void (*asCLEANSCRIPTOBJECTFUNC_t)(asIScriptObject *); >typedef asIScriptContext *(*asREQUESTCONTEXTFUNC_t)(asIScriptEngine *, void *); >typedef void (*asRETURNCONTEXTFUNC_t)(asIScriptEngine *, asIScriptContext *, void *); > >// Check if the compiler can use C++11 features >#if !defined(_MSC_VER) || _MSC_VER >= 1700 // MSVC 2012 > #if !defined(__GNUC__) || defined(__clang__) || __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7) // gnuc 4.7 or clang > #if !(defined(__GNUC__) && defined(__cplusplus) && __cplusplus < 201103L) // gnuc and clang require compiler flag -std=c++11 > #if !defined(__SUNPRO_CC) // Oracle Solaris Studio > #define AS_CAN_USE_CPP11 1 > #endif ># 422 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" > #endif ># 423 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" > #endif ># 424 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" >#endif ># 425 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" > >// This macro does basically the same thing as offsetof defined in stddef.h, but >// GNUC should not complain about the usage as I'm not using 0 as the base pointer. >#define asOFFSET(s,m) ((size_t)(&reinterpret_cast<s*>(100000)->m)-100000) > >#define asFUNCTION(f) asFunctionPtr(f) >#if (defined(_MSC_VER) && _MSC_VER <= 1200) || (defined(__BORLANDC__) && __BORLANDC__ < 0x590) >// MSVC 6 has a bug that prevents it from properly compiling using the correct asFUNCTIONPR with operator > >// so we need to use ordinary C style cast instead of static_cast. The drawback is that the compiler can't >// check that the cast is really valid. >// BCC v5.8 (C++Builder 2006) and earlier have a similar bug which forces us to fall back to a C-style cast. >#define asFUNCTIONPR(f,p,r) asFunctionPtr((void (*)())((r (*)p)(f))) >#else ># 438 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" >#define asFUNCTIONPR(f,p,r) asFunctionPtr((void (*)())(static_cast<r (*)p>(f))) >#endif ># 440 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" > >#ifndef AS_NO_CLASS_METHODS > >class asCUnknownClass; >typedef void (asCUnknownClass::*asMETHOD_t)(); > >struct asSFuncPtr >{ > asSFuncPtr(asBYTE f = 0) > { > for( size_t n = 0; n < sizeof(ptr.dummy); n++ ) > ptr.dummy[n] = 0; > flag = f; > } > > void CopyMethodPtr(const void *mthdPtr, size_t size) > { > for( size_t n = 0; n < size; n++ ) > ptr.dummy[n] = reinterpret_cast<const char *>(mthdPtr)[n]; > } > > union > { > // The largest known method point is 20 bytes (MSVC 64bit), > // but with 8byte alignment this becomes 24 bytes. So we need > // to be able to store at least that much. > char dummy[25]; > struct {asMETHOD_t mthd; char dummy[25-sizeof(asMETHOD_t)];} m; > struct {asFUNCTION_t func; char dummy[25-sizeof(asFUNCTION_t)];} f; > } ptr; > asBYTE flag; // 1 = generic, 2 = global func, 3 = method >}; > >#if defined(__BORLANDC__) >// A bug in BCC (QC #85374) makes it impossible to distinguish const/non-const method overloads >// with static_cast<>. The workaround is to use an _implicit_cast instead. > > #if __BORLANDC__ < 0x590 > // BCC v5.8 (C++Builder 2006) and earlier have an even more annoying bug which causes > // the "pretty" workaround below (with _implicit_cast<>) to fail. For these compilers > // we need to use a traditional C-style cast. > #define AS_METHOD_AMBIGUITY_CAST(t) (t) > #else ># 483 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" >template <typename T> > T _implicit_cast (T val) >{ return val; } > #define AS_METHOD_AMBIGUITY_CAST(t) AS_NAMESPACE_QUALIFIER _implicit_cast<t > > #endif ># 488 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" >#else ># 489 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" > #define AS_METHOD_AMBIGUITY_CAST(t) static_cast<t > >#endif ># 491 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" > >#define asMETHOD(c,m) asSMethodPtr<sizeof(void (c::*)())>::Convert((void (c::*)())(&c::m)) >#define asMETHODPR(c,m,p,r) asSMethodPtr<sizeof(void (c::*)())>::Convert(AS_METHOD_AMBIGUITY_CAST(r (c::*)p)(&c::m)) > >#else // Class methods are disabled ># 496 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" > >struct asSFuncPtr >{ > asSFuncPtr(asBYTE f) > { > for( int n = 0; n < sizeof(ptr.dummy); n++ ) > ptr.dummy[n] = 0; > flag = f; > } > > union > { > char dummy[25]; // largest known class method pointer > struct {asFUNCTION_t func; char dummy[25-sizeof(asFUNCTION_t)];} f; > } ptr; > asBYTE flag; // 1 = generic, 2 = global func >}; > >#endif ># 515 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" > >struct asSMessageInfo >{ > const char *section; > int row; > int col; > asEMsgType type; > const char *message; >}; > > >// API functions > >// ANGELSCRIPT_EXPORT is defined when compiling the dll or lib >// ANGELSCRIPT_DLL_LIBRARY_IMPORT is defined when dynamically linking to the >// dll through the link lib automatically generated by MSVC++ >// ANGELSCRIPT_DLL_MANUAL_IMPORT is defined when manually loading the dll >// Don't define anything when linking statically to the lib > >#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) > #if defined(ANGELSCRIPT_EXPORT) > #define AS_API __declspec(dllexport) > #elif defined(ANGELSCRIPT_DLL_LIBRARY_IMPORT) ># 538 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" > #define AS_API __declspec(dllimport) > #else // statically linked library ># 540 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" > #define AS_API > #endif ># 542 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" >#elif defined(__GNUC__) ># 543 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" > #if defined(ANGELSCRIPT_EXPORT) > #define AS_API __attribute__((visibility ("default"))) > #else ># 546 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" > #define AS_API > #endif ># 548 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" >#else ># 549 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" > #define AS_API >#endif ># 551 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" > >#ifndef ANGELSCRIPT_DLL_MANUAL_IMPORT >extern "C" >{ > // Engine > AS_API asIScriptEngine *asCreateScriptEngine(asDWORD version = ANGELSCRIPT_VERSION); > AS_API const char *asGetLibraryVersion(); > AS_API const char *asGetLibraryOptions(); > > // Context > AS_API asIScriptContext *asGetActiveContext(); > > // Thread support > AS_API int asPrepareMultithread(asIThreadManager *externalMgr = 0); > AS_API void asUnprepareMultithread(); > AS_API asIThreadManager *asGetThreadManager(); > AS_API void asAcquireExclusiveLock(); > AS_API void asReleaseExclusiveLock(); > AS_API void asAcquireSharedLock(); > AS_API void asReleaseSharedLock(); > AS_API int asAtomicInc(int &value); > AS_API int asAtomicDec(int &value); > AS_API int asThreadCleanup(); > > // Memory management > AS_API int asSetGlobalMemoryFunctions(asALLOCFUNC_t allocFunc, asFREEFUNC_t freeFunc); > AS_API int asResetGlobalMemoryFunctions(); > AS_API void *asAllocMem(size_t size); > AS_API void asFreeMem(void *mem); > > // Auxiliary > AS_API asILockableSharedBool *asCreateLockableSharedBool(); >} >#endif // ANGELSCRIPT_DLL_MANUAL_IMPORT ># 585 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" > >// Determine traits of a type for registration of value types >// Relies on C++11 features so it can not be used with non-compliant compilers >#ifdef AS_CAN_USE_CPP11 > >END_AS_NAMESPACE >#if 0 /* expanded by -frewrite-includes */ >#include <type_traits> >#endif /* expanded by -frewrite-includes */ ># 591 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" ># 1 "/usr/include/c++/v1/type_traits" 1 3 >// -*- C++ -*- >//===------------------------ type_traits ---------------------------------===// >// >// The LLVM Compiler Infrastructure >// >// This file is dual licensed under the MIT and the University of Illinois Open >// Source Licenses. See LICENSE.TXT for details. >// >//===----------------------------------------------------------------------===// > >#ifndef _LIBCPP_TYPE_TRAITS >#define _LIBCPP_TYPE_TRAITS > >/* > type_traits synopsis > >namespace std >{ > > // helper class: > template <class T, T v> struct integral_constant; > typedef integral_constant<bool, true> true_type; // C++11 > typedef integral_constant<bool, false> false_type; // C++11 > > template <bool B> // C++14 > using bool_constant = integral_constant<bool, B>; // C++14 > typedef bool_constant<true> true_type; // C++14 > typedef bool_constant<false> false_type; // C++14 > > // helper traits > template <bool, class T = void> struct enable_if; > template <bool, class T, class F> struct conditional; > > // Primary classification traits: > template <class T> struct is_void; > template <class T> struct is_null_pointer; // C++14 > template <class T> struct is_integral; > template <class T> struct is_floating_point; > template <class T> struct is_array; > template <class T> struct is_pointer; > template <class T> struct is_lvalue_reference; > template <class T> struct is_rvalue_reference; > template <class T> struct is_member_object_pointer; > template <class T> struct is_member_function_pointer; > template <class T> struct is_enum; > template <class T> struct is_union; > template <class T> struct is_class; > template <class T> struct is_function; > > // Secondary classification traits: > template <class T> struct is_reference; > template <class T> struct is_arithmetic; > template <class T> struct is_fundamental; > template <class T> struct is_member_pointer; > template <class T> struct is_scalar; > template <class T> struct is_object; > template <class T> struct is_compound; > > // Const-volatile properties and transformations: > template <class T> struct is_const; > template <class T> struct is_volatile; > template <class T> struct remove_const; > template <class T> struct remove_volatile; > template <class T> struct remove_cv; > template <class T> struct add_const; > template <class T> struct add_volatile; > template <class T> struct add_cv; > > // Reference transformations: > template <class T> struct remove_reference; > template <class T> struct add_lvalue_reference; > template <class T> struct add_rvalue_reference; > > // Pointer transformations: > template <class T> struct remove_pointer; > template <class T> struct add_pointer; > > // Integral properties: > template <class T> struct is_signed; > template <class T> struct is_unsigned; > template <class T> struct make_signed; > template <class T> struct make_unsigned; > > // Array properties and transformations: > template <class T> struct rank; > template <class T, unsigned I = 0> struct extent; > template <class T> struct remove_extent; > template <class T> struct remove_all_extents; > > // Member introspection: > template <class T> struct is_pod; > template <class T> struct is_trivial; > template <class T> struct is_trivially_copyable; > template <class T> struct is_standard_layout; > template <class T> struct is_literal_type; > template <class T> struct is_empty; > template <class T> struct is_polymorphic; > template <class T> struct is_abstract; > template <class T> struct is_final; // C++14 > template <class T> struct is_aggregate; // C++17 > > template <class T, class... Args> struct is_constructible; > template <class T> struct is_default_constructible; > template <class T> struct is_copy_constructible; > template <class T> struct is_move_constructible; > template <class T, class U> struct is_assignable; > template <class T> struct is_copy_assignable; > template <class T> struct is_move_assignable; > template <class T, class U> struct is_swappable_with; // C++17 > template <class T> struct is_swappable; // C++17 > template <class T> struct is_destructible; > > template <class T, class... Args> struct is_trivially_constructible; > template <class T> struct is_trivially_default_constructible; > template <class T> struct is_trivially_copy_constructible; > template <class T> struct is_trivially_move_constructible; > template <class T, class U> struct is_trivially_assignable; > template <class T> struct is_trivially_copy_assignable; > template <class T> struct is_trivially_move_assignable; > template <class T> struct is_trivially_destructible; > > template <class T, class... Args> struct is_nothrow_constructible; > template <class T> struct is_nothrow_default_constructible; > template <class T> struct is_nothrow_copy_constructible; > template <class T> struct is_nothrow_move_constructible; > template <class T, class U> struct is_nothrow_assignable; > template <class T> struct is_nothrow_copy_assignable; > template <class T> struct is_nothrow_move_assignable; > template <class T, class U> struct is_nothrow_swappable_with; // C++17 > template <class T> struct is_nothrow_swappable; // C++17 > template <class T> struct is_nothrow_destructible; > > template <class T> struct has_virtual_destructor; > > // Relationships between types: > template <class T, class U> struct is_same; > template <class Base, class Derived> struct is_base_of; > template <class From, class To> struct is_convertible; > > template <class, class R = void> struct is_callable; // not defined > template <class Fn, class... ArgTypes, class R> > struct is_callable<Fn(ArgTypes...), R>; > > template <class, class R = void> struct is_nothrow_callable; // not defined > template <class Fn, class... ArgTypes, class R> > struct is_nothrow_callable<Fn(ArgTypes...), R>; > > // Alignment properties and transformations: > template <class T> struct alignment_of; > template <size_t Len, size_t Align = most_stringent_alignment_requirement> > struct aligned_storage; > template <size_t Len, class... Types> struct aligned_union; > > template <class T> struct decay; > template <class... T> struct common_type; > template <class T> struct underlying_type; > template <class> class result_of; // undefined > template <class Fn, class... ArgTypes> class result_of<Fn(ArgTypes...)>; > > // const-volatile modifications: > template <class T> > using remove_const_t = typename remove_const<T>::type; // C++14 > template <class T> > using remove_volatile_t = typename remove_volatile<T>::type; // C++14 > template <class T> > using remove_cv_t = typename remove_cv<T>::type; // C++14 > template <class T> > using add_const_t = typename add_const<T>::type; // C++14 > template <class T> > using add_volatile_t = typename add_volatile<T>::type; // C++14 > template <class T> > using add_cv_t = typename add_cv<T>::type; // C++14 > > // reference modifications: > template <class T> > using remove_reference_t = typename remove_reference<T>::type; // C++14 > template <class T> > using add_lvalue_reference_t = typename add_lvalue_reference<T>::type; // C++14 > template <class T> > using add_rvalue_reference_t = typename add_rvalue_reference<T>::type; // C++14 > > // sign modifications: > template <class T> > using make_signed_t = typename make_signed<T>::type; // C++14 > template <class T> > using make_unsigned_t = typename make_unsigned<T>::type; // C++14 > > // array modifications: > template <class T> > using remove_extent_t = typename remove_extent<T>::type; // C++14 > template <class T> > using remove_all_extents_t = typename remove_all_extents<T>::type; // C++14 > > // pointer modifications: > template <class T> > using remove_pointer_t = typename remove_pointer<T>::type; // C++14 > template <class T> > using add_pointer_t = typename add_pointer<T>::type; // C++14 > > // other transformations: > template <size_t Len, std::size_t Align=default-alignment> > using aligned_storage_t = typename aligned_storage<Len,Align>::type; // C++14 > template <std::size_t Len, class... Types> > using aligned_union_t = typename aligned_union<Len,Types...>::type; // C++14 > template <class T> > using decay_t = typename decay<T>::type; // C++14 > template <bool b, class T=void> > using enable_if_t = typename enable_if<b,T>::type; // C++14 > template <bool b, class T, class F> > using conditional_t = typename conditional<b,T,F>::type; // C++14 > template <class... T> > using common_type_t = typename common_type<T...>::type; // C++14 > template <class T> > using underlying_type_t = typename underlying_type<T>::type; // C++14 > template <class F, class... ArgTypes> > using result_of_t = typename result_of<F(ArgTypes...)>::type; // C++14 > > template <class...> > using void_t = void; // C++17 > > // See C++14 20.10.4.1, primary type categories > template <class T> constexpr bool is_void_v > = is_void<T>::value; // C++17 > template <class T> constexpr bool is_null_pointer_v > = is_null_pointer<T>::value; // C++17 > template <class T> constexpr bool is_integral_v > = is_integral<T>::value; // C++17 > template <class T> constexpr bool is_floating_point_v > = is_floating_point<T>::value; // C++17 > template <class T> constexpr bool is_array_v > = is_array<T>::value; // C++17 > template <class T> constexpr bool is_pointer_v > = is_pointer<T>::value; // C++17 > template <class T> constexpr bool is_lvalue_reference_v > = is_lvalue_reference<T>::value; // C++17 > template <class T> constexpr bool is_rvalue_reference_v > = is_rvalue_reference<T>::value; // C++17 > template <class T> constexpr bool is_member_object_pointer_v > = is_member_object_pointer<T>::value; // C++17 > template <class T> constexpr bool is_member_function_pointer_v > = is_member_function_pointer<T>::value; // C++17 > template <class T> constexpr bool is_enum_v > = is_enum<T>::value; // C++17 > template <class T> constexpr bool is_union_v > = is_union<T>::value; // C++17 > template <class T> constexpr bool is_class_v > = is_class<T>::value; // C++17 > template <class T> constexpr bool is_function_v > = is_function<T>::value; // C++17 > > // See C++14 20.10.4.2, composite type categories > template <class T> constexpr bool is_reference_v > = is_reference<T>::value; // C++17 > template <class T> constexpr bool is_arithmetic_v > = is_arithmetic<T>::value; // C++17 > template <class T> constexpr bool is_fundamental_v > = is_fundamental<T>::value; // C++17 > template <class T> constexpr bool is_object_v > = is_object<T>::value; // C++17 > template <class T> constexpr bool is_scalar_v > = is_scalar<T>::value; // C++17 > template <class T> constexpr bool is_compound_v > = is_compound<T>::value; // C++17 > template <class T> constexpr bool is_member_pointer_v > = is_member_pointer<T>::value; // C++17 > > // See C++14 20.10.4.3, type properties > template <class T> constexpr bool is_const_v > = is_const<T>::value; // C++17 > template <class T> constexpr bool is_volatile_v > = is_volatile<T>::value; // C++17 > template <class T> constexpr bool is_trivial_v > = is_trivial<T>::value; // C++17 > template <class T> constexpr bool is_trivially_copyable_v > = is_trivially_copyable<T>::value; // C++17 > template <class T> constexpr bool is_standard_layout_v > = is_standard_layout<T>::value; // C++17 > template <class T> constexpr bool is_pod_v > = is_pod<T>::value; // C++17 > template <class T> constexpr bool is_literal_type_v > = is_literal_type<T>::value; // C++17 > template <class T> constexpr bool is_empty_v > = is_empty<T>::value; // C++17 > template <class T> constexpr bool is_polymorphic_v > = is_polymorphic<T>::value; // C++17 > template <class T> constexpr bool is_abstract_v > = is_abstract<T>::value; // C++17 > template <class T> constexpr bool is_final_v > = is_final<T>::value; // C++17 > template <class T> constexpr bool is_aggregate_v > = is_aggregate<T>::value; // C++17 > template <class T> constexpr bool is_signed_v > = is_signed<T>::value; // C++17 > template <class T> constexpr bool is_unsigned_v > = is_unsigned<T>::value; // C++17 > template <class T, class... Args> constexpr bool is_constructible_v > = is_constructible<T, Args...>::value; // C++17 > template <class T> constexpr bool is_default_constructible_v > = is_default_constructible<T>::value; // C++17 > template <class T> constexpr bool is_copy_constructible_v > = is_copy_constructible<T>::value; // C++17 > template <class T> constexpr bool is_move_constructible_v > = is_move_constructible<T>::value; // C++17 > template <class T, class U> constexpr bool is_assignable_v > = is_assignable<T, U>::value; // C++17 > template <class T> constexpr bool is_copy_assignable_v > = is_copy_assignable<T>::value; // C++17 > template <class T> constexpr bool is_move_assignable_v > = is_move_assignable<T>::value; // C++17 > template <class T, class U> constexpr bool is_swappable_with_v > = is_swappable_with<T, U>::value; // C++17 > template <class T> constexpr bool is_swappable_v > = is_swappable<T>::value; // C++17 > template <class T> constexpr bool is_destructible_v > = is_destructible<T>::value; // C++17 > template <class T, class... Args> constexpr bool is_trivially_constructible_v > = is_trivially_constructible<T, Args...>::value; // C++17 > template <class T> constexpr bool is_trivially_default_constructible_v > = is_trivially_default_constructible<T>::value; // C++17 > template <class T> constexpr bool is_trivially_copy_constructible_v > = is_trivially_copy_constructible<T>::value; // C++17 > template <class T> constexpr bool is_trivially_move_constructible_v > = is_trivially_move_constructible<T>::value; // C++17 > template <class T, class U> constexpr bool is_trivially_assignable_v > = is_trivially_assignable<T, U>::value; // C++17 > template <class T> constexpr bool is_trivially_copy_assignable_v > = is_trivially_copy_assignable<T>::value; // C++17 > template <class T> constexpr bool is_trivially_move_assignable_v > = is_trivially_move_assignable<T>::value; // C++17 > template <class T> constexpr bool is_trivially_destructible_v > = is_trivially_destructible<T>::value; // C++17 > template <class T, class... Args> constexpr bool is_nothrow_constructible_v > = is_nothrow_constructible<T, Args...>::value; // C++17 > template <class T> constexpr bool is_nothrow_default_constructible_v > = is_nothrow_default_constructible<T>::value; // C++17 > template <class T> constexpr bool is_nothrow_copy_constructible_v > = is_nothrow_copy_constructible<T>::value; // C++17 > template <class T> constexpr bool is_nothrow_move_constructible_v > = is_nothrow_move_constructible<T>::value; // C++17 > template <class T, class U> constexpr bool is_nothrow_assignable_v > = is_nothrow_assignable<T, U>::value; // C++17 > template <class T> constexpr bool is_nothrow_copy_assignable_v > = is_nothrow_copy_assignable<T>::value; // C++17 > template <class T> constexpr bool is_nothrow_move_assignable_v > = is_nothrow_move_assignable<T>::value; // C++17 > template <class T, class U> constexpr bool is_nothrow_swappable_with_v > = is_nothrow_swappable_with<T, U>::value; // C++17 > template <class T> constexpr bool is_nothrow_swappable_v > = is_nothrow_swappable<T>::value; // C++17 > template <class T> constexpr bool is_nothrow_destructible_v > = is_nothrow_destructible<T>::value; // C++17 > template <class T> constexpr bool has_virtual_destructor_v > = has_virtual_destructor<T>::value; // C++17 > > // See C++14 20.10.5, type property queries > template <class T> constexpr size_t alignment_of_v > = alignment_of<T>::value; // C++17 > template <class T> constexpr size_t rank_v > = rank<T>::value; // C++17 > template <class T, unsigned I = 0> constexpr size_t extent_v > = extent<T, I>::value; // C++17 > > // See C++14 20.10.6, type relations > template <class T, class U> constexpr bool is_same_v > = is_same<T, U>::value; // C++17 > template <class Base, class Derived> constexpr bool is_base_of_v > = is_base_of<Base, Derived>::value; // C++17 > template <class From, class To> constexpr bool is_convertible_v > = is_convertible<From, To>::value; // C++17 > template <class T, class R = void> constexpr bool is_callable_v > = is_callable<T, R>::value; // C++17 > template <class T, class R = void> constexpr bool is_nothrow_callable_v > = is_nothrow_callable<T, R>::value; // C++17 > > // [meta.logical], logical operator traits: > template<class... B> struct conjunction; // C++17 > template<class... B> > constexpr bool conjunction_v = conjunction<B...>::value; // C++17 > template<class... B> struct disjunction; // C++17 > template<class... B> > constexpr bool disjunction_v = disjunction<B...>::value; // C++17 > template<class B> struct negation; // C++17 > template<class B> > constexpr bool negation_v = negation<B>::value; // C++17 > >} > >*/ >#if 0 /* expanded by -frewrite-includes */ >#include <__config> >#endif /* expanded by -frewrite-includes */ ># 389 "/usr/include/c++/v1/type_traits" 3 ># 390 "/usr/include/c++/v1/type_traits" 3 >#if 0 /* expanded by -frewrite-includes */ >#include <cstddef> >#endif /* expanded by -frewrite-includes */ ># 390 "/usr/include/c++/v1/type_traits" 3 ># 1 "/usr/include/c++/v1/cstddef" 1 3 >// -*- C++ -*- >//===--------------------------- cstddef ----------------------------------===// >// >// The LLVM Compiler Infrastructure >// >// This file is dual licensed under the MIT and the University of Illinois Open >// Source Licenses. See LICENSE.TXT for details. >// >//===----------------------------------------------------------------------===// > >#ifndef _LIBCPP_CSTDDEF >#define _LIBCPP_CSTDDEF > >/* > cstddef synopsis > >Macros: > > offsetof(type,member-designator) > NULL > >namespace std >{ > >Types: > > ptrdiff_t > size_t > max_align_t > nullptr_t > byte // C++17 > >} // std > >*/ > >#if 0 /* expanded by -frewrite-includes */ >#include <__config> >#endif /* expanded by -frewrite-includes */ ># 37 "/usr/include/c++/v1/cstddef" 3 ># 38 "/usr/include/c++/v1/cstddef" 3 > >#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) >#if 0 /* expanded by -frewrite-includes */ >#pragma GCC system_header >#endif /* expanded by -frewrite-includes */ ># 41 "/usr/include/c++/v1/cstddef" 3 >#endif ># 42 "/usr/include/c++/v1/cstddef" 3 > >// Don't include our own <stddef.h>; we don't want to declare ::nullptr_t. >#if 0 /* expanded by -frewrite-includes */ >#include_next <stddef.h> >#endif /* expanded by -frewrite-includes */ ># 44 "/usr/include/c++/v1/cstddef" 3 ># 45 "/usr/include/c++/v1/cstddef" 3 >#if 0 /* expanded by -frewrite-includes */ >#include <__nullptr> >#endif /* expanded by -frewrite-includes */ ># 45 "/usr/include/c++/v1/cstddef" 3 ># 46 "/usr/include/c++/v1/cstddef" 3 > >_LIBCPP_BEGIN_NAMESPACE_STD > >using ::ptrdiff_t; >using ::size_t; > >#if defined(__CLANG_MAX_ALIGN_T_DEFINED) || defined(_GCC_MAX_ALIGN_T) || \ > defined(__DEFINED_max_align_t) >// Re-use the compiler's <stddef.h> max_align_t where possible. >using ::max_align_t; >#else ># 57 "/usr/include/c++/v1/cstddef" 3 >typedef long double max_align_t; >#endif ># 59 "/usr/include/c++/v1/cstddef" 3 > >_LIBCPP_END_NAMESPACE_STD > >#if _LIBCPP_STD_VER > 14 >namespace std // purposefully not versioned >{ >enum class byte : unsigned char {}; > >constexpr byte& operator|=(byte& __lhs, byte __rhs) noexcept >{ return __lhs = byte(static_cast<unsigned char>(__lhs) | static_cast<unsigned char>(__rhs)); } >constexpr byte operator| (byte __lhs, byte __rhs) noexcept >{ return byte(static_cast<unsigned char>(__lhs) | static_cast<unsigned char>(__rhs)); } > >constexpr byte& operator&=(byte& __lhs, byte __rhs) noexcept >{ return __lhs = byte(static_cast<unsigned char>(__lhs) & static_cast<unsigned char>(__rhs)); } >constexpr byte operator& (byte __lhs, byte __rhs) noexcept >{ return byte(static_cast<unsigned char>(__lhs) & static_cast<unsigned char>(__rhs)); } > >constexpr byte& operator^=(byte& __lhs, byte __rhs) noexcept >{ return __lhs = byte(static_cast<unsigned char>(__lhs) ^ static_cast<unsigned char>(__rhs)); } >constexpr byte operator^ (byte __lhs, byte __rhs) noexcept >{ return byte(static_cast<unsigned char>(__lhs) ^ static_cast<unsigned char>(__rhs)); } > >constexpr byte operator~ (byte __b) noexcept >{ return byte(~static_cast<unsigned char>(__b)); } > >} > >#if 0 /* expanded by -frewrite-includes */ >#include <type_traits> // rest of byte >#endif /* expanded by -frewrite-includes */ ># 87 "/usr/include/c++/v1/cstddef" 3 ># 88 "/usr/include/c++/v1/cstddef" 3 >#endif ># 89 "/usr/include/c++/v1/cstddef" 3 > >#endif // _LIBCPP_CSTDDEF ># 91 "/usr/include/c++/v1/cstddef" 3 ># 391 "/usr/include/c++/v1/type_traits" 2 3 > >#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) >#if 0 /* expanded by -frewrite-includes */ >#pragma GCC system_header >#endif /* expanded by -frewrite-includes */ ># 394 "/usr/include/c++/v1/type_traits" 3 >#endif ># 395 "/usr/include/c++/v1/type_traits" 3 > >_LIBCPP_BEGIN_NAMESPACE_STD > >template <class _T1, class _T2> struct _LIBCPP_TEMPLATE_VIS pair; >template <class _Tp> class _LIBCPP_TEMPLATE_VIS reference_wrapper; >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS hash; > >template <class> >struct __void_t { typedef void type; }; > >template <class _Tp> >struct __identity { typedef _Tp type; }; > >template <class _Tp, bool> >struct _LIBCPP_TEMPLATE_VIS __dependent_type : public _Tp {}; > >template <bool _Bp, class _If, class _Then> > struct _LIBCPP_TEMPLATE_VIS conditional {typedef _If type;}; >template <class _If, class _Then> > struct _LIBCPP_TEMPLATE_VIS conditional<false, _If, _Then> {typedef _Then type;}; > >#if _LIBCPP_STD_VER > 11 >template <bool _Bp, class _If, class _Then> using conditional_t = typename conditional<_Bp, _If, _Then>::type; >#endif ># 419 "/usr/include/c++/v1/type_traits" 3 > >template <bool, class _Tp> struct _LIBCPP_TEMPLATE_VIS __lazy_enable_if {}; >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS __lazy_enable_if<true, _Tp> {typedef typename _Tp::type type;}; > >template <bool, class _Tp = void> struct _LIBCPP_TEMPLATE_VIS enable_if {}; >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS enable_if<true, _Tp> {typedef _Tp type;}; > >#if _LIBCPP_STD_VER > 11 >template <bool _Bp, class _Tp = void> using enable_if_t = typename enable_if<_Bp, _Tp>::type; >#endif ># 429 "/usr/include/c++/v1/type_traits" 3 > >// addressof >#ifndef _LIBCPP_HAS_NO_BUILTIN_ADDRESSOF > >template <class _Tp> >inline _LIBCPP_CONSTEXPR_AFTER_CXX14 >_LIBCPP_NO_CFI _LIBCPP_INLINE_VISIBILITY >_Tp* >addressof(_Tp& __x) _NOEXCEPT >{ > return __builtin_addressof(__x); >} > >#else ># 443 "/usr/include/c++/v1/type_traits" 3 > >template <class _Tp> >inline _LIBCPP_NO_CFI _LIBCPP_INLINE_VISIBILITY >_Tp* >addressof(_Tp& __x) _NOEXCEPT >{ > return reinterpret_cast<_Tp *>( > const_cast<char *>(&reinterpret_cast<const volatile char &>(__x))); >} > >#endif // _LIBCPP_HAS_NO_BUILTIN_ADDRESSOF ># 454 "/usr/include/c++/v1/type_traits" 3 > >#if defined(_LIBCPP_HAS_OBJC_ARC) && !defined(_LIBCPP_PREDEFINED_OBJC_ARC_ADDRESSOF) >// Objective-C++ Automatic Reference Counting uses qualified pointers >// that require special addressof() signatures. When >// _LIBCPP_PREDEFINED_OBJC_ARC_ADDRESSOF is defined, the compiler >// itself is providing these definitions. Otherwise, we provide them. >template <class _Tp> >inline _LIBCPP_INLINE_VISIBILITY >__strong _Tp* >addressof(__strong _Tp& __x) _NOEXCEPT >{ > return &__x; >} > >#ifdef _LIBCPP_HAS_OBJC_ARC_WEAK >template <class _Tp> >inline _LIBCPP_INLINE_VISIBILITY >__weak _Tp* >addressof(__weak _Tp& __x) _NOEXCEPT >{ > return &__x; >} >#endif ># 477 "/usr/include/c++/v1/type_traits" 3 > >template <class _Tp> >inline _LIBCPP_INLINE_VISIBILITY >__autoreleasing _Tp* >addressof(__autoreleasing _Tp& __x) _NOEXCEPT >{ > return &__x; >} > >template <class _Tp> >inline _LIBCPP_INLINE_VISIBILITY >__unsafe_unretained _Tp* >addressof(__unsafe_unretained _Tp& __x) _NOEXCEPT >{ > return &__x; >} >#endif ># 494 "/usr/include/c++/v1/type_traits" 3 > >#if !defined(_LIBCPP_CXX03_LANG) >template <class _Tp> _Tp* addressof(const _Tp&&) noexcept = delete; >#endif ># 498 "/usr/include/c++/v1/type_traits" 3 > >struct __two {char __lx[2];}; > >// helper class: > >template <class _Tp, _Tp __v> >struct _LIBCPP_TEMPLATE_VIS integral_constant >{ > static _LIBCPP_CONSTEXPR const _Tp value = __v; > typedef _Tp value_type; > typedef integral_constant type; > _LIBCPP_INLINE_VISIBILITY > _LIBCPP_CONSTEXPR operator value_type() const _NOEXCEPT {return value;} >#if _LIBCPP_STD_VER > 11 > _LIBCPP_INLINE_VISIBILITY > constexpr value_type operator ()() const _NOEXCEPT {return value;} >#endif ># 515 "/usr/include/c++/v1/type_traits" 3 >}; > >template <class _Tp, _Tp __v> >_LIBCPP_CONSTEXPR const _Tp integral_constant<_Tp, __v>::value; > >#if _LIBCPP_STD_VER > 14 >template <bool __b> >using bool_constant = integral_constant<bool, __b>; >#define _LIBCPP_BOOL_CONSTANT(__b) bool_constant<(__b)> >#else ># 525 "/usr/include/c++/v1/type_traits" 3 >#define _LIBCPP_BOOL_CONSTANT(__b) integral_constant<bool,(__b)> >#endif ># 527 "/usr/include/c++/v1/type_traits" 3 > >typedef _LIBCPP_BOOL_CONSTANT(true) true_type; >typedef _LIBCPP_BOOL_CONSTANT(false) false_type; > >#if !defined(_LIBCPP_CXX03_LANG) > >// __lazy_and > >template <bool _Last, class ..._Preds> >struct __lazy_and_impl; > >template <class ..._Preds> >struct __lazy_and_impl<false, _Preds...> : false_type {}; > >template <> >struct __lazy_and_impl<true> : true_type {}; > >template <class _Pred> >struct __lazy_and_impl<true, _Pred> : integral_constant<bool, _Pred::type::value> {}; > >template <class _Hp, class ..._Tp> >struct __lazy_and_impl<true, _Hp, _Tp...> : __lazy_and_impl<_Hp::type::value, _Tp...> {}; > >template <class _P1, class ..._Pr> >struct __lazy_and : __lazy_and_impl<_P1::type::value, _Pr...> {}; > >// __lazy_or > >template <bool _List, class ..._Preds> >struct __lazy_or_impl; > >template <class ..._Preds> >struct __lazy_or_impl<true, _Preds...> : true_type {}; > >template <> >struct __lazy_or_impl<false> : false_type {}; > >template <class _Hp, class ..._Tp> >struct __lazy_or_impl<false, _Hp, _Tp...> > : __lazy_or_impl<_Hp::type::value, _Tp...> {}; > >template <class _P1, class ..._Pr> >struct __lazy_or : __lazy_or_impl<_P1::type::value, _Pr...> {}; > >// __lazy_not > >template <class _Pred> >struct __lazy_not : integral_constant<bool, !_Pred::type::value> {}; > >// __and_ >template<class...> struct __and_; >template<> struct __and_<> : true_type {}; > >template<class _B0> struct __and_<_B0> : _B0 {}; > >template<class _B0, class _B1> >struct __and_<_B0, _B1> : conditional<_B0::value, _B1, _B0>::type {}; > >template<class _B0, class _B1, class _B2, class... _Bn> >struct __and_<_B0, _B1, _B2, _Bn...> > : conditional<_B0::value, __and_<_B1, _B2, _Bn...>, _B0>::type {}; > >// __or_ >template<class...> struct __or_; >template<> struct __or_<> : false_type {}; > >template<class _B0> struct __or_<_B0> : _B0 {}; > >template<class _B0, class _B1> >struct __or_<_B0, _B1> : conditional<_B0::value, _B0, _B1>::type {}; > >template<class _B0, class _B1, class _B2, class... _Bn> >struct __or_<_B0, _B1, _B2, _Bn...> > : conditional<_B0::value, _B0, __or_<_B1, _B2, _Bn...> >::type {}; > >// __not_ >template<class _Tp> >struct __not_ : conditional<_Tp::value, false_type, true_type>::type {}; > >#endif // !defined(_LIBCPP_CXX03_LANG) ># 607 "/usr/include/c++/v1/type_traits" 3 > >// is_const > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_const : public false_type {}; >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_const<_Tp const> : public true_type {}; > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_const_v > = is_const<_Tp>::value; >#endif ># 617 "/usr/include/c++/v1/type_traits" 3 > >// is_volatile > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_volatile : public false_type {}; >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_volatile<_Tp volatile> : public true_type {}; > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_volatile_v > = is_volatile<_Tp>::value; >#endif ># 627 "/usr/include/c++/v1/type_traits" 3 > >// remove_const > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_const {typedef _Tp type;}; >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_const<const _Tp> {typedef _Tp type;}; >#if _LIBCPP_STD_VER > 11 >template <class _Tp> using remove_const_t = typename remove_const<_Tp>::type; >#endif ># 635 "/usr/include/c++/v1/type_traits" 3 > >// remove_volatile > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_volatile {typedef _Tp type;}; >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_volatile<volatile _Tp> {typedef _Tp type;}; >#if _LIBCPP_STD_VER > 11 >template <class _Tp> using remove_volatile_t = typename remove_volatile<_Tp>::type; >#endif ># 643 "/usr/include/c++/v1/type_traits" 3 > >// remove_cv > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_cv >{typedef typename remove_volatile<typename remove_const<_Tp>::type>::type type;}; >#if _LIBCPP_STD_VER > 11 >template <class _Tp> using remove_cv_t = typename remove_cv<_Tp>::type; >#endif ># 651 "/usr/include/c++/v1/type_traits" 3 > >// is_void > >template <class _Tp> struct __libcpp_is_void : public false_type {}; >template <> struct __libcpp_is_void<void> : public true_type {}; > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_void > : public __libcpp_is_void<typename remove_cv<_Tp>::type> {}; > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_void_v > = is_void<_Tp>::value; >#endif ># 664 "/usr/include/c++/v1/type_traits" 3 > >// __is_nullptr_t > >template <class _Tp> struct __is_nullptr_t_impl : public false_type {}; >template <> struct __is_nullptr_t_impl<nullptr_t> : public true_type {}; > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS __is_nullptr_t > : public __is_nullptr_t_impl<typename remove_cv<_Tp>::type> {}; > >#if _LIBCPP_STD_VER > 11 >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_null_pointer > : public __is_nullptr_t_impl<typename remove_cv<_Tp>::type> {}; > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_null_pointer_v > = is_null_pointer<_Tp>::value; >#endif ># 681 "/usr/include/c++/v1/type_traits" 3 >#endif ># 682 "/usr/include/c++/v1/type_traits" 3 > >// is_integral > >template <class _Tp> struct __libcpp_is_integral : public false_type {}; >template <> struct __libcpp_is_integral<bool> : public true_type {}; >template <> struct __libcpp_is_integral<char> : public true_type {}; >template <> struct __libcpp_is_integral<signed char> : public true_type {}; >template <> struct __libcpp_is_integral<unsigned char> : public true_type {}; >template <> struct __libcpp_is_integral<wchar_t> : public true_type {}; >#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS >template <> struct __libcpp_is_integral<char16_t> : public true_type {}; >template <> struct __libcpp_is_integral<char32_t> : public true_type {}; >#endif // _LIBCPP_HAS_NO_UNICODE_CHARS ># 695 "/usr/include/c++/v1/type_traits" 3 >template <> struct __libcpp_is_integral<short> : public true_type {}; >template <> struct __libcpp_is_integral<unsigned short> : public true_type {}; >template <> struct __libcpp_is_integral<int> : public true_type {}; >template <> struct __libcpp_is_integral<unsigned int> : public true_type {}; >template <> struct __libcpp_is_integral<long> : public true_type {}; >template <> struct __libcpp_is_integral<unsigned long> : public true_type {}; >template <> struct __libcpp_is_integral<long long> : public true_type {}; >template <> struct __libcpp_is_integral<unsigned long long> : public true_type {}; >#ifndef _LIBCPP_HAS_NO_INT128 >template <> struct __libcpp_is_integral<__int128_t> : public true_type {}; >template <> struct __libcpp_is_integral<__uint128_t> : public true_type {}; >#endif ># 707 "/usr/include/c++/v1/type_traits" 3 > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_integral > : public __libcpp_is_integral<typename remove_cv<_Tp>::type> {}; > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_integral_v > = is_integral<_Tp>::value; >#endif ># 715 "/usr/include/c++/v1/type_traits" 3 > >// is_floating_point > >template <class _Tp> struct __libcpp_is_floating_point : public false_type {}; >template <> struct __libcpp_is_floating_point<float> : public true_type {}; >template <> struct __libcpp_is_floating_point<double> : public true_type {}; >template <> struct __libcpp_is_floating_point<long double> : public true_type {}; > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_floating_point > : public __libcpp_is_floating_point<typename remove_cv<_Tp>::type> {}; > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_floating_point_v > = is_floating_point<_Tp>::value; >#endif ># 730 "/usr/include/c++/v1/type_traits" 3 > >// is_array > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_array > : public false_type {}; >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_array<_Tp[]> > : public true_type {}; >template <class _Tp, size_t _Np> struct _LIBCPP_TEMPLATE_VIS is_array<_Tp[_Np]> > : public true_type {}; > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_array_v > = is_array<_Tp>::value; >#endif ># 744 "/usr/include/c++/v1/type_traits" 3 > >// is_pointer > >template <class _Tp> struct __libcpp_is_pointer : public false_type {}; >template <class _Tp> struct __libcpp_is_pointer<_Tp*> : public true_type {}; > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_pointer > : public __libcpp_is_pointer<typename remove_cv<_Tp>::type> {}; > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_pointer_v > = is_pointer<_Tp>::value; >#endif ># 757 "/usr/include/c++/v1/type_traits" 3 > >// is_reference > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_lvalue_reference : public false_type {}; >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_lvalue_reference<_Tp&> : public true_type {}; > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_rvalue_reference : public false_type {}; >#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_rvalue_reference<_Tp&&> : public true_type {}; >#endif ># 767 "/usr/include/c++/v1/type_traits" 3 > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_reference : public false_type {}; >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_reference<_Tp&> : public true_type {}; >#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_reference<_Tp&&> : public true_type {}; >#endif ># 773 "/usr/include/c++/v1/type_traits" 3 > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_reference_v > = is_reference<_Tp>::value; > >template <class _Tp> _LIBCPP_CONSTEXPR bool is_lvalue_reference_v > = is_lvalue_reference<_Tp>::value; > >template <class _Tp> _LIBCPP_CONSTEXPR bool is_rvalue_reference_v > = is_rvalue_reference<_Tp>::value; >#endif ># 784 "/usr/include/c++/v1/type_traits" 3 >// is_union > >#if __has_feature(is_union) || (_GNUC_VER >= 403) > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_union > : public integral_constant<bool, __is_union(_Tp)> {}; > >#else ># 792 "/usr/include/c++/v1/type_traits" 3 > >template <class _Tp> struct __libcpp_union : public false_type {}; >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_union > : public __libcpp_union<typename remove_cv<_Tp>::type> {}; > >#endif ># 798 "/usr/include/c++/v1/type_traits" 3 > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_union_v > = is_union<_Tp>::value; >#endif ># 803 "/usr/include/c++/v1/type_traits" 3 > >// is_class > >#if __has_feature(is_class) || (_GNUC_VER >= 403) > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_class > : public integral_constant<bool, __is_class(_Tp)> {}; > >#else ># 812 "/usr/include/c++/v1/type_traits" 3 > >namespace __is_class_imp >{ >template <class _Tp> char __test(int _Tp::*); >template <class _Tp> __two __test(...); >} > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_class > : public integral_constant<bool, sizeof(__is_class_imp::__test<_Tp>(0)) == 1 && !is_union<_Tp>::value> {}; > >#endif ># 823 "/usr/include/c++/v1/type_traits" 3 > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_class_v > = is_class<_Tp>::value; >#endif ># 828 "/usr/include/c++/v1/type_traits" 3 > >// is_same > >template <class _Tp, class _Up> struct _LIBCPP_TEMPLATE_VIS is_same : public false_type {}; >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_same<_Tp, _Tp> : public true_type {}; > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp, class _Up> _LIBCPP_CONSTEXPR bool is_same_v > = is_same<_Tp, _Up>::value; >#endif ># 838 "/usr/include/c++/v1/type_traits" 3 > >// is_function > >namespace __libcpp_is_function_imp >{ >struct __dummy_type {}; >template <class _Tp> char __test(_Tp*); >template <class _Tp> char __test(__dummy_type); >template <class _Tp> __two __test(...); >template <class _Tp> _Tp& __source(int); >template <class _Tp> __dummy_type __source(...); >} > >template <class _Tp, bool = is_class<_Tp>::value || > is_union<_Tp>::value || > is_void<_Tp>::value || > is_reference<_Tp>::value || > __is_nullptr_t<_Tp>::value > >struct __libcpp_is_function > : public integral_constant<bool, sizeof(__libcpp_is_function_imp::__test<_Tp>(__libcpp_is_function_imp::__source<_Tp>(0))) == 1> > {}; >template <class _Tp> struct __libcpp_is_function<_Tp, true> : public false_type {}; > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_function > : public __libcpp_is_function<_Tp> {}; > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_function_v > = is_function<_Tp>::value; >#endif ># 868 "/usr/include/c++/v1/type_traits" 3 > >// is_member_function_pointer > >// template <class _Tp> struct __libcpp_is_member_function_pointer : public false_type {}; >// template <class _Tp, class _Up> struct __libcpp_is_member_function_pointer<_Tp _Up::*> : public is_function<_Tp> {}; >// > >template <class _MP, bool _IsMemberFunctionPtr, bool _IsMemberObjectPtr> >struct __member_pointer_traits_imp >{ // forward declaration; specializations later >}; > > >template <class _Tp> struct __libcpp_is_member_function_pointer > : public false_type {}; > >template <class _Ret, class _Class> >struct __libcpp_is_member_function_pointer<_Ret _Class::*> > : public is_function<_Ret> {}; > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_member_function_pointer > : public __libcpp_is_member_function_pointer<typename remove_cv<_Tp>::type>::type {}; > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_member_function_pointer_v > = is_member_function_pointer<_Tp>::value; >#endif ># 895 "/usr/include/c++/v1/type_traits" 3 > >// is_member_pointer > >template <class _Tp> struct __libcpp_is_member_pointer : public false_type {}; >template <class _Tp, class _Up> struct __libcpp_is_member_pointer<_Tp _Up::*> : public true_type {}; > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_member_pointer > : public __libcpp_is_member_pointer<typename remove_cv<_Tp>::type> {}; > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_member_pointer_v > = is_member_pointer<_Tp>::value; >#endif ># 908 "/usr/include/c++/v1/type_traits" 3 > >// is_member_object_pointer > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_member_object_pointer > : public integral_constant<bool, is_member_pointer<_Tp>::value && > !is_member_function_pointer<_Tp>::value> {}; > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_member_object_pointer_v > = is_member_object_pointer<_Tp>::value; >#endif ># 919 "/usr/include/c++/v1/type_traits" 3 > >// is_enum > >#if __has_feature(is_enum) || (_GNUC_VER >= 403) > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_enum > : public integral_constant<bool, __is_enum(_Tp)> {}; > >#else ># 928 "/usr/include/c++/v1/type_traits" 3 > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_enum > : public integral_constant<bool, !is_void<_Tp>::value && > !is_integral<_Tp>::value && > !is_floating_point<_Tp>::value && > !is_array<_Tp>::value && > !is_pointer<_Tp>::value && > !is_reference<_Tp>::value && > !is_member_pointer<_Tp>::value && > !is_union<_Tp>::value && > !is_class<_Tp>::value && > !is_function<_Tp>::value > {}; > >#endif ># 942 "/usr/include/c++/v1/type_traits" 3 > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_enum_v > = is_enum<_Tp>::value; >#endif ># 947 "/usr/include/c++/v1/type_traits" 3 > >// is_arithmetic > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_arithmetic > : public integral_constant<bool, is_integral<_Tp>::value || > is_floating_point<_Tp>::value> {}; > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_arithmetic_v > = is_arithmetic<_Tp>::value; >#endif ># 958 "/usr/include/c++/v1/type_traits" 3 > >// is_fundamental > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_fundamental > : public integral_constant<bool, is_void<_Tp>::value || > __is_nullptr_t<_Tp>::value || > is_arithmetic<_Tp>::value> {}; > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_fundamental_v > = is_fundamental<_Tp>::value; >#endif ># 970 "/usr/include/c++/v1/type_traits" 3 > >// is_scalar > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_scalar > : public integral_constant<bool, is_arithmetic<_Tp>::value || > is_member_pointer<_Tp>::value || > is_pointer<_Tp>::value || > __is_nullptr_t<_Tp>::value || > is_enum<_Tp>::value > {}; > >template <> struct _LIBCPP_TEMPLATE_VIS is_scalar<nullptr_t> : public true_type {}; > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_scalar_v > = is_scalar<_Tp>::value; >#endif ># 986 "/usr/include/c++/v1/type_traits" 3 > >// is_object > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_object > : public integral_constant<bool, is_scalar<_Tp>::value || > is_array<_Tp>::value || > is_union<_Tp>::value || > is_class<_Tp>::value > {}; > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_object_v > = is_object<_Tp>::value; >#endif ># 999 "/usr/include/c++/v1/type_traits" 3 > >// is_compound > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_compound > : public integral_constant<bool, !is_fundamental<_Tp>::value> {}; > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_compound_v > = is_compound<_Tp>::value; >#endif ># 1009 "/usr/include/c++/v1/type_traits" 3 > > >// __is_referenceable [defns.referenceable] > >struct __is_referenceable_impl { > template <class _Tp> static _Tp& __test(int); > template <class _Tp> static __two __test(...); >}; > >template <class _Tp> >struct __is_referenceable : integral_constant<bool, > !is_same<decltype(__is_referenceable_impl::__test<_Tp>(0)), __two>::value> {}; > > >// add_const > >template <class _Tp, bool = is_reference<_Tp>::value || > is_function<_Tp>::value || > is_const<_Tp>::value > >struct __add_const {typedef _Tp type;}; > >template <class _Tp> >struct __add_const<_Tp, false> {typedef const _Tp type;}; > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS add_const > {typedef typename __add_const<_Tp>::type type;}; > >#if _LIBCPP_STD_VER > 11 >template <class _Tp> using add_const_t = typename add_const<_Tp>::type; >#endif ># 1039 "/usr/include/c++/v1/type_traits" 3 > >// add_volatile > >template <class _Tp, bool = is_reference<_Tp>::value || > is_function<_Tp>::value || > is_volatile<_Tp>::value > >struct __add_volatile {typedef _Tp type;}; > >template <class _Tp> >struct __add_volatile<_Tp, false> {typedef volatile _Tp type;}; > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS add_volatile > {typedef typename __add_volatile<_Tp>::type type;}; > >#if _LIBCPP_STD_VER > 11 >template <class _Tp> using add_volatile_t = typename add_volatile<_Tp>::type; >#endif ># 1056 "/usr/include/c++/v1/type_traits" 3 > >// add_cv > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS add_cv > {typedef typename add_const<typename add_volatile<_Tp>::type>::type type;}; > >#if _LIBCPP_STD_VER > 11 >template <class _Tp> using add_cv_t = typename add_cv<_Tp>::type; >#endif ># 1065 "/usr/include/c++/v1/type_traits" 3 > >// remove_reference > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_reference {typedef _Tp type;}; >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_reference<_Tp&> {typedef _Tp type;}; >#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_reference<_Tp&&> {typedef _Tp type;}; >#endif ># 1073 "/usr/include/c++/v1/type_traits" 3 > >#if _LIBCPP_STD_VER > 11 >template <class _Tp> using remove_reference_t = typename remove_reference<_Tp>::type; >#endif ># 1077 "/usr/include/c++/v1/type_traits" 3 > >// add_lvalue_reference > >template <class _Tp, bool = __is_referenceable<_Tp>::value> struct __add_lvalue_reference_impl { typedef _Tp type; }; >template <class _Tp > struct __add_lvalue_reference_impl<_Tp, true> { typedef _Tp& type; }; > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS add_lvalue_reference >{typedef typename __add_lvalue_reference_impl<_Tp>::type type;}; > >#if _LIBCPP_STD_VER > 11 >template <class _Tp> using add_lvalue_reference_t = typename add_lvalue_reference<_Tp>::type; >#endif ># 1089 "/usr/include/c++/v1/type_traits" 3 > >#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES > >template <class _Tp, bool = __is_referenceable<_Tp>::value> struct __add_rvalue_reference_impl { typedef _Tp type; }; >template <class _Tp > struct __add_rvalue_reference_impl<_Tp, true> { typedef _Tp&& type; }; > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS add_rvalue_reference >{typedef typename __add_rvalue_reference_impl<_Tp>::type type;}; > >#if _LIBCPP_STD_VER > 11 >template <class _Tp> using add_rvalue_reference_t = typename add_rvalue_reference<_Tp>::type; >#endif ># 1101 "/usr/include/c++/v1/type_traits" 3 > >#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES ># 1103 "/usr/include/c++/v1/type_traits" 3 > >#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES > >template <class _Tp> _Tp&& __declval(int); >template <class _Tp> _Tp __declval(long); > >template <class _Tp> >decltype(_VSTD::__declval<_Tp>(0)) >declval() _NOEXCEPT; > >#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES ># 1114 "/usr/include/c++/v1/type_traits" 3 > >template <class _Tp> >typename add_lvalue_reference<_Tp>::type >declval(); > >#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES ># 1120 "/usr/include/c++/v1/type_traits" 3 > >// __uncvref > >template <class _Tp> >struct __uncvref { > typedef typename remove_cv<typename remove_reference<_Tp>::type>::type type; >}; > >template <class _Tp> >struct __unconstref { > typedef typename remove_const<typename remove_reference<_Tp>::type>::type type; >}; > >#ifndef _LIBCPP_CXX03_LANG >template <class _Tp> >using __uncvref_t = typename __uncvref<_Tp>::type; >#endif ># 1137 "/usr/include/c++/v1/type_traits" 3 > >// __is_same_uncvref > >template <class _Tp, class _Up> >struct __is_same_uncvref : is_same<typename __uncvref<_Tp>::type, > typename __uncvref<_Up>::type> {}; > >struct __any >{ > __any(...); >}; > >// remove_pointer > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_pointer {typedef _Tp type;}; >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_pointer<_Tp*> {typedef _Tp type;}; >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_pointer<_Tp* const> {typedef _Tp type;}; >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_pointer<_Tp* volatile> {typedef _Tp type;}; >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_pointer<_Tp* const volatile> {typedef _Tp type;}; > >#if _LIBCPP_STD_VER > 11 >template <class _Tp> using remove_pointer_t = typename remove_pointer<_Tp>::type; >#endif ># 1160 "/usr/include/c++/v1/type_traits" 3 > >// add_pointer > >template <class _Tp, > bool = __is_referenceable<_Tp>::value || > is_same<typename remove_cv<_Tp>::type, void>::value> >struct __add_pointer_impl > {typedef typename remove_reference<_Tp>::type* type;}; >template <class _Tp> struct __add_pointer_impl<_Tp, false> > {typedef _Tp type;}; > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS add_pointer > {typedef typename __add_pointer_impl<_Tp>::type type;}; > >#if _LIBCPP_STD_VER > 11 >template <class _Tp> using add_pointer_t = typename add_pointer<_Tp>::type; >#endif ># 1177 "/usr/include/c++/v1/type_traits" 3 > >// is_signed > >template <class _Tp, bool = is_integral<_Tp>::value> >struct __libcpp_is_signed_impl : public _LIBCPP_BOOL_CONSTANT(_Tp(-1) < _Tp(0)) {}; > >template <class _Tp> >struct __libcpp_is_signed_impl<_Tp, false> : public true_type {}; // floating point > >template <class _Tp, bool = is_arithmetic<_Tp>::value> >struct __libcpp_is_signed : public __libcpp_is_signed_impl<_Tp> {}; > >template <class _Tp> struct __libcpp_is_signed<_Tp, false> : public false_type {}; > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_signed : public __libcpp_is_signed<_Tp> {}; > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_signed_v > = is_signed<_Tp>::value; >#endif ># 1197 "/usr/include/c++/v1/type_traits" 3 > >// is_unsigned > >template <class _Tp, bool = is_integral<_Tp>::value> >struct __libcpp_is_unsigned_impl : public _LIBCPP_BOOL_CONSTANT(_Tp(0) < _Tp(-1)) {}; > >template <class _Tp> >struct __libcpp_is_unsigned_impl<_Tp, false> : public false_type {}; // floating point > >template <class _Tp, bool = is_arithmetic<_Tp>::value> >struct __libcpp_is_unsigned : public __libcpp_is_unsigned_impl<_Tp> {}; > >template <class _Tp> struct __libcpp_is_unsigned<_Tp, false> : public false_type {}; > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_unsigned : public __libcpp_is_unsigned<_Tp> {}; > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_unsigned_v > = is_unsigned<_Tp>::value; >#endif ># 1217 "/usr/include/c++/v1/type_traits" 3 > >// rank > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS rank > : public integral_constant<size_t, 0> {}; >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS rank<_Tp[]> > : public integral_constant<size_t, rank<_Tp>::value + 1> {}; >template <class _Tp, size_t _Np> struct _LIBCPP_TEMPLATE_VIS rank<_Tp[_Np]> > : public integral_constant<size_t, rank<_Tp>::value + 1> {}; > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR size_t rank_v > = rank<_Tp>::value; >#endif ># 1231 "/usr/include/c++/v1/type_traits" 3 > >// extent > >template <class _Tp, unsigned _Ip = 0> struct _LIBCPP_TEMPLATE_VIS extent > : public integral_constant<size_t, 0> {}; >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS extent<_Tp[], 0> > : public integral_constant<size_t, 0> {}; >template <class _Tp, unsigned _Ip> struct _LIBCPP_TEMPLATE_VIS extent<_Tp[], _Ip> > : public integral_constant<size_t, extent<_Tp, _Ip-1>::value> {}; >template <class _Tp, size_t _Np> struct _LIBCPP_TEMPLATE_VIS extent<_Tp[_Np], 0> > : public integral_constant<size_t, _Np> {}; >template <class _Tp, size_t _Np, unsigned _Ip> struct _LIBCPP_TEMPLATE_VIS extent<_Tp[_Np], _Ip> > : public integral_constant<size_t, extent<_Tp, _Ip-1>::value> {}; > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp, unsigned _Ip = 0> _LIBCPP_CONSTEXPR size_t extent_v > = extent<_Tp, _Ip>::value; >#endif ># 1249 "/usr/include/c++/v1/type_traits" 3 > >// remove_extent > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_extent > {typedef _Tp type;}; >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_extent<_Tp[]> > {typedef _Tp type;}; >template <class _Tp, size_t _Np> struct _LIBCPP_TEMPLATE_VIS remove_extent<_Tp[_Np]> > {typedef _Tp type;}; > >#if _LIBCPP_STD_VER > 11 >template <class _Tp> using remove_extent_t = typename remove_extent<_Tp>::type; >#endif ># 1262 "/usr/include/c++/v1/type_traits" 3 > >// remove_all_extents > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_all_extents > {typedef _Tp type;}; >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_all_extents<_Tp[]> > {typedef typename remove_all_extents<_Tp>::type type;}; >template <class _Tp, size_t _Np> struct _LIBCPP_TEMPLATE_VIS remove_all_extents<_Tp[_Np]> > {typedef typename remove_all_extents<_Tp>::type type;}; > >#if _LIBCPP_STD_VER > 11 >template <class _Tp> using remove_all_extents_t = typename remove_all_extents<_Tp>::type; >#endif ># 1275 "/usr/include/c++/v1/type_traits" 3 > >// decay > >template <class _Up, bool> >struct __decay { > typedef typename remove_cv<_Up>::type type; >}; > >template <class _Up> >struct __decay<_Up, true> { >public: > typedef typename conditional > < > is_array<_Up>::value, > typename remove_extent<_Up>::type*, > typename conditional > < > is_function<_Up>::value, > typename add_pointer<_Up>::type, > typename remove_cv<_Up>::type > >::type > >::type type; >}; > >template <class _Tp> >struct _LIBCPP_TEMPLATE_VIS decay >{ >private: > typedef typename remove_reference<_Tp>::type _Up; >public: > typedef typename __decay<_Up, __is_referenceable<_Up>::value>::type type; >}; > >#if _LIBCPP_STD_VER > 11 >template <class _Tp> using decay_t = typename decay<_Tp>::type; >#endif ># 1311 "/usr/include/c++/v1/type_traits" 3 > >// is_abstract > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_abstract > : public integral_constant<bool, __is_abstract(_Tp)> {}; > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_abstract_v > = is_abstract<_Tp>::value; >#endif ># 1321 "/usr/include/c++/v1/type_traits" 3 > >// is_final > >#if defined(_LIBCPP_HAS_IS_FINAL) >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS >__libcpp_is_final : public integral_constant<bool, __is_final(_Tp)> {}; >#else ># 1328 "/usr/include/c++/v1/type_traits" 3 >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS >__libcpp_is_final : public false_type {}; >#endif ># 1331 "/usr/include/c++/v1/type_traits" 3 > >#if defined(_LIBCPP_HAS_IS_FINAL) && _LIBCPP_STD_VER > 11 >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS >is_final : public integral_constant<bool, __is_final(_Tp)> {}; >#endif ># 1336 "/usr/include/c++/v1/type_traits" 3 > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_final_v > = is_final<_Tp>::value; >#endif ># 1341 "/usr/include/c++/v1/type_traits" 3 > >// is_aggregate >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_IS_AGGREGATE) > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS >is_aggregate : public integral_constant<bool, __is_aggregate(_Tp)> {}; > >#if !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> >constexpr bool is_aggregate_v = is_aggregate<_Tp>::value; >#endif ># 1352 "/usr/include/c++/v1/type_traits" 3 > >#endif // _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_IS_AGGREGATE) ># 1354 "/usr/include/c++/v1/type_traits" 3 > >// is_base_of > >#ifdef _LIBCPP_HAS_IS_BASE_OF > >template <class _Bp, class _Dp> >struct _LIBCPP_TEMPLATE_VIS is_base_of > : public integral_constant<bool, __is_base_of(_Bp, _Dp)> {}; > >#else // _LIBCPP_HAS_IS_BASE_OF ># 1364 "/usr/include/c++/v1/type_traits" 3 > >namespace __is_base_of_imp >{ >template <class _Tp> >struct _Dst >{ > _Dst(const volatile _Tp &); >}; >template <class _Tp> >struct _Src >{ > operator const volatile _Tp &(); > template <class _Up> operator const _Dst<_Up> &(); >}; >template <size_t> struct __one { typedef char type; }; >template <class _Bp, class _Dp> typename __one<sizeof(_Dst<_Bp>(declval<_Src<_Dp> >()))>::type __test(int); >template <class _Bp, class _Dp> __two __test(...); >} > >template <class _Bp, class _Dp> >struct _LIBCPP_TEMPLATE_VIS is_base_of > : public integral_constant<bool, is_class<_Bp>::value && > sizeof(__is_base_of_imp::__test<_Bp, _Dp>(0)) == 2> {}; > >#endif // _LIBCPP_HAS_IS_BASE_OF ># 1389 "/usr/include/c++/v1/type_traits" 3 > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Bp, class _Dp> _LIBCPP_CONSTEXPR bool is_base_of_v > = is_base_of<_Bp, _Dp>::value; >#endif ># 1394 "/usr/include/c++/v1/type_traits" 3 > >// is_convertible > >#if __has_feature(is_convertible_to) && !defined(_LIBCPP_USE_IS_CONVERTIBLE_FALLBACK) > >template <class _T1, class _T2> struct _LIBCPP_TEMPLATE_VIS is_convertible > : public integral_constant<bool, __is_convertible_to(_T1, _T2) && > !is_abstract<_T2>::value> {}; > >#else // __has_feature(is_convertible_to) ># 1404 "/usr/include/c++/v1/type_traits" 3 > >namespace __is_convertible_imp >{ >template <class _Tp> void __test_convert(_Tp); > >template <class _From, class _To, class = void> >struct __is_convertible_test : public false_type {}; > >template <class _From, class _To> >struct __is_convertible_test<_From, _To, > decltype(_VSTD::__is_convertible_imp::__test_convert<_To>(_VSTD::declval<_From>()))> : public true_type >{}; > >template <class _Tp, bool _IsArray = is_array<_Tp>::value, > bool _IsFunction = is_function<_Tp>::value, > bool _IsVoid = is_void<_Tp>::value> > struct __is_array_function_or_void {enum {value = 0};}; >template <class _Tp> struct __is_array_function_or_void<_Tp, true, false, false> {enum {value = 1};}; >template <class _Tp> struct __is_array_function_or_void<_Tp, false, true, false> {enum {value = 2};}; >template <class _Tp> struct __is_array_function_or_void<_Tp, false, false, true> {enum {value = 3};}; >} > >template <class _Tp, > unsigned = __is_convertible_imp::__is_array_function_or_void<typename remove_reference<_Tp>::type>::value> >struct __is_convertible_check >{ > static const size_t __v = 0; >}; > >template <class _Tp> >struct __is_convertible_check<_Tp, 0> >{ > static const size_t __v = sizeof(_Tp); >}; > >template <class _T1, class _T2, > unsigned _T1_is_array_function_or_void = __is_convertible_imp::__is_array_function_or_void<_T1>::value, > unsigned _T2_is_array_function_or_void = __is_convertible_imp::__is_array_function_or_void<_T2>::value> >struct __is_convertible > : public integral_constant<bool, > __is_convertible_imp::__is_convertible_test<_T1, _T2>::value >#if defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) > && !(!is_function<_T1>::value && !is_reference<_T1>::value && is_reference<_T2>::value > && (!is_const<typename remove_reference<_T2>::type>::value > || is_volatile<typename remove_reference<_T2>::type>::value) > && (is_same<typename remove_cv<_T1>::type, > typename remove_cv<typename remove_reference<_T2>::type>::type>::value > || is_base_of<typename remove_reference<_T2>::type, _T1>::value)) >#endif ># 1453 "/usr/include/c++/v1/type_traits" 3 > > >{}; > >template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 0, 1> : public false_type {}; >template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 1, 1> : public false_type {}; >template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 2, 1> : public false_type {}; >template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 3, 1> : public false_type {}; > >template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 0, 2> : public false_type {}; >template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 1, 2> : public false_type {}; >template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 2, 2> : public false_type {}; >template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 3, 2> : public false_type {}; > >template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 0, 3> : public false_type {}; >template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 1, 3> : public false_type {}; >template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 2, 3> : public false_type {}; >template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 3, 3> : public true_type {}; > >template <class _T1, class _T2> struct _LIBCPP_TEMPLATE_VIS is_convertible > : public __is_convertible<_T1, _T2> >{ > static const size_t __complete_check1 = __is_convertible_check<_T1>::__v; > static const size_t __complete_check2 = __is_convertible_check<_T2>::__v; >}; > >#endif // __has_feature(is_convertible_to) ># 1479 "/usr/include/c++/v1/type_traits" 3 > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _From, class _To> _LIBCPP_CONSTEXPR bool is_convertible_v > = is_convertible<_From, _To>::value; >#endif ># 1484 "/usr/include/c++/v1/type_traits" 3 > >// is_empty > >#if __has_feature(is_empty) || (_GNUC_VER >= 407) > >template <class _Tp> >struct _LIBCPP_TEMPLATE_VIS is_empty > : public integral_constant<bool, __is_empty(_Tp)> {}; > >#else // __has_feature(is_empty) ># 1494 "/usr/include/c++/v1/type_traits" 3 > >template <class _Tp> >struct __is_empty1 > : public _Tp >{ > double __lx; >}; > >struct __is_empty2 >{ > double __lx; >}; > >template <class _Tp, bool = is_class<_Tp>::value> >struct __libcpp_empty : public integral_constant<bool, sizeof(__is_empty1<_Tp>) == sizeof(__is_empty2)> {}; > >template <class _Tp> struct __libcpp_empty<_Tp, false> : public false_type {}; > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_empty : public __libcpp_empty<_Tp> {}; > >#endif // __has_feature(is_empty) ># 1515 "/usr/include/c++/v1/type_traits" 3 > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_empty_v > = is_empty<_Tp>::value; >#endif ># 1520 "/usr/include/c++/v1/type_traits" 3 > >// is_polymorphic > >#if __has_feature(is_polymorphic) || defined(_LIBCPP_COMPILER_MSVC) > >template <class _Tp> >struct _LIBCPP_TEMPLATE_VIS is_polymorphic > : public integral_constant<bool, __is_polymorphic(_Tp)> {}; > >#else ># 1530 "/usr/include/c++/v1/type_traits" 3 > >template<typename _Tp> char &__is_polymorphic_impl( > typename enable_if<sizeof((_Tp*)dynamic_cast<const volatile void*>(declval<_Tp*>())) != 0, > int>::type); >template<typename _Tp> __two &__is_polymorphic_impl(...); > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_polymorphic > : public integral_constant<bool, sizeof(__is_polymorphic_impl<_Tp>(0)) == 1> {}; > >#endif // __has_feature(is_polymorphic) ># 1540 "/usr/include/c++/v1/type_traits" 3 > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_polymorphic_v > = is_polymorphic<_Tp>::value; >#endif ># 1545 "/usr/include/c++/v1/type_traits" 3 > >// has_virtual_destructor > >#if __has_feature(has_virtual_destructor) || (_GNUC_VER >= 403) > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS has_virtual_destructor > : public integral_constant<bool, __has_virtual_destructor(_Tp)> {}; > >#else ># 1554 "/usr/include/c++/v1/type_traits" 3 > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS has_virtual_destructor > : public false_type {}; > >#endif ># 1559 "/usr/include/c++/v1/type_traits" 3 > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool has_virtual_destructor_v > = has_virtual_destructor<_Tp>::value; >#endif ># 1564 "/usr/include/c++/v1/type_traits" 3 > >// alignment_of > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS alignment_of > : public integral_constant<size_t, __alignof__(_Tp)> {}; > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR size_t alignment_of_v > = alignment_of<_Tp>::value; >#endif ># 1574 "/usr/include/c++/v1/type_traits" 3 > >// aligned_storage > >template <class _Hp, class _Tp> >struct __type_list >{ > typedef _Hp _Head; > typedef _Tp _Tail; >}; > >struct __nat >{ >#ifndef _LIBCPP_CXX03_LANG > __nat() = delete; > __nat(const __nat&) = delete; > __nat& operator=(const __nat&) = delete; > ~__nat() = delete; >#endif ># 1592 "/usr/include/c++/v1/type_traits" 3 >}; > >template <class _Tp> >struct __align_type >{ > static const size_t value = alignment_of<_Tp>::value; > typedef _Tp type; >}; > >struct __struct_double {long double __lx;}; >struct __struct_double4 {double __lx[4];}; > >typedef > __type_list<__align_type<unsigned char>, > __type_list<__align_type<unsigned short>, > __type_list<__align_type<unsigned int>, > __type_list<__align_type<unsigned long>, > __type_list<__align_type<unsigned long long>, > __type_list<__align_type<double>, > __type_list<__align_type<long double>, > __type_list<__align_type<__struct_double>, > __type_list<__align_type<__struct_double4>, > __type_list<__align_type<int*>, > __nat > > > > > > > > > > > __all_types; > >template <class _TL, size_t _Align> struct __find_pod; > >template <class _Hp, size_t _Align> >struct __find_pod<__type_list<_Hp, __nat>, _Align> >{ > typedef typename conditional< > _Align == _Hp::value, > typename _Hp::type, > void > >::type type; >}; > >template <class _Hp, class _Tp, size_t _Align> >struct __find_pod<__type_list<_Hp, _Tp>, _Align> >{ > typedef typename conditional< > _Align == _Hp::value, > typename _Hp::type, > typename __find_pod<_Tp, _Align>::type > >::type type; >}; > >template <class _TL, size_t _Len> struct __find_max_align; > >template <class _Hp, size_t _Len> >struct __find_max_align<__type_list<_Hp, __nat>, _Len> : public integral_constant<size_t, _Hp::value> {}; > >template <size_t _Len, size_t _A1, size_t _A2> >struct __select_align >{ >private: > static const size_t __min = _A2 < _A1 ? _A2 : _A1; > static const size_t __max = _A1 < _A2 ? _A2 : _A1; >public: > static const size_t value = _Len < __max ? __min : __max; >}; > >template <class _Hp, class _Tp, size_t _Len> >struct __find_max_align<__type_list<_Hp, _Tp>, _Len> > : public integral_constant<size_t, __select_align<_Len, _Hp::value, __find_max_align<_Tp, _Len>::value>::value> {}; > >template <size_t _Len, size_t _Align = __find_max_align<__all_types, _Len>::value> >struct _LIBCPP_TEMPLATE_VIS aligned_storage >{ > typedef typename __find_pod<__all_types, _Align>::type _Aligner; > static_assert(!is_void<_Aligner>::value, ""); > union type > { > _Aligner __align; > unsigned char __data[(_Len + _Align - 1)/_Align * _Align]; > }; >}; > >#if _LIBCPP_STD_VER > 11 >template <size_t _Len, size_t _Align = __find_max_align<__all_types, _Len>::value> > using aligned_storage_t = typename aligned_storage<_Len, _Align>::type; >#endif ># 1675 "/usr/include/c++/v1/type_traits" 3 > >#define _CREATE_ALIGNED_STORAGE_SPECIALIZATION(n) \ >template <size_t _Len>\ >struct _LIBCPP_TEMPLATE_VIS aligned_storage<_Len, n>\ >{\ > struct _ALIGNAS(n) type\ > {\ > unsigned char __lx[(_Len + n - 1)/n * n];\ > };\ >} > >_CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x1); >_CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x2); >_CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x4); >_CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x8); >_CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x10); >_CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x20); >_CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x40); >_CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x80); >_CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x100); >_CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x200); >_CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x400); >_CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x800); >_CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x1000); >_CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x2000); >// PE/COFF does not support alignment beyond 8192 (=0x2000) >#if !defined(_LIBCPP_OBJECT_FORMAT_COFF) >_CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x4000); >#endif // !defined(_LIBCPP_OBJECT_FORMAT_COFF) ># 1704 "/usr/include/c++/v1/type_traits" 3 > >#undef _CREATE_ALIGNED_STORAGE_SPECIALIZATION > >#ifndef _LIBCPP_HAS_NO_VARIADICS > >// aligned_union > >template <size_t _I0, size_t ..._In> >struct __static_max; > >template <size_t _I0> >struct __static_max<_I0> >{ > static const size_t value = _I0; >}; > >template <size_t _I0, size_t _I1, size_t ..._In> >struct __static_max<_I0, _I1, _In...> >{ > static const size_t value = _I0 >= _I1 ? __static_max<_I0, _In...>::value : > __static_max<_I1, _In...>::value; >}; > >template <size_t _Len, class _Type0, class ..._Types> >struct aligned_union >{ > static const size_t alignment_value = __static_max<__alignof__(_Type0), > __alignof__(_Types)...>::value; > static const size_t __len = __static_max<_Len, sizeof(_Type0), > sizeof(_Types)...>::value; > typedef typename aligned_storage<__len, alignment_value>::type type; >}; > >#if _LIBCPP_STD_VER > 11 >template <size_t _Len, class ..._Types> using aligned_union_t = typename aligned_union<_Len, _Types...>::type; >#endif ># 1740 "/usr/include/c++/v1/type_traits" 3 > >#endif // _LIBCPP_HAS_NO_VARIADICS ># 1742 "/usr/include/c++/v1/type_traits" 3 > >template <class _Tp> >struct __numeric_type >{ > static void __test(...); > static float __test(float); > static double __test(char); > static double __test(int); > static double __test(unsigned); > static double __test(long); > static double __test(unsigned long); > static double __test(long long); > static double __test(unsigned long long); > static double __test(double); > static long double __test(long double); > > typedef decltype(__test(declval<_Tp>())) type; > static const bool value = !is_same<type, void>::value; >}; > >template <> >struct __numeric_type<void> >{ > static const bool value = true; >}; > >// __promote > >template <class _A1, class _A2 = void, class _A3 = void, > bool = __numeric_type<_A1>::value && > __numeric_type<_A2>::value && > __numeric_type<_A3>::value> >class __promote_imp >{ >public: > static const bool value = false; >}; > >template <class _A1, class _A2, class _A3> >class __promote_imp<_A1, _A2, _A3, true> >{ >private: > typedef typename __promote_imp<_A1>::type __type1; > typedef typename __promote_imp<_A2>::type __type2; > typedef typename __promote_imp<_A3>::type __type3; >public: > typedef decltype(__type1() + __type2() + __type3()) type; > static const bool value = true; >}; > >template <class _A1, class _A2> >class __promote_imp<_A1, _A2, void, true> >{ >private: > typedef typename __promote_imp<_A1>::type __type1; > typedef typename __promote_imp<_A2>::type __type2; >public: > typedef decltype(__type1() + __type2()) type; > static const bool value = true; >}; > >template <class _A1> >class __promote_imp<_A1, void, void, true> >{ >public: > typedef typename __numeric_type<_A1>::type type; > static const bool value = true; >}; > >template <class _A1, class _A2 = void, class _A3 = void> >class __promote : public __promote_imp<_A1, _A2, _A3> {}; > >// make_signed / make_unsigned > >typedef > __type_list<signed char, > __type_list<signed short, > __type_list<signed int, > __type_list<signed long, > __type_list<signed long long, >#ifndef _LIBCPP_HAS_NO_INT128 > __type_list<__int128_t, >#endif ># 1825 "/usr/include/c++/v1/type_traits" 3 > __nat >#ifndef _LIBCPP_HAS_NO_INT128 > > >#endif ># 1829 "/usr/include/c++/v1/type_traits" 3 > > > > > > __signed_types; > >typedef > __type_list<unsigned char, > __type_list<unsigned short, > __type_list<unsigned int, > __type_list<unsigned long, > __type_list<unsigned long long, >#ifndef _LIBCPP_HAS_NO_INT128 > __type_list<__uint128_t, >#endif ># 1840 "/usr/include/c++/v1/type_traits" 3 > __nat >#ifndef _LIBCPP_HAS_NO_INT128 > > >#endif ># 1844 "/usr/include/c++/v1/type_traits" 3 > > > > > > __unsigned_types; > >template <class _TypeList, size_t _Size, bool = _Size <= sizeof(typename _TypeList::_Head)> struct __find_first; > >template <class _Hp, class _Tp, size_t _Size> >struct __find_first<__type_list<_Hp, _Tp>, _Size, true> >{ > typedef _Hp type; >}; > >template <class _Hp, class _Tp, size_t _Size> >struct __find_first<__type_list<_Hp, _Tp>, _Size, false> >{ > typedef typename __find_first<_Tp, _Size>::type type; >}; > >template <class _Tp, class _Up, bool = is_const<typename remove_reference<_Tp>::type>::value, > bool = is_volatile<typename remove_reference<_Tp>::type>::value> >struct __apply_cv >{ > typedef _Up type; >}; > >template <class _Tp, class _Up> >struct __apply_cv<_Tp, _Up, true, false> >{ > typedef const _Up type; >}; > >template <class _Tp, class _Up> >struct __apply_cv<_Tp, _Up, false, true> >{ > typedef volatile _Up type; >}; > >template <class _Tp, class _Up> >struct __apply_cv<_Tp, _Up, true, true> >{ > typedef const volatile _Up type; >}; > >template <class _Tp, class _Up> >struct __apply_cv<_Tp&, _Up, false, false> >{ > typedef _Up& type; >}; > >template <class _Tp, class _Up> >struct __apply_cv<_Tp&, _Up, true, false> >{ > typedef const _Up& type; >}; > >template <class _Tp, class _Up> >struct __apply_cv<_Tp&, _Up, false, true> >{ > typedef volatile _Up& type; >}; > >template <class _Tp, class _Up> >struct __apply_cv<_Tp&, _Up, true, true> >{ > typedef const volatile _Up& type; >}; > >template <class _Tp, bool = is_integral<_Tp>::value || is_enum<_Tp>::value> >struct __make_signed {}; > >template <class _Tp> >struct __make_signed<_Tp, true> >{ > typedef typename __find_first<__signed_types, sizeof(_Tp)>::type type; >}; > >template <> struct __make_signed<bool, true> {}; >template <> struct __make_signed< signed short, true> {typedef short type;}; >template <> struct __make_signed<unsigned short, true> {typedef short type;}; >template <> struct __make_signed< signed int, true> {typedef int type;}; >template <> struct __make_signed<unsigned int, true> {typedef int type;}; >template <> struct __make_signed< signed long, true> {typedef long type;}; >template <> struct __make_signed<unsigned long, true> {typedef long type;}; >template <> struct __make_signed< signed long long, true> {typedef long long type;}; >template <> struct __make_signed<unsigned long long, true> {typedef long long type;}; >#ifndef _LIBCPP_HAS_NO_INT128 >template <> struct __make_signed<__int128_t, true> {typedef __int128_t type;}; >template <> struct __make_signed<__uint128_t, true> {typedef __int128_t type;}; >#endif ># 1931 "/usr/include/c++/v1/type_traits" 3 > >template <class _Tp> >struct _LIBCPP_TEMPLATE_VIS make_signed >{ > typedef typename __apply_cv<_Tp, typename __make_signed<typename remove_cv<_Tp>::type>::type>::type type; >}; > >#if _LIBCPP_STD_VER > 11 >template <class _Tp> using make_signed_t = typename make_signed<_Tp>::type; >#endif ># 1941 "/usr/include/c++/v1/type_traits" 3 > >template <class _Tp, bool = is_integral<_Tp>::value || is_enum<_Tp>::value> >struct __make_unsigned {}; > >template <class _Tp> >struct __make_unsigned<_Tp, true> >{ > typedef typename __find_first<__unsigned_types, sizeof(_Tp)>::type type; >}; > >template <> struct __make_unsigned<bool, true> {}; >template <> struct __make_unsigned< signed short, true> {typedef unsigned short type;}; >template <> struct __make_unsigned<unsigned short, true> {typedef unsigned short type;}; >template <> struct __make_unsigned< signed int, true> {typedef unsigned int type;}; >template <> struct __make_unsigned<unsigned int, true> {typedef unsigned int type;}; >template <> struct __make_unsigned< signed long, true> {typedef unsigned long type;}; >template <> struct __make_unsigned<unsigned long, true> {typedef unsigned long type;}; >template <> struct __make_unsigned< signed long long, true> {typedef unsigned long long type;}; >template <> struct __make_unsigned<unsigned long long, true> {typedef unsigned long long type;}; >#ifndef _LIBCPP_HAS_NO_INT128 >template <> struct __make_unsigned<__int128_t, true> {typedef __uint128_t type;}; >template <> struct __make_unsigned<__uint128_t, true> {typedef __uint128_t type;}; >#endif ># 1964 "/usr/include/c++/v1/type_traits" 3 > >template <class _Tp> >struct _LIBCPP_TEMPLATE_VIS make_unsigned >{ > typedef typename __apply_cv<_Tp, typename __make_unsigned<typename remove_cv<_Tp>::type>::type>::type type; >}; > >#if _LIBCPP_STD_VER > 11 >template <class _Tp> using make_unsigned_t = typename make_unsigned<_Tp>::type; >#endif ># 1974 "/usr/include/c++/v1/type_traits" 3 > >#ifdef _LIBCPP_HAS_NO_VARIADICS > >template <class _Tp, class _Up = void, class _Vp = void> >struct _LIBCPP_TEMPLATE_VIS common_type >{ >public: > typedef typename common_type<typename common_type<_Tp, _Up>::type, _Vp>::type type; >}; > >template <> >struct _LIBCPP_TEMPLATE_VIS common_type<void, void, void> >{ >public: > typedef void type; >}; > >template <class _Tp> >struct _LIBCPP_TEMPLATE_VIS common_type<_Tp, void, void> >{ >public: > typedef typename common_type<_Tp, _Tp>::type type; >}; > >template <class _Tp, class _Up> >struct _LIBCPP_TEMPLATE_VIS common_type<_Tp, _Up, void> >{ > typedef typename decay<decltype( > true ? _VSTD::declval<_Tp>() : _VSTD::declval<_Up>() > )>::type type; >}; > >#else // _LIBCPP_HAS_NO_VARIADICS ># 2007 "/usr/include/c++/v1/type_traits" 3 > >// bullet 1 - sizeof...(Tp) == 0 > >template <class ..._Tp> >struct _LIBCPP_TEMPLATE_VIS common_type {}; > >// bullet 2 - sizeof...(Tp) == 1 > >template <class _Tp> >struct _LIBCPP_TEMPLATE_VIS common_type<_Tp> > : public common_type<_Tp, _Tp> {}; > >// bullet 3 - sizeof...(Tp) == 2 > >template <class _Tp, class _Up, class = void> >struct __common_type2_imp {}; > >template <class _Tp, class _Up> >struct __common_type2_imp<_Tp, _Up, > typename __void_t<decltype( > true ? _VSTD::declval<_Tp>() : _VSTD::declval<_Up>() > )>::type> >{ > typedef typename decay<decltype( > true ? _VSTD::declval<_Tp>() : _VSTD::declval<_Up>() > )>::type type; >}; > >template <class _Tp, class _Up, > class _DTp = typename decay<_Tp>::type, > class _DUp = typename decay<_Up>::type> >using __common_type2 = > typename conditional< > is_same<_Tp, _DTp>::value && is_same<_Up, _DUp>::value, > __common_type2_imp<_Tp, _Up>, > common_type<_DTp, _DUp> > >::type; > >template <class _Tp, class _Up> >struct _LIBCPP_TEMPLATE_VIS common_type<_Tp, _Up> > : __common_type2<_Tp, _Up> {}; > >// bullet 4 - sizeof...(Tp) > 2 > >template <class ...Tp> struct __common_types; > >template <class, class = void> >struct __common_type_impl {}; > >template <class _Tp, class _Up> >struct __common_type_impl< > __common_types<_Tp, _Up>, > typename __void_t<typename common_type<_Tp, _Up>::type>::type> >{ > typedef typename common_type<_Tp, _Up>::type type; >}; > >template <class _Tp, class _Up, class ..._Vp> >struct __common_type_impl<__common_types<_Tp, _Up, _Vp...>, > typename __void_t<typename common_type<_Tp, _Up>::type>::type> > : __common_type_impl< > __common_types<typename common_type<_Tp, _Up>::type, _Vp...> > >{ > >}; > >template <class _Tp, class _Up, class ..._Vp> >struct _LIBCPP_TEMPLATE_VIS common_type<_Tp, _Up, _Vp...> > : __common_type_impl<__common_types<_Tp, _Up, _Vp...> > {}; > >#if _LIBCPP_STD_VER > 11 >template <class ..._Tp> using common_type_t = typename common_type<_Tp...>::type; >#endif ># 2080 "/usr/include/c++/v1/type_traits" 3 > >#endif // _LIBCPP_HAS_NO_VARIADICS ># 2082 "/usr/include/c++/v1/type_traits" 3 > >// is_assignable > >template<typename, typename _Tp> struct __select_2nd { typedef _Tp type; }; > >template <class _Tp, class _Arg> >typename __select_2nd<decltype((_VSTD::declval<_Tp>() = _VSTD::declval<_Arg>())), true_type>::type >__is_assignable_test(int); > >template <class, class> >false_type __is_assignable_test(...); > > >template <class _Tp, class _Arg, bool = is_void<_Tp>::value || is_void<_Arg>::value> >struct __is_assignable_imp > : public decltype((_VSTD::__is_assignable_test<_Tp, _Arg>(0))) {}; > >template <class _Tp, class _Arg> >struct __is_assignable_imp<_Tp, _Arg, true> > : public false_type >{ >}; > >template <class _Tp, class _Arg> >struct is_assignable > : public __is_assignable_imp<_Tp, _Arg> {}; > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp, class _Arg> _LIBCPP_CONSTEXPR bool is_assignable_v > = is_assignable<_Tp, _Arg>::value; >#endif ># 2113 "/usr/include/c++/v1/type_traits" 3 > >// is_copy_assignable > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_copy_assignable > : public is_assignable<typename add_lvalue_reference<_Tp>::type, > typename add_lvalue_reference<typename add_const<_Tp>::type>::type> {}; > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_copy_assignable_v > = is_copy_assignable<_Tp>::value; >#endif ># 2124 "/usr/include/c++/v1/type_traits" 3 > >// is_move_assignable > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_move_assignable >#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES > : public is_assignable<typename add_lvalue_reference<_Tp>::type, > typename add_rvalue_reference<_Tp>::type> {}; >#else ># 2132 "/usr/include/c++/v1/type_traits" 3 > : public is_copy_assignable<_Tp> {}; >#endif ># 2134 "/usr/include/c++/v1/type_traits" 3 > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_move_assignable_v > = is_move_assignable<_Tp>::value; >#endif ># 2139 "/usr/include/c++/v1/type_traits" 3 > >// is_destructible > >// if it's a reference, return true >// if it's a function, return false >// if it's void, return false >// if it's an array of unknown bound, return false >// Otherwise, return "std::declval<_Up&>().~_Up()" is well-formed >// where _Up is remove_all_extents<_Tp>::type > >template <class> >struct __is_destructible_apply { typedef int type; }; > >template <typename _Tp> >struct __is_destructor_wellformed { > template <typename _Tp1> > static char __test ( > typename __is_destructible_apply<decltype(_VSTD::declval<_Tp1&>().~_Tp1())>::type > ); > > template <typename _Tp1> > static __two __test (...); > > static const bool value = sizeof(__test<_Tp>(12)) == sizeof(char); >}; > >template <class _Tp, bool> >struct __destructible_imp; > >template <class _Tp> >struct __destructible_imp<_Tp, false> > : public _VSTD::integral_constant<bool, > __is_destructor_wellformed<typename _VSTD::remove_all_extents<_Tp>::type>::value> {}; > >template <class _Tp> >struct __destructible_imp<_Tp, true> > : public _VSTD::true_type {}; > >template <class _Tp, bool> >struct __destructible_false; > >template <class _Tp> >struct __destructible_false<_Tp, false> : public __destructible_imp<_Tp, _VSTD::is_reference<_Tp>::value> {}; > >template <class _Tp> >struct __destructible_false<_Tp, true> : public _VSTD::false_type {}; > >template <class _Tp> >struct is_destructible > : public __destructible_false<_Tp, _VSTD::is_function<_Tp>::value> {}; > >template <class _Tp> >struct is_destructible<_Tp[]> > : public _VSTD::false_type {}; > >template <> >struct is_destructible<void> > : public _VSTD::false_type {}; > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_destructible_v > = is_destructible<_Tp>::value; >#endif ># 2202 "/usr/include/c++/v1/type_traits" 3 > >// move > >#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES > >template <class _Tp> >inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR >typename remove_reference<_Tp>::type&& >move(_Tp&& __t) _NOEXCEPT >{ > typedef typename remove_reference<_Tp>::type _Up; > return static_cast<_Up&&>(__t); >} > >template <class _Tp> >inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR >_Tp&& >forward(typename remove_reference<_Tp>::type& __t) _NOEXCEPT >{ > return static_cast<_Tp&&>(__t); >} > >template <class _Tp> >inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR >_Tp&& >forward(typename remove_reference<_Tp>::type&& __t) _NOEXCEPT >{ > static_assert(!is_lvalue_reference<_Tp>::value, > "can not forward an rvalue as an lvalue"); > return static_cast<_Tp&&>(__t); >} > >#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES ># 2235 "/usr/include/c++/v1/type_traits" 3 > >template <class _Tp> >inline _LIBCPP_INLINE_VISIBILITY >_Tp& >move(_Tp& __t) >{ > return __t; >} > >template <class _Tp> >inline _LIBCPP_INLINE_VISIBILITY >const _Tp& >move(const _Tp& __t) >{ > return __t; >} > >template <class _Tp> >inline _LIBCPP_INLINE_VISIBILITY >_Tp& >forward(typename remove_reference<_Tp>::type& __t) _NOEXCEPT >{ > return __t; >} > > >template <class _Tp> >class __rv >{ > typedef typename remove_reference<_Tp>::type _Trr; > _Trr& t_; >public: > _LIBCPP_INLINE_VISIBILITY > _Trr* operator->() {return &t_;} > _LIBCPP_INLINE_VISIBILITY > explicit __rv(_Trr& __t) : t_(__t) {} >}; > >#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES ># 2274 "/usr/include/c++/v1/type_traits" 3 > >#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES > >template <class _Tp> >inline _LIBCPP_INLINE_VISIBILITY >typename decay<_Tp>::type >__decay_copy(_Tp&& __t) >{ > return _VSTD::forward<_Tp>(__t); >} > >#else ># 2286 "/usr/include/c++/v1/type_traits" 3 > >template <class _Tp> >inline _LIBCPP_INLINE_VISIBILITY >typename decay<_Tp>::type >__decay_copy(const _Tp& __t) >{ > return _VSTD::forward<_Tp>(__t); >} > >#endif ># 2296 "/usr/include/c++/v1/type_traits" 3 > >#ifndef _LIBCPP_HAS_NO_VARIADICS > >template <class _Rp, class _Class, class ..._Param> >struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param...), true, false> >{ > typedef _Class _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (_Param...); >}; > >template <class _Rp, class _Class, class ..._Param> >struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param..., ...), true, false> >{ > typedef _Class _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (_Param..., ...); >}; > >template <class _Rp, class _Class, class ..._Param> >struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param...) const, true, false> >{ > typedef _Class const _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (_Param...); >}; > >template <class _Rp, class _Class, class ..._Param> >struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param..., ...) const, true, false> >{ > typedef _Class const _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (_Param..., ...); >}; > >template <class _Rp, class _Class, class ..._Param> >struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param...) volatile, true, false> >{ > typedef _Class volatile _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (_Param...); >}; > >template <class _Rp, class _Class, class ..._Param> >struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param..., ...) volatile, true, false> >{ > typedef _Class volatile _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (_Param..., ...); >}; > >template <class _Rp, class _Class, class ..._Param> >struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param...) const volatile, true, false> >{ > typedef _Class const volatile _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (_Param...); >}; > >template <class _Rp, class _Class, class ..._Param> >struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param..., ...) const volatile, true, false> >{ > typedef _Class const volatile _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (_Param..., ...); >}; > >#if __has_feature(cxx_reference_qualified_functions) || \ > (defined(_GNUC_VER) && _GNUC_VER >= 409) > >template <class _Rp, class _Class, class ..._Param> >struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param...) &, true, false> >{ > typedef _Class& _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (_Param...); >}; > >template <class _Rp, class _Class, class ..._Param> >struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param..., ...) &, true, false> >{ > typedef _Class& _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (_Param..., ...); >}; > >template <class _Rp, class _Class, class ..._Param> >struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param...) const&, true, false> >{ > typedef _Class const& _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (_Param...); >}; > >template <class _Rp, class _Class, class ..._Param> >struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param..., ...) const&, true, false> >{ > typedef _Class const& _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (_Param..., ...); >}; > >template <class _Rp, class _Class, class ..._Param> >struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param...) volatile&, true, false> >{ > typedef _Class volatile& _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (_Param...); >}; > >template <class _Rp, class _Class, class ..._Param> >struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param..., ...) volatile&, true, false> >{ > typedef _Class volatile& _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (_Param..., ...); >}; > >template <class _Rp, class _Class, class ..._Param> >struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param...) const volatile&, true, false> >{ > typedef _Class const volatile& _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (_Param...); >}; > >template <class _Rp, class _Class, class ..._Param> >struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param..., ...) const volatile&, true, false> >{ > typedef _Class const volatile& _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (_Param..., ...); >}; > >template <class _Rp, class _Class, class ..._Param> >struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param...) &&, true, false> >{ > typedef _Class&& _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (_Param...); >}; > >template <class _Rp, class _Class, class ..._Param> >struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param..., ...) &&, true, false> >{ > typedef _Class&& _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (_Param..., ...); >}; > >template <class _Rp, class _Class, class ..._Param> >struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param...) const&&, true, false> >{ > typedef _Class const&& _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (_Param...); >}; > >template <class _Rp, class _Class, class ..._Param> >struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param..., ...) const&&, true, false> >{ > typedef _Class const&& _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (_Param..., ...); >}; > >template <class _Rp, class _Class, class ..._Param> >struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param...) volatile&&, true, false> >{ > typedef _Class volatile&& _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (_Param...); >}; > >template <class _Rp, class _Class, class ..._Param> >struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param..., ...) volatile&&, true, false> >{ > typedef _Class volatile&& _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (_Param..., ...); >}; > >template <class _Rp, class _Class, class ..._Param> >struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param...) const volatile&&, true, false> >{ > typedef _Class const volatile&& _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (_Param...); >}; > >template <class _Rp, class _Class, class ..._Param> >struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param..., ...) const volatile&&, true, false> >{ > typedef _Class const volatile&& _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (_Param..., ...); >}; > >#endif // __has_feature(cxx_reference_qualified_functions) || _GNUC_VER >= 409 ># 2495 "/usr/include/c++/v1/type_traits" 3 > >#else // _LIBCPP_HAS_NO_VARIADICS ># 2497 "/usr/include/c++/v1/type_traits" 3 > >template <class _Rp, class _Class> >struct __member_pointer_traits_imp<_Rp (_Class::*)(), true, false> >{ > typedef _Class _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (); >}; > >template <class _Rp, class _Class> >struct __member_pointer_traits_imp<_Rp (_Class::*)(...), true, false> >{ > typedef _Class _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (...); >}; > >template <class _Rp, class _Class, class _P0> >struct __member_pointer_traits_imp<_Rp (_Class::*)(_P0), true, false> >{ > typedef _Class _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (_P0); >}; > >template <class _Rp, class _Class, class _P0> >struct __member_pointer_traits_imp<_Rp (_Class::*)(_P0, ...), true, false> >{ > typedef _Class _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (_P0, ...); >}; > >template <class _Rp, class _Class, class _P0, class _P1> >struct __member_pointer_traits_imp<_Rp (_Class::*)(_P0, _P1), true, false> >{ > typedef _Class _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (_P0, _P1); >}; > >template <class _Rp, class _Class, class _P0, class _P1> >struct __member_pointer_traits_imp<_Rp (_Class::*)(_P0, _P1, ...), true, false> >{ > typedef _Class _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (_P0, _P1, ...); >}; > >template <class _Rp, class _Class, class _P0, class _P1, class _P2> >struct __member_pointer_traits_imp<_Rp (_Class::*)(_P0, _P1, _P2), true, false> >{ > typedef _Class _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (_P0, _P1, _P2); >}; > >template <class _Rp, class _Class, class _P0, class _P1, class _P2> >struct __member_pointer_traits_imp<_Rp (_Class::*)(_P0, _P1, _P2, ...), true, false> >{ > typedef _Class _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (_P0, _P1, _P2, ...); >}; > >template <class _Rp, class _Class> >struct __member_pointer_traits_imp<_Rp (_Class::*)() const, true, false> >{ > typedef _Class const _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (); >}; > >template <class _Rp, class _Class> >struct __member_pointer_traits_imp<_Rp (_Class::*)(...) const, true, false> >{ > typedef _Class const _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (...); >}; > >template <class _Rp, class _Class, class _P0> >struct __member_pointer_traits_imp<_Rp (_Class::*)(_P0) const, true, false> >{ > typedef _Class const _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (_P0); >}; > >template <class _Rp, class _Class, class _P0> >struct __member_pointer_traits_imp<_Rp (_Class::*)(_P0, ...) const, true, false> >{ > typedef _Class const _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (_P0, ...); >}; > >template <class _Rp, class _Class, class _P0, class _P1> >struct __member_pointer_traits_imp<_Rp (_Class::*)(_P0, _P1) const, true, false> >{ > typedef _Class const _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (_P0, _P1); >}; > >template <class _Rp, class _Class, class _P0, class _P1> >struct __member_pointer_traits_imp<_Rp (_Class::*)(_P0, _P1, ...) const, true, false> >{ > typedef _Class const _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (_P0, _P1, ...); >}; > >template <class _Rp, class _Class, class _P0, class _P1, class _P2> >struct __member_pointer_traits_imp<_Rp (_Class::*)(_P0, _P1, _P2) const, true, false> >{ > typedef _Class const _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (_P0, _P1, _P2); >}; > >template <class _Rp, class _Class, class _P0, class _P1, class _P2> >struct __member_pointer_traits_imp<_Rp (_Class::*)(_P0, _P1, _P2, ...) const, true, false> >{ > typedef _Class const _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (_P0, _P1, _P2, ...); >}; > >template <class _Rp, class _Class> >struct __member_pointer_traits_imp<_Rp (_Class::*)() volatile, true, false> >{ > typedef _Class volatile _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (); >}; > >template <class _Rp, class _Class> >struct __member_pointer_traits_imp<_Rp (_Class::*)(...) volatile, true, false> >{ > typedef _Class volatile _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (...); >}; > >template <class _Rp, class _Class, class _P0> >struct __member_pointer_traits_imp<_Rp (_Class::*)(_P0) volatile, true, false> >{ > typedef _Class volatile _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (_P0); >}; > >template <class _Rp, class _Class, class _P0> >struct __member_pointer_traits_imp<_Rp (_Class::*)(_P0, ...) volatile, true, false> >{ > typedef _Class volatile _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (_P0, ...); >}; > >template <class _Rp, class _Class, class _P0, class _P1> >struct __member_pointer_traits_imp<_Rp (_Class::*)(_P0, _P1) volatile, true, false> >{ > typedef _Class volatile _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (_P0, _P1); >}; > >template <class _Rp, class _Class, class _P0, class _P1> >struct __member_pointer_traits_imp<_Rp (_Class::*)(_P0, _P1, ...) volatile, true, false> >{ > typedef _Class volatile _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (_P0, _P1, ...); >}; > >template <class _Rp, class _Class, class _P0, class _P1, class _P2> >struct __member_pointer_traits_imp<_Rp (_Class::*)(_P0, _P1, _P2) volatile, true, false> >{ > typedef _Class volatile _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (_P0, _P1, _P2); >}; > >template <class _Rp, class _Class, class _P0, class _P1, class _P2> >struct __member_pointer_traits_imp<_Rp (_Class::*)(_P0, _P1, _P2, ...) volatile, true, false> >{ > typedef _Class volatile _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (_P0, _P1, _P2, ...); >}; > >template <class _Rp, class _Class> >struct __member_pointer_traits_imp<_Rp (_Class::*)() const volatile, true, false> >{ > typedef _Class const volatile _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (); >}; > >template <class _Rp, class _Class> >struct __member_pointer_traits_imp<_Rp (_Class::*)(...) const volatile, true, false> >{ > typedef _Class const volatile _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (...); >}; > >template <class _Rp, class _Class, class _P0> >struct __member_pointer_traits_imp<_Rp (_Class::*)(_P0) const volatile, true, false> >{ > typedef _Class const volatile _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (_P0); >}; > >template <class _Rp, class _Class, class _P0> >struct __member_pointer_traits_imp<_Rp (_Class::*)(_P0, ...) const volatile, true, false> >{ > typedef _Class const volatile _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (_P0, ...); >}; > >template <class _Rp, class _Class, class _P0, class _P1> >struct __member_pointer_traits_imp<_Rp (_Class::*)(_P0, _P1) const volatile, true, false> >{ > typedef _Class const volatile _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (_P0, _P1); >}; > >template <class _Rp, class _Class, class _P0, class _P1> >struct __member_pointer_traits_imp<_Rp (_Class::*)(_P0, _P1, ...) const volatile, true, false> >{ > typedef _Class const volatile _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (_P0, _P1, ...); >}; > >template <class _Rp, class _Class, class _P0, class _P1, class _P2> >struct __member_pointer_traits_imp<_Rp (_Class::*)(_P0, _P1, _P2) const volatile, true, false> >{ > typedef _Class const volatile _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (_P0, _P1, _P2); >}; > >template <class _Rp, class _Class, class _P0, class _P1, class _P2> >struct __member_pointer_traits_imp<_Rp (_Class::*)(_P0, _P1, _P2, ...) const volatile, true, false> >{ > typedef _Class const volatile _ClassType; > typedef _Rp _ReturnType; > typedef _Rp (_FnType) (_P0, _P1, _P2, ...); >}; > >#endif // _LIBCPP_HAS_NO_VARIADICS ># 2755 "/usr/include/c++/v1/type_traits" 3 > >template <class _Rp, class _Class> >struct __member_pointer_traits_imp<_Rp _Class::*, false, true> >{ > typedef _Class _ClassType; > typedef _Rp _ReturnType; >}; > >template <class _MP> >struct __member_pointer_traits > : public __member_pointer_traits_imp<typename remove_cv<_MP>::type, > is_member_function_pointer<_MP>::value, > is_member_object_pointer<_MP>::value> >{ >// typedef ... _ClassType; >// typedef ... _ReturnType; >// typedef ... _FnType; >}; > > >template <class _DecayedFp> >struct __member_pointer_class_type {}; > >template <class _Ret, class _ClassType> >struct __member_pointer_class_type<_Ret _ClassType::*> { > typedef _ClassType type; >}; > >// result_of > >template <class _Callable> class result_of; > >#ifdef _LIBCPP_HAS_NO_VARIADICS > >template <class _Fn, bool, bool> >class __result_of >{ >}; > >template <class _Fn> >class __result_of<_Fn(), true, false> >{ >public: > typedef decltype(declval<_Fn>()()) type; >}; > >template <class _Fn, class _A0> >class __result_of<_Fn(_A0), true, false> >{ >public: > typedef decltype(declval<_Fn>()(declval<_A0>())) type; >}; > >template <class _Fn, class _A0, class _A1> >class __result_of<_Fn(_A0, _A1), true, false> >{ >public: > typedef decltype(declval<_Fn>()(declval<_A0>(), declval<_A1>())) type; >}; > >template <class _Fn, class _A0, class _A1, class _A2> >class __result_of<_Fn(_A0, _A1, _A2), true, false> >{ >public: > typedef decltype(declval<_Fn>()(declval<_A0>(), declval<_A1>(), declval<_A2>())) type; >}; > >template <class _MP, class _Tp, bool _IsMemberFunctionPtr> >struct __result_of_mp; > >// member function pointer > >template <class _MP, class _Tp> >struct __result_of_mp<_MP, _Tp, true> > : public __identity<typename __member_pointer_traits<_MP>::_ReturnType> >{ >}; > >// member data pointer > >template <class _MP, class _Tp, bool> >struct __result_of_mdp; > >template <class _Rp, class _Class, class _Tp> >struct __result_of_mdp<_Rp _Class::*, _Tp, false> >{ > typedef typename __apply_cv<decltype(*_VSTD::declval<_Tp>()), _Rp>::type& type; >}; > >template <class _Rp, class _Class, class _Tp> >struct __result_of_mdp<_Rp _Class::*, _Tp, true> >{ > typedef typename __apply_cv<_Tp, _Rp>::type& type; >}; > >template <class _Rp, class _Class, class _Tp> >struct __result_of_mp<_Rp _Class::*, _Tp, false> > : public __result_of_mdp<_Rp _Class::*, _Tp, > is_base_of<_Class, typename remove_reference<_Tp>::type>::value> >{ >}; > > > >template <class _Fn, class _Tp> >class __result_of<_Fn(_Tp), false, true> // _Fn must be member pointer > : public __result_of_mp<typename remove_reference<_Fn>::type, > _Tp, > is_member_function_pointer<typename remove_reference<_Fn>::type>::value> >{ >}; > >template <class _Fn, class _Tp, class _A0> >class __result_of<_Fn(_Tp, _A0), false, true> // _Fn must be member pointer > : public __result_of_mp<typename remove_reference<_Fn>::type, > _Tp, > is_member_function_pointer<typename remove_reference<_Fn>::type>::value> >{ >}; > >template <class _Fn, class _Tp, class _A0, class _A1> >class __result_of<_Fn(_Tp, _A0, _A1), false, true> // _Fn must be member pointer > : public __result_of_mp<typename remove_reference<_Fn>::type, > _Tp, > is_member_function_pointer<typename remove_reference<_Fn>::type>::value> >{ >}; > >template <class _Fn, class _Tp, class _A0, class _A1, class _A2> >class __result_of<_Fn(_Tp, _A0, _A1, _A2), false, true> // _Fn must be member pointer > : public __result_of_mp<typename remove_reference<_Fn>::type, > _Tp, > is_member_function_pointer<typename remove_reference<_Fn>::type>::value> >{ >}; > >// result_of > >template <class _Fn> >class _LIBCPP_TEMPLATE_VIS result_of<_Fn()> > : public __result_of<_Fn(), > is_class<typename remove_reference<_Fn>::type>::value || > is_function<typename remove_pointer<typename remove_reference<_Fn>::type>::type>::value, > is_member_pointer<typename remove_reference<_Fn>::type>::value > > >{ >}; > >template <class _Fn, class _A0> >class _LIBCPP_TEMPLATE_VIS result_of<_Fn(_A0)> > : public __result_of<_Fn(_A0), > is_class<typename remove_reference<_Fn>::type>::value || > is_function<typename remove_pointer<typename remove_reference<_Fn>::type>::type>::value, > is_member_pointer<typename remove_reference<_Fn>::type>::value > > >{ >}; > >template <class _Fn, class _A0, class _A1> >class _LIBCPP_TEMPLATE_VIS result_of<_Fn(_A0, _A1)> > : public __result_of<_Fn(_A0, _A1), > is_class<typename remove_reference<_Fn>::type>::value || > is_function<typename remove_pointer<typename remove_reference<_Fn>::type>::type>::value, > is_member_pointer<typename remove_reference<_Fn>::type>::value > > >{ >}; > >template <class _Fn, class _A0, class _A1, class _A2> >class _LIBCPP_TEMPLATE_VIS result_of<_Fn(_A0, _A1, _A2)> > : public __result_of<_Fn(_A0, _A1, _A2), > is_class<typename remove_reference<_Fn>::type>::value || > is_function<typename remove_pointer<typename remove_reference<_Fn>::type>::type>::value, > is_member_pointer<typename remove_reference<_Fn>::type>::value > > >{ >}; > >#endif // _LIBCPP_HAS_NO_VARIADICS ># 2934 "/usr/include/c++/v1/type_traits" 3 > >// template <class T, class... Args> struct is_constructible; > >namespace __is_construct >{ >struct __nat {}; >} > >#if !defined(_LIBCPP_CXX03_LANG) && (!__has_feature(is_constructible) || \ > defined(_LIBCPP_TESTING_FALLBACK_IS_CONSTRUCTIBLE)) > >template <class _Tp, class... _Args> >struct __libcpp_is_constructible; > >template <class _To, class _From> >struct __is_invalid_base_to_derived_cast { > static_assert(is_reference<_To>::value, "Wrong specialization"); > using _RawFrom = __uncvref_t<_From>; > using _RawTo = __uncvref_t<_To>; > static const bool value = __lazy_and< > __lazy_not<is_same<_RawFrom, _RawTo>>, > is_base_of<_RawFrom, _RawTo>, > __lazy_not<__libcpp_is_constructible<_RawTo, _From>> > >::value; >}; > >template <class _To, class _From> >struct __is_invalid_lvalue_to_rvalue_cast : false_type { > static_assert(is_reference<_To>::value, "Wrong specialization"); >}; > >template <class _ToRef, class _FromRef> >struct __is_invalid_lvalue_to_rvalue_cast<_ToRef&&, _FromRef&> { > using _RawFrom = __uncvref_t<_FromRef>; > using _RawTo = __uncvref_t<_ToRef>; > static const bool value = __lazy_and< > __lazy_not<is_function<_RawTo>>, > __lazy_or< > is_same<_RawFrom, _RawTo>, > is_base_of<_RawTo, _RawFrom>> > >::value; >}; > >struct __is_constructible_helper >{ > template <class _To> > static void __eat(_To); > > // This overload is needed to work around a Clang bug that disallows > // static_cast<T&&>(e) for non-reference-compatible types. > // Example: static_cast<int&&>(declval<double>()); > // NOTE: The static_cast implementation below is required to support > // classes with explicit conversion operators. > template <class _To, class _From, > class = decltype(__eat<_To>(_VSTD::declval<_From>()))> > static true_type __test_cast(int); > > template <class _To, class _From, > class = decltype(static_cast<_To>(_VSTD::declval<_From>()))> > static integral_constant<bool, > !__is_invalid_base_to_derived_cast<_To, _From>::value && > !__is_invalid_lvalue_to_rvalue_cast<_To, _From>::value > > __test_cast(long); > > template <class, class> > static false_type __test_cast(...); > > template <class _Tp, class ..._Args, > class = decltype(_Tp(_VSTD::declval<_Args>()...))> > static true_type __test_nary(int); > template <class _Tp, class...> > static false_type __test_nary(...); > > template <class _Tp, class _A0, class = decltype(::new _Tp(_VSTD::declval<_A0>()))> > static is_destructible<_Tp> __test_unary(int); > template <class, class> > static false_type __test_unary(...); >}; > >template <class _Tp, bool = is_void<_Tp>::value> >struct __is_default_constructible > : decltype(__is_constructible_helper::__test_nary<_Tp>(0)) >{}; > >template <class _Tp> >struct __is_default_constructible<_Tp, true> : false_type {}; > >template <class _Tp> >struct __is_default_constructible<_Tp[], false> : false_type {}; > >template <class _Tp, size_t _Nx> >struct __is_default_constructible<_Tp[_Nx], false> > : __is_default_constructible<typename remove_all_extents<_Tp>::type> {}; > >template <class _Tp, class... _Args> >struct __libcpp_is_constructible >{ > static_assert(sizeof...(_Args) > 1, "Wrong specialization"); > typedef decltype(__is_constructible_helper::__test_nary<_Tp, _Args...>(0)) > type; >}; > >template <class _Tp> >struct __libcpp_is_constructible<_Tp> : __is_default_constructible<_Tp> {}; > >template <class _Tp, class _A0> >struct __libcpp_is_constructible<_Tp, _A0> > : public decltype(__is_constructible_helper::__test_unary<_Tp, _A0>(0)) >{}; > >template <class _Tp, class _A0> >struct __libcpp_is_constructible<_Tp&, _A0> > : public decltype(__is_constructible_helper:: > __test_cast<_Tp&, _A0>(0)) >{}; > >template <class _Tp, class _A0> >struct __libcpp_is_constructible<_Tp&&, _A0> > : public decltype(__is_constructible_helper:: > __test_cast<_Tp&&, _A0>(0)) >{}; > >#endif ># 3057 "/usr/include/c++/v1/type_traits" 3 > >#if __has_feature(is_constructible) >template <class _Tp, class ..._Args> >struct _LIBCPP_TEMPLATE_VIS is_constructible > : public integral_constant<bool, __is_constructible(_Tp, _Args...)> > {}; >#elif !defined(_LIBCPP_CXX03_LANG) ># 3064 "/usr/include/c++/v1/type_traits" 3 >template <class _Tp, class... _Args> >struct _LIBCPP_TEMPLATE_VIS is_constructible > : public __libcpp_is_constructible<_Tp, _Args...>::type {}; >#else ># 3068 "/usr/include/c++/v1/type_traits" 3 >// template <class T> struct is_constructible0; > >// main is_constructible0 test > >template <class _Tp> >decltype((_Tp(), true_type())) >__is_constructible0_test(_Tp&); > >false_type >__is_constructible0_test(__any); > >template <class _Tp, class _A0> >decltype((_Tp(_VSTD::declval<_A0>()), true_type())) >__is_constructible1_test(_Tp&, _A0&); > >template <class _A0> >false_type >__is_constructible1_test(__any, _A0&); > >template <class _Tp, class _A0, class _A1> >decltype((_Tp(_VSTD::declval<_A0>(), _VSTD::declval<_A1>()), true_type())) >__is_constructible2_test(_Tp&, _A0&, _A1&); > >template <class _A0, class _A1> >false_type >__is_constructible2_test(__any, _A0&, _A1&); > >template <bool, class _Tp> >struct __is_constructible0_imp // false, _Tp is not a scalar > : public common_type > < > decltype(__is_constructible0_test(declval<_Tp&>())) > >::type > {}; > >template <bool, class _Tp, class _A0> >struct __is_constructible1_imp // false, _Tp is not a scalar > : public common_type > < > decltype(__is_constructible1_test(declval<_Tp&>(), declval<_A0&>())) > >::type > {}; > >template <bool, class _Tp, class _A0, class _A1> >struct __is_constructible2_imp // false, _Tp is not a scalar > : public common_type > < > decltype(__is_constructible2_test(declval<_Tp&>(), declval<_A0>(), declval<_A1>())) > >::type > {}; > >// handle scalars and reference types > >// Scalars are default constructible, references are not > >template <class _Tp> >struct __is_constructible0_imp<true, _Tp> > : public is_scalar<_Tp> > {}; > >template <class _Tp, class _A0> >struct __is_constructible1_imp<true, _Tp, _A0> > : public is_convertible<_A0, _Tp> > {}; > >template <class _Tp, class _A0, class _A1> >struct __is_constructible2_imp<true, _Tp, _A0, _A1> > : public false_type > {}; > >// Treat scalars and reference types separately > >template <bool, class _Tp> >struct __is_constructible0_void_check > : public __is_constructible0_imp<is_scalar<_Tp>::value || is_reference<_Tp>::value, > _Tp> > {}; > >template <bool, class _Tp, class _A0> >struct __is_constructible1_void_check > : public __is_constructible1_imp<is_scalar<_Tp>::value || is_reference<_Tp>::value, > _Tp, _A0> > {}; > >template <bool, class _Tp, class _A0, class _A1> >struct __is_constructible2_void_check > : public __is_constructible2_imp<is_scalar<_Tp>::value || is_reference<_Tp>::value, > _Tp, _A0, _A1> > {}; > >// If any of T or Args is void, is_constructible should be false > >template <class _Tp> >struct __is_constructible0_void_check<true, _Tp> > : public false_type > {}; > >template <class _Tp, class _A0> >struct __is_constructible1_void_check<true, _Tp, _A0> > : public false_type > {}; > >template <class _Tp, class _A0, class _A1> >struct __is_constructible2_void_check<true, _Tp, _A0, _A1> > : public false_type > {}; > >// is_constructible entry point > >template <class _Tp, class _A0 = __is_construct::__nat, > class _A1 = __is_construct::__nat> >struct _LIBCPP_TEMPLATE_VIS is_constructible > : public __is_constructible2_void_check<is_void<_Tp>::value > || is_abstract<_Tp>::value > || is_function<_Tp>::value > || is_void<_A0>::value > || is_void<_A1>::value, > _Tp, _A0, _A1> > {}; > >template <class _Tp> >struct _LIBCPP_TEMPLATE_VIS is_constructible<_Tp, __is_construct::__nat, __is_construct::__nat> > : public __is_constructible0_void_check<is_void<_Tp>::value > || is_abstract<_Tp>::value > || is_function<_Tp>::value, > _Tp> > {}; > >template <class _Tp, class _A0> >struct _LIBCPP_TEMPLATE_VIS is_constructible<_Tp, _A0, __is_construct::__nat> > : public __is_constructible1_void_check<is_void<_Tp>::value > || is_abstract<_Tp>::value > || is_function<_Tp>::value > || is_void<_A0>::value, > _Tp, _A0> > {}; > >// Array types are default constructible if their element type >// is default constructible > >template <class _Ap, size_t _Np> >struct __is_constructible0_imp<false, _Ap[_Np]> > : public is_constructible<typename remove_all_extents<_Ap>::type> > {}; > >template <class _Ap, size_t _Np, class _A0> >struct __is_constructible1_imp<false, _Ap[_Np], _A0> > : public false_type > {}; > >template <class _Ap, size_t _Np, class _A0, class _A1> >struct __is_constructible2_imp<false, _Ap[_Np], _A0, _A1> > : public false_type > {}; > >// Incomplete array types are not constructible > >template <class _Ap> >struct __is_constructible0_imp<false, _Ap[]> > : public false_type > {}; > >template <class _Ap, class _A0> >struct __is_constructible1_imp<false, _Ap[], _A0> > : public false_type > {}; > >template <class _Ap, class _A0, class _A1> >struct __is_constructible2_imp<false, _Ap[], _A0, _A1> > : public false_type > {}; > >#endif // __has_feature(is_constructible) ># 3241 "/usr/include/c++/v1/type_traits" 3 > > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) && !defined(_LIBCPP_HAS_NO_VARIADICS) >template <class _Tp, class ..._Args> _LIBCPP_CONSTEXPR bool is_constructible_v > = is_constructible<_Tp, _Args...>::value; >#endif ># 3247 "/usr/include/c++/v1/type_traits" 3 > >// is_default_constructible > >template <class _Tp> >struct _LIBCPP_TEMPLATE_VIS is_default_constructible > : public is_constructible<_Tp> > {}; > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_default_constructible_v > = is_default_constructible<_Tp>::value; >#endif ># 3259 "/usr/include/c++/v1/type_traits" 3 > >// is_copy_constructible > >template <class _Tp> >struct _LIBCPP_TEMPLATE_VIS is_copy_constructible > : public is_constructible<_Tp, > typename add_lvalue_reference<typename add_const<_Tp>::type>::type> {}; > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_copy_constructible_v > = is_copy_constructible<_Tp>::value; >#endif ># 3271 "/usr/include/c++/v1/type_traits" 3 > >// is_move_constructible > >template <class _Tp> >struct _LIBCPP_TEMPLATE_VIS is_move_constructible >#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES > : public is_constructible<_Tp, typename add_rvalue_reference<_Tp>::type> >#else ># 3279 "/usr/include/c++/v1/type_traits" 3 > : public is_copy_constructible<_Tp> >#endif ># 3281 "/usr/include/c++/v1/type_traits" 3 > {}; > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_move_constructible_v > = is_move_constructible<_Tp>::value; >#endif ># 3287 "/usr/include/c++/v1/type_traits" 3 > >// is_trivially_constructible > >#ifndef _LIBCPP_HAS_NO_VARIADICS > >#if __has_feature(is_trivially_constructible) || _GNUC_VER >= 501 > >template <class _Tp, class... _Args> >struct _LIBCPP_TEMPLATE_VIS is_trivially_constructible > : integral_constant<bool, __is_trivially_constructible(_Tp, _Args...)> >{ >}; > >#else // !__has_feature(is_trivially_constructible) ># 3301 "/usr/include/c++/v1/type_traits" 3 > >template <class _Tp, class... _Args> >struct _LIBCPP_TEMPLATE_VIS is_trivially_constructible > : false_type >{ >}; > >template <class _Tp> >struct _LIBCPP_TEMPLATE_VIS is_trivially_constructible<_Tp> >#if __has_feature(has_trivial_constructor) || (_GNUC_VER >= 403) > : integral_constant<bool, __has_trivial_constructor(_Tp)> >#else ># 3313 "/usr/include/c++/v1/type_traits" 3 > : integral_constant<bool, is_scalar<_Tp>::value> >#endif ># 3315 "/usr/include/c++/v1/type_traits" 3 >{ >}; > >template <class _Tp> >#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES >struct _LIBCPP_TEMPLATE_VIS is_trivially_constructible<_Tp, _Tp&&> >#else ># 3322 "/usr/include/c++/v1/type_traits" 3 >struct _LIBCPP_TEMPLATE_VIS is_trivially_constructible<_Tp, _Tp> >#endif ># 3324 "/usr/include/c++/v1/type_traits" 3 > : integral_constant<bool, is_scalar<_Tp>::value> >{ >}; > >template <class _Tp> >struct _LIBCPP_TEMPLATE_VIS is_trivially_constructible<_Tp, const _Tp&> > : integral_constant<bool, is_scalar<_Tp>::value> >{ >}; > >template <class _Tp> >struct _LIBCPP_TEMPLATE_VIS is_trivially_constructible<_Tp, _Tp&> > : integral_constant<bool, is_scalar<_Tp>::value> >{ >}; > >#endif // !__has_feature(is_trivially_constructible) ># 3341 "/usr/include/c++/v1/type_traits" 3 > >#else // _LIBCPP_HAS_NO_VARIADICS ># 3343 "/usr/include/c++/v1/type_traits" 3 > >template <class _Tp, class _A0 = __is_construct::__nat, > class _A1 = __is_construct::__nat> >struct _LIBCPP_TEMPLATE_VIS is_trivially_constructible > : false_type >{ >}; > >#if __has_feature(is_trivially_constructible) || _GNUC_VER >= 501 > >template <class _Tp> >struct _LIBCPP_TEMPLATE_VIS is_trivially_constructible<_Tp, __is_construct::__nat, > __is_construct::__nat> > : integral_constant<bool, __is_trivially_constructible(_Tp)> >{ >}; > >template <class _Tp> >struct _LIBCPP_TEMPLATE_VIS is_trivially_constructible<_Tp, _Tp, > __is_construct::__nat> > : integral_constant<bool, __is_trivially_constructible(_Tp, _Tp)> >{ >}; > >template <class _Tp> >struct _LIBCPP_TEMPLATE_VIS is_trivially_constructible<_Tp, const _Tp&, > __is_construct::__nat> > : integral_constant<bool, __is_trivially_constructible(_Tp, const _Tp&)> >{ >}; > >template <class _Tp> >struct _LIBCPP_TEMPLATE_VIS is_trivially_constructible<_Tp, _Tp&, > __is_construct::__nat> > : integral_constant<bool, __is_trivially_constructible(_Tp, _Tp&)> >{ >}; > >#else // !__has_feature(is_trivially_constructible) ># 3382 "/usr/include/c++/v1/type_traits" 3 > >template <class _Tp> >struct _LIBCPP_TEMPLATE_VIS is_trivially_constructible<_Tp, __is_construct::__nat, > __is_construct::__nat> > : integral_constant<bool, is_scalar<_Tp>::value> >{ >}; > >template <class _Tp> >struct _LIBCPP_TEMPLATE_VIS is_trivially_constructible<_Tp, _Tp, > __is_construct::__nat> > : integral_constant<bool, is_scalar<_Tp>::value> >{ >}; > >template <class _Tp> >struct _LIBCPP_TEMPLATE_VIS is_trivially_constructible<_Tp, const _Tp&, > __is_construct::__nat> > : integral_constant<bool, is_scalar<_Tp>::value> >{ >}; > >template <class _Tp> >struct _LIBCPP_TEMPLATE_VIS is_trivially_constructible<_Tp, _Tp&, > __is_construct::__nat> > : integral_constant<bool, is_scalar<_Tp>::value> >{ >}; > >#endif // !__has_feature(is_trivially_constructible) ># 3412 "/usr/include/c++/v1/type_traits" 3 > >#endif // _LIBCPP_HAS_NO_VARIADICS ># 3414 "/usr/include/c++/v1/type_traits" 3 > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) && !defined(_LIBCPP_HAS_NO_VARIADICS) >template <class _Tp, class... _Args> _LIBCPP_CONSTEXPR bool is_trivially_constructible_v > = is_trivially_constructible<_Tp, _Args...>::value; >#endif ># 3419 "/usr/include/c++/v1/type_traits" 3 > >// is_trivially_default_constructible > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivially_default_constructible > : public is_trivially_constructible<_Tp> > {}; > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_trivially_default_constructible_v > = is_trivially_default_constructible<_Tp>::value; >#endif ># 3430 "/usr/include/c++/v1/type_traits" 3 > >// is_trivially_copy_constructible > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivially_copy_constructible > : public is_trivially_constructible<_Tp, typename add_lvalue_reference<const _Tp>::type> > {}; > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_trivially_copy_constructible_v > = is_trivially_copy_constructible<_Tp>::value; >#endif ># 3441 "/usr/include/c++/v1/type_traits" 3 > >// is_trivially_move_constructible > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivially_move_constructible >#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES > : public is_trivially_constructible<_Tp, typename add_rvalue_reference<_Tp>::type> >#else ># 3448 "/usr/include/c++/v1/type_traits" 3 > : public is_trivially_copy_constructible<_Tp> >#endif ># 3450 "/usr/include/c++/v1/type_traits" 3 > {}; > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_trivially_move_constructible_v > = is_trivially_move_constructible<_Tp>::value; >#endif ># 3456 "/usr/include/c++/v1/type_traits" 3 > >// is_trivially_assignable > >#if __has_feature(is_trivially_assignable) || _GNUC_VER >= 501 > >template <class _Tp, class _Arg> >struct is_trivially_assignable > : integral_constant<bool, __is_trivially_assignable(_Tp, _Arg)> >{ >}; > >#else // !__has_feature(is_trivially_assignable) ># 3468 "/usr/include/c++/v1/type_traits" 3 > >template <class _Tp, class _Arg> >struct is_trivially_assignable > : public false_type {}; > >template <class _Tp> >struct is_trivially_assignable<_Tp&, _Tp> > : integral_constant<bool, is_scalar<_Tp>::value> {}; > >template <class _Tp> >struct is_trivially_assignable<_Tp&, _Tp&> > : integral_constant<bool, is_scalar<_Tp>::value> {}; > >template <class _Tp> >struct is_trivially_assignable<_Tp&, const _Tp&> > : integral_constant<bool, is_scalar<_Tp>::value> {}; > >#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES > >template <class _Tp> >struct is_trivially_assignable<_Tp&, _Tp&&> > : integral_constant<bool, is_scalar<_Tp>::value> {}; > >#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES ># 3492 "/usr/include/c++/v1/type_traits" 3 > >#endif // !__has_feature(is_trivially_assignable) ># 3494 "/usr/include/c++/v1/type_traits" 3 > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp, class _Arg> _LIBCPP_CONSTEXPR bool is_trivially_assignable_v > = is_trivially_assignable<_Tp, _Arg>::value; >#endif ># 3499 "/usr/include/c++/v1/type_traits" 3 > >// is_trivially_copy_assignable > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivially_copy_assignable > : public is_trivially_assignable<typename add_lvalue_reference<_Tp>::type, > typename add_lvalue_reference<typename add_const<_Tp>::type>::type> {}; > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_trivially_copy_assignable_v > = is_trivially_copy_assignable<_Tp>::value; >#endif ># 3510 "/usr/include/c++/v1/type_traits" 3 > >// is_trivially_move_assignable > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivially_move_assignable > : public is_trivially_assignable<typename add_lvalue_reference<_Tp>::type, >#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES > typename add_rvalue_reference<_Tp>::type> >#else ># 3518 "/usr/include/c++/v1/type_traits" 3 > typename add_lvalue_reference<_Tp>::type> >#endif ># 3520 "/usr/include/c++/v1/type_traits" 3 > {}; > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_trivially_move_assignable_v > = is_trivially_move_assignable<_Tp>::value; >#endif ># 3526 "/usr/include/c++/v1/type_traits" 3 > >// is_trivially_destructible > >#if __has_feature(has_trivial_destructor) || (_GNUC_VER >= 403) > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivially_destructible > : public integral_constant<bool, is_destructible<_Tp>::value && __has_trivial_destructor(_Tp)> {}; > >#else ># 3535 "/usr/include/c++/v1/type_traits" 3 > >template <class _Tp> struct __libcpp_trivial_destructor > : public integral_constant<bool, is_scalar<_Tp>::value || > is_reference<_Tp>::value> {}; > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivially_destructible > : public __libcpp_trivial_destructor<typename remove_all_extents<_Tp>::type> {}; > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivially_destructible<_Tp[]> > : public false_type {}; > >#endif ># 3547 "/usr/include/c++/v1/type_traits" 3 > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_trivially_destructible_v > = is_trivially_destructible<_Tp>::value; >#endif ># 3552 "/usr/include/c++/v1/type_traits" 3 > >// is_nothrow_constructible > >#if 0 >template <class _Tp, class... _Args> >struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible > : public integral_constant<bool, __is_nothrow_constructible(_Tp(_Args...))> >{ >}; > >#else ># 3563 "/usr/include/c++/v1/type_traits" 3 > >#ifndef _LIBCPP_HAS_NO_VARIADICS > >#if __has_feature(cxx_noexcept) || (_GNUC_VER >= 407 && __cplusplus >= 201103L) > >template <bool, bool, class _Tp, class... _Args> struct __libcpp_is_nothrow_constructible; > >template <class _Tp, class... _Args> >struct __libcpp_is_nothrow_constructible</*is constructible*/true, /*is reference*/false, _Tp, _Args...> > : public integral_constant<bool, noexcept(_Tp(declval<_Args>()...))> >{ >}; > >template <class _Tp> >void __implicit_conversion_to(_Tp) noexcept { } > >template <class _Tp, class _Arg> >struct __libcpp_is_nothrow_constructible</*is constructible*/true, /*is reference*/true, _Tp, _Arg> > : public integral_constant<bool, noexcept(__implicit_conversion_to<_Tp>(declval<_Arg>()))> >{ >}; > >template <class _Tp, bool _IsReference, class... _Args> >struct __libcpp_is_nothrow_constructible</*is constructible*/false, _IsReference, _Tp, _Args...> > : public false_type >{ >}; > >template <class _Tp, class... _Args> >struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible > : __libcpp_is_nothrow_constructible<is_constructible<_Tp, _Args...>::value, is_reference<_Tp>::value, _Tp, _Args...> >{ >}; > >template <class _Tp, size_t _Ns> >struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible<_Tp[_Ns]> > : __libcpp_is_nothrow_constructible<is_constructible<_Tp>::value, is_reference<_Tp>::value, _Tp> >{ >}; > >#else // __has_feature(cxx_noexcept) ># 3604 "/usr/include/c++/v1/type_traits" 3 > >template <class _Tp, class... _Args> >struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible > : false_type >{ >}; > >template <class _Tp> >struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible<_Tp> >#if __has_feature(has_nothrow_constructor) || (_GNUC_VER >= 403) > : integral_constant<bool, __has_nothrow_constructor(_Tp)> >#else ># 3616 "/usr/include/c++/v1/type_traits" 3 > : integral_constant<bool, is_scalar<_Tp>::value> >#endif ># 3618 "/usr/include/c++/v1/type_traits" 3 >{ >}; > >template <class _Tp> >#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES >struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible<_Tp, _Tp&&> >#else ># 3625 "/usr/include/c++/v1/type_traits" 3 >struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible<_Tp, _Tp> >#endif ># 3627 "/usr/include/c++/v1/type_traits" 3 >#if __has_feature(has_nothrow_copy) || (_GNUC_VER >= 403) > : integral_constant<bool, __has_nothrow_copy(_Tp)> >#else ># 3630 "/usr/include/c++/v1/type_traits" 3 > : integral_constant<bool, is_scalar<_Tp>::value> >#endif ># 3632 "/usr/include/c++/v1/type_traits" 3 >{ >}; > >template <class _Tp> >struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible<_Tp, const _Tp&> >#if __has_feature(has_nothrow_copy) || (_GNUC_VER >= 403) > : integral_constant<bool, __has_nothrow_copy(_Tp)> >#else ># 3640 "/usr/include/c++/v1/type_traits" 3 > : integral_constant<bool, is_scalar<_Tp>::value> >#endif ># 3642 "/usr/include/c++/v1/type_traits" 3 >{ >}; > >template <class _Tp> >struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible<_Tp, _Tp&> >#if __has_feature(has_nothrow_copy) || (_GNUC_VER >= 403) > : integral_constant<bool, __has_nothrow_copy(_Tp)> >#else ># 3650 "/usr/include/c++/v1/type_traits" 3 > : integral_constant<bool, is_scalar<_Tp>::value> >#endif ># 3652 "/usr/include/c++/v1/type_traits" 3 >{ >}; > >#endif // __has_feature(cxx_noexcept) ># 3656 "/usr/include/c++/v1/type_traits" 3 > >#else // _LIBCPP_HAS_NO_VARIADICS ># 3658 "/usr/include/c++/v1/type_traits" 3 > >template <class _Tp, class _A0 = __is_construct::__nat, > class _A1 = __is_construct::__nat> >struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible > : false_type >{ >}; > >template <class _Tp> >struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible<_Tp, __is_construct::__nat, > __is_construct::__nat> >#if __has_feature(has_nothrow_constructor) || (_GNUC_VER >= 403) > : integral_constant<bool, __has_nothrow_constructor(_Tp)> >#else ># 3672 "/usr/include/c++/v1/type_traits" 3 > : integral_constant<bool, is_scalar<_Tp>::value> >#endif ># 3674 "/usr/include/c++/v1/type_traits" 3 >{ >}; > >template <class _Tp> >struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible<_Tp, _Tp, > __is_construct::__nat> >#if __has_feature(has_nothrow_copy) || (_GNUC_VER >= 403) > : integral_constant<bool, __has_nothrow_copy(_Tp)> >#else ># 3683 "/usr/include/c++/v1/type_traits" 3 > : integral_constant<bool, is_scalar<_Tp>::value> >#endif ># 3685 "/usr/include/c++/v1/type_traits" 3 >{ >}; > >template <class _Tp> >struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible<_Tp, const _Tp&, > __is_construct::__nat> >#if __has_feature(has_nothrow_copy) || (_GNUC_VER >= 403) > : integral_constant<bool, __has_nothrow_copy(_Tp)> >#else ># 3694 "/usr/include/c++/v1/type_traits" 3 > : integral_constant<bool, is_scalar<_Tp>::value> >#endif ># 3696 "/usr/include/c++/v1/type_traits" 3 >{ >}; > >template <class _Tp> >struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible<_Tp, _Tp&, > __is_construct::__nat> >#if __has_feature(has_nothrow_copy) || (_GNUC_VER >= 403) > : integral_constant<bool, __has_nothrow_copy(_Tp)> >#else ># 3705 "/usr/include/c++/v1/type_traits" 3 > : integral_constant<bool, is_scalar<_Tp>::value> >#endif ># 3707 "/usr/include/c++/v1/type_traits" 3 >{ >}; > >#endif // _LIBCPP_HAS_NO_VARIADICS ># 3711 "/usr/include/c++/v1/type_traits" 3 >#endif // __has_feature(is_nothrow_constructible) ># 3712 "/usr/include/c++/v1/type_traits" 3 > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) && !defined(_LIBCPP_HAS_NO_VARIADICS) >template <class _Tp, class ..._Args> _LIBCPP_CONSTEXPR bool is_nothrow_constructible_v > = is_nothrow_constructible<_Tp, _Args...>::value; >#endif ># 3717 "/usr/include/c++/v1/type_traits" 3 > >// is_nothrow_default_constructible > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_nothrow_default_constructible > : public is_nothrow_constructible<_Tp> > {}; > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_nothrow_default_constructible_v > = is_nothrow_default_constructible<_Tp>::value; >#endif ># 3728 "/usr/include/c++/v1/type_traits" 3 > >// is_nothrow_copy_constructible > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_nothrow_copy_constructible > : public is_nothrow_constructible<_Tp, > typename add_lvalue_reference<typename add_const<_Tp>::type>::type> {}; > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_nothrow_copy_constructible_v > = is_nothrow_copy_constructible<_Tp>::value; >#endif ># 3739 "/usr/include/c++/v1/type_traits" 3 > >// is_nothrow_move_constructible > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_nothrow_move_constructible >#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES > : public is_nothrow_constructible<_Tp, typename add_rvalue_reference<_Tp>::type> >#else ># 3746 "/usr/include/c++/v1/type_traits" 3 > : public is_nothrow_copy_constructible<_Tp> >#endif ># 3748 "/usr/include/c++/v1/type_traits" 3 > {}; > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_nothrow_move_constructible_v > = is_nothrow_move_constructible<_Tp>::value; >#endif ># 3754 "/usr/include/c++/v1/type_traits" 3 > >// is_nothrow_assignable > >#if __has_feature(cxx_noexcept) || (_GNUC_VER >= 407 && __cplusplus >= 201103L) > >template <bool, class _Tp, class _Arg> struct __libcpp_is_nothrow_assignable; > >template <class _Tp, class _Arg> >struct __libcpp_is_nothrow_assignable<false, _Tp, _Arg> > : public false_type >{ >}; > >template <class _Tp, class _Arg> >struct __libcpp_is_nothrow_assignable<true, _Tp, _Arg> > : public integral_constant<bool, noexcept(_VSTD::declval<_Tp>() = _VSTD::declval<_Arg>()) > >{ >}; > >template <class _Tp, class _Arg> >struct _LIBCPP_TEMPLATE_VIS is_nothrow_assignable > : public __libcpp_is_nothrow_assignable<is_assignable<_Tp, _Arg>::value, _Tp, _Arg> >{ >}; > >#else // __has_feature(cxx_noexcept) ># 3780 "/usr/include/c++/v1/type_traits" 3 > >template <class _Tp, class _Arg> >struct _LIBCPP_TEMPLATE_VIS is_nothrow_assignable > : public false_type {}; > >template <class _Tp> >struct _LIBCPP_TEMPLATE_VIS is_nothrow_assignable<_Tp&, _Tp> >#if __has_feature(has_nothrow_assign) || (_GNUC_VER >= 403) > : integral_constant<bool, __has_nothrow_assign(_Tp)> {}; >#else ># 3790 "/usr/include/c++/v1/type_traits" 3 > : integral_constant<bool, is_scalar<_Tp>::value> {}; >#endif ># 3792 "/usr/include/c++/v1/type_traits" 3 > >template <class _Tp> >struct _LIBCPP_TEMPLATE_VIS is_nothrow_assignable<_Tp&, _Tp&> >#if __has_feature(has_nothrow_assign) || (_GNUC_VER >= 403) > : integral_constant<bool, __has_nothrow_assign(_Tp)> {}; >#else ># 3798 "/usr/include/c++/v1/type_traits" 3 > : integral_constant<bool, is_scalar<_Tp>::value> {}; >#endif ># 3800 "/usr/include/c++/v1/type_traits" 3 > >template <class _Tp> >struct _LIBCPP_TEMPLATE_VIS is_nothrow_assignable<_Tp&, const _Tp&> >#if __has_feature(has_nothrow_assign) || (_GNUC_VER >= 403) > : integral_constant<bool, __has_nothrow_assign(_Tp)> {}; >#else ># 3806 "/usr/include/c++/v1/type_traits" 3 > : integral_constant<bool, is_scalar<_Tp>::value> {}; >#endif ># 3808 "/usr/include/c++/v1/type_traits" 3 > >#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES > >template <class _Tp> >struct is_nothrow_assignable<_Tp&, _Tp&&> >#if __has_feature(has_nothrow_assign) || (_GNUC_VER >= 403) > : integral_constant<bool, __has_nothrow_assign(_Tp)> {}; >#else ># 3816 "/usr/include/c++/v1/type_traits" 3 > : integral_constant<bool, is_scalar<_Tp>::value> {}; >#endif ># 3818 "/usr/include/c++/v1/type_traits" 3 > >#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES ># 3820 "/usr/include/c++/v1/type_traits" 3 > >#endif // __has_feature(cxx_noexcept) ># 3822 "/usr/include/c++/v1/type_traits" 3 > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp, class _Arg> _LIBCPP_CONSTEXPR bool is_nothrow_assignable_v > = is_nothrow_assignable<_Tp, _Arg>::value; >#endif ># 3827 "/usr/include/c++/v1/type_traits" 3 > >// is_nothrow_copy_assignable > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_nothrow_copy_assignable > : public is_nothrow_assignable<typename add_lvalue_reference<_Tp>::type, > typename add_lvalue_reference<typename add_const<_Tp>::type>::type> {}; > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_nothrow_copy_assignable_v > = is_nothrow_copy_assignable<_Tp>::value; >#endif ># 3838 "/usr/include/c++/v1/type_traits" 3 > >// is_nothrow_move_assignable > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_nothrow_move_assignable > : public is_nothrow_assignable<typename add_lvalue_reference<_Tp>::type, >#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES > typename add_rvalue_reference<_Tp>::type> >#else ># 3846 "/usr/include/c++/v1/type_traits" 3 > typename add_lvalue_reference<_Tp>::type> >#endif ># 3848 "/usr/include/c++/v1/type_traits" 3 > {}; > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_nothrow_move_assignable_v > = is_nothrow_move_assignable<_Tp>::value; >#endif ># 3854 "/usr/include/c++/v1/type_traits" 3 > >// is_nothrow_destructible > >#if __has_feature(cxx_noexcept) || (_GNUC_VER >= 407 && __cplusplus >= 201103L) > >template <bool, class _Tp> struct __libcpp_is_nothrow_destructible; > >template <class _Tp> >struct __libcpp_is_nothrow_destructible<false, _Tp> > : public false_type >{ >}; > >template <class _Tp> >struct __libcpp_is_nothrow_destructible<true, _Tp> > : public integral_constant<bool, noexcept(_VSTD::declval<_Tp>().~_Tp()) > >{ >}; > >template <class _Tp> >struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible > : public __libcpp_is_nothrow_destructible<is_destructible<_Tp>::value, _Tp> >{ >}; > >template <class _Tp, size_t _Ns> >struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible<_Tp[_Ns]> > : public is_nothrow_destructible<_Tp> >{ >}; > >template <class _Tp> >struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible<_Tp&> > : public true_type >{ >}; > >#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES > >template <class _Tp> >struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible<_Tp&&> > : public true_type >{ >}; > >#endif ># 3900 "/usr/include/c++/v1/type_traits" 3 > >#else ># 3902 "/usr/include/c++/v1/type_traits" 3 > >template <class _Tp> struct __libcpp_nothrow_destructor > : public integral_constant<bool, is_scalar<_Tp>::value || > is_reference<_Tp>::value> {}; > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible > : public __libcpp_nothrow_destructor<typename remove_all_extents<_Tp>::type> {}; > >template <class _Tp> >struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible<_Tp[]> > : public false_type {}; > >#endif ># 3915 "/usr/include/c++/v1/type_traits" 3 > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_nothrow_destructible_v > = is_nothrow_destructible<_Tp>::value; >#endif ># 3920 "/usr/include/c++/v1/type_traits" 3 > >// is_pod > >#if __has_feature(is_pod) || (_GNUC_VER >= 403) > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_pod > : public integral_constant<bool, __is_pod(_Tp)> {}; > >#else ># 3929 "/usr/include/c++/v1/type_traits" 3 > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_pod > : public integral_constant<bool, is_trivially_default_constructible<_Tp>::value && > is_trivially_copy_constructible<_Tp>::value && > is_trivially_copy_assignable<_Tp>::value && > is_trivially_destructible<_Tp>::value> {}; > >#endif ># 3937 "/usr/include/c++/v1/type_traits" 3 > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_pod_v > = is_pod<_Tp>::value; >#endif ># 3942 "/usr/include/c++/v1/type_traits" 3 > >// is_literal_type; > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_literal_type >#ifdef _LIBCPP_IS_LITERAL > : public integral_constant<bool, _LIBCPP_IS_LITERAL(_Tp)> >#else ># 3949 "/usr/include/c++/v1/type_traits" 3 > : integral_constant<bool, is_scalar<typename remove_all_extents<_Tp>::type>::value || > is_reference<typename remove_all_extents<_Tp>::type>::value> >#endif ># 3952 "/usr/include/c++/v1/type_traits" 3 > {}; > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_literal_type_v > = is_literal_type<_Tp>::value; >#endif ># 3958 "/usr/include/c++/v1/type_traits" 3 > >// is_standard_layout; > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_standard_layout >#if __has_feature(is_standard_layout) || (_GNUC_VER >= 407) > : public integral_constant<bool, __is_standard_layout(_Tp)> >#else ># 3965 "/usr/include/c++/v1/type_traits" 3 > : integral_constant<bool, is_scalar<typename remove_all_extents<_Tp>::type>::value> >#endif ># 3967 "/usr/include/c++/v1/type_traits" 3 > {}; > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_standard_layout_v > = is_standard_layout<_Tp>::value; >#endif ># 3973 "/usr/include/c++/v1/type_traits" 3 > >// is_trivially_copyable; > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivially_copyable >#if __has_feature(is_trivially_copyable) > : public integral_constant<bool, __is_trivially_copyable(_Tp)> >#elif _GNUC_VER >= 501 ># 3980 "/usr/include/c++/v1/type_traits" 3 > : public integral_constant<bool, !is_volatile<_Tp>::value && __is_trivially_copyable(_Tp)> >#else ># 3982 "/usr/include/c++/v1/type_traits" 3 > : integral_constant<bool, is_scalar<typename remove_all_extents<_Tp>::type>::value> >#endif ># 3984 "/usr/include/c++/v1/type_traits" 3 > {}; > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_trivially_copyable_v > = is_trivially_copyable<_Tp>::value; >#endif ># 3990 "/usr/include/c++/v1/type_traits" 3 > >// is_trivial; > >template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivial >#if __has_feature(is_trivial) || _GNUC_VER >= 407 > : public integral_constant<bool, __is_trivial(_Tp)> >#else ># 3997 "/usr/include/c++/v1/type_traits" 3 > : integral_constant<bool, is_trivially_copyable<_Tp>::value && > is_trivially_default_constructible<_Tp>::value> >#endif ># 4000 "/usr/include/c++/v1/type_traits" 3 > {}; > >#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) >template <class _Tp> _LIBCPP_CONSTEXPR bool is_trivial_v > = is_trivial<_Tp>::value; >#endif ># 4006 "/usr/include/c++/v1/type_traits" 3 > >template <class _Tp> struct __is_reference_wrapper_impl : public false_type {}; >template <class _Tp> struct __is_reference_wrapper_impl<reference_wrapper<_Tp> > : public true_type {}; >template <class _Tp> struct __is_reference_wrapper > : public __is_reference_wrapper_impl<typename remove_cv<_Tp>::type> {}; > >#ifndef _LIBCPP_CXX03_LANG > >// Check for complete types > >template <class ..._Tp> struct __check_complete; > >template <> >struct __check_complete<> >{ >}; > >template <class _Hp, class _T0, class ..._Tp> >struct __check_complete<_Hp, _T0, _Tp...> > : private __check_complete<_Hp>, > private __check_complete<_T0, _Tp...> >{ >}; > >template <class _Hp> >struct __check_complete<_Hp, _Hp> > : private __check_complete<_Hp> >{ >}; > >template <class _Tp> >struct __check_complete<_Tp> >{ > static_assert(sizeof(_Tp) > 0, "Type must be complete."); >}; > >template <class _Tp> >struct __check_complete<_Tp&> > : private __check_complete<_Tp> >{ >}; > >template <class _Tp> >struct __check_complete<_Tp&&> > : private __check_complete<_Tp> >{ >}; > >template <class _Rp, class ..._Param> >struct __check_complete<_Rp (*)(_Param...)> > : private __check_complete<_Rp> >{ >}; > >template <class ..._Param> >struct __check_complete<void (*)(_Param...)> >{ >}; > >template <class _Rp, class ..._Param> >struct __check_complete<_Rp (_Param...)> > : private __check_complete<_Rp> >{ >}; > >template <class ..._Param> >struct __check_complete<void (_Param...)> >{ >}; > >template <class _Rp, class _Class, class ..._Param> >struct __check_complete<_Rp (_Class::*)(_Param...)> > : private __check_complete<_Class> >{ >}; > >template <class _Rp, class _Class, class ..._Param> >struct __check_complete<_Rp (_Class::*)(_Param...) const> > : private __check_complete<_Class> >{ >}; > >template <class _Rp, class _Class, class ..._Param> >struct __check_complete<_Rp (_Class::*)(_Param...) volatile> > : private __check_complete<_Class> >{ >}; > >template <class _Rp, class _Class, class ..._Param> >struct __check_complete<_Rp (_Class::*)(_Param...) const volatile> > : private __check_complete<_Class> >{ >}; > >template <class _Rp, class _Class, class ..._Param> >struct __check_complete<_Rp (_Class::*)(_Param...) &> > : private __check_complete<_Class> >{ >}; > >template <class _Rp, class _Class, class ..._Param> >struct __check_complete<_Rp (_Class::*)(_Param...) const&> > : private __check_complete<_Class> >{ >}; > >template <class _Rp, class _Class, class ..._Param> >struct __check_complete<_Rp (_Class::*)(_Param...) volatile&> > : private __check_complete<_Class> >{ >}; > >template <class _Rp, class _Class, class ..._Param> >struct __check_complete<_Rp (_Class::*)(_Param...) const volatile&> > : private __check_complete<_Class> >{ >}; > >template <class _Rp, class _Class, class ..._Param> >struct __check_complete<_Rp (_Class::*)(_Param...) &&> > : private __check_complete<_Class> >{ >}; > >template <class _Rp, class _Class, class ..._Param> >struct __check_complete<_Rp (_Class::*)(_Param...) const&&> > : private __check_complete<_Class> >{ >}; > >template <class _Rp, class _Class, class ..._Param> >struct __check_complete<_Rp (_Class::*)(_Param...) volatile&&> > : private __check_complete<_Class> >{ >}; > >template <class _Rp, class _Class, class ..._Param> >struct __check_complete<_Rp (_Class::*)(_Param...) const volatile&&> > : private __check_complete<_Class> >{ >}; > >template <class _Rp, class _Class> >struct __check_complete<_Rp _Class::*> > : private __check_complete<_Class> >{ >}; > > >template <class _Fp, class _A0, > class _DecayFp = typename decay<_Fp>::type, > class _DecayA0 = typename decay<_A0>::type, > class _ClassT = typename __member_pointer_class_type<_DecayFp>::type> >using __enable_if_bullet1 = typename enable_if > < > is_member_function_pointer<_DecayFp>::value > && is_base_of<_ClassT, _DecayA0>::value > >::type; > >template <class _Fp, class _A0, > class _DecayFp = typename decay<_Fp>::type, > class _DecayA0 = typename decay<_A0>::type> >using __enable_if_bullet2 = typename enable_if > < > is_member_function_pointer<_DecayFp>::value > && __is_reference_wrapper<_DecayA0>::value > >::type; > >template <class _Fp, class _A0, > class _DecayFp = typename decay<_Fp>::type, > class _DecayA0 = typename decay<_A0>::type, > class _ClassT = typename __member_pointer_class_type<_DecayFp>::type> >using __enable_if_bullet3 = typename enable_if > < > is_member_function_pointer<_DecayFp>::value > && !is_base_of<_ClassT, _DecayA0>::value > && !__is_reference_wrapper<_DecayA0>::value > >::type; > >template <class _Fp, class _A0, > class _DecayFp = typename decay<_Fp>::type, > class _DecayA0 = typename decay<_A0>::type, > class _ClassT = typename __member_pointer_class_type<_DecayFp>::type> >using __enable_if_bullet4 = typename enable_if > < > is_member_object_pointer<_DecayFp>::value > && is_base_of<_ClassT, _DecayA0>::value > >::type; > >template <class _Fp, class _A0, > class _DecayFp = typename decay<_Fp>::type, > class _DecayA0 = typename decay<_A0>::type> >using __enable_if_bullet5 = typename enable_if > < > is_member_object_pointer<_DecayFp>::value > && __is_reference_wrapper<_DecayA0>::value > >::type; > >template <class _Fp, class _A0, > class _DecayFp = typename decay<_Fp>::type, > class _DecayA0 = typename decay<_A0>::type, > class _ClassT = typename __member_pointer_class_type<_DecayFp>::type> >using __enable_if_bullet6 = typename enable_if > < > is_member_object_pointer<_DecayFp>::value > && !is_base_of<_ClassT, _DecayA0>::value > && !__is_reference_wrapper<_DecayA0>::value > >::type; > >// __invoke forward declarations > >// fall back - none of the bullets > >#define _LIBCPP_INVOKE_RETURN(...) \ > noexcept(noexcept(__VA_ARGS__)) -> decltype(__VA_ARGS__) \ > { return __VA_ARGS__; } > >template <class ..._Args> >auto __invoke(__any, _Args&& ...__args) -> __nat; > >template <class ..._Args> >auto __invoke_constexpr(__any, _Args&& ...__args) -> __nat; > >// bullets 1, 2 and 3 > >template <class _Fp, class _A0, class ..._Args, > class = __enable_if_bullet1<_Fp, _A0>> >inline _LIBCPP_INLINE_VISIBILITY >auto >__invoke(_Fp&& __f, _A0&& __a0, _Args&& ...__args) >_LIBCPP_INVOKE_RETURN((_VSTD::forward<_A0>(__a0).*__f)(_VSTD::forward<_Args>(__args)...)) > >template <class _Fp, class _A0, class ..._Args, > class = __enable_if_bullet1<_Fp, _A0>> >inline _LIBCPP_INLINE_VISIBILITY >_LIBCPP_CONSTEXPR auto >__invoke_constexpr(_Fp&& __f, _A0&& __a0, _Args&& ...__args) >_LIBCPP_INVOKE_RETURN((_VSTD::forward<_A0>(__a0).*__f)(_VSTD::forward<_Args>(__args)...)) > >template <class _Fp, class _A0, class ..._Args, > class = __enable_if_bullet2<_Fp, _A0>> >inline _LIBCPP_INLINE_VISIBILITY >auto >__invoke(_Fp&& __f, _A0&& __a0, _Args&& ...__args) >_LIBCPP_INVOKE_RETURN((__a0.get().*__f)(_VSTD::forward<_Args>(__args)...)) > >template <class _Fp, class _A0, class ..._Args, > class = __enable_if_bullet2<_Fp, _A0>> >inline _LIBCPP_INLINE_VISIBILITY >_LIBCPP_CONSTEXPR auto >__invoke_constexpr(_Fp&& __f, _A0&& __a0, _Args&& ...__args) >_LIBCPP_INVOKE_RETURN((__a0.get().*__f)(_VSTD::forward<_Args>(__args)...)) > >template <class _Fp, class _A0, class ..._Args, > class = __enable_if_bullet3<_Fp, _A0>> >inline _LIBCPP_INLINE_VISIBILITY >auto >__invoke(_Fp&& __f, _A0&& __a0, _Args&& ...__args) >_LIBCPP_INVOKE_RETURN(((*_VSTD::forward<_A0>(__a0)).*__f)(_VSTD::forward<_Args>(__args)...)) > >template <class _Fp, class _A0, class ..._Args, > class = __enable_if_bullet3<_Fp, _A0>> >inline _LIBCPP_INLINE_VISIBILITY >_LIBCPP_CONSTEXPR auto >__invoke_constexpr(_Fp&& __f, _A0&& __a0, _Args&& ...__args) >_LIBCPP_INVOKE_RETURN(((*_VSTD::forward<_A0>(__a0)).*__f)(_VSTD::forward<_Args>(__args)...)) > >// bullets 4, 5 and 6 > >template <class _Fp, class _A0, > class = __enable_if_bullet4<_Fp, _A0>> >inline _LIBCPP_INLINE_VISIBILITY >auto >__invoke(_Fp&& __f, _A0&& __a0) >_LIBCPP_INVOKE_RETURN(_VSTD::forward<_A0>(__a0).*__f) > >template <class _Fp, class _A0, > class = __enable_if_bullet4<_Fp, _A0>> >inline _LIBCPP_INLINE_VISIBILITY >_LIBCPP_CONSTEXPR auto >__invoke_constexpr(_Fp&& __f, _A0&& __a0) >_LIBCPP_INVOKE_RETURN(_VSTD::forward<_A0>(__a0).*__f) > >template <class _Fp, class _A0, > class = __enable_if_bullet5<_Fp, _A0>> >inline _LIBCPP_INLINE_VISIBILITY >auto >__invoke(_Fp&& __f, _A0&& __a0) >_LIBCPP_INVOKE_RETURN(__a0.get().*__f) > >template <class _Fp, class _A0, > class = __enable_if_bullet5<_Fp, _A0>> >inline _LIBCPP_INLINE_VISIBILITY >_LIBCPP_CONSTEXPR auto >__invoke_constexpr(_Fp&& __f, _A0&& __a0) >_LIBCPP_INVOKE_RETURN(__a0.get().*__f) > >template <class _Fp, class _A0, > class = __enable_if_bullet6<_Fp, _A0>> >inline _LIBCPP_INLINE_VISIBILITY >auto >__invoke(_Fp&& __f, _A0&& __a0) >_LIBCPP_INVOKE_RETURN((*_VSTD::forward<_A0>(__a0)).*__f) > >template <class _Fp, class _A0, > class = __enable_if_bullet6<_Fp, _A0>> >inline _LIBCPP_INLINE_VISIBILITY >_LIBCPP_CONSTEXPR auto >__invoke_constexpr(_Fp&& __f, _A0&& __a0) >_LIBCPP_INVOKE_RETURN((*_VSTD::forward<_A0>(__a0)).*__f) > >// bullet 7 > >template <class _Fp, class ..._Args> >inline _LIBCPP_INLINE_VISIBILITY >auto >__invoke(_Fp&& __f, _Args&& ...__args) >_LIBCPP_INVOKE_RETURN(_VSTD::forward<_Fp>(__f)(_VSTD::forward<_Args>(__args)...)) > >template <class _Fp, class ..._Args> >inline _LIBCPP_INLINE_VISIBILITY >_LIBCPP_CONSTEXPR auto >__invoke_constexpr(_Fp&& __f, _Args&& ...__args) >_LIBCPP_INVOKE_RETURN(_VSTD::forward<_Fp>(__f)(_VSTD::forward<_Args>(__args)...)) > >#undef _LIBCPP_INVOKE_RETURN > >// __invokable > >template <class _Ret, class _Fp, class ..._Args> >struct __invokable_r > : private __check_complete<_Fp> >{ > using _Result = decltype( > _VSTD::__invoke(_VSTD::declval<_Fp>(), _VSTD::declval<_Args>()...)); > > static const bool value = > conditional< > !is_same<_Result, __nat>::value, > typename conditional< > is_void<_Ret>::value, > true_type, > is_convertible<_Result, _Ret> > >::type, > false_type > >::type::value; >}; > >template <class _Fp, class ..._Args> >using __invokable = __invokable_r<void, _Fp, _Args...>; > >template <bool _IsInvokable, bool _IsCVVoid, class _Ret, class _Fp, class ..._Args> >struct __nothrow_invokable_r_imp { > static const bool value = false; >}; > >template <class _Ret, class _Fp, class ..._Args> >struct __nothrow_invokable_r_imp<true, false, _Ret, _Fp, _Args...> >{ > typedef __nothrow_invokable_r_imp _ThisT; > > template <class _Tp> > static void __test_noexcept(_Tp) noexcept; > > static const bool value = noexcept(_ThisT::__test_noexcept<_Ret>( > _VSTD::__invoke(_VSTD::declval<_Fp>(), _VSTD::declval<_Args>()...))); >}; > >template <class _Ret, class _Fp, class ..._Args> >struct __nothrow_invokable_r_imp<true, true, _Ret, _Fp, _Args...> >{ > static const bool value = noexcept( > _VSTD::__invoke(_VSTD::declval<_Fp>(), _VSTD::declval<_Args>()...)); >}; > >template <class _Ret, class _Fp, class ..._Args> >using __nothrow_invokable_r = > __nothrow_invokable_r_imp< > __invokable_r<_Ret, _Fp, _Args...>::value, > is_void<_Ret>::value, > _Ret, _Fp, _Args... > >; > >template <class _Fp, class ..._Args> >struct __invoke_of > : public enable_if< > __invokable<_Fp, _Args...>::value, > typename __invokable_r<void, _Fp, _Args...>::_Result> >{ >}; > >// result_of > >template <class _Fp, class ..._Args> >class _LIBCPP_TEMPLATE_VIS result_of<_Fp(_Args...)> > : public __invoke_of<_Fp, _Args...> >{ >}; > >#if _LIBCPP_STD_VER > 11 >template <class _Tp> using result_of_t = typename result_of<_Tp>::type; >#endif ># 4408 "/usr/include/c++/v1/type_traits" 3 > >#if _LIBCPP_STD_VER > 14 > >// is_callable > >template <class _Fn, class _Ret = void> >struct _LIBCPP_TEMPLATE_VIS is_callable; > >template <class _Fn, class ..._Args, class _Ret> >struct _LIBCPP_TEMPLATE_VIS is_callable<_Fn(_Args...), _Ret> > : integral_constant<bool, __invokable_r<_Ret, _Fn, _Args...>::value> {}; > >template <class _Fn, class _Ret = void> >constexpr bool is_callable_v = is_callable<_Fn, _Ret>::value; > >// is_nothrow_callable > >template <class _Fn, class _Ret = void> >struct _LIBCPP_TEMPLATE_VIS is_nothrow_callable; > >template <class _Fn, class ..._Args, class _Ret> >struct _LIBCPP_TEMPLATE_VIS is_nothrow_callable<_Fn(_Args...), _Ret> > : integral_constant<bool, __nothrow_invokable_r<_Ret, _Fn, _Args...>::value> >{}; > >template <class _Fn, class _Ret = void> >constexpr bool is_nothrow_callable_v = is_nothrow_callable<_Fn, _Ret>::value; > >#endif // _LIBCPP_STD_VER > 14 ># 4437 "/usr/include/c++/v1/type_traits" 3 > >#endif // !defined(_LIBCPP_CXX03_LANG) ># 4439 "/usr/include/c++/v1/type_traits" 3 > >template <class _Tp> struct __is_swappable; >template <class _Tp> struct __is_nothrow_swappable; > >template <class _Tp> >inline _LIBCPP_INLINE_VISIBILITY >#ifndef _LIBCPP_CXX03_LANG >typename enable_if >< > is_move_constructible<_Tp>::value && > is_move_assignable<_Tp>::value >>::type >#else ># 4452 "/usr/include/c++/v1/type_traits" 3 >void >#endif ># 4454 "/usr/include/c++/v1/type_traits" 3 >swap(_Tp& __x, _Tp& __y) _NOEXCEPT_(is_nothrow_move_constructible<_Tp>::value && > is_nothrow_move_assignable<_Tp>::value) >{ > _Tp __t(_VSTD::move(__x)); > __x = _VSTD::move(__y); > __y = _VSTD::move(__t); >} > >template<class _Tp, size_t _Np> >inline _LIBCPP_INLINE_VISIBILITY >typename enable_if< > __is_swappable<_Tp>::value >>::type >swap(_Tp (&__a)[_Np], _Tp (&__b)[_Np]) _NOEXCEPT_(__is_nothrow_swappable<_Tp>::value); > >template <class _ForwardIterator1, class _ForwardIterator2> >inline _LIBCPP_INLINE_VISIBILITY >void >iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) > // _NOEXCEPT_(_NOEXCEPT_(swap(*__a, *__b))) > _NOEXCEPT_(_NOEXCEPT_(swap(*_VSTD::declval<_ForwardIterator1>(), > *_VSTD::declval<_ForwardIterator2>()))) >{ > swap(*__a, *__b); >} > >// __swappable > >namespace __detail >{ >// ALL generic swap overloads MUST already have a declaration available at this point. > >template <class _Tp, class _Up = _Tp, > bool _NotVoid = !is_void<_Tp>::value && !is_void<_Up>::value> >struct __swappable_with >{ > template <class _LHS, class _RHS> > static decltype(swap(_VSTD::declval<_LHS>(), _VSTD::declval<_RHS>())) > __test_swap(int); > template <class, class> > static __nat __test_swap(long); > > // Extra parens are needed for the C++03 definition of decltype. > typedef decltype((__test_swap<_Tp, _Up>(0))) __swap1; > typedef decltype((__test_swap<_Up, _Tp>(0))) __swap2; > > static const bool value = !is_same<__swap1, __nat>::value > && !is_same<__swap2, __nat>::value; >}; > >template <class _Tp, class _Up> >struct __swappable_with<_Tp, _Up, false> : false_type {}; > >template <class _Tp, class _Up = _Tp, bool _Swappable = __swappable_with<_Tp, _Up>::value> >struct __nothrow_swappable_with { > static const bool value = >#ifndef _LIBCPP_HAS_NO_NOEXCEPT > noexcept(swap(_VSTD::declval<_Tp>(), _VSTD::declval<_Up>())) > && noexcept(swap(_VSTD::declval<_Up>(), _VSTD::declval<_Tp>())); >#else ># 4514 "/usr/include/c++/v1/type_traits" 3 > false; >#endif ># 4516 "/usr/include/c++/v1/type_traits" 3 >}; > >template <class _Tp, class _Up> >struct __nothrow_swappable_with<_Tp, _Up, false> : false_type {}; > >} // __detail > >template <class _Tp> >struct __is_swappable > : public integral_constant<bool, __detail::__swappable_with<_Tp&>::value> >{ >}; > >template <class _Tp> >struct __is_nothrow_swappable > : public integral_constant<bool, __detail::__nothrow_swappable_with<_Tp&>::value> >{ >}; > >#if _LIBCPP_STD_VER > 14 > >template <class _Tp, class _Up> >struct _LIBCPP_TEMPLATE_VIS is_swappable_with > : public integral_constant<bool, __detail::__swappable_with<_Tp, _Up>::value> >{ >}; > >template <class _Tp> >struct _LIBCPP_TEMPLATE_VIS is_swappable > : public conditional< > __is_referenceable<_Tp>::value, > is_swappable_with< > typename add_lvalue_reference<_Tp>::type, > typename add_lvalue_reference<_Tp>::type>, > false_type > >::type >{ >}; > >template <class _Tp, class _Up> >struct _LIBCPP_TEMPLATE_VIS is_nothrow_swappable_with > : public integral_constant<bool, __detail::__nothrow_swappable_with<_Tp, _Up>::value> >{ >}; > >template <class _Tp> >struct _LIBCPP_TEMPLATE_VIS is_nothrow_swappable > : public conditional< > __is_referenceable<_Tp>::value, > is_nothrow_swappable_with< > typename add_lvalue_reference<_Tp>::type, > typename add_lvalue_reference<_Tp>::type>, > false_type > >::type >{ >}; > >template <class _Tp, class _Up> >constexpr bool is_swappable_with_v = is_swappable_with<_Tp, _Up>::value; > >template <class _Tp> >constexpr bool is_swappable_v = is_swappable<_Tp>::value; > >template <class _Tp, class _Up> >constexpr bool is_nothrow_swappable_with_v = is_nothrow_swappable_with<_Tp, _Up>::value; > >template <class _Tp> >constexpr bool is_nothrow_swappable_v = is_nothrow_swappable<_Tp>::value; > >#endif // _LIBCPP_STD_VER > 14 ># 4586 "/usr/include/c++/v1/type_traits" 3 > >#ifdef _LIBCPP_UNDERLYING_TYPE > >template <class _Tp> >struct underlying_type >{ > typedef _LIBCPP_UNDERLYING_TYPE(_Tp) type; >}; > >#if _LIBCPP_STD_VER > 11 >template <class _Tp> using underlying_type_t = typename underlying_type<_Tp>::type; >#endif ># 4598 "/usr/include/c++/v1/type_traits" 3 > >#else // _LIBCPP_UNDERLYING_TYPE ># 4600 "/usr/include/c++/v1/type_traits" 3 > >template <class _Tp, bool _Support = false> >struct underlying_type >{ > static_assert(_Support, "The underyling_type trait requires compiler " > "support. Either no such support exists or " > "libc++ does not know how to use it."); >}; > >#endif // _LIBCPP_UNDERLYING_TYPE ># 4610 "/usr/include/c++/v1/type_traits" 3 > > >template <class _Tp, bool = is_enum<_Tp>::value> >struct __sfinae_underlying_type >{ > typedef typename underlying_type<_Tp>::type type; > typedef decltype(((type)1) + 0) __promoted_type; >}; > >template <class _Tp> >struct __sfinae_underlying_type<_Tp, false> {}; > >inline _LIBCPP_INLINE_VISIBILITY >int __convert_to_integral(int __val) { return __val; } > >inline _LIBCPP_INLINE_VISIBILITY >unsigned __convert_to_integral(unsigned __val) { return __val; } > >inline _LIBCPP_INLINE_VISIBILITY >long __convert_to_integral(long __val) { return __val; } > >inline _LIBCPP_INLINE_VISIBILITY >unsigned long __convert_to_integral(unsigned long __val) { return __val; } > >inline _LIBCPP_INLINE_VISIBILITY >long long __convert_to_integral(long long __val) { return __val; } > >inline _LIBCPP_INLINE_VISIBILITY >unsigned long long __convert_to_integral(unsigned long long __val) {return __val; } > >#ifndef _LIBCPP_HAS_NO_INT128 >inline _LIBCPP_INLINE_VISIBILITY >__int128_t __convert_to_integral(__int128_t __val) { return __val; } > >inline _LIBCPP_INLINE_VISIBILITY >__uint128_t __convert_to_integral(__uint128_t __val) { return __val; } >#endif ># 4647 "/usr/include/c++/v1/type_traits" 3 > >template <class _Tp> >inline _LIBCPP_INLINE_VISIBILITY >typename __sfinae_underlying_type<_Tp>::__promoted_type >__convert_to_integral(_Tp __val) { return __val; } > >#ifndef _LIBCPP_CXX03_LANG > >template <class _Tp> >struct __has_operator_addressof_member_imp >{ > template <class _Up> > static auto __test(int) > -> typename __select_2nd<decltype(_VSTD::declval<_Up>().operator&()), true_type>::type; > template <class> > static auto __test(long) -> false_type; > > static const bool value = decltype(__test<_Tp>(0))::value; >}; > >template <class _Tp> >struct __has_operator_addressof_free_imp >{ > template <class _Up> > static auto __test(int) > -> typename __select_2nd<decltype(operator&(_VSTD::declval<_Up>())), true_type>::type; > template <class> > static auto __test(long) -> false_type; > > static const bool value = decltype(__test<_Tp>(0))::value; >}; > >template <class _Tp> >struct __has_operator_addressof > : public integral_constant<bool, __has_operator_addressof_member_imp<_Tp>::value > || __has_operator_addressof_free_imp<_Tp>::value> >{}; > >#endif // _LIBCPP_CXX03_LANG ># 4686 "/usr/include/c++/v1/type_traits" 3 > >#if _LIBCPP_STD_VER > 14 > >#define __cpp_lib_void_t 201411 >template <class...> using void_t = void; > ># ifndef _LIBCPP_HAS_NO_VARIADICS >template <class... _Args> >struct conjunction : __and_<_Args...> {}; >template<class... _Args> constexpr bool conjunction_v = conjunction<_Args...>::value; > >template <class... _Args> >struct disjunction : __or_<_Args...> {}; >template<class... _Args> constexpr bool disjunction_v = disjunction<_Args...>::value; > >template <class _Tp> >struct negation : __not_<_Tp> {}; >template<class _Tp> constexpr bool negation_v = negation<_Tp>::value; ># endif // _LIBCPP_HAS_NO_VARIADICS ># 4705 "/usr/include/c++/v1/type_traits" 3 >#endif // _LIBCPP_STD_VER > 14 ># 4706 "/usr/include/c++/v1/type_traits" 3 > >// These traits are used in __tree and __hash_table >#ifndef _LIBCPP_CXX03_LANG >struct __extract_key_fail_tag {}; >struct __extract_key_self_tag {}; >struct __extract_key_first_tag {}; > >template <class _ValTy, class _Key, > class _RawValTy = typename __unconstref<_ValTy>::type> >struct __can_extract_key > : conditional<is_same<_RawValTy, _Key>::value, __extract_key_self_tag, > __extract_key_fail_tag>::type {}; > >template <class _Pair, class _Key, class _First, class _Second> >struct __can_extract_key<_Pair, _Key, pair<_First, _Second>> > : conditional<is_same<typename remove_const<_First>::type, _Key>::value, > __extract_key_first_tag, __extract_key_fail_tag>::type {}; > >// __can_extract_map_key uses true_type/false_type instead of the tags. >// It returns true if _Key != _ContainerValueTy (the container is a map not a set) >// and _ValTy == _Key. >template <class _ValTy, class _Key, class _ContainerValueTy, > class _RawValTy = typename __unconstref<_ValTy>::type> >struct __can_extract_map_key > : integral_constant<bool, is_same<_RawValTy, _Key>::value> {}; > >// This specialization returns __extract_key_fail_tag for non-map containers >// because _Key == _ContainerValueTy >template <class _ValTy, class _Key, class _RawValTy> >struct __can_extract_map_key<_ValTy, _Key, _Key, _RawValTy> > : false_type {}; > >#endif ># 4739 "/usr/include/c++/v1/type_traits" 3 > >_LIBCPP_END_NAMESPACE_STD > >#if _LIBCPP_STD_VER > 14 >// std::byte >namespace std // purposefully not versioned >{ >template <class _Integer> > constexpr typename enable_if<is_integral_v<_Integer>, byte>::type & > operator<<=(byte& __lhs, _Integer __shift) noexcept > { return __lhs = byte(static_cast<unsigned char>(__lhs) << __shift); } > >template <class _Integer> > constexpr typename enable_if<is_integral_v<_Integer>, byte>::type > operator<< (byte __lhs, _Integer __shift) noexcept > { return byte(static_cast<unsigned char>(__lhs) << __shift); } > >template <class _Integer> > constexpr typename enable_if<is_integral_v<_Integer>, byte>::type & > operator>>=(byte& __lhs, _Integer __shift) noexcept > { return __lhs = byte(static_cast<unsigned char>(__lhs) >> __shift); } > >template <class _Integer> > constexpr typename enable_if<is_integral_v<_Integer>, byte>::type > operator>> (byte __lhs, _Integer __shift) noexcept > { return byte(static_cast<unsigned char>(__lhs) >> __shift); } > >template <class _Integer> > constexpr typename enable_if<is_integral_v<_Integer>, _Integer>::type > to_integer(byte __b) noexcept { return _Integer(__b); } > >} >#endif ># 4772 "/usr/include/c++/v1/type_traits" 3 > >#endif // _LIBCPP_TYPE_TRAITS ># 4774 "/usr/include/c++/v1/type_traits" 3 ># 592 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" 2 >BEGIN_AS_NAMESPACE > >template<typename T> >asUINT asGetTypeTraits() >{ >#if defined(_MSC_VER) || defined(_LIBCPP_TYPE_TRAITS) || (__GNUC__ >= 5) || defined(__clang__) > // MSVC, XCode/Clang, and gnuc 5+ > // C++11 compliant code > bool hasConstructor = std::is_default_constructible<T>::value && !std::is_trivially_default_constructible<T>::value; > bool hasDestructor = std::is_destructible<T>::value && !std::is_trivially_destructible<T>::value; > bool hasAssignmentOperator = std::is_copy_assignable<T>::value && !std::is_trivially_copy_assignable<T>::value; > bool hasCopyConstructor = std::is_copy_constructible<T>::value && !std::is_trivially_copy_constructible<T>::value; >#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)) ># 605 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" > // gnuc 4.8 is using a mix of C++11 standard and pre-standard templates > bool hasConstructor = std::is_default_constructible<T>::value && !std::has_trivial_default_constructor<T>::value; > bool hasDestructor = std::is_destructible<T>::value && !std::is_trivially_destructible<T>::value; > bool hasAssignmentOperator = std::is_copy_assignable<T>::value && !std::has_trivial_copy_assign<T>::value; > bool hasCopyConstructor = std::is_copy_constructible<T>::value && !std::has_trivial_copy_constructor<T>::value; >#else ># 611 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" > // All other compilers and versions are assumed to use non C++11 compliant code until proven otherwise > // Not fully C++11 compliant. The has_trivial checks were used while the standard was still > // being elaborated, but were then removed in favor of the above is_trivially checks > // http://stackoverflow.com/questions/12702103/writing-code-that-works-when-has-trivial-destructor-is-defined-instead-of-is > // https://github.com/mozart/mozart2/issues/51 > bool hasConstructor = std::is_default_constructible<T>::value && !std::has_trivial_default_constructor<T>::value; > bool hasDestructor = std::is_destructible<T>::value && !std::has_trivial_destructor<T>::value; > bool hasAssignmentOperator = std::is_copy_assignable<T>::value && !std::has_trivial_copy_assign<T>::value; > bool hasCopyConstructor = std::is_copy_constructible<T>::value && !std::has_trivial_copy_constructor<T>::value; >#endif ># 621 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" > bool isFloat = std::is_floating_point<T>::value; > bool isPrimitive = std::is_integral<T>::value || std::is_pointer<T>::value || std::is_enum<T>::value; > bool isClass = std::is_class<T>::value; > bool isArray = std::is_array<T>::value; > > if( isFloat ) > return asOBJ_APP_FLOAT; > if( isPrimitive ) > return asOBJ_APP_PRIMITIVE; > > if( isClass ) > { > asDWORD flags = asOBJ_APP_CLASS; > if( hasConstructor ) > flags |= asOBJ_APP_CLASS_CONSTRUCTOR; > if( hasDestructor ) > flags |= asOBJ_APP_CLASS_DESTRUCTOR; > if( hasAssignmentOperator ) > flags |= asOBJ_APP_CLASS_ASSIGNMENT; > if( hasCopyConstructor ) > flags |= asOBJ_APP_CLASS_COPY_CONSTRUCTOR; > return flags; > } > > if( isArray ) > return asOBJ_APP_ARRAY; > > // Unknown type traits > return 0; >} > >#endif // c++11 ># 653 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" > >// Interface declarations > >class asIScriptEngine >{ >public: > // Memory management > virtual int AddRef() const = 0; > virtual int Release() const = 0; > virtual int ShutDownAndRelease() = 0; > > // Engine properties > virtual int SetEngineProperty(asEEngineProp property, asPWORD value) = 0; > virtual asPWORD GetEngineProperty(asEEngineProp property) const = 0; > > // Compiler messages > virtual int SetMessageCallback(const asSFuncPtr &callback, void *obj, asDWORD callConv) = 0; > virtual int ClearMessageCallback() = 0; > virtual int WriteMessage(const char *section, int row, int col, asEMsgType type, const char *message) = 0; > > // JIT Compiler > virtual int SetJITCompiler(asIJITCompiler *compiler) = 0; > virtual asIJITCompiler *GetJITCompiler() const = 0; > > // Global functions > virtual int RegisterGlobalFunction(const char *declaration, const asSFuncPtr &funcPointer, asDWORD callConv, void *auxiliary = 0) = 0; > virtual asUINT GetGlobalFunctionCount() const = 0; > virtual asIScriptFunction *GetGlobalFunctionByIndex(asUINT index) const = 0; > virtual asIScriptFunction *GetGlobalFunctionByDecl(const char *declaration) const = 0; > > // Global properties > virtual int RegisterGlobalProperty(const char *declaration, void *pointer) = 0; > virtual asUINT GetGlobalPropertyCount() const = 0; > virtual int GetGlobalPropertyByIndex(asUINT index, const char **name, const char **nameSpace = 0, int *typeId = 0, bool *isConst = 0, const char **configGroup = 0, void **pointer = 0, asDWORD *accessMask = 0) const = 0; > virtual int GetGlobalPropertyIndexByName(const char *name) const = 0; > virtual int GetGlobalPropertyIndexByDecl(const char *decl) const = 0; > > // Object types > virtual int RegisterObjectType(const char *obj, int byteSize, asDWORD flags) = 0; > virtual int RegisterObjectProperty(const char *obj, const char *declaration, int byteOffset) = 0; > virtual int RegisterObjectMethod(const char *obj, const char *declaration, const asSFuncPtr &funcPointer, asDWORD callConv, void *auxiliary = 0) = 0; > virtual int RegisterObjectBehaviour(const char *obj, asEBehaviours behaviour, const char *declaration, const asSFuncPtr &funcPointer, asDWORD callConv, void *auxiliary = 0) = 0; > virtual int RegisterInterface(const char *name) = 0; > virtual int RegisterInterfaceMethod(const char *intf, const char *declaration) = 0; > virtual asUINT GetObjectTypeCount() const = 0; > virtual asITypeInfo *GetObjectTypeByIndex(asUINT index) const = 0; >#ifdef AS_DEPRECATED > // Deprecated since 2.31.0, 2015-12-06 > virtual asITypeInfo *GetObjectTypeByName(const char *name) const = 0; > virtual asITypeInfo *GetObjectTypeByDecl(const char *decl) const = 0; >#endif ># 704 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" > > // String factory > virtual int RegisterStringFactory(const char *datatype, const asSFuncPtr &factoryFunc, asDWORD callConv, void *auxiliary = 0) = 0; > virtual int GetStringFactoryReturnTypeId(asDWORD *flags = 0) const = 0; > > // Default array type > virtual int RegisterDefaultArrayType(const char *type) = 0; > virtual int GetDefaultArrayTypeId() const = 0; > > // Enums > virtual int RegisterEnum(const char *type) = 0; > virtual int RegisterEnumValue(const char *type, const char *name, int value) = 0; > virtual asUINT GetEnumCount() const = 0; > virtual asITypeInfo *GetEnumByIndex(asUINT index) const = 0; >#ifdef AS_DEPRECATED > // Deprecated since 2.31.0, 2015-12-06 > virtual int GetEnumValueCount(int enumTypeId) const = 0; > virtual const char * GetEnumValueByIndex(int enumTypeId, asUINT index, int *outValue) const = 0; >#endif ># 723 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" > > // Funcdefs > virtual int RegisterFuncdef(const char *decl) = 0; > virtual asUINT GetFuncdefCount() const = 0; > virtual asITypeInfo *GetFuncdefByIndex(asUINT index) const = 0; > > // Typedefs > virtual int RegisterTypedef(const char *type, const char *decl) = 0; > virtual asUINT GetTypedefCount() const = 0; > virtual asITypeInfo *GetTypedefByIndex(asUINT index) const = 0; > > // Configuration groups > virtual int BeginConfigGroup(const char *groupName) = 0; > virtual int EndConfigGroup() = 0; > virtual int RemoveConfigGroup(const char *groupName) = 0; > virtual asDWORD SetDefaultAccessMask(asDWORD defaultMask) = 0; > virtual int SetDefaultNamespace(const char *nameSpace) = 0; > virtual const char *GetDefaultNamespace() const = 0; > > // Script modules > virtual asIScriptModule *GetModule(const char *module, asEGMFlags flag = asGM_ONLY_IF_EXISTS) = 0; > virtual int DiscardModule(const char *module) = 0; > virtual asUINT GetModuleCount() const = 0; > virtual asIScriptModule *GetModuleByIndex(asUINT index) const = 0; > > // Script functions > virtual asIScriptFunction *GetFunctionById(int funcId) const = 0; >#ifdef AS_DEPRECATED > // deprecated since 2.31.0, 2016-01-01 > virtual asIScriptFunction *GetFuncdefFromTypeId(int typeId) const = 0; >#endif ># 754 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" > > // Type identification >#ifdef AS_DEPRECATED > // Deprecated since 2.31.0, 2015-12-06 > virtual asITypeInfo *GetObjectTypeById(int typeId) const = 0; >#endif ># 760 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" > virtual int GetTypeIdByDecl(const char *decl) const = 0; > virtual const char *GetTypeDeclaration(int typeId, bool includeNamespace = false) const = 0; > virtual int GetSizeOfPrimitiveType(int typeId) const = 0; > virtual asITypeInfo *GetTypeInfoById(int typeId) const = 0; > virtual asITypeInfo *GetTypeInfoByName(const char *name) const = 0; > virtual asITypeInfo *GetTypeInfoByDecl(const char *decl) const = 0; > > // Script execution > virtual asIScriptContext *CreateContext() = 0; > virtual void *CreateScriptObject(const asITypeInfo *type) = 0; > virtual void *CreateScriptObjectCopy(void *obj, const asITypeInfo *type) = 0; > virtual void *CreateUninitializedScriptObject(const asITypeInfo *type) = 0; > virtual asIScriptFunction *CreateDelegate(asIScriptFunction *func, void *obj) = 0; > virtual int AssignScriptObject(void *dstObj, void *srcObj, const asITypeInfo *type) = 0; > virtual void ReleaseScriptObject(void *obj, const asITypeInfo *type) = 0; > virtual void AddRefScriptObject(void *obj, const asITypeInfo *type) = 0; > virtual int RefCastObject(void *obj, asITypeInfo *fromType, asITypeInfo *toType, void **newPtr, bool useOnlyImplicitCast = false) = 0; >#ifdef AS_DEPRECATED > // Deprecated since 2.30.0, 2014-11-04 > virtual bool IsHandleCompatibleWithObject(void *obj, int objTypeId, int handleTypeId) const = 0; >#endif ># 781 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" > virtual asILockableSharedBool *GetWeakRefFlagOfScriptObject(void *obj, const asITypeInfo *type) const = 0; > > // Context pooling > virtual asIScriptContext *RequestContext() = 0; > virtual void ReturnContext(asIScriptContext *ctx) = 0; > virtual int SetContextCallbacks(asREQUESTCONTEXTFUNC_t requestCtx, asRETURNCONTEXTFUNC_t returnCtx, void *param = 0) = 0; > > // String interpretation > virtual asETokenClass ParseToken(const char *string, size_t stringLength = 0, asUINT *tokenLength = 0) const = 0; > > // Garbage collection > virtual int GarbageCollect(asDWORD flags = asGC_FULL_CYCLE, asUINT numIterations = 1) = 0; > virtual void GetGCStatistics(asUINT *currentSize, asUINT *totalDestroyed = 0, asUINT *totalDetected = 0, asUINT *newObjects = 0, asUINT *totalNewDestroyed = 0) const = 0; > virtual int NotifyGarbageCollectorOfNewObject(void *obj, asITypeInfo *type) = 0; > virtual int GetObjectInGC(asUINT idx, asUINT *seqNbr = 0, void **obj = 0, asITypeInfo **type = 0) = 0; > virtual void GCEnumCallback(void *reference) = 0; > > // User data > virtual void *SetUserData(void *data, asPWORD type = 0) = 0; > virtual void *GetUserData(asPWORD type = 0) const = 0; > virtual void SetEngineUserDataCleanupCallback(asCLEANENGINEFUNC_t callback, asPWORD type = 0) = 0; > virtual void SetModuleUserDataCleanupCallback(asCLEANMODULEFUNC_t callback, asPWORD type = 0) = 0; > virtual void SetContextUserDataCleanupCallback(asCLEANCONTEXTFUNC_t callback, asPWORD type = 0) = 0; > virtual void SetFunctionUserDataCleanupCallback(asCLEANFUNCTIONFUNC_t callback, asPWORD type = 0) = 0; >#ifdef AS_DEPRECATED > // Deprecated since 2.31.0, 2015-12-06 > virtual void SetObjectTypeUserDataCleanupCallback(asCLEANTYPEINFOFUNC_t callback, asPWORD type = 0) = 0; >#endif ># 809 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" > virtual void SetTypeInfoUserDataCleanupCallback(asCLEANTYPEINFOFUNC_t callback, asPWORD type = 0) = 0; > virtual void SetScriptObjectUserDataCleanupCallback(asCLEANSCRIPTOBJECTFUNC_t callback, asPWORD type = 0) = 0; > >protected: > virtual ~asIScriptEngine() {} >}; > >class asIThreadManager >{ >protected: > virtual ~asIThreadManager() {} >}; > >class asIScriptModule >{ >public: > virtual asIScriptEngine *GetEngine() const = 0; > virtual void SetName(const char *name) = 0; > virtual const char *GetName() const = 0; > virtual void Discard() = 0; > > // Compilation > virtual int AddScriptSection(const char *name, const char *code, size_t codeLength = 0, int lineOffset = 0) = 0; > virtual int Build() = 0; > virtual int CompileFunction(const char *sectionName, const char *code, int lineOffset, asDWORD compileFlags, asIScriptFunction **outFunc) = 0; > virtual int CompileGlobalVar(const char *sectionName, const char *code, int lineOffset) = 0; > virtual asDWORD SetAccessMask(asDWORD accessMask) = 0; > virtual int SetDefaultNamespace(const char *nameSpace) = 0; > virtual const char *GetDefaultNamespace() const = 0; > > // Functions > virtual asUINT GetFunctionCount() const = 0; > virtual asIScriptFunction *GetFunctionByIndex(asUINT index) const = 0; > virtual asIScriptFunction *GetFunctionByDecl(const char *decl) const = 0; > virtual asIScriptFunction *GetFunctionByName(const char *name) const = 0; > virtual int RemoveFunction(asIScriptFunction *func) = 0; > > // Global variables > virtual int ResetGlobalVars(asIScriptContext *ctx = 0) = 0; > virtual asUINT GetGlobalVarCount() const = 0; > virtual int GetGlobalVarIndexByName(const char *name) const = 0; > virtual int GetGlobalVarIndexByDecl(const char *decl) const = 0; > virtual const char *GetGlobalVarDeclaration(asUINT index, bool includeNamespace = false) const = 0; > virtual int GetGlobalVar(asUINT index, const char **name, const char **nameSpace = 0, int *typeId = 0, bool *isConst = 0) const = 0; > virtual void *GetAddressOfGlobalVar(asUINT index) = 0; > virtual int RemoveGlobalVar(asUINT index) = 0; > > // Type identification > virtual asUINT GetObjectTypeCount() const = 0; > virtual asITypeInfo *GetObjectTypeByIndex(asUINT index) const = 0; >#ifdef AS_DEPRECATED > // Deprecated since 2.31.0, 2015-12-06 > virtual asITypeInfo *GetObjectTypeByName(const char *name) const = 0; > virtual asITypeInfo *GetObjectTypeByDecl(const char *decl) const = 0; >#endif ># 864 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" > virtual int GetTypeIdByDecl(const char *decl) const = 0; > virtual asITypeInfo *GetTypeInfoByName(const char *name) const = 0; > virtual asITypeInfo *GetTypeInfoByDecl(const char *decl) const = 0; > > // Enums > virtual asUINT GetEnumCount() const = 0; > virtual asITypeInfo *GetEnumByIndex(asUINT index) const = 0; >#ifdef AS_DEPRECATED > // Deprecated since 2.31.0, 2015-12-06 > virtual int GetEnumValueCount(int enumTypeId) const = 0; > virtual const char * GetEnumValueByIndex(int enumTypeId, asUINT index, int *outValue) const = 0; >#endif ># 876 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" > > // Typedefs > virtual asUINT GetTypedefCount() const = 0; > virtual asITypeInfo *GetTypedefByIndex(asUINT index) const = 0; > > // Dynamic binding between modules > virtual asUINT GetImportedFunctionCount() const = 0; > virtual int GetImportedFunctionIndexByDecl(const char *decl) const = 0; > virtual const char *GetImportedFunctionDeclaration(asUINT importIndex) const = 0; > virtual const char *GetImportedFunctionSourceModule(asUINT importIndex) const = 0; > virtual int BindImportedFunction(asUINT importIndex, asIScriptFunction *func) = 0; > virtual int UnbindImportedFunction(asUINT importIndex) = 0; > virtual int BindAllImportedFunctions() = 0; > virtual int UnbindAllImportedFunctions() = 0; > > // Byte code saving and loading > virtual int SaveByteCode(asIBinaryStream *out, bool stripDebugInfo = false) const = 0; > virtual int LoadByteCode(asIBinaryStream *in, bool *wasDebugInfoStripped = 0) = 0; > > // User data > virtual void *SetUserData(void *data, asPWORD type = 0) = 0; > virtual void *GetUserData(asPWORD type = 0) const = 0; > >protected: > virtual ~asIScriptModule() {} >}; > >class asIScriptContext >{ >public: > // Memory management > virtual int AddRef() const = 0; > virtual int Release() const = 0; > > // Miscellaneous > virtual asIScriptEngine *GetEngine() const = 0; > > // Execution > virtual int Prepare(asIScriptFunction *func) = 0; > virtual int Unprepare() = 0; > virtual int Execute() = 0; > virtual int Abort() = 0; > virtual int Suspend() = 0; > virtual asEContextState GetState() const = 0; > virtual int PushState() = 0; > virtual int PopState() = 0; > virtual bool IsNested(asUINT *nestCount = 0) const = 0; > > // Object pointer for calling class methods > virtual int SetObject(void *obj) = 0; > > // Arguments > virtual int SetArgByte(asUINT arg, asBYTE value) = 0; > virtual int SetArgWord(asUINT arg, asWORD value) = 0; > virtual int SetArgDWord(asUINT arg, asDWORD value) = 0; > virtual int SetArgQWord(asUINT arg, asQWORD value) = 0; > virtual int SetArgFloat(asUINT arg, float value) = 0; > virtual int SetArgDouble(asUINT arg, double value) = 0; > virtual int SetArgAddress(asUINT arg, void *addr) = 0; > virtual int SetArgObject(asUINT arg, void *obj) = 0; > virtual int SetArgVarType(asUINT arg, void *ptr, int typeId) = 0; > virtual void *GetAddressOfArg(asUINT arg) = 0; > > // Return value > virtual asBYTE GetReturnByte() = 0; > virtual asWORD GetReturnWord() = 0; > virtual asDWORD GetReturnDWord() = 0; > virtual asQWORD GetReturnQWord() = 0; > virtual float GetReturnFloat() = 0; > virtual double GetReturnDouble() = 0; > virtual void *GetReturnAddress() = 0; > virtual void *GetReturnObject() = 0; > virtual void *GetAddressOfReturnValue() = 0; > > // Exception handling > virtual int SetException(const char *string) = 0; > virtual int GetExceptionLineNumber(int *column = 0, const char **sectionName = 0) = 0; > virtual asIScriptFunction *GetExceptionFunction() = 0; > virtual const char * GetExceptionString() = 0; > virtual int SetExceptionCallback(asSFuncPtr callback, void *obj, int callConv) = 0; > virtual void ClearExceptionCallback() = 0; > > // Debugging > virtual int SetLineCallback(asSFuncPtr callback, void *obj, int callConv) = 0; > virtual void ClearLineCallback() = 0; > virtual asUINT GetCallstackSize() const = 0; > virtual asIScriptFunction *GetFunction(asUINT stackLevel = 0) = 0; > virtual int GetLineNumber(asUINT stackLevel = 0, int *column = 0, const char **sectionName = 0) = 0; > virtual int GetVarCount(asUINT stackLevel = 0) = 0; > virtual const char *GetVarName(asUINT varIndex, asUINT stackLevel = 0) = 0; > virtual const char *GetVarDeclaration(asUINT varIndex, asUINT stackLevel = 0, bool includeNamespace = false) = 0; > virtual int GetVarTypeId(asUINT varIndex, asUINT stackLevel = 0) = 0; > virtual void *GetAddressOfVar(asUINT varIndex, asUINT stackLevel = 0) = 0; > virtual bool IsVarInScope(asUINT varIndex, asUINT stackLevel = 0) = 0; > virtual int GetThisTypeId(asUINT stackLevel = 0) = 0; > virtual void *GetThisPointer(asUINT stackLevel = 0) = 0; > virtual asIScriptFunction *GetSystemFunction() = 0; > > // User data > virtual void *SetUserData(void *data, asPWORD type = 0) = 0; > virtual void *GetUserData(asPWORD type = 0) const = 0; > >protected: > virtual ~asIScriptContext() {} >}; > >class asIScriptGeneric >{ >public: > // Miscellaneous > virtual asIScriptEngine *GetEngine() const = 0; > virtual asIScriptFunction *GetFunction() const = 0; > virtual void *GetAuxiliary() const = 0; > > // Object > virtual void *GetObject() = 0; > virtual int GetObjectTypeId() const = 0; > > // Arguments > virtual int GetArgCount() const = 0; > virtual int GetArgTypeId(asUINT arg, asDWORD *flags = 0) const = 0; > virtual asBYTE GetArgByte(asUINT arg) = 0; > virtual asWORD GetArgWord(asUINT arg) = 0; > virtual asDWORD GetArgDWord(asUINT arg) = 0; > virtual asQWORD GetArgQWord(asUINT arg) = 0; > virtual float GetArgFloat(asUINT arg) = 0; > virtual double GetArgDouble(asUINT arg) = 0; > virtual void *GetArgAddress(asUINT arg) = 0; > virtual void *GetArgObject(asUINT arg) = 0; > virtual void *GetAddressOfArg(asUINT arg) = 0; > > // Return value > virtual int GetReturnTypeId(asDWORD *flags = 0) const = 0; > virtual int SetReturnByte(asBYTE val) = 0; > virtual int SetReturnWord(asWORD val) = 0; > virtual int SetReturnDWord(asDWORD val) = 0; > virtual int SetReturnQWord(asQWORD val) = 0; > virtual int SetReturnFloat(float val) = 0; > virtual int SetReturnDouble(double val) = 0; > virtual int SetReturnAddress(void *addr) = 0; > virtual int SetReturnObject(void *obj) = 0; > virtual void *GetAddressOfReturnLocation() = 0; > >protected: > virtual ~asIScriptGeneric() {} >}; > >class asIScriptObject >{ >public: > // Memory management > virtual int AddRef() const = 0; > virtual int Release() const = 0; > virtual asILockableSharedBool *GetWeakRefFlag() const = 0; > > // Type info > virtual int GetTypeId() const = 0; > virtual asITypeInfo *GetObjectType() const = 0; > > // Class properties > virtual asUINT GetPropertyCount() const = 0; > virtual int GetPropertyTypeId(asUINT prop) const = 0; > virtual const char *GetPropertyName(asUINT prop) const = 0; > virtual void *GetAddressOfProperty(asUINT prop) = 0; > > // Miscellaneous > virtual asIScriptEngine *GetEngine() const = 0; > virtual int CopyFrom(asIScriptObject *other) = 0; > > // User data > virtual void *SetUserData(void *data, asPWORD type = 0) = 0; > virtual void *GetUserData(asPWORD type = 0) const = 0; > >protected: > virtual ~asIScriptObject() {} >}; > >class asITypeInfo >{ >public: > // Miscellaneous > virtual asIScriptEngine *GetEngine() const = 0; > virtual const char *GetConfigGroup() const = 0; > virtual asDWORD GetAccessMask() const = 0; > virtual asIScriptModule *GetModule() const = 0; > > // Memory management > virtual int AddRef() const = 0; > virtual int Release() const = 0; > > // Type info > virtual const char *GetName() const = 0; > virtual const char *GetNamespace() const = 0; > virtual asITypeInfo *GetBaseType() const = 0; > virtual bool DerivesFrom(const asITypeInfo *objType) const = 0; > virtual asDWORD GetFlags() const = 0; > virtual asUINT GetSize() const = 0; > virtual int GetTypeId() const = 0; > virtual int GetSubTypeId(asUINT subTypeIndex = 0) const = 0; > virtual asITypeInfo *GetSubType(asUINT subTypeIndex = 0) const = 0; > virtual asUINT GetSubTypeCount() const = 0; > > // Interfaces > virtual asUINT GetInterfaceCount() const = 0; > virtual asITypeInfo *GetInterface(asUINT index) const = 0; > virtual bool Implements(const asITypeInfo *objType) const = 0; > > // Factories > virtual asUINT GetFactoryCount() const = 0; > virtual asIScriptFunction *GetFactoryByIndex(asUINT index) const = 0; > virtual asIScriptFunction *GetFactoryByDecl(const char *decl) const = 0; > > // Methods > virtual asUINT GetMethodCount() const = 0; > virtual asIScriptFunction *GetMethodByIndex(asUINT index, bool getVirtual = true) const = 0; > virtual asIScriptFunction *GetMethodByName(const char *name, bool getVirtual = true) const = 0; > virtual asIScriptFunction *GetMethodByDecl(const char *decl, bool getVirtual = true) const = 0; > > // Properties > virtual asUINT GetPropertyCount() const = 0; > virtual int GetProperty(asUINT index, const char **name, int *typeId = 0, bool *isPrivate = 0, bool *isProtected = 0, int *offset = 0, bool *isReference = 0, asDWORD *accessMask = 0) const = 0; > virtual const char *GetPropertyDeclaration(asUINT index, bool includeNamespace = false) const = 0; > > // Behaviours > virtual asUINT GetBehaviourCount() const = 0; > virtual asIScriptFunction *GetBehaviourByIndex(asUINT index, asEBehaviours *outBehaviour) const = 0; > > // Child types > virtual asUINT GetChildFuncdefCount() const = 0; > virtual asITypeInfo *GetChildFuncdef(asUINT index) const = 0; > virtual asITypeInfo *GetParentType() const = 0; > > // Enums > virtual asUINT GetEnumValueCount() const = 0; > virtual const char *GetEnumValueByIndex(asUINT index, int *outValue) const = 0; > > // Typedef > virtual int GetTypedefTypeId() const = 0; > > // Funcdef > virtual asIScriptFunction *GetFuncdefSignature() const = 0; > > // User data > virtual void *SetUserData(void *data, asPWORD type = 0) = 0; > virtual void *GetUserData(asPWORD type = 0) const = 0; > >protected: > virtual ~asITypeInfo() {} >}; > >class asIScriptFunction >{ >public: > virtual asIScriptEngine *GetEngine() const = 0; > > // Memory management > virtual int AddRef() const = 0; > virtual int Release() const = 0; > > // Miscellaneous > virtual int GetId() const = 0; > virtual asEFuncType GetFuncType() const = 0; > virtual const char *GetModuleName() const = 0; > virtual asIScriptModule *GetModule() const = 0; > virtual const char *GetScriptSectionName() const = 0; > virtual const char *GetConfigGroup() const = 0; > virtual asDWORD GetAccessMask() const = 0; > virtual void *GetAuxiliary() const = 0; > > // Function signature > virtual asITypeInfo *GetObjectType() const = 0; > virtual const char *GetObjectName() const = 0; > virtual const char *GetName() const = 0; > virtual const char *GetNamespace() const = 0; > virtual const char *GetDeclaration(bool includeObjectName = true, bool includeNamespace = false, bool includeParamNames = false) const = 0; > virtual bool IsReadOnly() const = 0; > virtual bool IsPrivate() const = 0; > virtual bool IsProtected() const = 0; > virtual bool IsFinal() const = 0; > virtual bool IsOverride() const = 0; > virtual bool IsShared() const = 0; > virtual asUINT GetParamCount() const = 0; > virtual int GetParam(asUINT index, int *typeId, asDWORD *flags = 0, const char **name = 0, const char **defaultArg = 0) const = 0; >#ifdef AS_DEPRECATED > // Deprecated since 2.29.0, 2014-04-06 > virtual int GetParamTypeId(asUINT index, asDWORD *flags = 0) const = 0; >#endif ># 1163 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" > virtual int GetReturnTypeId(asDWORD *flags = 0) const = 0; > > // Type id for function pointers > virtual int GetTypeId() const = 0; > virtual bool IsCompatibleWithTypeId(int typeId) const = 0; > > // Delegates > virtual void *GetDelegateObject() const = 0; > virtual asITypeInfo *GetDelegateObjectType() const = 0; > virtual asIScriptFunction *GetDelegateFunction() const = 0; > > // Debug information > virtual asUINT GetVarCount() const = 0; > virtual int GetVar(asUINT index, const char **name, int *typeId = 0) const = 0; > virtual const char *GetVarDecl(asUINT index, bool includeNamespace = false) const = 0; > virtual int FindNextLineWithCode(int line) const = 0; > > // For JIT compilation > virtual asDWORD *GetByteCode(asUINT *length = 0) = 0; > > // User data > virtual void *SetUserData(void *userData, asPWORD type = 0) = 0; > virtual void *GetUserData(asPWORD type = 0) const = 0; > >protected: > virtual ~asIScriptFunction() {}; >}; > >class asIBinaryStream >{ >public: > virtual void Read(void *ptr, asUINT size) = 0; > virtual void Write(const void *ptr, asUINT size) = 0; > >public: > virtual ~asIBinaryStream() {} >}; > >class asILockableSharedBool >{ >public: > // Memory management > virtual int AddRef() const = 0; > virtual int Release() const = 0; > > // Value > virtual bool Get() const = 0; > virtual void Set(bool val) = 0; > > // Thread management > virtual void Lock() const = 0; > virtual void Unlock() const = 0; > >protected: > virtual ~asILockableSharedBool() {} >}; > >//----------------------------------------------------------------- >// Function pointers > >// Template function to capture all global functions, >// except the ones using the generic calling convention >template <class T> >inline asSFuncPtr asFunctionPtr(T func) >{ > // Mark this as a global function > asSFuncPtr p(2); > >#ifdef AS_64BIT_PTR > // The size_t cast is to avoid a compiler warning with asFUNCTION(0) > // on 64bit, as 0 is interpreted as a 32bit int value > p.ptr.f.func = reinterpret_cast<asFUNCTION_t>(size_t(func)); >#else ># 1236 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" > // MSVC6 doesn't like the size_t cast above so I > // solved this with a separate code for 32bit. > p.ptr.f.func = reinterpret_cast<asFUNCTION_t>(func); >#endif ># 1240 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" > > return p; >} > >// Specialization for functions using the generic calling convention >template<> >inline asSFuncPtr asFunctionPtr<asGENFUNC_t>(asGENFUNC_t func) >{ > // Mark this as a generic function > asSFuncPtr p(1); > p.ptr.f.func = reinterpret_cast<asFUNCTION_t>(func); > return p; >} > >#ifndef AS_NO_CLASS_METHODS > >// Method pointers > >// Declare a dummy class so that we can determine the size of a simple method pointer >class asCSimpleDummy {}; >typedef void (asCSimpleDummy::*asSIMPLEMETHOD_t)(); >const int SINGLE_PTR_SIZE = sizeof(asSIMPLEMETHOD_t); > >// Define template >template <int N> >struct asSMethodPtr >{ > template<class M> > static asSFuncPtr Convert(M Mthd) > { > // This version of the function should never be executed, nor compiled, > // as it would mean that the size of the method pointer cannot be determined. > > int ERROR_UnsupportedMethodPtr[N-100]; > > asSFuncPtr p(0); > return p; > } >}; > >// Template specialization >template <> >struct asSMethodPtr<SINGLE_PTR_SIZE> >{ > template<class M> > static asSFuncPtr Convert(M Mthd) > { > // Mark this as a class method > asSFuncPtr p(3); > p.CopyMethodPtr(&Mthd, SINGLE_PTR_SIZE); > return p; > } >}; > >#if defined(_MSC_VER) && !defined(__MWERKS__) > >// MSVC and Intel uses different sizes for different class method pointers >template <> >struct asSMethodPtr<SINGLE_PTR_SIZE+1*sizeof(int)> >{ > template <class M> > static asSFuncPtr Convert(M Mthd) > { > // Mark this as a class method > asSFuncPtr p(3); > p.CopyMethodPtr(&Mthd, SINGLE_PTR_SIZE+sizeof(int)); > return p; > } >}; > >template <> >struct asSMethodPtr<SINGLE_PTR_SIZE+2*sizeof(int)> >{ > template <class M> > static asSFuncPtr Convert(M Mthd) > { > // On 32bit platforms with is where a class with virtual inheritance falls. > // On 64bit platforms we can also fall here if 8byte data alignments is used. > > // Mark this as a class method > asSFuncPtr p(3); > p.CopyMethodPtr(&Mthd, SINGLE_PTR_SIZE+2*sizeof(int)); > > // Microsoft has a terrible optimization on class methods with virtual inheritance. > // They are hardcoding an important offset, which is not coming in the method pointer. > >#if defined(_MSC_VER) && !defined(AS_64BIT_PTR) > // Method pointers for virtual inheritance is not supported, > // as it requires the location of the vbase table, which is > // only available to the C++ compiler, but not in the method > // pointer. > > // You can get around this by forward declaring the class and > // storing the sizeof its method pointer in a constant. Example: > > // class ClassWithVirtualInheritance; > // const int ClassWithVirtualInheritance_workaround = sizeof(void ClassWithVirtualInheritance::*()); > > // This will force the compiler to use the unknown type > // for the class, which falls under the next case > > > // Copy the virtual table index to the 4th dword so that AngelScript > // can properly detect and deny the use of methods with virtual inheritance. > *(reinterpret_cast<asDWORD*>(&p)+3) = *(reinterpret_cast<asDWORD*>(&p)+2); >#endif ># 1346 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" > > return p; > } >}; > >template <> >struct asSMethodPtr<SINGLE_PTR_SIZE+3*sizeof(int)> >{ > template <class M> > static asSFuncPtr Convert(M Mthd) > { > // Mark this as a class method > asSFuncPtr p(3); > p.CopyMethodPtr(&Mthd, SINGLE_PTR_SIZE+3*sizeof(int)); > return p; > } >}; > >template <> >struct asSMethodPtr<SINGLE_PTR_SIZE+4*sizeof(int)> >{ > template <class M> > static asSFuncPtr Convert(M Mthd) > { > // On 64bit platforms with 8byte data alignment > // the unknown class method pointers will come here. > > // Mark this as a class method > asSFuncPtr p(3); > p.CopyMethodPtr(&Mthd, SINGLE_PTR_SIZE+4*sizeof(int)); > return p; > } >}; > >#endif ># 1381 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" > >#endif // AS_NO_CLASS_METHODS ># 1383 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" > >//---------------------------------------------------------------- >// JIT compiler > >struct asSVMRegisters >{ > asDWORD *programPointer; // points to current bytecode instruction > asDWORD *stackFramePointer; // function stack frame > asDWORD *stackPointer; // top of stack (grows downward) > asQWORD valueRegister; // temp register for primitives > void *objectRegister; // temp register for objects and handles > asITypeInfo *objectType; // type of object held in object register > bool doProcessSuspend; // whether or not the JIT should break out when it encounters a suspend instruction > asIScriptContext *ctx; // the active context >}; > >typedef void (*asJITFunction)(asSVMRegisters *registers, asPWORD jitArg); > >class asIJITCompiler >{ >public: > virtual int CompileFunction(asIScriptFunction *function, asJITFunction *output) = 0; > virtual void ReleaseJITFunction(asJITFunction func) = 0; >public: > virtual ~asIJITCompiler() {} >}; > >// Byte code instructions >enum asEBCInstr >{ > asBC_PopPtr = 0, > asBC_PshGPtr = 1, > asBC_PshC4 = 2, > asBC_PshV4 = 3, > asBC_PSF = 4, > asBC_SwapPtr = 5, > asBC_NOT = 6, > asBC_PshG4 = 7, > asBC_LdGRdR4 = 8, > asBC_CALL = 9, > asBC_RET = 10, > asBC_JMP = 11, > asBC_JZ = 12, > asBC_JNZ = 13, > asBC_JS = 14, > asBC_JNS = 15, > asBC_JP = 16, > asBC_JNP = 17, > asBC_TZ = 18, > asBC_TNZ = 19, > asBC_TS = 20, > asBC_TNS = 21, > asBC_TP = 22, > asBC_TNP = 23, > asBC_NEGi = 24, > asBC_NEGf = 25, > asBC_NEGd = 26, > asBC_INCi16 = 27, > asBC_INCi8 = 28, > asBC_DECi16 = 29, > asBC_DECi8 = 30, > asBC_INCi = 31, > asBC_DECi = 32, > asBC_INCf = 33, > asBC_DECf = 34, > asBC_INCd = 35, > asBC_DECd = 36, > asBC_IncVi = 37, > asBC_DecVi = 38, > asBC_BNOT = 39, > asBC_BAND = 40, > asBC_BOR = 41, > asBC_BXOR = 42, > asBC_BSLL = 43, > asBC_BSRL = 44, > asBC_BSRA = 45, > asBC_COPY = 46, > asBC_PshC8 = 47, > asBC_PshVPtr = 48, > asBC_RDSPtr = 49, > asBC_CMPd = 50, > asBC_CMPu = 51, > asBC_CMPf = 52, > asBC_CMPi = 53, > asBC_CMPIi = 54, > asBC_CMPIf = 55, > asBC_CMPIu = 56, > asBC_JMPP = 57, > asBC_PopRPtr = 58, > asBC_PshRPtr = 59, > asBC_STR = 60, > asBC_CALLSYS = 61, > asBC_CALLBND = 62, > asBC_SUSPEND = 63, > asBC_ALLOC = 64, > asBC_FREE = 65, > asBC_LOADOBJ = 66, > asBC_STOREOBJ = 67, > asBC_GETOBJ = 68, > asBC_REFCPY = 69, > asBC_CHKREF = 70, > asBC_GETOBJREF = 71, > asBC_GETREF = 72, > asBC_PshNull = 73, > asBC_ClrVPtr = 74, > asBC_OBJTYPE = 75, > asBC_TYPEID = 76, > asBC_SetV4 = 77, > asBC_SetV8 = 78, > asBC_ADDSi = 79, > asBC_CpyVtoV4 = 80, > asBC_CpyVtoV8 = 81, > asBC_CpyVtoR4 = 82, > asBC_CpyVtoR8 = 83, > asBC_CpyVtoG4 = 84, > asBC_CpyRtoV4 = 85, > asBC_CpyRtoV8 = 86, > asBC_CpyGtoV4 = 87, > asBC_WRTV1 = 88, > asBC_WRTV2 = 89, > asBC_WRTV4 = 90, > asBC_WRTV8 = 91, > asBC_RDR1 = 92, > asBC_RDR2 = 93, > asBC_RDR4 = 94, > asBC_RDR8 = 95, > asBC_LDG = 96, > asBC_LDV = 97, > asBC_PGA = 98, > asBC_CmpPtr = 99, > asBC_VAR = 100, > asBC_iTOf = 101, > asBC_fTOi = 102, > asBC_uTOf = 103, > asBC_fTOu = 104, > asBC_sbTOi = 105, > asBC_swTOi = 106, > asBC_ubTOi = 107, > asBC_uwTOi = 108, > asBC_dTOi = 109, > asBC_dTOu = 110, > asBC_dTOf = 111, > asBC_iTOd = 112, > asBC_uTOd = 113, > asBC_fTOd = 114, > asBC_ADDi = 115, > asBC_SUBi = 116, > asBC_MULi = 117, > asBC_DIVi = 118, > asBC_MODi = 119, > asBC_ADDf = 120, > asBC_SUBf = 121, > asBC_MULf = 122, > asBC_DIVf = 123, > asBC_MODf = 124, > asBC_ADDd = 125, > asBC_SUBd = 126, > asBC_MULd = 127, > asBC_DIVd = 128, > asBC_MODd = 129, > asBC_ADDIi = 130, > asBC_SUBIi = 131, > asBC_MULIi = 132, > asBC_ADDIf = 133, > asBC_SUBIf = 134, > asBC_MULIf = 135, > asBC_SetG4 = 136, > asBC_ChkRefS = 137, > asBC_ChkNullV = 138, > asBC_CALLINTF = 139, > asBC_iTOb = 140, > asBC_iTOw = 141, > asBC_SetV1 = 142, > asBC_SetV2 = 143, > asBC_Cast = 144, > asBC_i64TOi = 145, > asBC_uTOi64 = 146, > asBC_iTOi64 = 147, > asBC_fTOi64 = 148, > asBC_dTOi64 = 149, > asBC_fTOu64 = 150, > asBC_dTOu64 = 151, > asBC_i64TOf = 152, > asBC_u64TOf = 153, > asBC_i64TOd = 154, > asBC_u64TOd = 155, > asBC_NEGi64 = 156, > asBC_INCi64 = 157, > asBC_DECi64 = 158, > asBC_BNOT64 = 159, > asBC_ADDi64 = 160, > asBC_SUBi64 = 161, > asBC_MULi64 = 162, > asBC_DIVi64 = 163, > asBC_MODi64 = 164, > asBC_BAND64 = 165, > asBC_BOR64 = 166, > asBC_BXOR64 = 167, > asBC_BSLL64 = 168, > asBC_BSRL64 = 169, > asBC_BSRA64 = 170, > asBC_CMPi64 = 171, > asBC_CMPu64 = 172, > asBC_ChkNullS = 173, > asBC_ClrHi = 174, > asBC_JitEntry = 175, > asBC_CallPtr = 176, > asBC_FuncPtr = 177, > asBC_LoadThisR = 178, > asBC_PshV8 = 179, > asBC_DIVu = 180, > asBC_MODu = 181, > asBC_DIVu64 = 182, > asBC_MODu64 = 183, > asBC_LoadRObjR = 184, > asBC_LoadVObjR = 185, > asBC_RefCpyV = 186, > asBC_JLowZ = 187, > asBC_JLowNZ = 188, > asBC_AllocMem = 189, > asBC_SetListSize = 190, > asBC_PshListElmnt = 191, > asBC_SetListType = 192, > asBC_POWi = 193, > asBC_POWu = 194, > asBC_POWf = 195, > asBC_POWd = 196, > asBC_POWdi = 197, > asBC_POWi64 = 198, > asBC_POWu64 = 199, > asBC_Thiscall1 = 200, > asBC_MAXBYTECODE = 201, > > // Temporary tokens. Can't be output to the final program > asBC_VarDecl = 251, > asBC_Block = 252, > asBC_ObjInfo = 253, > asBC_LINE = 254, > asBC_LABEL = 255 >}; > >// Instruction types >enum asEBCType >{ > asBCTYPE_INFO = 0, > asBCTYPE_NO_ARG = 1, > asBCTYPE_W_ARG = 2, > asBCTYPE_wW_ARG = 3, > asBCTYPE_DW_ARG = 4, > asBCTYPE_rW_DW_ARG = 5, > asBCTYPE_QW_ARG = 6, > asBCTYPE_DW_DW_ARG = 7, > asBCTYPE_wW_rW_rW_ARG = 8, > asBCTYPE_wW_QW_ARG = 9, > asBCTYPE_wW_rW_ARG = 10, > asBCTYPE_rW_ARG = 11, > asBCTYPE_wW_DW_ARG = 12, > asBCTYPE_wW_rW_DW_ARG = 13, > asBCTYPE_rW_rW_ARG = 14, > asBCTYPE_wW_W_ARG = 15, > asBCTYPE_QW_DW_ARG = 16, > asBCTYPE_rW_QW_ARG = 17, > asBCTYPE_W_DW_ARG = 18, > asBCTYPE_rW_W_DW_ARG = 19, > asBCTYPE_rW_DW_DW_ARG = 20 >}; > >// Instruction type sizes >const int asBCTypeSize[21] = >{ > 0, // asBCTYPE_INFO > 1, // asBCTYPE_NO_ARG > 1, // asBCTYPE_W_ARG > 1, // asBCTYPE_wW_ARG > 2, // asBCTYPE_DW_ARG > 2, // asBCTYPE_rW_DW_ARG > 3, // asBCTYPE_QW_ARG > 3, // asBCTYPE_DW_DW_ARG > 2, // asBCTYPE_wW_rW_rW_ARG > 3, // asBCTYPE_wW_QW_ARG > 2, // asBCTYPE_wW_rW_ARG > 1, // asBCTYPE_rW_ARG > 2, // asBCTYPE_wW_DW_ARG > 3, // asBCTYPE_wW_rW_DW_ARG > 2, // asBCTYPE_rW_rW_ARG > 2, // asBCTYPE_wW_W_ARG > 4, // asBCTYPE_QW_DW_ARG > 3, // asBCTYPE_rW_QW_ARG > 2, // asBCTYPE_W_DW_ARG > 3, // asBCTYPE_rW_W_DW_ARG > 3 // asBCTYPE_rW_DW_DW_ARG >}; > >// Instruction info >struct asSBCInfo >{ > asEBCInstr bc; > asEBCType type; > int stackInc; > const char *name; >}; > >#ifndef AS_64BIT_PTR > #define asBCTYPE_PTR_ARG asBCTYPE_DW_ARG > #define asBCTYPE_PTR_DW_ARG asBCTYPE_DW_DW_ARG > #define asBCTYPE_wW_PTR_ARG asBCTYPE_wW_DW_ARG > #define asBCTYPE_rW_PTR_ARG asBCTYPE_rW_DW_ARG > #ifndef AS_PTR_SIZE > #define AS_PTR_SIZE 1 > #endif ># 1693 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" >#else ># 1694 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" > #define asBCTYPE_PTR_ARG asBCTYPE_QW_ARG > #define asBCTYPE_PTR_DW_ARG asBCTYPE_QW_DW_ARG > #define asBCTYPE_wW_PTR_ARG asBCTYPE_wW_QW_ARG > #define asBCTYPE_rW_PTR_ARG asBCTYPE_rW_QW_ARG > #ifndef AS_PTR_SIZE > #define AS_PTR_SIZE 2 > #endif ># 1701 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" >#endif ># 1702 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" > >#define asBCINFO(b,t,s) {asBC_##b, asBCTYPE_##t, s, #b} >#define asBCINFO_DUMMY(b) {asBC_MAXBYTECODE, asBCTYPE_INFO, 0, "BC_" #b} > >const asSBCInfo asBCInfo[256] = >{ > asBCINFO(PopPtr, NO_ARG, -AS_PTR_SIZE), > asBCINFO(PshGPtr, PTR_ARG, AS_PTR_SIZE), > asBCINFO(PshC4, DW_ARG, 1), > asBCINFO(PshV4, rW_ARG, 1), > asBCINFO(PSF, rW_ARG, AS_PTR_SIZE), > asBCINFO(SwapPtr, NO_ARG, 0), > asBCINFO(NOT, rW_ARG, 0), > asBCINFO(PshG4, PTR_ARG, 1), > asBCINFO(LdGRdR4, wW_PTR_ARG, 0), > asBCINFO(CALL, DW_ARG, 0xFFFF), > asBCINFO(RET, W_ARG, 0xFFFF), > asBCINFO(JMP, DW_ARG, 0), > asBCINFO(JZ, DW_ARG, 0), > asBCINFO(JNZ, DW_ARG, 0), > asBCINFO(JS, DW_ARG, 0), > asBCINFO(JNS, DW_ARG, 0), > asBCINFO(JP, DW_ARG, 0), > asBCINFO(JNP, DW_ARG, 0), > asBCINFO(TZ, NO_ARG, 0), > asBCINFO(TNZ, NO_ARG, 0), > asBCINFO(TS, NO_ARG, 0), > asBCINFO(TNS, NO_ARG, 0), > asBCINFO(TP, NO_ARG, 0), > asBCINFO(TNP, NO_ARG, 0), > asBCINFO(NEGi, rW_ARG, 0), > asBCINFO(NEGf, rW_ARG, 0), > asBCINFO(NEGd, rW_ARG, 0), > asBCINFO(INCi16, NO_ARG, 0), > asBCINFO(INCi8, NO_ARG, 0), > asBCINFO(DECi16, NO_ARG, 0), > asBCINFO(DECi8, NO_ARG, 0), > asBCINFO(INCi, NO_ARG, 0), > asBCINFO(DECi, NO_ARG, 0), > asBCINFO(INCf, NO_ARG, 0), > asBCINFO(DECf, NO_ARG, 0), > asBCINFO(INCd, NO_ARG, 0), > asBCINFO(DECd, NO_ARG, 0), > asBCINFO(IncVi, rW_ARG, 0), > asBCINFO(DecVi, rW_ARG, 0), > asBCINFO(BNOT, rW_ARG, 0), > asBCINFO(BAND, wW_rW_rW_ARG, 0), > asBCINFO(BOR, wW_rW_rW_ARG, 0), > asBCINFO(BXOR, wW_rW_rW_ARG, 0), > asBCINFO(BSLL, wW_rW_rW_ARG, 0), > asBCINFO(BSRL, wW_rW_rW_ARG, 0), > asBCINFO(BSRA, wW_rW_rW_ARG, 0), > asBCINFO(COPY, W_DW_ARG, -AS_PTR_SIZE), > asBCINFO(PshC8, QW_ARG, 2), > asBCINFO(PshVPtr, rW_ARG, AS_PTR_SIZE), > asBCINFO(RDSPtr, NO_ARG, 0), > asBCINFO(CMPd, rW_rW_ARG, 0), > asBCINFO(CMPu, rW_rW_ARG, 0), > asBCINFO(CMPf, rW_rW_ARG, 0), > asBCINFO(CMPi, rW_rW_ARG, 0), > asBCINFO(CMPIi, rW_DW_ARG, 0), > asBCINFO(CMPIf, rW_DW_ARG, 0), > asBCINFO(CMPIu, rW_DW_ARG, 0), > asBCINFO(JMPP, rW_ARG, 0), > asBCINFO(PopRPtr, NO_ARG, -AS_PTR_SIZE), > asBCINFO(PshRPtr, NO_ARG, AS_PTR_SIZE), > asBCINFO(STR, W_ARG, 1+AS_PTR_SIZE), > asBCINFO(CALLSYS, DW_ARG, 0xFFFF), > asBCINFO(CALLBND, DW_ARG, 0xFFFF), > asBCINFO(SUSPEND, NO_ARG, 0), > asBCINFO(ALLOC, PTR_DW_ARG, 0xFFFF), > asBCINFO(FREE, wW_PTR_ARG, 0), > asBCINFO(LOADOBJ, rW_ARG, 0), > asBCINFO(STOREOBJ, wW_ARG, 0), > asBCINFO(GETOBJ, W_ARG, 0), > asBCINFO(REFCPY, PTR_ARG, -AS_PTR_SIZE), > asBCINFO(CHKREF, NO_ARG, 0), > asBCINFO(GETOBJREF, W_ARG, 0), > asBCINFO(GETREF, W_ARG, 0), > asBCINFO(PshNull, NO_ARG, AS_PTR_SIZE), > asBCINFO(ClrVPtr, wW_ARG, 0), > asBCINFO(OBJTYPE, PTR_ARG, AS_PTR_SIZE), > asBCINFO(TYPEID, DW_ARG, 1), > asBCINFO(SetV4, wW_DW_ARG, 0), > asBCINFO(SetV8, wW_QW_ARG, 0), > asBCINFO(ADDSi, W_DW_ARG, 0), > asBCINFO(CpyVtoV4, wW_rW_ARG, 0), > asBCINFO(CpyVtoV8, wW_rW_ARG, 0), > asBCINFO(CpyVtoR4, rW_ARG, 0), > asBCINFO(CpyVtoR8, rW_ARG, 0), > asBCINFO(CpyVtoG4, rW_PTR_ARG, 0), > asBCINFO(CpyRtoV4, wW_ARG, 0), > asBCINFO(CpyRtoV8, wW_ARG, 0), > asBCINFO(CpyGtoV4, wW_PTR_ARG, 0), > asBCINFO(WRTV1, rW_ARG, 0), > asBCINFO(WRTV2, rW_ARG, 0), > asBCINFO(WRTV4, rW_ARG, 0), > asBCINFO(WRTV8, rW_ARG, 0), > asBCINFO(RDR1, wW_ARG, 0), > asBCINFO(RDR2, wW_ARG, 0), > asBCINFO(RDR4, wW_ARG, 0), > asBCINFO(RDR8, wW_ARG, 0), > asBCINFO(LDG, PTR_ARG, 0), > asBCINFO(LDV, rW_ARG, 0), > asBCINFO(PGA, PTR_ARG, AS_PTR_SIZE), > asBCINFO(CmpPtr, rW_rW_ARG, 0), > asBCINFO(VAR, rW_ARG, AS_PTR_SIZE), > asBCINFO(iTOf, rW_ARG, 0), > asBCINFO(fTOi, rW_ARG, 0), > asBCINFO(uTOf, rW_ARG, 0), > asBCINFO(fTOu, rW_ARG, 0), > asBCINFO(sbTOi, rW_ARG, 0), > asBCINFO(swTOi, rW_ARG, 0), > asBCINFO(ubTOi, rW_ARG, 0), > asBCINFO(uwTOi, rW_ARG, 0), > asBCINFO(dTOi, wW_rW_ARG, 0), > asBCINFO(dTOu, wW_rW_ARG, 0), > asBCINFO(dTOf, wW_rW_ARG, 0), > asBCINFO(iTOd, wW_rW_ARG, 0), > asBCINFO(uTOd, wW_rW_ARG, 0), > asBCINFO(fTOd, wW_rW_ARG, 0), > asBCINFO(ADDi, wW_rW_rW_ARG, 0), > asBCINFO(SUBi, wW_rW_rW_ARG, 0), > asBCINFO(MULi, wW_rW_rW_ARG, 0), > asBCINFO(DIVi, wW_rW_rW_ARG, 0), > asBCINFO(MODi, wW_rW_rW_ARG, 0), > asBCINFO(ADDf, wW_rW_rW_ARG, 0), > asBCINFO(SUBf, wW_rW_rW_ARG, 0), > asBCINFO(MULf, wW_rW_rW_ARG, 0), > asBCINFO(DIVf, wW_rW_rW_ARG, 0), > asBCINFO(MODf, wW_rW_rW_ARG, 0), > asBCINFO(ADDd, wW_rW_rW_ARG, 0), > asBCINFO(SUBd, wW_rW_rW_ARG, 0), > asBCINFO(MULd, wW_rW_rW_ARG, 0), > asBCINFO(DIVd, wW_rW_rW_ARG, 0), > asBCINFO(MODd, wW_rW_rW_ARG, 0), > asBCINFO(ADDIi, wW_rW_DW_ARG, 0), > asBCINFO(SUBIi, wW_rW_DW_ARG, 0), > asBCINFO(MULIi, wW_rW_DW_ARG, 0), > asBCINFO(ADDIf, wW_rW_DW_ARG, 0), > asBCINFO(SUBIf, wW_rW_DW_ARG, 0), > asBCINFO(MULIf, wW_rW_DW_ARG, 0), > asBCINFO(SetG4, PTR_DW_ARG, 0), > asBCINFO(ChkRefS, NO_ARG, 0), > asBCINFO(ChkNullV, rW_ARG, 0), > asBCINFO(CALLINTF, DW_ARG, 0xFFFF), > asBCINFO(iTOb, rW_ARG, 0), > asBCINFO(iTOw, rW_ARG, 0), > asBCINFO(SetV1, wW_DW_ARG, 0), > asBCINFO(SetV2, wW_DW_ARG, 0), > asBCINFO(Cast, DW_ARG, -AS_PTR_SIZE), > asBCINFO(i64TOi, wW_rW_ARG, 0), > asBCINFO(uTOi64, wW_rW_ARG, 0), > asBCINFO(iTOi64, wW_rW_ARG, 0), > asBCINFO(fTOi64, wW_rW_ARG, 0), > asBCINFO(dTOi64, rW_ARG, 0), > asBCINFO(fTOu64, wW_rW_ARG, 0), > asBCINFO(dTOu64, rW_ARG, 0), > asBCINFO(i64TOf, wW_rW_ARG, 0), > asBCINFO(u64TOf, wW_rW_ARG, 0), > asBCINFO(i64TOd, rW_ARG, 0), > asBCINFO(u64TOd, rW_ARG, 0), > asBCINFO(NEGi64, rW_ARG, 0), > asBCINFO(INCi64, NO_ARG, 0), > asBCINFO(DECi64, NO_ARG, 0), > asBCINFO(BNOT64, rW_ARG, 0), > asBCINFO(ADDi64, wW_rW_rW_ARG, 0), > asBCINFO(SUBi64, wW_rW_rW_ARG, 0), > asBCINFO(MULi64, wW_rW_rW_ARG, 0), > asBCINFO(DIVi64, wW_rW_rW_ARG, 0), > asBCINFO(MODi64, wW_rW_rW_ARG, 0), > asBCINFO(BAND64, wW_rW_rW_ARG, 0), > asBCINFO(BOR64, wW_rW_rW_ARG, 0), > asBCINFO(BXOR64, wW_rW_rW_ARG, 0), > asBCINFO(BSLL64, wW_rW_rW_ARG, 0), > asBCINFO(BSRL64, wW_rW_rW_ARG, 0), > asBCINFO(BSRA64, wW_rW_rW_ARG, 0), > asBCINFO(CMPi64, rW_rW_ARG, 0), > asBCINFO(CMPu64, rW_rW_ARG, 0), > asBCINFO(ChkNullS, W_ARG, 0), > asBCINFO(ClrHi, NO_ARG, 0), > asBCINFO(JitEntry, PTR_ARG, 0), > asBCINFO(CallPtr, rW_ARG, 0xFFFF), > asBCINFO(FuncPtr, PTR_ARG, AS_PTR_SIZE), > asBCINFO(LoadThisR, W_DW_ARG, 0), > asBCINFO(PshV8, rW_ARG, 2), > asBCINFO(DIVu, wW_rW_rW_ARG, 0), > asBCINFO(MODu, wW_rW_rW_ARG, 0), > asBCINFO(DIVu64, wW_rW_rW_ARG, 0), > asBCINFO(MODu64, wW_rW_rW_ARG, 0), > asBCINFO(LoadRObjR, rW_W_DW_ARG, 0), > asBCINFO(LoadVObjR, rW_W_DW_ARG, 0), > asBCINFO(RefCpyV, wW_PTR_ARG, 0), > asBCINFO(JLowZ, DW_ARG, 0), > asBCINFO(JLowNZ, DW_ARG, 0), > asBCINFO(AllocMem, wW_DW_ARG, 0), > asBCINFO(SetListSize, rW_DW_DW_ARG, 0), > asBCINFO(PshListElmnt, rW_DW_ARG, AS_PTR_SIZE), > asBCINFO(SetListType, rW_DW_DW_ARG, 0), > asBCINFO(POWi, wW_rW_rW_ARG, 0), > asBCINFO(POWu, wW_rW_rW_ARG, 0), > asBCINFO(POWf, wW_rW_rW_ARG, 0), > asBCINFO(POWd, wW_rW_rW_ARG, 0), > asBCINFO(POWdi, wW_rW_rW_ARG, 0), > asBCINFO(POWi64, wW_rW_rW_ARG, 0), > asBCINFO(POWu64, wW_rW_rW_ARG, 0), > asBCINFO(Thiscall1, DW_ARG, -AS_PTR_SIZE-1), > > asBCINFO_DUMMY(201), > asBCINFO_DUMMY(202), > asBCINFO_DUMMY(203), > asBCINFO_DUMMY(204), > asBCINFO_DUMMY(205), > asBCINFO_DUMMY(206), > asBCINFO_DUMMY(207), > asBCINFO_DUMMY(208), > asBCINFO_DUMMY(209), > asBCINFO_DUMMY(210), > asBCINFO_DUMMY(211), > asBCINFO_DUMMY(212), > asBCINFO_DUMMY(213), > asBCINFO_DUMMY(214), > asBCINFO_DUMMY(215), > asBCINFO_DUMMY(216), > asBCINFO_DUMMY(217), > asBCINFO_DUMMY(218), > asBCINFO_DUMMY(219), > asBCINFO_DUMMY(220), > asBCINFO_DUMMY(221), > asBCINFO_DUMMY(222), > asBCINFO_DUMMY(223), > asBCINFO_DUMMY(224), > asBCINFO_DUMMY(225), > asBCINFO_DUMMY(226), > asBCINFO_DUMMY(227), > asBCINFO_DUMMY(228), > asBCINFO_DUMMY(229), > asBCINFO_DUMMY(230), > asBCINFO_DUMMY(231), > asBCINFO_DUMMY(232), > asBCINFO_DUMMY(233), > asBCINFO_DUMMY(234), > asBCINFO_DUMMY(235), > asBCINFO_DUMMY(236), > asBCINFO_DUMMY(237), > asBCINFO_DUMMY(238), > asBCINFO_DUMMY(239), > asBCINFO_DUMMY(240), > asBCINFO_DUMMY(241), > asBCINFO_DUMMY(242), > asBCINFO_DUMMY(243), > asBCINFO_DUMMY(244), > asBCINFO_DUMMY(245), > asBCINFO_DUMMY(246), > asBCINFO_DUMMY(247), > asBCINFO_DUMMY(248), > asBCINFO_DUMMY(249), > asBCINFO_DUMMY(250), > > asBCINFO(VarDecl, W_ARG, 0), > asBCINFO(Block, INFO, 0), > asBCINFO(ObjInfo, rW_DW_ARG, 0), > asBCINFO(LINE, INFO, 0), > asBCINFO(LABEL, INFO, 0) >}; > >// Macros to access bytecode instruction arguments >#define asBC_DWORDARG(x) (*(((asDWORD*)x)+1)) >#define asBC_INTARG(x) (*(int*)(((asDWORD*)x)+1)) >#define asBC_QWORDARG(x) (*(asQWORD*)(((asDWORD*)x)+1)) >#define asBC_FLOATARG(x) (*(float*)(((asDWORD*)x)+1)) >#define asBC_PTRARG(x) (*(asPWORD*)(((asDWORD*)x)+1)) >#define asBC_WORDARG0(x) (*(((asWORD*)x)+1)) >#define asBC_WORDARG1(x) (*(((asWORD*)x)+2)) >#define asBC_SWORDARG0(x) (*(((short*)x)+1)) >#define asBC_SWORDARG1(x) (*(((short*)x)+2)) >#define asBC_SWORDARG2(x) (*(((short*)x)+3)) > > >END_AS_NAMESPACE > >#endif ># 1984 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/../include/angelscript.h" ># 1256 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" 2 >#if 0 /* expanded by -frewrite-includes */ >#include "as_memory.h" >#endif /* expanded by -frewrite-includes */ ># 1256 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" ># 1 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_memory.h" 1 >/* > AngelCode Scripting Library > Copyright (c) 2003-2014 Andreas Jonsson > > This software is provided 'as-is', without any express or implied > warranty. In no event will the authors be held liable for any > damages arising from the use of this software. > > Permission is granted to anyone to use this software for any > purpose, including commercial applications, and to alter it and > redistribute it freely, subject to the following restrictions: > > 1. The origin of this software must not be misrepresented; you > must not claim that you wrote the original software. If you use > this software in a product, an acknowledgment in the product > documentation would be appreciated but is not required. > > 2. Altered source versions must be plainly marked as such, and > must not be misrepresented as being the original software. > > 3. This notice may not be removed or altered from any source > distribution. > > The original version of this library can be located at: > http://www.angelcode.com/angelscript/ > > Andreas Jonsson > andreas@angelcode.com >*/ > > >// >// as_memory.h >// >// Overload the default memory management functions so that we >// can let the application decide how to do it. >// > > > >#ifndef AS_MEMORY_H >#define AS_MEMORY_H > >#if 0 /* expanded by -frewrite-includes */ >#include "as_config.h" >#endif /* expanded by -frewrite-includes */ ># 44 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_memory.h" ># 1 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" 1 >/* > AngelCode Scripting Library > Copyright (c) 2003-2016 Andreas Jonsson > > This software is provided 'as-is', without any express or implied > warranty. In no event will the authors be held liable for any > damages arising from the use of this software. > > Permission is granted to anyone to use this software for any > purpose, including commercial applications, and to alter it and > redistribute it freely, subject to the following restrictions: > > 1. The origin of this software must not be misrepresented; you > must not claim that you wrote the original software. If you use > this software in a product, an acknowledgment in the product > documentation would be appreciated but is not required. > > 2. Altered source versions must be plainly marked as such, and > must not be misrepresented as being the original software. > > 3. This notice may not be removed or altered from any source > distribution. > > The original version of this library can be located at: > http://www.angelcode.com/angelscript/ > > Andreas Jonsson > andreas@angelcode.com >*/ > > > >// >// as_config.h >// >// this file is used for configuring the compilation of the library >// > >#ifndef AS_CONFIG_H >#define AS_CONFIG_H > > > >// >// Features >//----------------------------------------- > >// AS_NO_THREADS >// Turns off support for multithreading. By turning off >// this when it's not needed a bit of performance is gained. > >// AS_WINDOWS_THREADS >// If the library should be compiled using windows threads. > >// AS_POSIX_THREADS >// If the library should be compiled using posix threads. > >// AS_NO_ATOMIC >// If the compiler/platform doesn't support atomic instructions >// then this should be defined to use critical sections instead. > >// AS_DEBUG >// This flag can be defined to make the library write some extra output when >// compiling and executing scripts. > >// AS_DEPRECATED >// If this flag is defined then some backwards compatibility is maintained. >// There is no guarantee for how well deprecated functionality will work though >// so it is best to exchange it for the new functionality as soon as possible. > >// AS_NO_CLASS_METHODS >// Disables the possibility to add class methods. Can increase the >// portability of the library. > >// AS_MAX_PORTABILITY >// Disables all platform specific code. Only the asCALL_GENERIC calling >// convention will be available in with this flag set. > >// AS_DOUBLEBYTE_CHARSET >// When this flag is defined, the parser will treat all characters in strings >// that are greater than 127 as lead characters and automatically include the >// next character in the script without checking its value. This should be >// compatible with common encoding schemes, e.g. Big5. Shift-JIS is not compatible >// though as it encodes some single byte characters above 127. >// >// If support for international text is desired, it is recommended that UTF-8 >// is used as this is supported natively by the compiler without the use for this >// preprocessor flag. > >// AS_NO_COMPILER >// Compiles the library without support for compiling scripts. This is intended >// for those applications that will load pre-compiled bytecode and wants to decrease >// the size of the executable. > >// AS_NO_EXCEPTIONS >// Define this if exception handling is turned off or not available on the target platform. > >// AS_NO_MEMBER_INIT >// Disable the support for initialization of class members directly in the declaration. >// This was as a form to maintain backwards compatibility with versions before 2.26.0 >// if the new order of the member initialization caused null pointer exceptions in older >// scripts (e.g. if a base class accessed members of a derived class through a virtual method). > >// AS_USE_NAMESPACE >// Adds the AngelScript namespace on the declarations. > > > >// >// Library usage >//------------------------------------------ > >// ANGELSCRIPT_EXPORT >// This flag should be defined when compiling the library as a lib or dll. > >// ANGELSCRIPT_DLL_LIBRARY_IMPORT >// This flag should be defined when using AngelScript as a dll with automatic >// library import. > >// ANGELSCRIPT_DLL_MANUAL_IMPORT >// This flag should be defined when using AngelScript as a dll with manual >// loading of the library. > > > > >// >// Compiler differences >//----------------------------------------- > >// asVSNPRINTF(a,b,c,d) >// Some compilers use different names for this function. You must >// define this macro to map to the proper function. > >// ASM_AT_N_T or ASM_INTEL >// You should choose what inline assembly syntax to use when compiling. > >// VALUE_OF_BOOLEAN_TRUE >// This flag allows to customize the exact value of boolean true. > >// AS_SIZEOF_BOOL >// On some target platforms the sizeof(bool) is 4, but on most it is 1. > >// STDCALL >// This is used to declare a function to use the stdcall calling convention. > >// AS_NO_MEMORY_H >// Some compilers don't come with the memory.h header file. > >// AS_NO_THISCALL_FUNCTOR_METHOD >// Defined if the support for functor methods hasn't been implemented on the platform. > > > >// >// How to identify different compilers >//----------------------------------------- >// Ref: http://nadeausoftware.com/articles/2012/10/c_c_tip_how_detect_compiler_name_and_version_using_compiler_predefined_macros > >// MS Visual C++ >// _MSC_VER is defined >// __MWERKS__ is not defined > >// Metrowerks >// _MSC_VER is defined >// __MWERKS__ is defined > >// GNU C based compilers >// __GNUC__ is defined > >// CLang/LLVM >// __clang__ is defined > >// Embarcadero C++Builder >// __BORLANDC__ is defined > >// Oracle Solaris Studio (previously known as Sun CC compiler) >// __SUNPRO_CC is defined > > > >// >// CPU differences >//--------------------------------------- > >// AS_USE_DOUBLE_AS_FLOAT >// If there is no 64 bit floating point type, then this constant can be defined >// to treat double like normal floats. > >// AS_X86 >// Use assembler code for the x86 CPU family > >// AS_SH4 >// Use assembler code for the SH4 CPU family > >// AS_MIPS >// Use assembler code for the MIPS CPU family > >// AS_PPC >// Use assembler code for the 32bit PowerPC CPU family > >// AS_PPC_64 >// Use assembler code for the 64bit PowerPC CPU family > >// AS_XENON >// Use assembler code for the Xenon (XBOX360) CPU family > >// AS_ARM >// Use assembler code for the ARM CPU family > >// AS_SOFTFP >// Use to tell compiler that ARM soft-float ABI >// should be used instead of ARM hard-float ABI > >// AS_X64_GCC >// Use GCC assembler code for the X64 AMD/Intel CPU family > >// AS_X64_MSVC >// Use MSVC assembler code for the X64 AMD/Intel CPU family > >// AS_64BIT_PTR >// Define this to make the engine store all pointers in 64bit words. > >// AS_BIG_ENDIAN >// Define this for CPUs that use big endian memory layout, e.g. PPC > >// AS_SPARC >// Define this for SPARC CPU family > > > >// >// Target systems >//-------------------------------- >// This group shows a few of the flags used to identify different target systems. >// Sometimes there are differences on different target systems, while both CPU and >// compiler is the same for both, when this is so these flags are used to produce the >// right code. > >// AS_WIN - Microsoft Windows >// AS_LINUX - Linux >// AS_MAC - Apple Macintosh >// AS_BSD - BSD based OS (FreeBSD, DragonFly, OpenBSD, etc) >// AS_XBOX - Microsoft XBox >// AS_XBOX360 - Microsoft XBox 360 >// AS_PSP - Sony Playstation Portable >// AS_PSVITA - Sony Playstation Vita >// AS_PS2 - Sony Playstation 2 >// AS_PS3 - Sony Playstation 3 >// AS_DC - Sega Dreamcast >// AS_GC - Nintendo GameCube >// AS_WII - Nintendo Wii >// AS_WIIU - Nintendo Wii U >// AS_IPHONE - Apple IPhone >// AS_ANDROID - Android >// AS_HAIKU - Haiku >// AS_ILLUMOS - Illumos like (OpenSolaris, OpenIndiana, NCP, etc) >// AS_MARMALADE - Marmalade cross platform SDK (a layer on top of the OS) >// AS_SUN - Sun UNIX > > > > >// >// Calling conventions >//----------------------------------------- > >// GNU_STYLE_VIRTUAL_METHOD >// This constant should be defined if method pointers store index for virtual >// functions in the same location as the function pointer. In such cases the method >// is identified as virtual if the least significant bit is set. > >// MULTI_BASE_OFFSET(x) >// This macro is used to retrieve the offset added to the object pointer in order to >// implicitly cast the object to the base object. x is the method pointer received by >// the register function. > >// HAVE_VIRTUAL_BASE_OFFSET >// Define this constant if the compiler stores the virtual base offset in the method >// pointers. If it is not stored in the pointers then AngelScript have no way of >// identifying a method as coming from a class with virtual inheritance. > >// VIRTUAL_BASE_OFFSET(x) >// This macro is used to retrieve the offset added to the object pointer in order to >// find the virtual base object. x is the method pointer received by the register >// function; > >// COMPLEX_RETURN_MASK >// This constant shows what attributes determine if an object is returned in memory >// or in the registers as normal structures > >// COMPLEX_MASK >// This constant shows what attributes determine if an object is implicitly passed >// by reference or not, even if the argument is declared by value > >// THISCALL_RETURN_SIMPLE_IN_MEMORY >// CDECL_RETURN_SIMPLE_IN_MEMORY >// STDCALL_RETURN_SIMPLE_IN_MEMORY >// When these constants are defined then the corresponding calling convention always >// return classes/structs in memory regardless of size or complexity. > >// THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE >// STDCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE >// CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE >// Specifies the minimum size in dwords a class/struct needs to be to be passed in memory > >// CALLEE_POPS_HIDDEN_RETURN_POINTER >// This constant should be defined if the callee pops the hidden return pointer, >// used when returning an object in memory. > >// THISCALL_CALLEE_POPS_HIDDEN_RETURN_POINTER >// This constant should be defined if the callee pops the hidden return pointer >// for thiscall functions; used when returning an object in memory. > >// THISCALL_PASS_OBJECT_POINTER_ON_THE_STACK >// With this constant defined AngelScript will pass the object pointer on the stack > >// THISCALL_CALLEE_POPS_ARGUMENTS >// If the callee pops arguments for class methods then define this constant > >// COMPLEX_OBJS_PASSED_BY_REF >// Some compilers always pass certain objects by reference. GNUC for example does >// this if the the class has a defined destructor. > >// AS_LARGE_OBJS_PASSED_BY_REF >// If this is defined large objects are passed by reference, whether they are complex or not > >// AS_LARGE_OBJ_MIN_SIZE >// This is the size of objects determined as large ones > >// AS_CALLEE_DESTROY_OBJ_BY_VAL >// When an object is passed by value the called function is the one responsible >// for calling the destructor before returning. > >// HAS_128_BIT_PRIMITIVES >// 64bit processors often support 128bit primitives. These may require special >// treatment when passed in function arguments or returned by functions. > >// SPLIT_OBJS_BY_MEMBER_TYPES >// On some platforms objects with primitive members are split over different >// register types when passed by value to functions. > > > > > >// >// Detect compiler >//------------------------------------------------ > > >#define VALUE_OF_BOOLEAN_TRUE 1 >#define STDCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 0 >#define CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 0 >#define THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 0 >#define THISCALL_CALLEE_POPS_HIDDEN_RETURN_POINTER > >// Not implemented by default. Undefined with tested platforms. >#define AS_NO_THISCALL_FUNCTOR_METHOD > > >// Embarcadero C++Builder >#if defined(__BORLANDC__) > #ifndef _Windows > #error "Configuration doesn't yet support BCC for Linux or Mac OS." > #endif ># 367 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #if defined(_M_X64) > #error "Configuration doesn't yet support BCC for AMD64." > #endif ># 370 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #define MULTI_BASE_OFFSET(x) (*((asDWORD*)(&x)+1)) > #define HAVE_VIRTUAL_BASE_OFFSET > #define VIRTUAL_BASE_OFFSET(x) (*((asDWORD*)(&x)+2)) > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > #define CDECL_RETURN_SIMPLE_IN_MEMORY > #define STDCALL_RETURN_SIMPLE_IN_MEMORY > #undef STDCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE > #undef CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE > #undef THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE > #define STDCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > #define CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > #define THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > > #define THISCALL_PASS_OBJECT_POINTER_ON_THE_STACK > #define COMPLEX_MASK (asOBJ_APP_CLASS_CONSTRUCTOR | asOBJ_APP_CLASS_DESTRUCTOR) > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_CONSTRUCTOR | asOBJ_APP_CLASS_DESTRUCTOR) > #define STDCALL __stdcall > #define AS_SIZEOF_BOOL 1 > #define AS_WINDOWS_THREADS > #undef THISCALL_CALLEE_POPS_HIDDEN_RETURN_POINTER > > #define AS_WIN > #define AS_X86 > #define ASM_INTEL > > #define asVSNPRINTF(a, b, c, d) _vsnprintf(a, b, c, d) > > #define fmodf(a,b) fmod(a,b) > > #define UNREACHABLE_RETURN >#endif ># 402 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > >// Microsoft Visual C++ >// Ref: http://msdn.microsoft.com/en-us/library/b0084kay.aspx >#if defined(_MSC_VER) && !defined(__MWERKS__) > > #if _MSC_VER <= 1200 // MSVC6 > // Disable the useless warnings about truncated symbol names for template instances > #pragma warning( disable : 4786 ) > #endif ># 411 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #ifdef _M_X64 > #define MULTI_BASE_OFFSET(x) (*((asDWORD*)(&x)+2)) > #define VIRTUAL_BASE_OFFSET(x) (*((asDWORD*)(&x)+4)) > #else ># 416 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define MULTI_BASE_OFFSET(x) (*((asDWORD*)(&x)+1)) > #define VIRTUAL_BASE_OFFSET(x) (*((asDWORD*)(&x)+3)) > #endif ># 419 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define HAVE_VIRTUAL_BASE_OFFSET > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > #define THISCALL_PASS_OBJECT_POINTER_IN_ECX > > // http://www.madewithmarmalade.com/ > #if defined(__S3E__) > #ifndef AS_MARMALADE > // From now on we'll use the below define > #define AS_MARMALADE > #endif ># 429 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > // Marmalade doesn't use the Windows libraries > #define asVSNPRINTF(a, b, c, d) vsnprintf(a, b, c, d) > > // Marmalade doesn't seem to have proper support for > // atomic instructions or read/write locks, so we turn off > // multithread support > //#define AS_POSIX_THREADS > #define AS_NO_THREADS > #define AS_NO_ATOMIC > > // Marmalade has it's own way of identifying the CPU target > // Note, when building for ARM, the gnuc compiler will always > // be used so we don't need to check for it here > #if defined(I3D_ARCH_X86) > #define AS_X86 > #endif ># 446 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #else ># 447 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #if _MSC_VER < 1500 // MSVC++ 9 (aka MSVC++ .NET 2008) > #define asVSNPRINTF(a, b, c, d) _vsnprintf(a, b, c, d) > #else ># 450 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define asVSNPRINTF(a, b, c, d) vsnprintf_s(a, b, _TRUNCATE, c, d) > #endif ># 452 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #define AS_WINDOWS_THREADS > #endif ># 455 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #define THISCALL_CALLEE_POPS_ARGUMENTS > #define STDCALL __stdcall > #define AS_SIZEOF_BOOL 1 > #define COMPLEX_OBJS_PASSED_BY_REF > > #define ASM_INTEL // Intel style for inline assembly on microsoft compilers > > #if defined(WIN32) || defined(_WIN32) || defined(_WIN64) > #define AS_WIN > #endif ># 466 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #if _XBOX_VER >= 200 > // 360 uses a Xenon processor (which is a modified 64bit PPC) > #define AS_XBOX360 > #define AS_XENON > #define AS_BIG_ENDIAN > #else ># 473 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #if defined(_XBOX) || (defined(_M_IX86) && !defined(__LP64__)) > #define AS_X86 > #ifndef _XBOX > // Not tested with xbox (only enabled if is Windows) > #undef AS_NO_THISCALL_FUNCTOR_METHOD > #endif ># 479 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #elif defined(_M_X64) ># 480 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_X64_MSVC > #undef AS_NO_THISCALL_FUNCTOR_METHOD > #define AS_CALLEE_DESTROY_OBJ_BY_VAL > #define AS_LARGE_OBJS_PASSED_BY_REF > #define AS_LARGE_OBJ_MIN_SIZE 3 > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_CONSTRUCTOR | asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_ASSIGNMENT | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > #define COMPLEX_MASK (asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > #endif ># 488 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #endif ># 489 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #if defined(_ARM_) || defined(_M_ARM) > #define AS_ARM > #define AS_CALLEE_DESTROY_OBJ_BY_VAL > #define CDECL_RETURN_SIMPLE_IN_MEMORY > #define STDCALL_RETURN_SIMPLE_IN_MEMORY > #define COMPLEX_MASK (asOBJ_APP_CLASS_ASSIGNMENT | asOBJ_APP_ARRAY) > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_ASSIGNMENT | asOBJ_APP_ARRAY) > > // Windows CE uses softfp calling convention, while Windows RT uses hardfp calling convention > // ref: http://stackoverflow.com/questions/16375355/what-is-the-windows-rt-on-arm-native-code-calling-convention > #if defined(_WIN32_WCE) > #define AS_SOFTFP > #endif ># 503 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #endif ># 504 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #ifndef COMPLEX_MASK > #define COMPLEX_MASK (asOBJ_APP_ARRAY) > #endif ># 508 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #ifndef COMPLEX_RETURN_MASK > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_CONSTRUCTOR | asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_ASSIGNMENT | asOBJ_APP_ARRAY) > #endif ># 512 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #define UNREACHABLE_RETURN >#endif ># 515 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > >// Metrowerks CodeWarrior (experimental, let me know if something isn't working) >#if defined(__MWERKS__) && !defined(EPPC) // JWC -- If Wii DO NOT use this even when using Metrowerks Compiler. Even though they are called Freescale... > #define MULTI_BASE_OFFSET(x) (*((asDWORD*)(&x)+1)) > #define HAVE_VIRTUAL_BASE_OFFSET > #define VIRTUAL_BASE_OFFSET(x) (*((asDWORD*)(&x)+3)) > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > #define THISCALL_PASS_OBJECT_POINTER_IN_ECX > #define asVSNPRINTF(a, b, c, d) _vsnprintf(a, b, c, d) > #define THISCALL_CALLEE_POPS_ARGUMENTS > #define COMPLEX_MASK (asOBJ_APP_CLASS_CONSTRUCTOR | asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_ASSIGNMENT) > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_CONSTRUCTOR | asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_ASSIGNMENT) > #define AS_SIZEOF_BOOL 1 > #define AS_WINDOWS_THREADS > #define STDCALL __stdcall > > // Support native calling conventions on x86, but not 64bit yet > #if defined(_M_IX86) && !defined(__LP64__) > #define AS_X86 > #define ASM_INTEL // Intel style for inline assembly > #endif ># 536 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #define UNREACHABLE_RETURN >#endif ># 539 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > >// SN Systems ProDG >#if defined(__SNC__) || defined(SNSYS) > #define MULTI_BASE_OFFSET(x) (*((asDWORD*)(&x)+1)) > #define CALLEE_POPS_HIDDEN_RETURN_POINTER > #define COMPLEX_OBJS_PASSED_BY_REF > > #ifdef __psp2__ > #define COMPLEX_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR) > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR) > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > #define CDECL_RETURN_SIMPLE_IN_MEMORY > #define STDCALL_RETURN_SIMPLE_IN_MEMORY > #define THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > #define CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > #define STDCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > #else ># 556 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define GNU_STYLE_VIRTUAL_METHOD > #define ASM_AT_N_T // AT&T style inline assembly > #define COMPLEX_MASK (asOBJ_APP_CLASS_DESTRUCTOR) > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_DESTRUCTOR) > #endif ># 561 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #define AS_SIZEOF_BOOL 1 > #define asVSNPRINTF(a, b, c, d) vsnprintf(a, b, c, d) > > // SN doesnt seem to like STDCALL. > // Maybe it can work with some fiddling, but I can't imagine linking to > // any STDCALL functions with a console anyway... > #define STDCALL > > // Linux specific > #ifdef __linux__ > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > #define CDECL_RETURN_SIMPLE_IN_MEMORY > #define STDCALL_RETURN_SIMPLE_IN_MEMORY > #endif ># 576 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > // Support native calling conventions on x86, but not 64bit yet > #if (defined(i386) || defined(__i386) || defined(__i386__)) && !defined(__LP64__) > #define AS_X86 > // PS3 > #elif (defined(__PPC__) || defined(__ppc__)) && defined(__PPU__) ># 582 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // Support native calling conventions on PS3 > #define AS_PS3 > #define AS_PPC_64 > #define AS_NO_MEMORY_H > #define AS_NO_EXCEPTIONS > #if 0 /* expanded by -frewrite-includes */ >#include <stdlib.h> >#endif /* expanded by -frewrite-includes */ ># 587 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" ># 588 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // PSP > #elif defined(__psp__) ># 590 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_NO_MEMORY_H > #define AS_MIPS > #define AS_PSP > #define AS_USE_DOUBLE_AS_FLOAT > // PSVita > #elif defined(__psp2__) ># 596 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_PSVITA > #define AS_ARM > #define AS_NO_MEMORY_H > #define AS_NO_EXCEPTIONS > #define AS_CALLEE_DESTROY_OBJ_BY_VAL > #undef AS_NO_THISCALL_FUNCTOR_METHOD > #endif ># 603 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #define UNREACHABLE_RETURN >#endif ># 606 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > >// GNU C (and MinGW or Cygwin on Windows) >// Use the following command to determine predefined macros: echo . | g++ -dM -E - >// MSVC2015 can now use CLang too, but it shouldn't go in here >#if (defined(__GNUC__) && !defined(__SNC__) && !defined(_MSC_VER)) || defined(EPPC) || defined(__CYGWIN__) // JWC -- use this instead for Wii > #define GNU_STYLE_VIRTUAL_METHOD > #define MULTI_BASE_OFFSET(x) (*((asPWORD*)(&x)+1)) > #define asVSNPRINTF(a, b, c, d) vsnprintf(a, b, c, d) > #define CALLEE_POPS_HIDDEN_RETURN_POINTER > #define COMPLEX_OBJS_PASSED_BY_REF > #define COMPLEX_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_ARRAY) > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_ARRAY) > #define AS_NO_MEMORY_H > #define AS_SIZEOF_BOOL 1 > #define STDCALL __attribute__((stdcall)) > #define ASM_AT_N_T > > // WII U > #if defined(__ghs__) > #define AS_WIIU > > // Native calling conventions are not yet supported > #define AS_MAX_PORTABILITY > > // Marmalade is a cross platform SDK. It uses g++ to compile for iOS and Android > #elif defined(__S3E__) ># 632 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #ifndef AS_MARMALADE > // From now on we'll use the below define > #define AS_MARMALADE > #endif ># 636 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > // STDCALL is not available on Marmalade when compiled for iOS or Android > #undef STDCALL > #define STDCALL > > // Marmalade doesn't seem to have proper support for > // atomic instructions or read/write locks > #define AS_NO_THREADS > #define AS_NO_ATOMIC > > // Identify for which CPU the library is being built > #if defined(I3D_ARCH_X86) > #define AS_X86 > #elif defined(I3D_ARCH_ARM) ># 650 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_ARM > > #define AS_SOFTFP > > // Marmalade appear to use the same ABI as Android when built for ARM > #define CDECL_RETURN_SIMPLE_IN_MEMORY > #define STDCALL_RETURN_SIMPLE_IN_MEMORY > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > > #undef THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE > #define THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > > #undef CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE > #define CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > > #undef STDCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE > #define STDCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > > #undef GNU_STYLE_VIRTUAL_METHOD > > #undef COMPLEX_MASK > #define COMPLEX_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > #undef COMPLEX_RETURN_MASK > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > > #define AS_CALLEE_DESTROY_OBJ_BY_VAL > #endif ># 677 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > // MacOSX and IPhone > #elif defined(__APPLE__) ># 680 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #if 0 /* expanded by -frewrite-includes */ >#include <TargetConditionals.h> >#endif /* expanded by -frewrite-includes */ ># 681 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" ># 682 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > // Is this a Mac or an IPhone (or other iOS device)? > #if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE == 1 > #define AS_IPHONE > #else ># 687 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_MAC > #endif ># 689 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > // The sizeof bool is different depending on the target CPU > #undef AS_SIZEOF_BOOL > #if defined(__ppc__) > #define AS_SIZEOF_BOOL 4 > // STDCALL is not available on PPC > #undef STDCALL > #define STDCALL > #else ># 698 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_SIZEOF_BOOL 1 > #endif ># 700 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #if (defined(_ARM_) || defined(__arm__)) > // iOS use ARM processor > #define AS_ARM > #undef AS_NO_THISCALL_FUNCTOR_METHOD > #define CDECL_RETURN_SIMPLE_IN_MEMORY > #define STDCALL_RETURN_SIMPLE_IN_MEMORY > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > > #undef GNU_STYLE_VIRTUAL_METHOD > > #undef THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE > #undef CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE > #undef STDCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE > > #define THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > #define CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > #define STDCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > #define COMPLEX_OBJS_PASSED_BY_REF > #undef COMPLEX_MASK > #define COMPLEX_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > #undef COMPLEX_RETURN_MASK > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > > // iOS uses soft-float ABI > #define AS_SOFTFP > > // STDCALL is not available on ARM > #undef STDCALL > #define STDCALL > > #elif (defined(__arm64__)) ># 732 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // The IPhone 5S+ uses an ARM64 processor > > // AngelScript currently doesn't support native calling > // for 64bit ARM processors so it's necessary to turn on > // portability mode > #define AS_MAX_PORTABILITY > > // STDCALL is not available on ARM > #undef STDCALL > #define STDCALL > > #elif (defined(i386) || defined(__i386) || defined(__i386__)) && !defined(__LP64__) ># 744 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // Support native calling conventions on Mac OS X + Intel 32bit CPU > #define AS_X86 > #undef AS_NO_THISCALL_FUNCTOR_METHOD > #define THISCALL_PASS_OBJECT_POINTER_ON_THE_STACK > #undef COMPLEX_MASK > #define COMPLEX_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > #undef COMPLEX_RETURN_MASK > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > > #elif defined(__LP64__) && !defined(__ppc__) && !defined(__PPC__) && !defined(__arm64__) ># 754 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // http://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/LowLevelABI/140-x86-64_Function_Calling_Conventions/x86_64.html#//apple_ref/doc/uid/TP40005035-SW1 > #define AS_X64_GCC > #undef AS_NO_THISCALL_FUNCTOR_METHOD > #define HAS_128_BIT_PRIMITIVES > #define SPLIT_OBJS_BY_MEMBER_TYPES > #undef COMPLEX_MASK > #define COMPLEX_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > #undef COMPLEX_RETURN_MASK > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > #define AS_LARGE_OBJS_PASSED_BY_REF > #define AS_LARGE_OBJ_MIN_SIZE 5 > // STDCALL is not available on 64bit Mac > #undef STDCALL > #define STDCALL > > #elif (defined(__ppc__) || defined(__PPC__)) && !defined(__LP64__) ># 770 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // Support native calling conventions on Mac OS X + PPC 32bit CPU > #define AS_PPC > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > #define CDECL_RETURN_SIMPLE_IN_MEMORY > #define STDCALL_RETURN_SIMPLE_IN_MEMORY > #undef COMPLEX_MASK > #define COMPLEX_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > #undef COMPLEX_RETURN_MASK > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > > #elif (defined(__ppc__) || defined(__PPC__)) && defined(__LP64__) ># 781 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_PPC_64 > #else ># 783 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // Unknown CPU type > #define AS_MAX_PORTABILITY > #endif ># 786 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_POSIX_THREADS > > // Windows > #elif defined(WIN32) || defined(_WIN32) || defined(_WIN64) || defined(__CYGWIN__) ># 790 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // On Windows the simple classes are returned in the EAX:EDX registers > //#define THISCALL_RETURN_SIMPLE_IN_MEMORY > //#define CDECL_RETURN_SIMPLE_IN_MEMORY > //#define STDCALL_RETURN_SIMPLE_IN_MEMORY > > #undef COMPLEX_MASK > #define COMPLEX_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > #undef COMPLEX_RETURN_MASK > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > > #if (defined(i386) || defined(__i386) || defined(__i386__)) && !defined(__LP64__) > // Support native calling conventions on Intel 32bit CPU > #define AS_X86 > #undef AS_NO_THISCALL_FUNCTOR_METHOD > > // As of version 4.7 MinGW changed the ABI, presumably > // to be better aligned with how MSVC works > #if (__GNUC__ == 4 && __GNUC_MINOR__ >= 7) || __GNUC__ > 4 > #define AS_MINGW47 > #endif ># 810 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #if (__clang_major__ == 3 && __clang_minor__ > 4) || __clang_major > 3 > #define AS_MINGW47 > #endif ># 814 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #ifdef AS_MINGW47 > #undef CALLEE_POPS_HIDDEN_RETURN_POINTER > #define THISCALL_CALLEE_POPS_ARGUMENTS > #else ># 819 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // Earlier versions than 4.7 > #define THISCALL_PASS_OBJECT_POINTER_ON_THE_STACK > #endif ># 822 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #elif defined(__x86_64__) ># 824 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_X64_MINGW > #undef AS_NO_THISCALL_FUNCTOR_METHOD > #define AS_LARGE_OBJS_PASSED_BY_REF > #define AS_LARGE_OBJ_MIN_SIZE 3 > #define COMPLEX_OBJS_PASSED_BY_REF > #else ># 830 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_MAX_PORTABILITY > #endif ># 832 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_WIN > #define AS_WINDOWS_THREADS > > // Linux > #elif defined(__linux__) && !defined(ANDROID) && !defined(__ANDROID__) ># 837 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #undef COMPLEX_MASK > #define COMPLEX_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > #undef COMPLEX_RETURN_MASK > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > > #if (defined(i386) || defined(__i386) || defined(__i386__)) && !defined(__LP64__) > // x86 32bit > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > #define CDECL_RETURN_SIMPLE_IN_MEMORY > #define STDCALL_RETURN_SIMPLE_IN_MEMORY > > // Support native calling conventions on Intel 32bit CPU > #define THISCALL_PASS_OBJECT_POINTER_ON_THE_STACK > #define AS_X86 > #undef AS_NO_THISCALL_FUNCTOR_METHOD > #elif defined(__x86_64__) ># 854 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // x86 64bit > #define AS_X64_GCC > #undef AS_NO_THISCALL_FUNCTOR_METHOD > #define HAS_128_BIT_PRIMITIVES > #define SPLIT_OBJS_BY_MEMBER_TYPES > #define AS_LARGE_OBJS_PASSED_BY_REF > #define AS_LARGE_OBJ_MIN_SIZE 5 > // STDCALL is not available on 64bit Linux > #undef STDCALL > #define STDCALL > #elif defined(__ARMEL__) || defined(__arm__) || defined(__aarch64__) || defined(__AARCH64EL__) ># 865 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // arm > > // The assembler code currently doesn't support arm v4, nor 64bit (v8) > #if !defined(__ARM_ARCH_4__) && !defined(__ARM_ARCH_4T__) && !defined(__LP64__) > #define AS_ARM > > // TODO: The stack unwind on exceptions currently fails due to the assembler code in as_callfunc_arm_gcc.S > #define AS_NO_EXCEPTIONS > > #undef STDCALL > #define STDCALL > > #define CDECL_RETURN_SIMPLE_IN_MEMORY > #define STDCALL_RETURN_SIMPLE_IN_MEMORY > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > > #undef THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE > #undef CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE > #undef STDCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE > > #define THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > #define CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > #define STDCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > > #ifndef AS_MAX_PORTABILITY > // Make a few checks against incompatible ABI combinations > #if defined(__FAST_MATH__) && __FAST_MATH__ == 1 > #error -ffast-math is not supported with native calling conventions > #endif ># 894 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #endif ># 895 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > // Verify if soft-float or hard-float ABI is used > #if defined(__SOFTFP__) && __SOFTFP__ == 1 > // -ffloat-abi=softfp or -ffloat-abi=soft > #define AS_SOFTFP > #endif ># 901 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > // Tested with both hard float and soft float abi > #undef AS_NO_THISCALL_FUNCTOR_METHOD > #endif ># 905 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #elif defined(__mips__) ># 907 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // mips > #define AS_MIPS > #undef STDCALL > #define STDCALL > > #ifdef _ABIO32 > // 32bit O32 ABI > #define AS_MIPS > > // All structures are returned in memory regardless of size or complexity > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > #define THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 0 > #define CDECL_RETURN_SIMPLE_IN_MEMORY > #define CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 0 > #define STDCALL_RETURN_SIMPLE_IN_MEMORY > #define CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 0 > #undef AS_NO_THISCALL_FUNCTOR_METHOD > #else ># 925 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // For other ABIs the native calling convention is not available (yet) > #define AS_MAX_PORTABILITY > #endif ># 928 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #elif defined(__PPC64__) ># 929 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // PPC 64bit > > // The code in as_callfunc_ppc_64.cpp was built for PS3 and XBox 360, that > // although use 64bit PPC only uses 32bit pointers. > // TODO: Add support for native calling conventions on Linux with PPC 64bit > #define AS_MAX_PORTABILITY > #else ># 936 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_MAX_PORTABILITY > #endif ># 938 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_LINUX > #define AS_POSIX_THREADS > > #if !( ( (__GNUC__ == 4) && (__GNUC_MINOR__ >= 1) || __GNUC__ > 4) ) > // Only with GCC 4.1 was the atomic instructions available > #define AS_NO_ATOMIC > #endif ># 945 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > // Free BSD > #elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(__OpenBSD__) ># 948 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_BSD > #if (defined(i386) || defined(__i386) || defined(__i386__)) && !defined(__LP64__) > #undef COMPLEX_MASK > #define COMPLEX_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > #undef COMPLEX_RETURN_MASK > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > #define THISCALL_PASS_OBJECT_POINTER_ON_THE_STACK > #define AS_X86 > #elif defined(__LP64__) ># 957 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_X64_GCC > #define HAS_128_BIT_PRIMITIVES > #define SPLIT_OBJS_BY_MEMBER_TYPES > #undef COMPLEX_MASK > #define COMPLEX_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > #undef COMPLEX_RETURN_MASK > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > #define AS_LARGE_OBJS_PASSED_BY_REF > #define AS_LARGE_OBJ_MIN_SIZE 5 > #undef STDCALL > #define STDCALL > #else ># 969 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_MAX_PORTABILITY > #endif ># 971 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_POSIX_THREADS > #if !( ( (__GNUC__ == 4) && (__GNUC_MINOR__ >= 1) || __GNUC__ > 4) ) > // Only with GCC 4.1 was the atomic instructions available > #define AS_NO_ATOMIC > #endif ># 976 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > // PSP and PS2 > #elif defined(__PSP__) || defined(__psp__) || defined(_EE_) || defined(_PSP) || defined(_PS2) ># 979 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // Support native calling conventions on MIPS architecture > #if (defined(_MIPS_ARCH) || defined(_mips) || defined(__MIPSEL__)) && !defined(__LP64__) > #define AS_MIPS > #define AS_USE_DOUBLE_AS_FLOAT > #else ># 984 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_MAX_PORTABILITY > #endif ># 986 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > // PS3 > #elif (defined(__PPC__) || defined(__ppc__)) && defined(__PPU__) ># 989 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // Support native calling conventions on PS3 > #define AS_PS3 > #define AS_PPC_64 > #define SPLIT_OBJS_BY_MEMBER_TYPES > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > #define CDECL_RETURN_SIMPLE_IN_MEMORY > #define STDCALL_RETURN_SIMPLE_IN_MEMORY > // PS3 doesn't have STDCALL > #undef STDCALL > #define STDCALL > > // Dreamcast > #elif __SH4_SINGLE_ONLY__ ># 1002 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // Support native calling conventions on Dreamcast > #define AS_DC > #define AS_SH4 > > // Wii JWC - Close to PS3 just no PPC_64 and AS_PS3 > #elif defined(EPPC) ># 1008 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_WII > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > #define CDECL_RETURN_SIMPLE_IN_MEMORY > #define STDCALL_RETURN_SIMPLE_IN_MEMORY > #undef STDCALL > #define STDCALL > > // Android > #elif defined(ANDROID) || defined(__ANDROID__) ># 1017 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_ANDROID > > // Android 2.3+ supports posix threads > #define AS_POSIX_THREADS > > // Common configuration with Android arm and x86 > #define CDECL_RETURN_SIMPLE_IN_MEMORY > #define STDCALL_RETURN_SIMPLE_IN_MEMORY > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > > #undef COMPLEX_MASK > #define COMPLEX_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > #undef COMPLEX_RETURN_MASK > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > > #if (defined(_ARM_) || defined(__arm__)) > // Android ARM > > // TODO: The stack unwind on exceptions currently fails due to the assembler code in as_callfunc_arm_gcc.S > #define AS_NO_EXCEPTIONS > > #undef THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE > #undef CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE > #undef STDCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE > > #define THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > #define CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > #define STDCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > > // The stdcall calling convention is not used on the arm cpu > #undef STDCALL > #define STDCALL > > #undef GNU_STYLE_VIRTUAL_METHOD > > #define AS_ARM > #undef AS_NO_THISCALL_FUNCTOR_METHOD > #define AS_SOFTFP > #define AS_CALLEE_DESTROY_OBJ_BY_VAL > #elif (defined(i386) || defined(__i386) || defined(__i386__)) && !defined(__LP64__) ># 1057 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // Android Intel x86 (same config as Linux x86). Tested with Intel x86 Atom System Image. > > // Support native calling conventions on Intel 32bit CPU > #define THISCALL_PASS_OBJECT_POINTER_ON_THE_STACK > #define AS_X86 > #undef AS_NO_THISCALL_FUNCTOR_METHOD > #elif defined(__mips__) ># 1064 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_MIPS > #undef STDCALL > #define STDCALL > > #ifdef _ABIO32 > #define AS_MIPS > > // All structures are returned in memory regardless of size or complexity > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > #define THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 0 > #define CDECL_RETURN_SIMPLE_IN_MEMORY > #define CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 0 > #define STDCALL_RETURN_SIMPLE_IN_MEMORY > #define CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 0 > #undef AS_NO_THISCALL_FUNCTOR_METHOD > #else ># 1080 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // For other ABIs the native calling convention is not available (yet) > #define AS_MAX_PORTABILITY > #endif ># 1083 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #endif ># 1084 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > // Haiku OS > #elif __HAIKU__ ># 1087 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_HAIKU > // Only x86-32 is currently supported by Haiku, but they do plan to support > // x86-64 and PowerPC in the future, so should go ahead and check the platform > // for future compatibility > #if (defined(i386) || defined(__i386) || defined(__i386__)) && !defined(__LP64__) > #define AS_X86 > #define THISCALL_PASS_OBJECT_POINTER_ON_THE_STACK > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > #define CDECL_RETURN_SIMPLE_IN_MEMORY > #define STDCALL_RETURN_SIMPLE_IN_MEMORY > #else ># 1098 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_MAX_PORTABILITY > #endif ># 1100 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #define AS_POSIX_THREADS > #if !( ( (__GNUC__ == 4) && (__GNUC_MINOR__ >= 1) || __GNUC__ > 4) ) > // Only with GCC 4.1 was the atomic instructions available > #define AS_NO_ATOMIC > #endif ># 1106 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > // Illumos > #elif defined(__sun) ># 1109 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #if (defined(i386) || defined(__i386) || defined(__i386__)) && !defined(__LP64__) > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > #define CDECL_RETURN_SIMPLE_IN_MEMORY > #define STDCALL_RETURN_SIMPLE_IN_MEMORY > > // Support native calling conventions on Intel 32bit CPU > #define THISCALL_PASS_OBJECT_POINTER_ON_THE_STACK > #define AS_X86 > #elif defined(__x86_64__) ># 1118 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_X64_GCC > #define HAS_128_BIT_PRIMITIVES > #define SPLIT_OBJS_BY_MEMBER_TYPES > // STDCALL is not available on 64bit Linux > #undef STDCALL > #define STDCALL > #else ># 1125 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_MAX_PORTABILITY > #endif ># 1127 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_ILLUMOS > #define AS_POSIX_THREADS > > #if !( ( (__GNUC__ == 4) && (__GNUC_MINOR__ >= 1) || __GNUC__ > 4) ) > // Only with GCC 4.1 was the atomic instructions available > #define AS_NO_ATOMIC > #endif ># 1134 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #endif ># 1135 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #define UNREACHABLE_RETURN >#endif ># 1138 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > >// Sun CC >// Initial information provided by Andrey Bergman >#if defined(__SUNPRO_CC) > #if defined(__sparc) > #define AS_SPARC > #endif ># 1145 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #if defined(__sun) > #define AS_SUN > #endif ># 1149 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > // Native calling conventions is not yet supported for Sun CC > #if !defined(AS_MAX_PORTABILITY) > #define AS_MAX_PORTABILITY > #endif ># 1154 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > // I presume Sun CC uses a similar structure of method pointers as gnuc > #define MULTI_BASE_OFFSET(x) (*((asPWORD*)(&x)+1)) > > #if !defined(AS_SIZEOF_BOOL) > #define AS_SIZEOF_BOOL 1 // sizeof(bool) == 1 > #endif ># 1161 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #if !defined(UNREACHABLE_RETURN) > #define UNREACHABLE_RETURN > #endif ># 1164 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #if !defined(STDCALL) > #define STDCALL // There is no stdcall on Solaris/SunPro/SPARC > #endif ># 1167 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #if !defined(asVSNPRINTF) > #define asVSNPRINTF(a, b, c, d) vsnprintf(a, b, c, d) > #endif ># 1170 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" >#endif ># 1171 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > >// >// Detect target hardware >//------------------------------------------------ > >// Big endian CPU target? >// see: http://sourceforge.net/p/predef/wiki/Endianness/ >#if !defined(AS_BIG_ENDIAN) && \ > defined(__BYTE_ORDER) && __BYTE_ORDER == __BIG_ENDIAN || \ > defined(__BIG_ENDIAN__) || \ > defined(__ARMEB__) || \ > defined(__THUMBEB__) || \ > defined(__AARCH64EB__) || \ > defined(_MIBSEB) || defined(__MIBSEB) || defined(__MIBSEB__) > #define AS_BIG_ENDIAN >#endif ># 1188 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > >// Dreamcast and Gamecube use only 32bit floats, so treat doubles as floats >#if defined(__SH4_SINGLE_ONLY__) || defined(_GC) > #define AS_USE_DOUBLE_AS_FLOAT // use 32bit floats instead of doubles >#endif ># 1193 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > >// If there are no current support for native calling >// conventions, then compile with AS_MAX_PORTABILITY >#if (!defined(AS_X86) && !defined(AS_SH4) && !defined(AS_MIPS) && !defined(AS_PPC) && !defined(AS_PPC_64) && !defined(AS_XENON) && !defined(AS_X64_GCC) && !defined(AS_X64_MSVC) && !defined(AS_ARM) && !defined(AS_X64_MINGW)) > #ifndef AS_MAX_PORTABILITY > #define AS_MAX_PORTABILITY > #endif ># 1200 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" >#endif ># 1201 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > >// If the platform doesn't support atomic instructions we can't allow >// multithreading as the reference counters won't be threadsafe >#if defined(AS_NO_ATOMIC) && !defined(AS_NO_THREADS) > #define AS_NO_THREADS >#endif ># 1207 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > >// If the form of threads to use hasn't been chosen >// then the library will be compiled without support >// for multithreading >#if !defined(AS_POSIX_THREADS) && !defined(AS_WINDOWS_THREADS) > #define AS_NO_THREADS >#endif ># 1214 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > >// The assert macro >#if defined(ANDROID) > #if defined(AS_DEBUG) > #if 0 /* expanded by -frewrite-includes */ >#include <android/log.h> >#endif /* expanded by -frewrite-includes */ ># 1219 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" ># 1220 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #if 0 /* expanded by -frewrite-includes */ >#include <stdlib.h> >#endif /* expanded by -frewrite-includes */ ># 1220 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" ># 1221 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define asASSERT(x) \ > do { \ > if (!(x)) { \ > __android_log_print(ANDROID_LOG_ERROR, "AngelScript", "Assert failed at %s:%d - %s", __FILE__, __LINE__, #x); \ > exit(1); \ > } \ > } while (0) > #else ># 1229 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define asASSERT(x) > #endif ># 1231 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" >#else ># 1232 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #if 0 /* expanded by -frewrite-includes */ >#include <assert.h> >#endif /* expanded by -frewrite-includes */ ># 1232 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" ># 1233 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define asASSERT(x) assert(x) >#endif ># 1235 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > > >// >// Internal defines (do not change these) >//---------------------------------------------------------------- > >#define ARG_W(b) ((asWORD*)&b) >#define ARG_DW(b) ((asDWORD*)&b) >#define ARG_QW(b) ((asQWORD*)&b) >#define ARG_PTR(b) ((asPWORD*)&b) >#define BCARG_W(b) ((asWORD*)&(b)[1]) >#define BCARG_DW(b) ((asDWORD*)&(b)[1]) >#define BCARG_QW(b) ((asQWORD*)&(b)[1]) >#define BCARG_PTR(b) ((asPWORD*)&(b)[1]) > >// This macro is used to avoid warnings about unused variables. >// Usually where the variables are only used in debug mode. >#define UNUSED_VAR(x) (void)(x) > >#if 0 /* expanded by -frewrite-includes */ >#include "../include/angelscript.h" >#endif /* expanded by -frewrite-includes */ ># 1255 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" ># 1256 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" >#if 0 /* expanded by -frewrite-includes */ >#include "as_memory.h" >#endif /* expanded by -frewrite-includes */ ># 1256 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" ># 1257 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > >#ifdef AS_USE_NAMESPACE >using namespace AngelScript; >#endif ># 1261 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > >#endif ># 1263 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" ># 45 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_memory.h" 2 > >BEGIN_AS_NAMESPACE > >extern asALLOCFUNC_t userAlloc; >extern asFREEFUNC_t userFree; > >#ifdef WIP_16BYTE_ALIGN > >// TODO: This declaration should be in angelscript.h >// when the application can register it's own >// aligned memory routines >typedef void *(*asALLOCALIGNEDFUNC_t)(size_t, size_t); >typedef void (*asFREEALIGNEDFUNC_t)(void *); >extern asALLOCALIGNEDFUNC_t userAllocAligned; >extern asFREEALIGNEDFUNC_t userFreeAligned; >typedef void *(*asALLOCALIGNEDFUNCDEBUG_t)(size_t, size_t, const char *, unsigned int); > >// The maximum type alignment supported. >const int MAX_TYPE_ALIGNMENT = 16; > >// Utility function used for assertions. >bool isAligned(const void* const pointer, asUINT alignment); > >#endif // WIP_16BYTE_ALIGN ># 69 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_memory.h" > >// We don't overload the new operator as that would affect the application as well > >#ifndef AS_DEBUG > > #define asNEW(x) new(userAlloc(sizeof(x))) x > #define asDELETE(ptr,x) {void *tmp = ptr; (ptr)->~x(); userFree(tmp);} > > #define asNEWARRAY(x,cnt) (x*)userAlloc(sizeof(x)*cnt) > #define asDELETEARRAY(ptr) userFree(ptr) > >#ifdef WIP_16BYTE_ALIGN > #define asNEWARRAYALIGNED(x,cnt, alignment) (x*)userAllocAligned(sizeof(x)*cnt, alignment) > #define asDELETEARRAYALIGNED(ptr) userFreeAligned(ptr) >#endif ># 84 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_memory.h" > >#else ># 86 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_memory.h" > > typedef void *(*asALLOCFUNCDEBUG_t)(size_t, const char *, unsigned int); > > #define asNEW(x) new(((asALLOCFUNCDEBUG_t)(userAlloc))(sizeof(x), __FILE__, __LINE__)) x > #define asDELETE(ptr,x) {void *tmp = ptr; (ptr)->~x(); userFree(tmp);} > > #define asNEWARRAY(x,cnt) (x*)((asALLOCFUNCDEBUG_t)(userAlloc))(sizeof(x)*cnt, __FILE__, __LINE__) > #define asDELETEARRAY(ptr) userFree(ptr) > >#ifdef WIP_16BYTE_ALIGN > //TODO: Equivalent of debug allocation function with alignment? > #define asNEWARRAYALIGNED(x,cnt, alignment) (x*)userAllocAligned(sizeof(x)*cnt, alignment) > #define asDELETEARRAYALIGNED(ptr) userFreeAligned(ptr) >#endif ># 100 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_memory.h" > >#endif ># 102 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_memory.h" > >END_AS_NAMESPACE > >#if 0 /* expanded by -frewrite-includes */ >#include <new> >#endif /* expanded by -frewrite-includes */ ># 105 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_memory.h" ># 1 "/usr/include/c++/v1/new" 1 3 >// -*- C++ -*- >//===----------------------------- new ------------------------------------===// >// >// The LLVM Compiler Infrastructure >// >// This file is dual licensed under the MIT and the University of Illinois Open >// Source Licenses. See LICENSE.TXT for details. >// >//===----------------------------------------------------------------------===// > >#ifndef _LIBCPP_NEW >#define _LIBCPP_NEW > >/* > new synopsis > >namespace std >{ > >class bad_alloc > : public exception >{ >public: > bad_alloc() noexcept; > bad_alloc(const bad_alloc&) noexcept; > bad_alloc& operator=(const bad_alloc&) noexcept; > virtual const char* what() const noexcept; >}; > >class bad_array_length : public bad_alloc // FIXME: Not part of C++ >{ >public: > bad_array_length() noexcept; >}; > >class bad_array_new_length : public bad_alloc // C++14 >{ >public: > bad_array_new_length() noexcept; >}; > >enum class align_val_t : size_t {}; // C++17 >struct nothrow_t {}; >extern const nothrow_t nothrow; >typedef void (*new_handler)(); >new_handler set_new_handler(new_handler new_p) noexcept; >new_handler get_new_handler() noexcept; > >} // std > >void* operator new(std::size_t size); // replaceable >void* operator new(std::size_t size, std::align_val_t alignment); // replaceable, C++17 >void* operator new(std::size_t size, const std::nothrow_t&) noexcept; // replaceable >void* operator new(std::size_t size, std::align_val_t alignment, > const std::nothrow_t&) noexcept; // replaceable, C++17 >void operator delete(void* ptr) noexcept; // replaceable >void operator delete(void* ptr, std::size_t size) noexcept; // replaceable, C++14 >void operator delete(void* ptr, std::align_val_t alignment) noexcept; // replaceable, C++17 >void operator delete(void* ptr, std::size_t size, > std::align_val_t alignment) noexcept; // replaceable, C++17 >void operator delete(void* ptr, const std::nothrow_t&) noexcept; // replaceable >void operator delete(void* ptr, std:align_val_t alignment, > const std::nothrow_t&) noexcept; // replaceable, C++17 > >void* operator new[](std::size_t size); // replaceable >void* operator new[](std::size_t size, > std::align_val_t alignment) noexcept; // replaceable, C++17 >void* operator new[](std::size_t size, const std::nothrow_t&) noexcept; // replaceable >void* operator new[](std::size_t size, std::align_val_t alignment, > const std::nothrow_t&) noexcept; // replaceable, C++17 >void operator delete[](void* ptr) noexcept; // replaceable >void operator delete[](void* ptr, std::size_t size) noexcept; // replaceable, C++14 >void operator delete[](void* ptr, > std::align_val_t alignment) noexcept; // replaceable, C++17 >void operator delete[](void* ptr, std::size_t size, > std::align_val_t alignment) noexcept; // replaceable, C++17 >void operator delete[](void* ptr, const std::nothrow_t&) noexcept; // replaceable >void operator delete[](void* ptr, std::align_val_t alignment, > const std::nothrow_t&) noexcept; // replaceable, C++17 > >void* operator new (std::size_t size, void* ptr) noexcept; >void* operator new[](std::size_t size, void* ptr) noexcept; >void operator delete (void* ptr, void*) noexcept; >void operator delete[](void* ptr, void*) noexcept; > >*/ > >#if 0 /* expanded by -frewrite-includes */ >#include <__config> >#endif /* expanded by -frewrite-includes */ ># 88 "/usr/include/c++/v1/new" 3 ># 89 "/usr/include/c++/v1/new" 3 >#if 0 /* expanded by -frewrite-includes */ >#include <exception> >#endif /* expanded by -frewrite-includes */ ># 89 "/usr/include/c++/v1/new" 3 ># 1 "/usr/include/c++/v1/exception" 1 3 >// -*- C++ -*- >//===-------------------------- exception ---------------------------------===// >// >// The LLVM Compiler Infrastructure >// >// This file is dual licensed under the MIT and the University of Illinois Open >// Source Licenses. See LICENSE.TXT for details. >// >//===----------------------------------------------------------------------===// > >#ifndef _LIBCPP_EXCEPTION >#define _LIBCPP_EXCEPTION > >/* > exception synopsis > >namespace std >{ > >class exception >{ >public: > exception() noexcept; > exception(const exception&) noexcept; > exception& operator=(const exception&) noexcept; > virtual ~exception() noexcept; > virtual const char* what() const noexcept; >}; > >class bad_exception > : public exception >{ >public: > bad_exception() noexcept; > bad_exception(const bad_exception&) noexcept; > bad_exception& operator=(const bad_exception&) noexcept; > virtual ~bad_exception() noexcept; > virtual const char* what() const noexcept; >}; > >typedef void (*unexpected_handler)(); >unexpected_handler set_unexpected(unexpected_handler f ) noexcept; >unexpected_handler get_unexpected() noexcept; >[[noreturn]] void unexpected(); > >typedef void (*terminate_handler)(); >terminate_handler set_terminate(terminate_handler f ) noexcept; >terminate_handler get_terminate() noexcept; >[[noreturn]] void terminate() noexcept; > >bool uncaught_exception() noexcept; >int uncaught_exceptions() noexcept; // C++17 > >typedef unspecified exception_ptr; > >exception_ptr current_exception() noexcept; >void rethrow_exception [[noreturn]] (exception_ptr p); >template<class E> exception_ptr make_exception_ptr(E e) noexcept; > >class nested_exception >{ >public: > nested_exception() noexcept; > nested_exception(const nested_exception&) noexcept = default; > nested_exception& operator=(const nested_exception&) noexcept = default; > virtual ~nested_exception() = default; > > // access functions > [[noreturn]] void rethrow_nested() const; > exception_ptr nested_ptr() const noexcept; >}; > >template <class T> [[noreturn]] void throw_with_nested(T&& t); >template <class E> void rethrow_if_nested(const E& e); > >} // std > >*/ > >#if 0 /* expanded by -frewrite-includes */ >#include <__config> >#endif /* expanded by -frewrite-includes */ ># 80 "/usr/include/c++/v1/exception" 3 ># 81 "/usr/include/c++/v1/exception" 3 >#if 0 /* expanded by -frewrite-includes */ >#include <cstddef> >#endif /* expanded by -frewrite-includes */ ># 81 "/usr/include/c++/v1/exception" 3 ># 82 "/usr/include/c++/v1/exception" 3 >#if 0 /* expanded by -frewrite-includes */ >#include <cstdlib> >#endif /* expanded by -frewrite-includes */ ># 82 "/usr/include/c++/v1/exception" 3 ># 1 "/usr/include/c++/v1/cstdlib" 1 3 >// -*- C++ -*- >//===--------------------------- cstdlib ----------------------------------===// >// >// The LLVM Compiler Infrastructure >// >// This file is dual licensed under the MIT and the University of Illinois Open >// Source Licenses. See LICENSE.TXT for details. >// >//===----------------------------------------------------------------------===// > >#ifndef _LIBCPP_CSTDLIB >#define _LIBCPP_CSTDLIB > >/* > cstdlib synopsis > >Macros: > > EXIT_FAILURE > EXIT_SUCCESS > MB_CUR_MAX > NULL > RAND_MAX > >namespace std >{ > >Types: > > size_t > div_t > ldiv_t > lldiv_t // C99 > >double atof (const char* nptr); >int atoi (const char* nptr); >long atol (const char* nptr); >long long atoll(const char* nptr); // C99 >double strtod (const char* restrict nptr, char** restrict endptr); >float strtof (const char* restrict nptr, char** restrict endptr); // C99 >long double strtold (const char* restrict nptr, char** restrict endptr); // C99 >long strtol (const char* restrict nptr, char** restrict endptr, int base); >long long strtoll (const char* restrict nptr, char** restrict endptr, int base); // C99 >unsigned long strtoul (const char* restrict nptr, char** restrict endptr, int base); >unsigned long long strtoull(const char* restrict nptr, char** restrict endptr, int base); // C99 >int rand(void); >void srand(unsigned int seed); >void* calloc(size_t nmemb, size_t size); >void free(void* ptr); >void* malloc(size_t size); >void* realloc(void* ptr, size_t size); >void abort(void); >int atexit(void (*func)(void)); >void exit(int status); >void _Exit(int status); >char* getenv(const char* name); >int system(const char* string); >void* bsearch(const void* key, const void* base, size_t nmemb, size_t size, > int (*compar)(const void *, const void *)); >void qsort(void* base, size_t nmemb, size_t size, > int (*compar)(const void *, const void *)); >int abs( int j); >long abs( long j); >long long abs(long long j); // C++0X >long labs( long j); >long long llabs(long long j); // C99 >div_t div( int numer, int denom); >ldiv_t div( long numer, long denom); >lldiv_t div(long long numer, long long denom); // C++0X >ldiv_t ldiv( long numer, long denom); >lldiv_t lldiv(long long numer, long long denom); // C99 >int mblen(const char* s, size_t n); >int mbtowc(wchar_t* restrict pwc, const char* restrict s, size_t n); >int wctomb(char* s, wchar_t wchar); >size_t mbstowcs(wchar_t* restrict pwcs, const char* restrict s, size_t n); >size_t wcstombs(char* restrict s, const wchar_t* restrict pwcs, size_t n); >int at_quick_exit(void (*func)(void)) // C++11 >void quick_exit(int status); // C++11 >void *aligned_alloc(size_t alignment, size_t size); // C11 > >} // std > >*/ > >#if 0 /* expanded by -frewrite-includes */ >#include <__config> >#endif /* expanded by -frewrite-includes */ ># 85 "/usr/include/c++/v1/cstdlib" 3 ># 86 "/usr/include/c++/v1/cstdlib" 3 >#if 0 /* expanded by -frewrite-includes */ >#include <stdlib.h> >#endif /* expanded by -frewrite-includes */ ># 86 "/usr/include/c++/v1/cstdlib" 3 ># 1 "/usr/include/c++/v1/stdlib.h" 1 3 >// -*- C++ -*- >//===--------------------------- stdlib.h ---------------------------------===// >// >// The LLVM Compiler Infrastructure >// >// This file is dual licensed under the MIT and the University of Illinois Open >// Source Licenses. See LICENSE.TXT for details. >// >//===----------------------------------------------------------------------===// > >#if defined(__need_malloc_and_calloc) > >#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) >#if 0 /* expanded by -frewrite-includes */ >#pragma GCC system_header >#endif /* expanded by -frewrite-includes */ ># 15 "/usr/include/c++/v1/stdlib.h" 3 >#endif ># 16 "/usr/include/c++/v1/stdlib.h" 3 > >#if 0 /* expanded by -frewrite-includes */ >#include_next <stdlib.h> >#endif /* expanded by -frewrite-includes */ ># 17 "/usr/include/c++/v1/stdlib.h" 3 ># 18 "/usr/include/c++/v1/stdlib.h" 3 > >#elif !defined(_LIBCPP_STDLIB_H) ># 20 "/usr/include/c++/v1/stdlib.h" 3 >#define _LIBCPP_STDLIB_H > >/* > stdlib.h synopsis > >Macros: > > EXIT_FAILURE > EXIT_SUCCESS > MB_CUR_MAX > NULL > RAND_MAX > >Types: > > size_t > div_t > ldiv_t > lldiv_t // C99 > >double atof (const char* nptr); >int atoi (const char* nptr); >long atol (const char* nptr); >long long atoll(const char* nptr); // C99 >double strtod (const char* restrict nptr, char** restrict endptr); >float strtof (const char* restrict nptr, char** restrict endptr); // C99 >long double strtold (const char* restrict nptr, char** restrict endptr); // C99 >long strtol (const char* restrict nptr, char** restrict endptr, int base); >long long strtoll (const char* restrict nptr, char** restrict endptr, int base); // C99 >unsigned long strtoul (const char* restrict nptr, char** restrict endptr, int base); >unsigned long long strtoull(const char* restrict nptr, char** restrict endptr, int base); // C99 >int rand(void); >void srand(unsigned int seed); >void* calloc(size_t nmemb, size_t size); >void free(void* ptr); >void* malloc(size_t size); >void* realloc(void* ptr, size_t size); >void abort(void); >int atexit(void (*func)(void)); >void exit(int status); >void _Exit(int status); >char* getenv(const char* name); >int system(const char* string); >void* bsearch(const void* key, const void* base, size_t nmemb, size_t size, > int (*compar)(const void *, const void *)); >void qsort(void* base, size_t nmemb, size_t size, > int (*compar)(const void *, const void *)); >int abs( int j); >long abs( long j); >long long abs(long long j); // C++0X >long labs( long j); >long long llabs(long long j); // C99 >div_t div( int numer, int denom); >ldiv_t div( long numer, long denom); >lldiv_t div(long long numer, long long denom); // C++0X >ldiv_t ldiv( long numer, long denom); >lldiv_t lldiv(long long numer, long long denom); // C99 >int mblen(const char* s, size_t n); >int mbtowc(wchar_t* restrict pwc, const char* restrict s, size_t n); >int wctomb(char* s, wchar_t wchar); >size_t mbstowcs(wchar_t* restrict pwcs, const char* restrict s, size_t n); >size_t wcstombs(char* restrict s, const wchar_t* restrict pwcs, size_t n); >int at_quick_exit(void (*func)(void)) // C++11 >void quick_exit(int status); // C++11 >void *aligned_alloc(size_t alignment, size_t size); // C11 > >*/ > >#if 0 /* expanded by -frewrite-includes */ >#include <__config> >#endif /* expanded by -frewrite-includes */ ># 88 "/usr/include/c++/v1/stdlib.h" 3 ># 89 "/usr/include/c++/v1/stdlib.h" 3 > >#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) >#if 0 /* expanded by -frewrite-includes */ >#pragma GCC system_header >#endif /* expanded by -frewrite-includes */ ># 92 "/usr/include/c++/v1/stdlib.h" 3 >#endif ># 93 "/usr/include/c++/v1/stdlib.h" 3 > >#if 0 /* expanded by -frewrite-includes */ >#include_next <stdlib.h> >#endif /* expanded by -frewrite-includes */ ># 94 "/usr/include/c++/v1/stdlib.h" 3 ># 1 "/usr/include/stdlib.h" 1 3 4 >/*- > * Copyright (c) 1990, 1993 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)stdlib.h 8.5 (Berkeley) 5/19/95 > * $FreeBSD: head/include/stdlib.h 316213 2017-03-30 04:57:26Z kib $ > */ > >#ifndef _STDLIB_H_ >#define _STDLIB_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 36 "/usr/include/stdlib.h" 3 4 ># 37 "/usr/include/stdlib.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_null.h> >#endif /* expanded by -frewrite-includes */ ># 37 "/usr/include/stdlib.h" 3 4 ># 38 "/usr/include/stdlib.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 38 "/usr/include/stdlib.h" 3 4 ># 39 "/usr/include/stdlib.h" 3 4 > >__NULLABILITY_PRAGMA_PUSH > >#if __BSD_VISIBLE >#ifndef _RUNE_T_DECLARED >typedef __rune_t rune_t; >#define _RUNE_T_DECLARED >#endif ># 47 "/usr/include/stdlib.h" 3 4 >#endif ># 48 "/usr/include/stdlib.h" 3 4 > >#ifndef _SIZE_T_DECLARED >typedef __size_t size_t; >#define _SIZE_T_DECLARED >#endif ># 53 "/usr/include/stdlib.h" 3 4 > >#ifndef __cplusplus >#ifndef _WCHAR_T_DECLARED >typedef ___wchar_t wchar_t; >#define _WCHAR_T_DECLARED >#endif ># 59 "/usr/include/stdlib.h" 3 4 >#endif ># 60 "/usr/include/stdlib.h" 3 4 > >typedef struct { > int quot; /* quotient */ > int rem; /* remainder */ >} div_t; > >typedef struct { > long quot; > long rem; >} ldiv_t; > >#define EXIT_FAILURE 1 >#define EXIT_SUCCESS 0 > >#define RAND_MAX 0x7ffffffd > >__BEGIN_DECLS >#ifdef _XLOCALE_H_ >#if 0 /* expanded by -frewrite-includes */ >#include <xlocale/_stdlib.h> >#endif /* expanded by -frewrite-includes */ ># 78 "/usr/include/stdlib.h" 3 4 ># 79 "/usr/include/stdlib.h" 3 4 >#endif ># 80 "/usr/include/stdlib.h" 3 4 >extern int __mb_cur_max; >extern int ___mb_cur_max(void); >#define MB_CUR_MAX ((size_t)___mb_cur_max()) > >_Noreturn void abort(void); >int abs(int) __pure2; >int atexit(void (* _Nonnull)(void)); >double atof(const char *); >int atoi(const char *); >long atol(const char *); >void *bsearch(const void *, const void *, size_t, > size_t, int (*)(const void * _Nonnull, const void *)); >void *calloc(size_t, size_t) __malloc_like __result_use_check > __alloc_size(1) __alloc_size(2); >div_t div(int, int) __pure2; >_Noreturn void exit(int); >void free(void *); >char *getenv(const char *); >long labs(long) __pure2; >ldiv_t ldiv(long, long) __pure2; >void *malloc(size_t) __malloc_like __result_use_check __alloc_size(1); >int mblen(const char *, size_t); >size_t mbstowcs(wchar_t * __restrict , const char * __restrict, size_t); >int mbtowc(wchar_t * __restrict, const char * __restrict, size_t); >void qsort(void *, size_t, size_t, > int (* _Nonnull)(const void *, const void *)); >int rand(void); >void *realloc(void *, size_t) __result_use_check __alloc_size(2); >void srand(unsigned); >double strtod(const char * __restrict, char ** __restrict); >float strtof(const char * __restrict, char ** __restrict); >long strtol(const char * __restrict, char ** __restrict, int); >long double > strtold(const char * __restrict, char ** __restrict); >unsigned long > strtoul(const char * __restrict, char ** __restrict, int); >int system(const char *); >int wctomb(char *, wchar_t); >size_t wcstombs(char * __restrict, const wchar_t * __restrict, size_t); > >/* > * Functions added in C99 which we make conditionally available in the > * BSD^C89 namespace if the compiler supports `long long'. > * The #if test is more complicated than it ought to be because > * __BSD_VISIBLE implies __ISO_C_VISIBLE == 1999 *even if* `long long' > * is not supported in the compilation environment (which therefore means > * that it can't really be ISO C99). > * > * (The only other extension made by C99 in thie header is _Exit().) > */ >#if __ISO_C_VISIBLE >= 1999 || defined(__cplusplus) >#ifdef __LONG_LONG_SUPPORTED >/* LONGLONG */ >typedef struct { > long long quot; > long long rem; >} lldiv_t; > >/* LONGLONG */ >long long > atoll(const char *); >/* LONGLONG */ >long long > llabs(long long) __pure2; >/* LONGLONG */ >lldiv_t lldiv(long long, long long) __pure2; >/* LONGLONG */ >long long > strtoll(const char * __restrict, char ** __restrict, int); >/* LONGLONG */ >unsigned long long > strtoull(const char * __restrict, char ** __restrict, int); >#endif /* __LONG_LONG_SUPPORTED */ ># 153 "/usr/include/stdlib.h" 3 4 > >_Noreturn void _Exit(int); >#endif /* __ISO_C_VISIBLE >= 1999 */ ># 156 "/usr/include/stdlib.h" 3 4 > >/* > * If we're in a mode greater than C99, expose C11 functions. > */ >#if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L >void * aligned_alloc(size_t, size_t) __malloc_like __alloc_align(1) > __alloc_size(2); >int at_quick_exit(void (*)(void)); >_Noreturn void > quick_exit(int); >#endif /* __ISO_C_VISIBLE >= 2011 */ ># 167 "/usr/include/stdlib.h" 3 4 >/* > * Extensions made by POSIX relative to C. > */ >#if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE >char *realpath(const char * __restrict, char * __restrict); >#endif ># 173 "/usr/include/stdlib.h" 3 4 >#if __POSIX_VISIBLE >= 199506 >int rand_r(unsigned *); /* (TSF) */ >#endif ># 176 "/usr/include/stdlib.h" 3 4 >#if __POSIX_VISIBLE >= 200112 >int posix_memalign(void **, size_t, size_t); /* (ADV) */ >int setenv(const char *, const char *, int); >int unsetenv(const char *); >#endif ># 181 "/usr/include/stdlib.h" 3 4 > >#if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE >int getsubopt(char **, char *const *, char **); >#ifndef _MKDTEMP_DECLARED >char *mkdtemp(char *); >#define _MKDTEMP_DECLARED >#endif ># 188 "/usr/include/stdlib.h" 3 4 >#ifndef _MKSTEMP_DECLARED >int mkstemp(char *); >#define _MKSTEMP_DECLARED >#endif ># 192 "/usr/include/stdlib.h" 3 4 >#endif /* __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE */ ># 193 "/usr/include/stdlib.h" 3 4 > >/* > * The only changes to the XSI namespace in revision 6 were the deletion > * of the ttyslot() and valloc() functions, which FreeBSD never declared > * in this header. For revision 7, ecvt(), fcvt(), and gcvt(), which > * FreeBSD also does not have, and mktemp(), are to be deleted. > */ >#if __XSI_VISIBLE >/* XXX XSI requires pollution from <sys/wait.h> here. We'd rather not. */ >long a64l(const char *); >double drand48(void); >/* char *ecvt(double, int, int * __restrict, int * __restrict); */ >double erand48(unsigned short[3]); >/* char *fcvt(double, int, int * __restrict, int * __restrict); */ >/* char *gcvt(double, int, int * __restrict, int * __restrict); */ >int grantpt(int); >char *initstate(unsigned int, char *, size_t); >long jrand48(unsigned short[3]); >char *l64a(long); >void lcong48(unsigned short[7]); >long lrand48(void); >#if !defined(_MKTEMP_DECLARED) && (__BSD_VISIBLE || __XSI_VISIBLE <= 600) >char *mktemp(char *); >#define _MKTEMP_DECLARED >#endif ># 218 "/usr/include/stdlib.h" 3 4 >long mrand48(void); >long nrand48(unsigned short[3]); >int posix_openpt(int); >char *ptsname(int); >int putenv(char *); >long random(void); >unsigned short > *seed48(unsigned short[3]); >char *setstate(/* const */ char *); >void srand48(long); >void srandom(unsigned int); >int unlockpt(int); >#endif /* __XSI_VISIBLE */ ># 231 "/usr/include/stdlib.h" 3 4 > >#if __BSD_VISIBLE >extern const char *malloc_conf; >extern void (*malloc_message)(void *, const char *); > >/* > * The alloca() function can't be implemented in C, and on some > * platforms it can't be implemented at all as a callable function. > * The GNU C compiler provides a built-in alloca() which we can use; > * in all other cases, provide a prototype, mainly to pacify various > * incarnations of lint. On platforms where alloca() is not in libc, > * programs which use it will fail to link when compiled with non-GNU > * compilers. > */ >#if __GNUC__ >= 2 || defined(__INTEL_COMPILER) >#undef alloca /* some GNU bits try to get cute and define this on their own */ >#define alloca(sz) __builtin_alloca(sz) >#elif defined(lint) ># 249 "/usr/include/stdlib.h" 3 4 >void *alloca(size_t); >#endif ># 251 "/usr/include/stdlib.h" 3 4 > >void abort2(const char *, int, void **) __dead2; >__uint32_t > arc4random(void); >void arc4random_addrandom(unsigned char *, int); >void arc4random_buf(void *, size_t); >void arc4random_stir(void); >__uint32_t > arc4random_uniform(__uint32_t); >#ifdef __BLOCKS__ >int atexit_b(void (^ _Nonnull)(void)); >void *bsearch_b(const void *, const void *, size_t, > size_t, int (^ _Nonnull)(const void *, const void *)); >#endif ># 265 "/usr/include/stdlib.h" 3 4 >char *getbsize(int *, long *); > /* getcap(3) functions */ >char *cgetcap(char *, const char *, int); >int cgetclose(void); >int cgetent(char **, char **, const char *); >int cgetfirst(char **, char **); >int cgetmatch(const char *, const char *); >int cgetnext(char **, char **); >int cgetnum(char *, const char *, long *); >int cgetset(const char *); >int cgetstr(char *, const char *, char **); >int cgetustr(char *, const char *, char **); > >int daemon(int, int); >char *devname(__dev_t, __mode_t); >char *devname_r(__dev_t, __mode_t, char *, int); >char *fdevname(int); >char *fdevname_r(int, char *, int); >int getloadavg(double [], int); >const char * > getprogname(void); > >int heapsort(void *, size_t, size_t, > int (* _Nonnull)(const void *, const void *)); >#ifdef __BLOCKS__ >int heapsort_b(void *, size_t, size_t, > int (^ _Nonnull)(const void *, const void *)); >void qsort_b(void *, size_t, size_t, > int (^ _Nonnull)(const void *, const void *)); >#endif ># 295 "/usr/include/stdlib.h" 3 4 >int l64a_r(long, char *, int); >int mergesort(void *, size_t, size_t, int (*)(const void *, const void *)); >#ifdef __BLOCKS__ >int mergesort_b(void *, size_t, size_t, int (^)(const void *, const void *)); >#endif ># 300 "/usr/include/stdlib.h" 3 4 >int mkostemp(char *, int); >int mkostemps(char *, int, int); >void qsort_r(void *, size_t, size_t, void *, > int (*)(void *, const void *, const void *)); >int radixsort(const unsigned char **, int, const unsigned char *, > unsigned); >void *reallocarray(void *, size_t, size_t) __result_use_check __alloc_size(2) > __alloc_size(3); >void *reallocf(void *, size_t) __alloc_size(2); >int rpmatch(const char *); >void setprogname(const char *); >int sradixsort(const unsigned char **, int, const unsigned char *, > unsigned); >void sranddev(void); >void srandomdev(void); >long long > strtonum(const char *, long long, long long, const char **); > >/* Deprecated interfaces, to be removed. */ >__int64_t > strtoq(const char *, char **, int); >__uint64_t > strtouq(const char *, char **, int); > >extern char *suboptarg; /* getsubopt(3) external variable */ >#endif /* __BSD_VISIBLE */ ># 326 "/usr/include/stdlib.h" 3 4 > >#if __EXT1_VISIBLE > >#ifndef _ERRNO_T_DEFINED >#define _ERRNO_T_DEFINED >typedef int errno_t; >#endif ># 333 "/usr/include/stdlib.h" 3 4 > >/* K.3.6 */ >typedef void (*constraint_handler_t)(const char * __restrict, > void * __restrict, errno_t); >/* K.3.6.1.1 */ >constraint_handler_t set_constraint_handler_s(constraint_handler_t handler); >/* K.3.6.1.2 */ >_Noreturn void abort_handler_s(const char * __restrict, void * __restrict, > errno_t); >/* K3.6.1.3 */ >void ignore_handler_s(const char * __restrict, void * __restrict, errno_t); >#endif /* __EXT1_VISIBLE */ ># 345 "/usr/include/stdlib.h" 3 4 > >__END_DECLS >__NULLABILITY_PRAGMA_POP > >#endif /* !_STDLIB_H_ */ ># 350 "/usr/include/stdlib.h" 3 4 ># 95 "/usr/include/c++/v1/stdlib.h" 2 3 > >#ifdef __cplusplus > >extern "C++" { > >#undef abs >#undef div >#undef labs >#undef ldiv >#ifndef _LIBCPP_HAS_NO_LONG_LONG >#undef llabs >#undef lldiv >#endif ># 108 "/usr/include/c++/v1/stdlib.h" 3 > >// MSVCRT already has the correct prototype in <stdlib.h> if __cplusplus is defined >#if !defined(_LIBCPP_MSVCRT) && !defined(__sun__) && !defined(_AIX) >inline _LIBCPP_INLINE_VISIBILITY long abs( long __x) _NOEXCEPT {return labs(__x);} >#ifndef _LIBCPP_HAS_NO_LONG_LONG >inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT {return llabs(__x);} >#endif // _LIBCPP_HAS_NO_LONG_LONG ># 115 "/usr/include/c++/v1/stdlib.h" 3 > >inline _LIBCPP_INLINE_VISIBILITY ldiv_t div( long __x, long __y) _NOEXCEPT {return ldiv(__x, __y);} >#ifndef _LIBCPP_HAS_NO_LONG_LONG >inline _LIBCPP_INLINE_VISIBILITY lldiv_t div(long long __x, long long __y) _NOEXCEPT {return lldiv(__x, __y);} >#endif // _LIBCPP_HAS_NO_LONG_LONG ># 120 "/usr/include/c++/v1/stdlib.h" 3 >#endif // _LIBCPP_MSVCRT / __sun__ / _AIX ># 121 "/usr/include/c++/v1/stdlib.h" 3 > >} // extern "C++" > >#endif // __cplusplus ># 125 "/usr/include/c++/v1/stdlib.h" 3 > >#endif // _LIBCPP_STDLIB_H ># 127 "/usr/include/c++/v1/stdlib.h" 3 ># 87 "/usr/include/c++/v1/cstdlib" 2 3 > >#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) >#if 0 /* expanded by -frewrite-includes */ >#pragma GCC system_header >#endif /* expanded by -frewrite-includes */ ># 90 "/usr/include/c++/v1/cstdlib" 3 >#endif ># 91 "/usr/include/c++/v1/cstdlib" 3 > >#ifdef __GNUC__ >#define _LIBCPP_UNREACHABLE() __builtin_unreachable() >#else ># 95 "/usr/include/c++/v1/cstdlib" 3 >#define _LIBCPP_UNREACHABLE() _VSTD::abort() >#endif ># 97 "/usr/include/c++/v1/cstdlib" 3 > >_LIBCPP_BEGIN_NAMESPACE_STD > >using ::size_t; >using ::div_t; >using ::ldiv_t; >#ifndef _LIBCPP_HAS_NO_LONG_LONG >using ::lldiv_t; >#endif // _LIBCPP_HAS_NO_LONG_LONG ># 106 "/usr/include/c++/v1/cstdlib" 3 >using ::atof; >using ::atoi; >using ::atol; >#ifndef _LIBCPP_HAS_NO_LONG_LONG >using ::atoll; >#endif // _LIBCPP_HAS_NO_LONG_LONG ># 112 "/usr/include/c++/v1/cstdlib" 3 >using ::strtod; >using ::strtof; >using ::strtold; >using ::strtol; >#ifndef _LIBCPP_HAS_NO_LONG_LONG >using ::strtoll; >#endif // _LIBCPP_HAS_NO_LONG_LONG ># 119 "/usr/include/c++/v1/cstdlib" 3 >using ::strtoul; >#ifndef _LIBCPP_HAS_NO_LONG_LONG >using ::strtoull; >#endif // _LIBCPP_HAS_NO_LONG_LONG ># 123 "/usr/include/c++/v1/cstdlib" 3 >using ::rand; >using ::srand; >using ::calloc; >using ::free; >using ::malloc; >using ::realloc; >using ::abort; >using ::atexit; >using ::exit; >using ::_Exit; >#ifndef _LIBCPP_WINDOWS_STORE_APP >using ::getenv; >using ::system; >#endif ># 137 "/usr/include/c++/v1/cstdlib" 3 >using ::bsearch; >using ::qsort; >using ::abs; >using ::labs; >#ifndef _LIBCPP_HAS_NO_LONG_LONG >using ::llabs; >#endif // _LIBCPP_HAS_NO_LONG_LONG ># 144 "/usr/include/c++/v1/cstdlib" 3 >using ::div; >using ::ldiv; >#ifndef _LIBCPP_HAS_NO_LONG_LONG >using ::lldiv; >#endif // _LIBCPP_HAS_NO_LONG_LONG ># 149 "/usr/include/c++/v1/cstdlib" 3 >using ::mblen; >using ::mbtowc; >using ::wctomb; >using ::mbstowcs; >using ::wcstombs; >#ifdef _LIBCPP_HAS_QUICK_EXIT >using ::at_quick_exit; >using ::quick_exit; >#endif ># 158 "/usr/include/c++/v1/cstdlib" 3 >#ifdef _LIBCPP_HAS_C11_FEATURES >using ::aligned_alloc; >#endif ># 161 "/usr/include/c++/v1/cstdlib" 3 > >_LIBCPP_END_NAMESPACE_STD > >#endif // _LIBCPP_CSTDLIB ># 165 "/usr/include/c++/v1/cstdlib" 3 ># 83 "/usr/include/c++/v1/exception" 2 3 >#if 0 /* expanded by -frewrite-includes */ >#include <type_traits> >#endif /* expanded by -frewrite-includes */ ># 83 "/usr/include/c++/v1/exception" 3 ># 84 "/usr/include/c++/v1/exception" 3 > >#if defined(_LIBCPP_ABI_MICROSOFT) >#if 0 /* expanded by -frewrite-includes */ >#include <vcruntime_exception.h> >#endif /* expanded by -frewrite-includes */ ># 86 "/usr/include/c++/v1/exception" 3 ># 87 "/usr/include/c++/v1/exception" 3 >#endif ># 88 "/usr/include/c++/v1/exception" 3 > >#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) >#if 0 /* expanded by -frewrite-includes */ >#pragma GCC system_header >#endif /* expanded by -frewrite-includes */ ># 91 "/usr/include/c++/v1/exception" 3 >#endif ># 92 "/usr/include/c++/v1/exception" 3 > >namespace std // purposefully not using versioning namespace >{ > >#if !defined(_LIBCPP_ABI_MICROSOFT) >class _LIBCPP_EXCEPTION_ABI exception >{ >public: > _LIBCPP_INLINE_VISIBILITY exception() _NOEXCEPT {} > virtual ~exception() _NOEXCEPT; > virtual const char* what() const _NOEXCEPT; >}; > >class _LIBCPP_EXCEPTION_ABI bad_exception > : public exception >{ >public: > _LIBCPP_INLINE_VISIBILITY bad_exception() _NOEXCEPT {} > virtual ~bad_exception() _NOEXCEPT; > virtual const char* what() const _NOEXCEPT; >}; >#endif // !_LIBCPP_ABI_MICROSOFT ># 114 "/usr/include/c++/v1/exception" 3 > >#if _LIBCPP_STD_VER <= 14 \ > || defined(_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS) \ > || defined(_LIBCPP_BUILDING_LIBRARY) >typedef void (*unexpected_handler)(); >_LIBCPP_FUNC_VIS unexpected_handler set_unexpected(unexpected_handler) _NOEXCEPT; >_LIBCPP_FUNC_VIS unexpected_handler get_unexpected() _NOEXCEPT; >_LIBCPP_NORETURN _LIBCPP_FUNC_VIS void unexpected(); >#endif ># 123 "/usr/include/c++/v1/exception" 3 > >typedef void (*terminate_handler)(); >_LIBCPP_FUNC_VIS terminate_handler set_terminate(terminate_handler) _NOEXCEPT; >_LIBCPP_FUNC_VIS terminate_handler get_terminate() _NOEXCEPT; >_LIBCPP_NORETURN _LIBCPP_FUNC_VIS void terminate() _NOEXCEPT; > >_LIBCPP_FUNC_VIS bool uncaught_exception() _NOEXCEPT; >_LIBCPP_FUNC_VIS _LIBCPP_AVAILABILITY_UNCAUGHT_EXCEPTIONS int uncaught_exceptions() _NOEXCEPT; > >class _LIBCPP_TYPE_VIS exception_ptr; > >_LIBCPP_FUNC_VIS exception_ptr current_exception() _NOEXCEPT; >_LIBCPP_NORETURN _LIBCPP_FUNC_VIS void rethrow_exception(exception_ptr); > >#ifndef _LIBCPP_ABI_MICROSOFT > >class _LIBCPP_TYPE_VIS exception_ptr >{ > void* __ptr_; >public: > _LIBCPP_INLINE_VISIBILITY exception_ptr() _NOEXCEPT : __ptr_() {} > _LIBCPP_INLINE_VISIBILITY exception_ptr(nullptr_t) _NOEXCEPT : __ptr_() {} > > exception_ptr(const exception_ptr&) _NOEXCEPT; > exception_ptr& operator=(const exception_ptr&) _NOEXCEPT; > ~exception_ptr() _NOEXCEPT; > > _LIBCPP_INLINE_VISIBILITY _LIBCPP_EXPLICIT operator bool() const _NOEXCEPT > {return __ptr_ != nullptr;} > > friend _LIBCPP_INLINE_VISIBILITY > bool operator==(const exception_ptr& __x, const exception_ptr& __y) _NOEXCEPT > {return __x.__ptr_ == __y.__ptr_;} > > friend _LIBCPP_INLINE_VISIBILITY > bool operator!=(const exception_ptr& __x, const exception_ptr& __y) _NOEXCEPT > {return !(__x == __y);} > > friend _LIBCPP_FUNC_VIS exception_ptr current_exception() _NOEXCEPT; > friend _LIBCPP_FUNC_VIS void rethrow_exception(exception_ptr); >}; > >template<class _Ep> >exception_ptr >make_exception_ptr(_Ep __e) _NOEXCEPT >{ >#ifndef _LIBCPP_NO_EXCEPTIONS > try > { > throw __e; > } > catch (...) > { > return current_exception(); > } >#else ># 179 "/usr/include/c++/v1/exception" 3 > ((void)__e); > _VSTD::abort(); >#endif ># 182 "/usr/include/c++/v1/exception" 3 >} > >#else // _LIBCPP_ABI_MICROSOFT ># 185 "/usr/include/c++/v1/exception" 3 > >class _LIBCPP_TYPE_VIS exception_ptr >{ >#if defined(__clang__) >#pragma clang diagnostic push >#pragma clang diagnostic ignored "-Wunused-private-field" >#endif ># 192 "/usr/include/c++/v1/exception" 3 > void* __ptr1_; > void* __ptr2_; >#if defined(__clang__) >#pragma clang diagnostic pop >#endif ># 197 "/usr/include/c++/v1/exception" 3 >public: > exception_ptr() _NOEXCEPT; > exception_ptr(nullptr_t) _NOEXCEPT; > exception_ptr(const exception_ptr& __other) _NOEXCEPT; > exception_ptr& operator=(const exception_ptr& __other) _NOEXCEPT; > exception_ptr& operator=(nullptr_t) _NOEXCEPT; > ~exception_ptr() _NOEXCEPT; > _LIBCPP_EXPLICIT operator bool() const _NOEXCEPT; >}; > >_LIBCPP_FUNC_VIS >bool operator==(const exception_ptr& __x, const exception_ptr& __y) _NOEXCEPT; > >inline _LIBCPP_INLINE_VISIBILITY >bool operator!=(const exception_ptr& __x, const exception_ptr& __y) _NOEXCEPT > {return !(__x == __y);} > >_LIBCPP_FUNC_VIS void swap(exception_ptr&, exception_ptr&) _NOEXCEPT; > >_LIBCPP_FUNC_VIS exception_ptr __copy_exception_ptr(void *__except, const void* __ptr); >_LIBCPP_FUNC_VIS exception_ptr current_exception() _NOEXCEPT; >_LIBCPP_NORETURN _LIBCPP_FUNC_VIS void rethrow_exception(exception_ptr p); > >// This is a built-in template function which automagically extracts the required >// information. >template <class _E> void *__GetExceptionInfo(_E); > >template<class _Ep> >exception_ptr >make_exception_ptr(_Ep __e) _NOEXCEPT >{ > return __copy_exception_ptr(_VSTD::addressof(__e), __GetExceptionInfo(__e)); >} > >#endif // _LIBCPP_ABI_MICROSOFT ># 232 "/usr/include/c++/v1/exception" 3 >// nested_exception > >class _LIBCPP_EXCEPTION_ABI nested_exception >{ > exception_ptr __ptr_; >public: > nested_exception() _NOEXCEPT; >// nested_exception(const nested_exception&) noexcept = default; >// nested_exception& operator=(const nested_exception&) noexcept = default; > virtual ~nested_exception() _NOEXCEPT; > > // access functions > _LIBCPP_NORETURN void rethrow_nested() const; > _LIBCPP_INLINE_VISIBILITY exception_ptr nested_ptr() const _NOEXCEPT {return __ptr_;} >}; > >template <class _Tp> >struct __nested > : public _Tp, > public nested_exception >{ > _LIBCPP_INLINE_VISIBILITY explicit __nested(const _Tp& __t) : _Tp(__t) {} >}; > >#ifndef _LIBCPP_NO_EXCEPTIONS >template <class _Tp, class _Up, bool> >struct __throw_with_nested; > >template <class _Tp, class _Up> >struct __throw_with_nested<_Tp, _Up, true> { > _LIBCPP_NORETURN static inline _LIBCPP_ALWAYS_INLINE void >#ifndef _LIBCPP_CXX03_LANG > __do_throw(_Tp&& __t) >#else ># 266 "/usr/include/c++/v1/exception" 3 > __do_throw (_Tp& __t) >#endif // _LIBCPP_CXX03_LANG ># 268 "/usr/include/c++/v1/exception" 3 > { > throw __nested<_Up>(_VSTD::forward<_Tp>(__t)); > } >}; > >template <class _Tp, class _Up> >struct __throw_with_nested<_Tp, _Up, false> { > _LIBCPP_NORETURN static inline _LIBCPP_ALWAYS_INLINE void >#ifndef _LIBCPP_CXX03_LANG > __do_throw(_Tp&& __t) >#else ># 279 "/usr/include/c++/v1/exception" 3 > __do_throw (_Tp& __t) >#endif // _LIBCPP_CXX03_LANG ># 281 "/usr/include/c++/v1/exception" 3 > { > throw _VSTD::forward<_Tp>(__t); > } >}; >#endif ># 286 "/usr/include/c++/v1/exception" 3 > >template <class _Tp> >_LIBCPP_NORETURN >void >#ifndef _LIBCPP_CXX03_LANG >throw_with_nested(_Tp&& __t) >#else ># 293 "/usr/include/c++/v1/exception" 3 >throw_with_nested (_Tp& __t) >#endif // _LIBCPP_CXX03_LANG ># 295 "/usr/include/c++/v1/exception" 3 >{ >#ifndef _LIBCPP_NO_EXCEPTIONS > typedef typename decay<_Tp>::type _Up; > static_assert( is_copy_constructible<_Up>::value, "type thrown must be CopyConstructible"); > __throw_with_nested<_Tp, _Up, > is_class<_Up>::value && > !is_base_of<nested_exception, _Up>::value && > !__libcpp_is_final<_Up>::value>:: > __do_throw(_VSTD::forward<_Tp>(__t)); >#else ># 305 "/usr/include/c++/v1/exception" 3 > ((void)__t); > // FIXME: Make this abort >#endif ># 308 "/usr/include/c++/v1/exception" 3 >} > >template <class _From, class _To> >struct __can_dynamic_cast : public _LIBCPP_BOOL_CONSTANT( > is_polymorphic<_From>::value && > (!is_base_of<_To, _From>::value || > is_convertible<const _From*, const _To*>::value)) {}; > >template <class _Ep> >inline _LIBCPP_INLINE_VISIBILITY >void >rethrow_if_nested(const _Ep& __e, > typename enable_if< __can_dynamic_cast<_Ep, nested_exception>::value>::type* = 0) >{ > const nested_exception* __nep = dynamic_cast<const nested_exception*>(_VSTD::addressof(__e)); > if (__nep) > __nep->rethrow_nested(); >} > >template <class _Ep> >inline _LIBCPP_INLINE_VISIBILITY >void >rethrow_if_nested(const _Ep&, > typename enable_if<!__can_dynamic_cast<_Ep, nested_exception>::value>::type* = 0) >{ >} > >} // std > >#endif // _LIBCPP_EXCEPTION ># 338 "/usr/include/c++/v1/exception" 3 ># 90 "/usr/include/c++/v1/new" 2 3 >#if 0 /* expanded by -frewrite-includes */ >#include <cstddef> >#endif /* expanded by -frewrite-includes */ ># 90 "/usr/include/c++/v1/new" 3 ># 91 "/usr/include/c++/v1/new" 3 >#ifdef _LIBCPP_NO_EXCEPTIONS >#if 0 /* expanded by -frewrite-includes */ >#include <cstdlib> >#endif /* expanded by -frewrite-includes */ ># 92 "/usr/include/c++/v1/new" 3 ># 93 "/usr/include/c++/v1/new" 3 >#endif ># 94 "/usr/include/c++/v1/new" 3 > >#if defined(_LIBCPP_ABI_MICROSOFT) >#if 0 /* expanded by -frewrite-includes */ >#include <new.h> >#endif /* expanded by -frewrite-includes */ ># 96 "/usr/include/c++/v1/new" 3 ># 97 "/usr/include/c++/v1/new" 3 >#endif ># 98 "/usr/include/c++/v1/new" 3 > >#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) >#if 0 /* expanded by -frewrite-includes */ >#pragma GCC system_header >#endif /* expanded by -frewrite-includes */ ># 101 "/usr/include/c++/v1/new" 3 >#endif ># 102 "/usr/include/c++/v1/new" 3 > >#if !(defined(_LIBCPP_BUILDING_NEW) || _LIBCPP_STD_VER >= 14 || \ > (defined(__cpp_sized_deallocation) && __cpp_sized_deallocation >= 201309)) ># define _LIBCPP_HAS_NO_SIZED_DEALLOCATION >#endif ># 107 "/usr/include/c++/v1/new" 3 > >#if !defined(_LIBCPP_HAS_NO_ALIGNED_ALLOCATION) && \ > (!(defined(_LIBCPP_BUILDING_NEW) || _LIBCPP_STD_VER > 14 || \ > (defined(__cpp_aligned_new) && __cpp_aligned_new >= 201606))) ># define _LIBCPP_HAS_NO_ALIGNED_ALLOCATION >#endif ># 113 "/usr/include/c++/v1/new" 3 > >namespace std // purposefully not using versioning namespace >{ > >#if !defined(_LIBCPP_ABI_MICROSOFT) >struct _LIBCPP_TYPE_VIS nothrow_t {}; >extern _LIBCPP_FUNC_VIS const nothrow_t nothrow; > >class _LIBCPP_EXCEPTION_ABI bad_alloc > : public exception >{ >public: > bad_alloc() _NOEXCEPT; > virtual ~bad_alloc() _NOEXCEPT; > virtual const char* what() const _NOEXCEPT; >}; > >class _LIBCPP_EXCEPTION_ABI bad_array_new_length > : public bad_alloc >{ >public: > bad_array_new_length() _NOEXCEPT; > virtual ~bad_array_new_length() _NOEXCEPT; > virtual const char* what() const _NOEXCEPT; >}; > >typedef void (*new_handler)(); >_LIBCPP_FUNC_VIS new_handler set_new_handler(new_handler) _NOEXCEPT; >_LIBCPP_FUNC_VIS new_handler get_new_handler() _NOEXCEPT; > >#endif // !_LIBCPP_ABI_MICROSOFT ># 144 "/usr/include/c++/v1/new" 3 > >_LIBCPP_NORETURN _LIBCPP_FUNC_VIS void __throw_bad_alloc(); // not in C++ spec > >#if defined(_LIBCPP_BUILDING_LIBRARY) || (_LIBCPP_STD_VER > 11) > >class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_BAD_ARRAY_LENGTH > bad_array_length : public bad_alloc { >public: > bad_array_length() _NOEXCEPT; > virtual ~bad_array_length() _NOEXCEPT; > virtual const char* what() const _NOEXCEPT; >}; > >#define _LIBCPP_BAD_ARRAY_LENGTH_DEFINED > >#endif // defined(_LIBCPP_BUILDING_NEW) || (_LIBCPP_STD_VER > 11) ># 160 "/usr/include/c++/v1/new" 3 > >#if !defined(_LIBCPP_HAS_NO_ALIGNED_ALLOCATION) || _LIBCPP_STD_VER > 14 >#ifndef _LIBCPP_CXX03_LANG >enum class _LIBCPP_ENUM_VIS align_val_t : size_t { }; >#else ># 165 "/usr/include/c++/v1/new" 3 >enum align_val_t { __zero = 0, __max = (size_t)-1 }; >#endif ># 167 "/usr/include/c++/v1/new" 3 >#endif ># 168 "/usr/include/c++/v1/new" 3 > >} // std > >#if defined(_LIBCPP_CXX03_LANG) >#define _THROW_BAD_ALLOC throw(std::bad_alloc) >#else ># 174 "/usr/include/c++/v1/new" 3 >#define _THROW_BAD_ALLOC >#endif ># 176 "/usr/include/c++/v1/new" 3 > >#if !defined(_LIBCPP_ABI_MICROSOFT) > >_LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz) _THROW_BAD_ALLOC; >_LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz, const std::nothrow_t&) _NOEXCEPT _NOALIAS; >_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p) _NOEXCEPT; >_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p, const std::nothrow_t&) _NOEXCEPT; >#ifndef _LIBCPP_HAS_NO_SIZED_DEALLOCATION >_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE void operator delete(void* __p, std::size_t __sz) _NOEXCEPT; >#endif ># 186 "/usr/include/c++/v1/new" 3 > >_LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz) _THROW_BAD_ALLOC; >_LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz, const std::nothrow_t&) _NOEXCEPT _NOALIAS; >_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete[](void* __p) _NOEXCEPT; >_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete[](void* __p, const std::nothrow_t&) _NOEXCEPT; >#ifndef _LIBCPP_HAS_NO_SIZED_DEALLOCATION >_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE void operator delete[](void* __p, std::size_t __sz) _NOEXCEPT; >#endif ># 194 "/usr/include/c++/v1/new" 3 > >#ifndef _LIBCPP_HAS_NO_ALIGNED_ALLOCATION >_LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz, std::align_val_t) _THROW_BAD_ALLOC; >_LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz, std::align_val_t, const std::nothrow_t&) _NOEXCEPT _NOALIAS; >_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p, std::align_val_t) _NOEXCEPT; >_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p, std::align_val_t, const std::nothrow_t&) _NOEXCEPT; >#ifndef _LIBCPP_HAS_NO_SIZED_DEALLOCATION >_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE void operator delete(void* __p, std::size_t __sz, std::align_val_t) _NOEXCEPT; >#endif ># 203 "/usr/include/c++/v1/new" 3 > >_LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz, std::align_val_t) _THROW_BAD_ALLOC; >_LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz, std::align_val_t, const std::nothrow_t&) _NOEXCEPT _NOALIAS; >_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete[](void* __p, std::align_val_t) _NOEXCEPT; >_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete[](void* __p, std::align_val_t, const std::nothrow_t&) _NOEXCEPT; >#ifndef _LIBCPP_HAS_NO_SIZED_DEALLOCATION >_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE void operator delete[](void* __p, std::size_t __sz, std::align_val_t) _NOEXCEPT; >#endif ># 211 "/usr/include/c++/v1/new" 3 >#endif ># 212 "/usr/include/c++/v1/new" 3 > >inline _LIBCPP_INLINE_VISIBILITY void* operator new (std::size_t, void* __p) _NOEXCEPT {return __p;} >inline _LIBCPP_INLINE_VISIBILITY void* operator new[](std::size_t, void* __p) _NOEXCEPT {return __p;} >inline _LIBCPP_INLINE_VISIBILITY void operator delete (void*, void*) _NOEXCEPT {} >inline _LIBCPP_INLINE_VISIBILITY void operator delete[](void*, void*) _NOEXCEPT {} > >#endif // !_LIBCPP_ABI_MICROSOFT ># 219 "/usr/include/c++/v1/new" 3 > >_LIBCPP_BEGIN_NAMESPACE_STD > >inline _LIBCPP_INLINE_VISIBILITY void *__allocate(size_t __size) { >#ifdef _LIBCPP_HAS_NO_BUILTIN_OPERATOR_NEW_DELETE > return ::operator new(__size); >#else ># 226 "/usr/include/c++/v1/new" 3 > return __builtin_operator_new(__size); >#endif ># 228 "/usr/include/c++/v1/new" 3 >} > >inline _LIBCPP_INLINE_VISIBILITY void __libcpp_deallocate(void *__ptr) { >#ifdef _LIBCPP_HAS_NO_BUILTIN_OPERATOR_NEW_DELETE > ::operator delete(__ptr); >#else ># 234 "/usr/include/c++/v1/new" 3 > __builtin_operator_delete(__ptr); >#endif ># 236 "/usr/include/c++/v1/new" 3 >} > >#ifdef _LIBCPP_BAD_ARRAY_LENGTH_DEFINED >_LIBCPP_NORETURN inline _LIBCPP_ALWAYS_INLINE >#ifndef _LIBCPP_NO_EXCEPTIONS >_LIBCPP_AVAILABILITY_BAD_ARRAY_LENGTH >#endif ># 243 "/usr/include/c++/v1/new" 3 >void __throw_bad_array_length() >{ >#ifndef _LIBCPP_NO_EXCEPTIONS > throw bad_array_length(); >#else ># 248 "/usr/include/c++/v1/new" 3 > _VSTD::abort(); >#endif ># 250 "/usr/include/c++/v1/new" 3 >} >#endif ># 252 "/usr/include/c++/v1/new" 3 > >_LIBCPP_END_NAMESPACE_STD > >#endif // _LIBCPP_NEW ># 256 "/usr/include/c++/v1/new" 3 ># 106 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_memory.h" 2 >#if 0 /* expanded by -frewrite-includes */ >#include "as_criticalsection.h" >#endif /* expanded by -frewrite-includes */ ># 106 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_memory.h" ># 1 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_criticalsection.h" 1 >/* > AngelCode Scripting Library > Copyright (c) 2003-2014 Andreas Jonsson > > This software is provided 'as-is', without any express or implied > warranty. In no event will the authors be held liable for any > damages arising from the use of this software. > > Permission is granted to anyone to use this software for any > purpose, including commercial applications, and to alter it and > redistribute it freely, subject to the following restrictions: > > 1. The origin of this software must not be misrepresented; you > must not claim that you wrote the original software. If you use > this software in a product, an acknowledgment in the product > documentation would be appreciated but is not required. > > 2. Altered source versions must be plainly marked as such, and > must not be misrepresented as being the original software. > > 3. This notice may not be removed or altered from any source > distribution. > > The original version of this library can be located at: > http://www.angelcode.com/angelscript/ > > Andreas Jonsson > andreas@angelcode.com >*/ > > > >// >// as_criticalsection.h >// >// Classes for multi threading support >// > >#ifndef AS_CRITICALSECTION_H >#define AS_CRITICALSECTION_H > >#if 0 /* expanded by -frewrite-includes */ >#include "as_config.h" >#endif /* expanded by -frewrite-includes */ ># 42 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_criticalsection.h" ># 1 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" 1 >/* > AngelCode Scripting Library > Copyright (c) 2003-2016 Andreas Jonsson > > This software is provided 'as-is', without any express or implied > warranty. In no event will the authors be held liable for any > damages arising from the use of this software. > > Permission is granted to anyone to use this software for any > purpose, including commercial applications, and to alter it and > redistribute it freely, subject to the following restrictions: > > 1. The origin of this software must not be misrepresented; you > must not claim that you wrote the original software. If you use > this software in a product, an acknowledgment in the product > documentation would be appreciated but is not required. > > 2. Altered source versions must be plainly marked as such, and > must not be misrepresented as being the original software. > > 3. This notice may not be removed or altered from any source > distribution. > > The original version of this library can be located at: > http://www.angelcode.com/angelscript/ > > Andreas Jonsson > andreas@angelcode.com >*/ > > > >// >// as_config.h >// >// this file is used for configuring the compilation of the library >// > >#ifndef AS_CONFIG_H >#define AS_CONFIG_H > > > >// >// Features >//----------------------------------------- > >// AS_NO_THREADS >// Turns off support for multithreading. By turning off >// this when it's not needed a bit of performance is gained. > >// AS_WINDOWS_THREADS >// If the library should be compiled using windows threads. > >// AS_POSIX_THREADS >// If the library should be compiled using posix threads. > >// AS_NO_ATOMIC >// If the compiler/platform doesn't support atomic instructions >// then this should be defined to use critical sections instead. > >// AS_DEBUG >// This flag can be defined to make the library write some extra output when >// compiling and executing scripts. > >// AS_DEPRECATED >// If this flag is defined then some backwards compatibility is maintained. >// There is no guarantee for how well deprecated functionality will work though >// so it is best to exchange it for the new functionality as soon as possible. > >// AS_NO_CLASS_METHODS >// Disables the possibility to add class methods. Can increase the >// portability of the library. > >// AS_MAX_PORTABILITY >// Disables all platform specific code. Only the asCALL_GENERIC calling >// convention will be available in with this flag set. > >// AS_DOUBLEBYTE_CHARSET >// When this flag is defined, the parser will treat all characters in strings >// that are greater than 127 as lead characters and automatically include the >// next character in the script without checking its value. This should be >// compatible with common encoding schemes, e.g. Big5. Shift-JIS is not compatible >// though as it encodes some single byte characters above 127. >// >// If support for international text is desired, it is recommended that UTF-8 >// is used as this is supported natively by the compiler without the use for this >// preprocessor flag. > >// AS_NO_COMPILER >// Compiles the library without support for compiling scripts. This is intended >// for those applications that will load pre-compiled bytecode and wants to decrease >// the size of the executable. > >// AS_NO_EXCEPTIONS >// Define this if exception handling is turned off or not available on the target platform. > >// AS_NO_MEMBER_INIT >// Disable the support for initialization of class members directly in the declaration. >// This was as a form to maintain backwards compatibility with versions before 2.26.0 >// if the new order of the member initialization caused null pointer exceptions in older >// scripts (e.g. if a base class accessed members of a derived class through a virtual method). > >// AS_USE_NAMESPACE >// Adds the AngelScript namespace on the declarations. > > > >// >// Library usage >//------------------------------------------ > >// ANGELSCRIPT_EXPORT >// This flag should be defined when compiling the library as a lib or dll. > >// ANGELSCRIPT_DLL_LIBRARY_IMPORT >// This flag should be defined when using AngelScript as a dll with automatic >// library import. > >// ANGELSCRIPT_DLL_MANUAL_IMPORT >// This flag should be defined when using AngelScript as a dll with manual >// loading of the library. > > > > >// >// Compiler differences >//----------------------------------------- > >// asVSNPRINTF(a,b,c,d) >// Some compilers use different names for this function. You must >// define this macro to map to the proper function. > >// ASM_AT_N_T or ASM_INTEL >// You should choose what inline assembly syntax to use when compiling. > >// VALUE_OF_BOOLEAN_TRUE >// This flag allows to customize the exact value of boolean true. > >// AS_SIZEOF_BOOL >// On some target platforms the sizeof(bool) is 4, but on most it is 1. > >// STDCALL >// This is used to declare a function to use the stdcall calling convention. > >// AS_NO_MEMORY_H >// Some compilers don't come with the memory.h header file. > >// AS_NO_THISCALL_FUNCTOR_METHOD >// Defined if the support for functor methods hasn't been implemented on the platform. > > > >// >// How to identify different compilers >//----------------------------------------- >// Ref: http://nadeausoftware.com/articles/2012/10/c_c_tip_how_detect_compiler_name_and_version_using_compiler_predefined_macros > >// MS Visual C++ >// _MSC_VER is defined >// __MWERKS__ is not defined > >// Metrowerks >// _MSC_VER is defined >// __MWERKS__ is defined > >// GNU C based compilers >// __GNUC__ is defined > >// CLang/LLVM >// __clang__ is defined > >// Embarcadero C++Builder >// __BORLANDC__ is defined > >// Oracle Solaris Studio (previously known as Sun CC compiler) >// __SUNPRO_CC is defined > > > >// >// CPU differences >//--------------------------------------- > >// AS_USE_DOUBLE_AS_FLOAT >// If there is no 64 bit floating point type, then this constant can be defined >// to treat double like normal floats. > >// AS_X86 >// Use assembler code for the x86 CPU family > >// AS_SH4 >// Use assembler code for the SH4 CPU family > >// AS_MIPS >// Use assembler code for the MIPS CPU family > >// AS_PPC >// Use assembler code for the 32bit PowerPC CPU family > >// AS_PPC_64 >// Use assembler code for the 64bit PowerPC CPU family > >// AS_XENON >// Use assembler code for the Xenon (XBOX360) CPU family > >// AS_ARM >// Use assembler code for the ARM CPU family > >// AS_SOFTFP >// Use to tell compiler that ARM soft-float ABI >// should be used instead of ARM hard-float ABI > >// AS_X64_GCC >// Use GCC assembler code for the X64 AMD/Intel CPU family > >// AS_X64_MSVC >// Use MSVC assembler code for the X64 AMD/Intel CPU family > >// AS_64BIT_PTR >// Define this to make the engine store all pointers in 64bit words. > >// AS_BIG_ENDIAN >// Define this for CPUs that use big endian memory layout, e.g. PPC > >// AS_SPARC >// Define this for SPARC CPU family > > > >// >// Target systems >//-------------------------------- >// This group shows a few of the flags used to identify different target systems. >// Sometimes there are differences on different target systems, while both CPU and >// compiler is the same for both, when this is so these flags are used to produce the >// right code. > >// AS_WIN - Microsoft Windows >// AS_LINUX - Linux >// AS_MAC - Apple Macintosh >// AS_BSD - BSD based OS (FreeBSD, DragonFly, OpenBSD, etc) >// AS_XBOX - Microsoft XBox >// AS_XBOX360 - Microsoft XBox 360 >// AS_PSP - Sony Playstation Portable >// AS_PSVITA - Sony Playstation Vita >// AS_PS2 - Sony Playstation 2 >// AS_PS3 - Sony Playstation 3 >// AS_DC - Sega Dreamcast >// AS_GC - Nintendo GameCube >// AS_WII - Nintendo Wii >// AS_WIIU - Nintendo Wii U >// AS_IPHONE - Apple IPhone >// AS_ANDROID - Android >// AS_HAIKU - Haiku >// AS_ILLUMOS - Illumos like (OpenSolaris, OpenIndiana, NCP, etc) >// AS_MARMALADE - Marmalade cross platform SDK (a layer on top of the OS) >// AS_SUN - Sun UNIX > > > > >// >// Calling conventions >//----------------------------------------- > >// GNU_STYLE_VIRTUAL_METHOD >// This constant should be defined if method pointers store index for virtual >// functions in the same location as the function pointer. In such cases the method >// is identified as virtual if the least significant bit is set. > >// MULTI_BASE_OFFSET(x) >// This macro is used to retrieve the offset added to the object pointer in order to >// implicitly cast the object to the base object. x is the method pointer received by >// the register function. > >// HAVE_VIRTUAL_BASE_OFFSET >// Define this constant if the compiler stores the virtual base offset in the method >// pointers. If it is not stored in the pointers then AngelScript have no way of >// identifying a method as coming from a class with virtual inheritance. > >// VIRTUAL_BASE_OFFSET(x) >// This macro is used to retrieve the offset added to the object pointer in order to >// find the virtual base object. x is the method pointer received by the register >// function; > >// COMPLEX_RETURN_MASK >// This constant shows what attributes determine if an object is returned in memory >// or in the registers as normal structures > >// COMPLEX_MASK >// This constant shows what attributes determine if an object is implicitly passed >// by reference or not, even if the argument is declared by value > >// THISCALL_RETURN_SIMPLE_IN_MEMORY >// CDECL_RETURN_SIMPLE_IN_MEMORY >// STDCALL_RETURN_SIMPLE_IN_MEMORY >// When these constants are defined then the corresponding calling convention always >// return classes/structs in memory regardless of size or complexity. > >// THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE >// STDCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE >// CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE >// Specifies the minimum size in dwords a class/struct needs to be to be passed in memory > >// CALLEE_POPS_HIDDEN_RETURN_POINTER >// This constant should be defined if the callee pops the hidden return pointer, >// used when returning an object in memory. > >// THISCALL_CALLEE_POPS_HIDDEN_RETURN_POINTER >// This constant should be defined if the callee pops the hidden return pointer >// for thiscall functions; used when returning an object in memory. > >// THISCALL_PASS_OBJECT_POINTER_ON_THE_STACK >// With this constant defined AngelScript will pass the object pointer on the stack > >// THISCALL_CALLEE_POPS_ARGUMENTS >// If the callee pops arguments for class methods then define this constant > >// COMPLEX_OBJS_PASSED_BY_REF >// Some compilers always pass certain objects by reference. GNUC for example does >// this if the the class has a defined destructor. > >// AS_LARGE_OBJS_PASSED_BY_REF >// If this is defined large objects are passed by reference, whether they are complex or not > >// AS_LARGE_OBJ_MIN_SIZE >// This is the size of objects determined as large ones > >// AS_CALLEE_DESTROY_OBJ_BY_VAL >// When an object is passed by value the called function is the one responsible >// for calling the destructor before returning. > >// HAS_128_BIT_PRIMITIVES >// 64bit processors often support 128bit primitives. These may require special >// treatment when passed in function arguments or returned by functions. > >// SPLIT_OBJS_BY_MEMBER_TYPES >// On some platforms objects with primitive members are split over different >// register types when passed by value to functions. > > > > > >// >// Detect compiler >//------------------------------------------------ > > >#define VALUE_OF_BOOLEAN_TRUE 1 >#define STDCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 0 >#define CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 0 >#define THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 0 >#define THISCALL_CALLEE_POPS_HIDDEN_RETURN_POINTER > >// Not implemented by default. Undefined with tested platforms. >#define AS_NO_THISCALL_FUNCTOR_METHOD > > >// Embarcadero C++Builder >#if defined(__BORLANDC__) > #ifndef _Windows > #error "Configuration doesn't yet support BCC for Linux or Mac OS." > #endif ># 367 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #if defined(_M_X64) > #error "Configuration doesn't yet support BCC for AMD64." > #endif ># 370 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #define MULTI_BASE_OFFSET(x) (*((asDWORD*)(&x)+1)) > #define HAVE_VIRTUAL_BASE_OFFSET > #define VIRTUAL_BASE_OFFSET(x) (*((asDWORD*)(&x)+2)) > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > #define CDECL_RETURN_SIMPLE_IN_MEMORY > #define STDCALL_RETURN_SIMPLE_IN_MEMORY > #undef STDCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE > #undef CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE > #undef THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE > #define STDCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > #define CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > #define THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > > #define THISCALL_PASS_OBJECT_POINTER_ON_THE_STACK > #define COMPLEX_MASK (asOBJ_APP_CLASS_CONSTRUCTOR | asOBJ_APP_CLASS_DESTRUCTOR) > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_CONSTRUCTOR | asOBJ_APP_CLASS_DESTRUCTOR) > #define STDCALL __stdcall > #define AS_SIZEOF_BOOL 1 > #define AS_WINDOWS_THREADS > #undef THISCALL_CALLEE_POPS_HIDDEN_RETURN_POINTER > > #define AS_WIN > #define AS_X86 > #define ASM_INTEL > > #define asVSNPRINTF(a, b, c, d) _vsnprintf(a, b, c, d) > > #define fmodf(a,b) fmod(a,b) > > #define UNREACHABLE_RETURN >#endif ># 402 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > >// Microsoft Visual C++ >// Ref: http://msdn.microsoft.com/en-us/library/b0084kay.aspx >#if defined(_MSC_VER) && !defined(__MWERKS__) > > #if _MSC_VER <= 1200 // MSVC6 > // Disable the useless warnings about truncated symbol names for template instances > #pragma warning( disable : 4786 ) > #endif ># 411 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #ifdef _M_X64 > #define MULTI_BASE_OFFSET(x) (*((asDWORD*)(&x)+2)) > #define VIRTUAL_BASE_OFFSET(x) (*((asDWORD*)(&x)+4)) > #else ># 416 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define MULTI_BASE_OFFSET(x) (*((asDWORD*)(&x)+1)) > #define VIRTUAL_BASE_OFFSET(x) (*((asDWORD*)(&x)+3)) > #endif ># 419 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define HAVE_VIRTUAL_BASE_OFFSET > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > #define THISCALL_PASS_OBJECT_POINTER_IN_ECX > > // http://www.madewithmarmalade.com/ > #if defined(__S3E__) > #ifndef AS_MARMALADE > // From now on we'll use the below define > #define AS_MARMALADE > #endif ># 429 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > // Marmalade doesn't use the Windows libraries > #define asVSNPRINTF(a, b, c, d) vsnprintf(a, b, c, d) > > // Marmalade doesn't seem to have proper support for > // atomic instructions or read/write locks, so we turn off > // multithread support > //#define AS_POSIX_THREADS > #define AS_NO_THREADS > #define AS_NO_ATOMIC > > // Marmalade has it's own way of identifying the CPU target > // Note, when building for ARM, the gnuc compiler will always > // be used so we don't need to check for it here > #if defined(I3D_ARCH_X86) > #define AS_X86 > #endif ># 446 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #else ># 447 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #if _MSC_VER < 1500 // MSVC++ 9 (aka MSVC++ .NET 2008) > #define asVSNPRINTF(a, b, c, d) _vsnprintf(a, b, c, d) > #else ># 450 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define asVSNPRINTF(a, b, c, d) vsnprintf_s(a, b, _TRUNCATE, c, d) > #endif ># 452 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #define AS_WINDOWS_THREADS > #endif ># 455 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #define THISCALL_CALLEE_POPS_ARGUMENTS > #define STDCALL __stdcall > #define AS_SIZEOF_BOOL 1 > #define COMPLEX_OBJS_PASSED_BY_REF > > #define ASM_INTEL // Intel style for inline assembly on microsoft compilers > > #if defined(WIN32) || defined(_WIN32) || defined(_WIN64) > #define AS_WIN > #endif ># 466 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #if _XBOX_VER >= 200 > // 360 uses a Xenon processor (which is a modified 64bit PPC) > #define AS_XBOX360 > #define AS_XENON > #define AS_BIG_ENDIAN > #else ># 473 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #if defined(_XBOX) || (defined(_M_IX86) && !defined(__LP64__)) > #define AS_X86 > #ifndef _XBOX > // Not tested with xbox (only enabled if is Windows) > #undef AS_NO_THISCALL_FUNCTOR_METHOD > #endif ># 479 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #elif defined(_M_X64) ># 480 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_X64_MSVC > #undef AS_NO_THISCALL_FUNCTOR_METHOD > #define AS_CALLEE_DESTROY_OBJ_BY_VAL > #define AS_LARGE_OBJS_PASSED_BY_REF > #define AS_LARGE_OBJ_MIN_SIZE 3 > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_CONSTRUCTOR | asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_ASSIGNMENT | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > #define COMPLEX_MASK (asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > #endif ># 488 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #endif ># 489 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #if defined(_ARM_) || defined(_M_ARM) > #define AS_ARM > #define AS_CALLEE_DESTROY_OBJ_BY_VAL > #define CDECL_RETURN_SIMPLE_IN_MEMORY > #define STDCALL_RETURN_SIMPLE_IN_MEMORY > #define COMPLEX_MASK (asOBJ_APP_CLASS_ASSIGNMENT | asOBJ_APP_ARRAY) > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_ASSIGNMENT | asOBJ_APP_ARRAY) > > // Windows CE uses softfp calling convention, while Windows RT uses hardfp calling convention > // ref: http://stackoverflow.com/questions/16375355/what-is-the-windows-rt-on-arm-native-code-calling-convention > #if defined(_WIN32_WCE) > #define AS_SOFTFP > #endif ># 503 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #endif ># 504 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #ifndef COMPLEX_MASK > #define COMPLEX_MASK (asOBJ_APP_ARRAY) > #endif ># 508 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #ifndef COMPLEX_RETURN_MASK > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_CONSTRUCTOR | asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_ASSIGNMENT | asOBJ_APP_ARRAY) > #endif ># 512 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #define UNREACHABLE_RETURN >#endif ># 515 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > >// Metrowerks CodeWarrior (experimental, let me know if something isn't working) >#if defined(__MWERKS__) && !defined(EPPC) // JWC -- If Wii DO NOT use this even when using Metrowerks Compiler. Even though they are called Freescale... > #define MULTI_BASE_OFFSET(x) (*((asDWORD*)(&x)+1)) > #define HAVE_VIRTUAL_BASE_OFFSET > #define VIRTUAL_BASE_OFFSET(x) (*((asDWORD*)(&x)+3)) > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > #define THISCALL_PASS_OBJECT_POINTER_IN_ECX > #define asVSNPRINTF(a, b, c, d) _vsnprintf(a, b, c, d) > #define THISCALL_CALLEE_POPS_ARGUMENTS > #define COMPLEX_MASK (asOBJ_APP_CLASS_CONSTRUCTOR | asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_ASSIGNMENT) > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_CONSTRUCTOR | asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_ASSIGNMENT) > #define AS_SIZEOF_BOOL 1 > #define AS_WINDOWS_THREADS > #define STDCALL __stdcall > > // Support native calling conventions on x86, but not 64bit yet > #if defined(_M_IX86) && !defined(__LP64__) > #define AS_X86 > #define ASM_INTEL // Intel style for inline assembly > #endif ># 536 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #define UNREACHABLE_RETURN >#endif ># 539 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > >// SN Systems ProDG >#if defined(__SNC__) || defined(SNSYS) > #define MULTI_BASE_OFFSET(x) (*((asDWORD*)(&x)+1)) > #define CALLEE_POPS_HIDDEN_RETURN_POINTER > #define COMPLEX_OBJS_PASSED_BY_REF > > #ifdef __psp2__ > #define COMPLEX_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR) > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR) > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > #define CDECL_RETURN_SIMPLE_IN_MEMORY > #define STDCALL_RETURN_SIMPLE_IN_MEMORY > #define THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > #define CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > #define STDCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > #else ># 556 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define GNU_STYLE_VIRTUAL_METHOD > #define ASM_AT_N_T // AT&T style inline assembly > #define COMPLEX_MASK (asOBJ_APP_CLASS_DESTRUCTOR) > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_DESTRUCTOR) > #endif ># 561 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #define AS_SIZEOF_BOOL 1 > #define asVSNPRINTF(a, b, c, d) vsnprintf(a, b, c, d) > > // SN doesnt seem to like STDCALL. > // Maybe it can work with some fiddling, but I can't imagine linking to > // any STDCALL functions with a console anyway... > #define STDCALL > > // Linux specific > #ifdef __linux__ > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > #define CDECL_RETURN_SIMPLE_IN_MEMORY > #define STDCALL_RETURN_SIMPLE_IN_MEMORY > #endif ># 576 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > // Support native calling conventions on x86, but not 64bit yet > #if (defined(i386) || defined(__i386) || defined(__i386__)) && !defined(__LP64__) > #define AS_X86 > // PS3 > #elif (defined(__PPC__) || defined(__ppc__)) && defined(__PPU__) ># 582 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // Support native calling conventions on PS3 > #define AS_PS3 > #define AS_PPC_64 > #define AS_NO_MEMORY_H > #define AS_NO_EXCEPTIONS > #if 0 /* expanded by -frewrite-includes */ >#include <stdlib.h> >#endif /* expanded by -frewrite-includes */ ># 587 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" ># 588 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // PSP > #elif defined(__psp__) ># 590 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_NO_MEMORY_H > #define AS_MIPS > #define AS_PSP > #define AS_USE_DOUBLE_AS_FLOAT > // PSVita > #elif defined(__psp2__) ># 596 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_PSVITA > #define AS_ARM > #define AS_NO_MEMORY_H > #define AS_NO_EXCEPTIONS > #define AS_CALLEE_DESTROY_OBJ_BY_VAL > #undef AS_NO_THISCALL_FUNCTOR_METHOD > #endif ># 603 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #define UNREACHABLE_RETURN >#endif ># 606 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > >// GNU C (and MinGW or Cygwin on Windows) >// Use the following command to determine predefined macros: echo . | g++ -dM -E - >// MSVC2015 can now use CLang too, but it shouldn't go in here >#if (defined(__GNUC__) && !defined(__SNC__) && !defined(_MSC_VER)) || defined(EPPC) || defined(__CYGWIN__) // JWC -- use this instead for Wii > #define GNU_STYLE_VIRTUAL_METHOD > #define MULTI_BASE_OFFSET(x) (*((asPWORD*)(&x)+1)) > #define asVSNPRINTF(a, b, c, d) vsnprintf(a, b, c, d) > #define CALLEE_POPS_HIDDEN_RETURN_POINTER > #define COMPLEX_OBJS_PASSED_BY_REF > #define COMPLEX_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_ARRAY) > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_ARRAY) > #define AS_NO_MEMORY_H > #define AS_SIZEOF_BOOL 1 > #define STDCALL __attribute__((stdcall)) > #define ASM_AT_N_T > > // WII U > #if defined(__ghs__) > #define AS_WIIU > > // Native calling conventions are not yet supported > #define AS_MAX_PORTABILITY > > // Marmalade is a cross platform SDK. It uses g++ to compile for iOS and Android > #elif defined(__S3E__) ># 632 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #ifndef AS_MARMALADE > // From now on we'll use the below define > #define AS_MARMALADE > #endif ># 636 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > // STDCALL is not available on Marmalade when compiled for iOS or Android > #undef STDCALL > #define STDCALL > > // Marmalade doesn't seem to have proper support for > // atomic instructions or read/write locks > #define AS_NO_THREADS > #define AS_NO_ATOMIC > > // Identify for which CPU the library is being built > #if defined(I3D_ARCH_X86) > #define AS_X86 > #elif defined(I3D_ARCH_ARM) ># 650 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_ARM > > #define AS_SOFTFP > > // Marmalade appear to use the same ABI as Android when built for ARM > #define CDECL_RETURN_SIMPLE_IN_MEMORY > #define STDCALL_RETURN_SIMPLE_IN_MEMORY > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > > #undef THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE > #define THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > > #undef CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE > #define CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > > #undef STDCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE > #define STDCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > > #undef GNU_STYLE_VIRTUAL_METHOD > > #undef COMPLEX_MASK > #define COMPLEX_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > #undef COMPLEX_RETURN_MASK > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > > #define AS_CALLEE_DESTROY_OBJ_BY_VAL > #endif ># 677 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > // MacOSX and IPhone > #elif defined(__APPLE__) ># 680 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #if 0 /* expanded by -frewrite-includes */ >#include <TargetConditionals.h> >#endif /* expanded by -frewrite-includes */ ># 681 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" ># 682 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > // Is this a Mac or an IPhone (or other iOS device)? > #if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE == 1 > #define AS_IPHONE > #else ># 687 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_MAC > #endif ># 689 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > // The sizeof bool is different depending on the target CPU > #undef AS_SIZEOF_BOOL > #if defined(__ppc__) > #define AS_SIZEOF_BOOL 4 > // STDCALL is not available on PPC > #undef STDCALL > #define STDCALL > #else ># 698 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_SIZEOF_BOOL 1 > #endif ># 700 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #if (defined(_ARM_) || defined(__arm__)) > // iOS use ARM processor > #define AS_ARM > #undef AS_NO_THISCALL_FUNCTOR_METHOD > #define CDECL_RETURN_SIMPLE_IN_MEMORY > #define STDCALL_RETURN_SIMPLE_IN_MEMORY > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > > #undef GNU_STYLE_VIRTUAL_METHOD > > #undef THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE > #undef CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE > #undef STDCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE > > #define THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > #define CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > #define STDCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > #define COMPLEX_OBJS_PASSED_BY_REF > #undef COMPLEX_MASK > #define COMPLEX_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > #undef COMPLEX_RETURN_MASK > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > > // iOS uses soft-float ABI > #define AS_SOFTFP > > // STDCALL is not available on ARM > #undef STDCALL > #define STDCALL > > #elif (defined(__arm64__)) ># 732 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // The IPhone 5S+ uses an ARM64 processor > > // AngelScript currently doesn't support native calling > // for 64bit ARM processors so it's necessary to turn on > // portability mode > #define AS_MAX_PORTABILITY > > // STDCALL is not available on ARM > #undef STDCALL > #define STDCALL > > #elif (defined(i386) || defined(__i386) || defined(__i386__)) && !defined(__LP64__) ># 744 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // Support native calling conventions on Mac OS X + Intel 32bit CPU > #define AS_X86 > #undef AS_NO_THISCALL_FUNCTOR_METHOD > #define THISCALL_PASS_OBJECT_POINTER_ON_THE_STACK > #undef COMPLEX_MASK > #define COMPLEX_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > #undef COMPLEX_RETURN_MASK > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > > #elif defined(__LP64__) && !defined(__ppc__) && !defined(__PPC__) && !defined(__arm64__) ># 754 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // http://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/LowLevelABI/140-x86-64_Function_Calling_Conventions/x86_64.html#//apple_ref/doc/uid/TP40005035-SW1 > #define AS_X64_GCC > #undef AS_NO_THISCALL_FUNCTOR_METHOD > #define HAS_128_BIT_PRIMITIVES > #define SPLIT_OBJS_BY_MEMBER_TYPES > #undef COMPLEX_MASK > #define COMPLEX_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > #undef COMPLEX_RETURN_MASK > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > #define AS_LARGE_OBJS_PASSED_BY_REF > #define AS_LARGE_OBJ_MIN_SIZE 5 > // STDCALL is not available on 64bit Mac > #undef STDCALL > #define STDCALL > > #elif (defined(__ppc__) || defined(__PPC__)) && !defined(__LP64__) ># 770 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // Support native calling conventions on Mac OS X + PPC 32bit CPU > #define AS_PPC > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > #define CDECL_RETURN_SIMPLE_IN_MEMORY > #define STDCALL_RETURN_SIMPLE_IN_MEMORY > #undef COMPLEX_MASK > #define COMPLEX_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > #undef COMPLEX_RETURN_MASK > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > > #elif (defined(__ppc__) || defined(__PPC__)) && defined(__LP64__) ># 781 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_PPC_64 > #else ># 783 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // Unknown CPU type > #define AS_MAX_PORTABILITY > #endif ># 786 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_POSIX_THREADS > > // Windows > #elif defined(WIN32) || defined(_WIN32) || defined(_WIN64) || defined(__CYGWIN__) ># 790 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // On Windows the simple classes are returned in the EAX:EDX registers > //#define THISCALL_RETURN_SIMPLE_IN_MEMORY > //#define CDECL_RETURN_SIMPLE_IN_MEMORY > //#define STDCALL_RETURN_SIMPLE_IN_MEMORY > > #undef COMPLEX_MASK > #define COMPLEX_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > #undef COMPLEX_RETURN_MASK > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > > #if (defined(i386) || defined(__i386) || defined(__i386__)) && !defined(__LP64__) > // Support native calling conventions on Intel 32bit CPU > #define AS_X86 > #undef AS_NO_THISCALL_FUNCTOR_METHOD > > // As of version 4.7 MinGW changed the ABI, presumably > // to be better aligned with how MSVC works > #if (__GNUC__ == 4 && __GNUC_MINOR__ >= 7) || __GNUC__ > 4 > #define AS_MINGW47 > #endif ># 810 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #if (__clang_major__ == 3 && __clang_minor__ > 4) || __clang_major > 3 > #define AS_MINGW47 > #endif ># 814 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #ifdef AS_MINGW47 > #undef CALLEE_POPS_HIDDEN_RETURN_POINTER > #define THISCALL_CALLEE_POPS_ARGUMENTS > #else ># 819 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // Earlier versions than 4.7 > #define THISCALL_PASS_OBJECT_POINTER_ON_THE_STACK > #endif ># 822 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #elif defined(__x86_64__) ># 824 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_X64_MINGW > #undef AS_NO_THISCALL_FUNCTOR_METHOD > #define AS_LARGE_OBJS_PASSED_BY_REF > #define AS_LARGE_OBJ_MIN_SIZE 3 > #define COMPLEX_OBJS_PASSED_BY_REF > #else ># 830 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_MAX_PORTABILITY > #endif ># 832 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_WIN > #define AS_WINDOWS_THREADS > > // Linux > #elif defined(__linux__) && !defined(ANDROID) && !defined(__ANDROID__) ># 837 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #undef COMPLEX_MASK > #define COMPLEX_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > #undef COMPLEX_RETURN_MASK > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > > #if (defined(i386) || defined(__i386) || defined(__i386__)) && !defined(__LP64__) > // x86 32bit > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > #define CDECL_RETURN_SIMPLE_IN_MEMORY > #define STDCALL_RETURN_SIMPLE_IN_MEMORY > > // Support native calling conventions on Intel 32bit CPU > #define THISCALL_PASS_OBJECT_POINTER_ON_THE_STACK > #define AS_X86 > #undef AS_NO_THISCALL_FUNCTOR_METHOD > #elif defined(__x86_64__) ># 854 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // x86 64bit > #define AS_X64_GCC > #undef AS_NO_THISCALL_FUNCTOR_METHOD > #define HAS_128_BIT_PRIMITIVES > #define SPLIT_OBJS_BY_MEMBER_TYPES > #define AS_LARGE_OBJS_PASSED_BY_REF > #define AS_LARGE_OBJ_MIN_SIZE 5 > // STDCALL is not available on 64bit Linux > #undef STDCALL > #define STDCALL > #elif defined(__ARMEL__) || defined(__arm__) || defined(__aarch64__) || defined(__AARCH64EL__) ># 865 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // arm > > // The assembler code currently doesn't support arm v4, nor 64bit (v8) > #if !defined(__ARM_ARCH_4__) && !defined(__ARM_ARCH_4T__) && !defined(__LP64__) > #define AS_ARM > > // TODO: The stack unwind on exceptions currently fails due to the assembler code in as_callfunc_arm_gcc.S > #define AS_NO_EXCEPTIONS > > #undef STDCALL > #define STDCALL > > #define CDECL_RETURN_SIMPLE_IN_MEMORY > #define STDCALL_RETURN_SIMPLE_IN_MEMORY > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > > #undef THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE > #undef CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE > #undef STDCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE > > #define THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > #define CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > #define STDCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > > #ifndef AS_MAX_PORTABILITY > // Make a few checks against incompatible ABI combinations > #if defined(__FAST_MATH__) && __FAST_MATH__ == 1 > #error -ffast-math is not supported with native calling conventions > #endif ># 894 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #endif ># 895 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > // Verify if soft-float or hard-float ABI is used > #if defined(__SOFTFP__) && __SOFTFP__ == 1 > // -ffloat-abi=softfp or -ffloat-abi=soft > #define AS_SOFTFP > #endif ># 901 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > // Tested with both hard float and soft float abi > #undef AS_NO_THISCALL_FUNCTOR_METHOD > #endif ># 905 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #elif defined(__mips__) ># 907 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // mips > #define AS_MIPS > #undef STDCALL > #define STDCALL > > #ifdef _ABIO32 > // 32bit O32 ABI > #define AS_MIPS > > // All structures are returned in memory regardless of size or complexity > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > #define THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 0 > #define CDECL_RETURN_SIMPLE_IN_MEMORY > #define CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 0 > #define STDCALL_RETURN_SIMPLE_IN_MEMORY > #define CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 0 > #undef AS_NO_THISCALL_FUNCTOR_METHOD > #else ># 925 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // For other ABIs the native calling convention is not available (yet) > #define AS_MAX_PORTABILITY > #endif ># 928 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #elif defined(__PPC64__) ># 929 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // PPC 64bit > > // The code in as_callfunc_ppc_64.cpp was built for PS3 and XBox 360, that > // although use 64bit PPC only uses 32bit pointers. > // TODO: Add support for native calling conventions on Linux with PPC 64bit > #define AS_MAX_PORTABILITY > #else ># 936 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_MAX_PORTABILITY > #endif ># 938 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_LINUX > #define AS_POSIX_THREADS > > #if !( ( (__GNUC__ == 4) && (__GNUC_MINOR__ >= 1) || __GNUC__ > 4) ) > // Only with GCC 4.1 was the atomic instructions available > #define AS_NO_ATOMIC > #endif ># 945 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > // Free BSD > #elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(__OpenBSD__) ># 948 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_BSD > #if (defined(i386) || defined(__i386) || defined(__i386__)) && !defined(__LP64__) > #undef COMPLEX_MASK > #define COMPLEX_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > #undef COMPLEX_RETURN_MASK > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > #define THISCALL_PASS_OBJECT_POINTER_ON_THE_STACK > #define AS_X86 > #elif defined(__LP64__) ># 957 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_X64_GCC > #define HAS_128_BIT_PRIMITIVES > #define SPLIT_OBJS_BY_MEMBER_TYPES > #undef COMPLEX_MASK > #define COMPLEX_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > #undef COMPLEX_RETURN_MASK > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > #define AS_LARGE_OBJS_PASSED_BY_REF > #define AS_LARGE_OBJ_MIN_SIZE 5 > #undef STDCALL > #define STDCALL > #else ># 969 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_MAX_PORTABILITY > #endif ># 971 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_POSIX_THREADS > #if !( ( (__GNUC__ == 4) && (__GNUC_MINOR__ >= 1) || __GNUC__ > 4) ) > // Only with GCC 4.1 was the atomic instructions available > #define AS_NO_ATOMIC > #endif ># 976 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > // PSP and PS2 > #elif defined(__PSP__) || defined(__psp__) || defined(_EE_) || defined(_PSP) || defined(_PS2) ># 979 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // Support native calling conventions on MIPS architecture > #if (defined(_MIPS_ARCH) || defined(_mips) || defined(__MIPSEL__)) && !defined(__LP64__) > #define AS_MIPS > #define AS_USE_DOUBLE_AS_FLOAT > #else ># 984 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_MAX_PORTABILITY > #endif ># 986 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > // PS3 > #elif (defined(__PPC__) || defined(__ppc__)) && defined(__PPU__) ># 989 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // Support native calling conventions on PS3 > #define AS_PS3 > #define AS_PPC_64 > #define SPLIT_OBJS_BY_MEMBER_TYPES > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > #define CDECL_RETURN_SIMPLE_IN_MEMORY > #define STDCALL_RETURN_SIMPLE_IN_MEMORY > // PS3 doesn't have STDCALL > #undef STDCALL > #define STDCALL > > // Dreamcast > #elif __SH4_SINGLE_ONLY__ ># 1002 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // Support native calling conventions on Dreamcast > #define AS_DC > #define AS_SH4 > > // Wii JWC - Close to PS3 just no PPC_64 and AS_PS3 > #elif defined(EPPC) ># 1008 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_WII > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > #define CDECL_RETURN_SIMPLE_IN_MEMORY > #define STDCALL_RETURN_SIMPLE_IN_MEMORY > #undef STDCALL > #define STDCALL > > // Android > #elif defined(ANDROID) || defined(__ANDROID__) ># 1017 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_ANDROID > > // Android 2.3+ supports posix threads > #define AS_POSIX_THREADS > > // Common configuration with Android arm and x86 > #define CDECL_RETURN_SIMPLE_IN_MEMORY > #define STDCALL_RETURN_SIMPLE_IN_MEMORY > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > > #undef COMPLEX_MASK > #define COMPLEX_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > #undef COMPLEX_RETURN_MASK > #define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY) > > #if (defined(_ARM_) || defined(__arm__)) > // Android ARM > > // TODO: The stack unwind on exceptions currently fails due to the assembler code in as_callfunc_arm_gcc.S > #define AS_NO_EXCEPTIONS > > #undef THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE > #undef CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE > #undef STDCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE > > #define THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > #define CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > #define STDCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2 > > // The stdcall calling convention is not used on the arm cpu > #undef STDCALL > #define STDCALL > > #undef GNU_STYLE_VIRTUAL_METHOD > > #define AS_ARM > #undef AS_NO_THISCALL_FUNCTOR_METHOD > #define AS_SOFTFP > #define AS_CALLEE_DESTROY_OBJ_BY_VAL > #elif (defined(i386) || defined(__i386) || defined(__i386__)) && !defined(__LP64__) ># 1057 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // Android Intel x86 (same config as Linux x86). Tested with Intel x86 Atom System Image. > > // Support native calling conventions on Intel 32bit CPU > #define THISCALL_PASS_OBJECT_POINTER_ON_THE_STACK > #define AS_X86 > #undef AS_NO_THISCALL_FUNCTOR_METHOD > #elif defined(__mips__) ># 1064 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_MIPS > #undef STDCALL > #define STDCALL > > #ifdef _ABIO32 > #define AS_MIPS > > // All structures are returned in memory regardless of size or complexity > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > #define THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 0 > #define CDECL_RETURN_SIMPLE_IN_MEMORY > #define CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 0 > #define STDCALL_RETURN_SIMPLE_IN_MEMORY > #define CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 0 > #undef AS_NO_THISCALL_FUNCTOR_METHOD > #else ># 1080 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > // For other ABIs the native calling convention is not available (yet) > #define AS_MAX_PORTABILITY > #endif ># 1083 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #endif ># 1084 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > // Haiku OS > #elif __HAIKU__ ># 1087 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_HAIKU > // Only x86-32 is currently supported by Haiku, but they do plan to support > // x86-64 and PowerPC in the future, so should go ahead and check the platform > // for future compatibility > #if (defined(i386) || defined(__i386) || defined(__i386__)) && !defined(__LP64__) > #define AS_X86 > #define THISCALL_PASS_OBJECT_POINTER_ON_THE_STACK > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > #define CDECL_RETURN_SIMPLE_IN_MEMORY > #define STDCALL_RETURN_SIMPLE_IN_MEMORY > #else ># 1098 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_MAX_PORTABILITY > #endif ># 1100 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #define AS_POSIX_THREADS > #if !( ( (__GNUC__ == 4) && (__GNUC_MINOR__ >= 1) || __GNUC__ > 4) ) > // Only with GCC 4.1 was the atomic instructions available > #define AS_NO_ATOMIC > #endif ># 1106 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > // Illumos > #elif defined(__sun) ># 1109 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #if (defined(i386) || defined(__i386) || defined(__i386__)) && !defined(__LP64__) > #define THISCALL_RETURN_SIMPLE_IN_MEMORY > #define CDECL_RETURN_SIMPLE_IN_MEMORY > #define STDCALL_RETURN_SIMPLE_IN_MEMORY > > // Support native calling conventions on Intel 32bit CPU > #define THISCALL_PASS_OBJECT_POINTER_ON_THE_STACK > #define AS_X86 > #elif defined(__x86_64__) ># 1118 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_X64_GCC > #define HAS_128_BIT_PRIMITIVES > #define SPLIT_OBJS_BY_MEMBER_TYPES > // STDCALL is not available on 64bit Linux > #undef STDCALL > #define STDCALL > #else ># 1125 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_MAX_PORTABILITY > #endif ># 1127 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define AS_ILLUMOS > #define AS_POSIX_THREADS > > #if !( ( (__GNUC__ == 4) && (__GNUC_MINOR__ >= 1) || __GNUC__ > 4) ) > // Only with GCC 4.1 was the atomic instructions available > #define AS_NO_ATOMIC > #endif ># 1134 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #endif ># 1135 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #define UNREACHABLE_RETURN >#endif ># 1138 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > >// Sun CC >// Initial information provided by Andrey Bergman >#if defined(__SUNPRO_CC) > #if defined(__sparc) > #define AS_SPARC > #endif ># 1145 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > #if defined(__sun) > #define AS_SUN > #endif ># 1149 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > // Native calling conventions is not yet supported for Sun CC > #if !defined(AS_MAX_PORTABILITY) > #define AS_MAX_PORTABILITY > #endif ># 1154 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > // I presume Sun CC uses a similar structure of method pointers as gnuc > #define MULTI_BASE_OFFSET(x) (*((asPWORD*)(&x)+1)) > > #if !defined(AS_SIZEOF_BOOL) > #define AS_SIZEOF_BOOL 1 // sizeof(bool) == 1 > #endif ># 1161 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #if !defined(UNREACHABLE_RETURN) > #define UNREACHABLE_RETURN > #endif ># 1164 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #if !defined(STDCALL) > #define STDCALL // There is no stdcall on Solaris/SunPro/SPARC > #endif ># 1167 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #if !defined(asVSNPRINTF) > #define asVSNPRINTF(a, b, c, d) vsnprintf(a, b, c, d) > #endif ># 1170 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" >#endif ># 1171 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > >// >// Detect target hardware >//------------------------------------------------ > >// Big endian CPU target? >// see: http://sourceforge.net/p/predef/wiki/Endianness/ >#if !defined(AS_BIG_ENDIAN) && \ > defined(__BYTE_ORDER) && __BYTE_ORDER == __BIG_ENDIAN || \ > defined(__BIG_ENDIAN__) || \ > defined(__ARMEB__) || \ > defined(__THUMBEB__) || \ > defined(__AARCH64EB__) || \ > defined(_MIBSEB) || defined(__MIBSEB) || defined(__MIBSEB__) > #define AS_BIG_ENDIAN >#endif ># 1188 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > >// Dreamcast and Gamecube use only 32bit floats, so treat doubles as floats >#if defined(__SH4_SINGLE_ONLY__) || defined(_GC) > #define AS_USE_DOUBLE_AS_FLOAT // use 32bit floats instead of doubles >#endif ># 1193 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > >// If there are no current support for native calling >// conventions, then compile with AS_MAX_PORTABILITY >#if (!defined(AS_X86) && !defined(AS_SH4) && !defined(AS_MIPS) && !defined(AS_PPC) && !defined(AS_PPC_64) && !defined(AS_XENON) && !defined(AS_X64_GCC) && !defined(AS_X64_MSVC) && !defined(AS_ARM) && !defined(AS_X64_MINGW)) > #ifndef AS_MAX_PORTABILITY > #define AS_MAX_PORTABILITY > #endif ># 1200 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" >#endif ># 1201 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > >// If the platform doesn't support atomic instructions we can't allow >// multithreading as the reference counters won't be threadsafe >#if defined(AS_NO_ATOMIC) && !defined(AS_NO_THREADS) > #define AS_NO_THREADS >#endif ># 1207 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > >// If the form of threads to use hasn't been chosen >// then the library will be compiled without support >// for multithreading >#if !defined(AS_POSIX_THREADS) && !defined(AS_WINDOWS_THREADS) > #define AS_NO_THREADS >#endif ># 1214 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > >// The assert macro >#if defined(ANDROID) > #if defined(AS_DEBUG) > #if 0 /* expanded by -frewrite-includes */ >#include <android/log.h> >#endif /* expanded by -frewrite-includes */ ># 1219 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" ># 1220 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #if 0 /* expanded by -frewrite-includes */ >#include <stdlib.h> >#endif /* expanded by -frewrite-includes */ ># 1220 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" ># 1221 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define asASSERT(x) \ > do { \ > if (!(x)) { \ > __android_log_print(ANDROID_LOG_ERROR, "AngelScript", "Assert failed at %s:%d - %s", __FILE__, __LINE__, #x); \ > exit(1); \ > } \ > } while (0) > #else ># 1229 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define asASSERT(x) > #endif ># 1231 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" >#else ># 1232 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #if 0 /* expanded by -frewrite-includes */ >#include <assert.h> >#endif /* expanded by -frewrite-includes */ ># 1232 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" ># 1233 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > #define asASSERT(x) assert(x) >#endif ># 1235 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > > > >// >// Internal defines (do not change these) >//---------------------------------------------------------------- > >#define ARG_W(b) ((asWORD*)&b) >#define ARG_DW(b) ((asDWORD*)&b) >#define ARG_QW(b) ((asQWORD*)&b) >#define ARG_PTR(b) ((asPWORD*)&b) >#define BCARG_W(b) ((asWORD*)&(b)[1]) >#define BCARG_DW(b) ((asDWORD*)&(b)[1]) >#define BCARG_QW(b) ((asQWORD*)&(b)[1]) >#define BCARG_PTR(b) ((asPWORD*)&(b)[1]) > >// This macro is used to avoid warnings about unused variables. >// Usually where the variables are only used in debug mode. >#define UNUSED_VAR(x) (void)(x) > >#if 0 /* expanded by -frewrite-includes */ >#include "../include/angelscript.h" >#endif /* expanded by -frewrite-includes */ ># 1255 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" ># 1256 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" >#if 0 /* expanded by -frewrite-includes */ >#include "as_memory.h" >#endif /* expanded by -frewrite-includes */ ># 1256 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" ># 1257 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > >#ifdef AS_USE_NAMESPACE >using namespace AngelScript; >#endif ># 1261 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > >#endif ># 1263 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" ># 43 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_criticalsection.h" 2 > >BEGIN_AS_NAMESPACE > >#ifdef AS_NO_THREADS > >#define DECLARECRITICALSECTION(x) >#define ENTERCRITICALSECTION(x) >#define LEAVECRITICALSECTION(x) > >inline bool tryEnter() { return true; } >#define TRYENTERCRITICALSECTION(x) tryEnter() > >#define DECLAREREADWRITELOCK(x) >#define ACQUIREEXCLUSIVE(x) >#define RELEASEEXCLUSIVE(x) >#define ACQUIRESHARED(x) >#define RELEASESHARED(x) > >#else ># 62 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_criticalsection.h" > >#define DECLARECRITICALSECTION(x) asCThreadCriticalSection x; >#define ENTERCRITICALSECTION(x) x.Enter() >#define LEAVECRITICALSECTION(x) x.Leave() >#define TRYENTERCRITICALSECTION(x) x.TryEnter() > >#define DECLAREREADWRITELOCK(x) asCThreadReadWriteLock x; >#define ACQUIREEXCLUSIVE(x) x.AcquireExclusive() >#define RELEASEEXCLUSIVE(x) x.ReleaseExclusive() >#define ACQUIRESHARED(x) x.AcquireShared() >#define RELEASESHARED(x) x.ReleaseShared() > >#ifdef AS_POSIX_THREADS > >END_AS_NAMESPACE >#if 0 /* expanded by -frewrite-includes */ >#include <pthread.h> >#endif /* expanded by -frewrite-includes */ ># 77 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_criticalsection.h" ># 1 "/usr/include/pthread.h" 1 3 4 >/* > * Copyright (c) 1993, 1994 by Chris Provenzano, proven@mit.edu > * Copyright (c) 1995-1998 by John Birrell <jb@cimlogic.com.au> > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. All advertising materials mentioning features or use of this software > * must display the following acknowledgement: > * This product includes software developed by Chris Provenzano. > * 4. The name of Chris Provenzano may not be used to endorse or promote > * products derived from this software without specific prior written > * permission. > * > * THIS SOFTWARE IS PROVIDED BY CHRIS PROVENZANO ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL CHRIS PROVENZANO BE LIABLE FOR ANY > * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES > * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR > * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER > * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: head/include/pthread.h 313818 2017-02-16 20:28:30Z pfg $ > */ >#ifndef _PTHREAD_H_ >#define _PTHREAD_H_ > >/* > * Header files. > */ >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 41 "/usr/include/pthread.h" 3 4 ># 42 "/usr/include/pthread.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_pthreadtypes.h> >#endif /* expanded by -frewrite-includes */ ># 42 "/usr/include/pthread.h" 3 4 ># 1 "/usr/include/sys/_pthreadtypes.h" 1 3 4 >/* > * Copyright (c) 1993, 1994 by Chris Provenzano, proven@mit.edu > * Copyright (c) 1995-1998 by John Birrell <jb@cimlogic.com.au> > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. All advertising materials mentioning features or use of this software > * must display the following acknowledgement: > * This product includes software developed by Chris Provenzano. > * 4. The name of Chris Provenzano may not be used to endorse or promote > * products derived from this software without specific prior written > * permission. > * > * THIS SOFTWARE IS PROVIDED BY CHRIS PROVENZANO ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL CHRIS PROVENZANO BE LIABLE FOR ANY > * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES > * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR > * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER > * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: head/sys/sys/_pthreadtypes.h 189828 2009-03-14 20:10:14Z das $ > */ > >#ifndef _SYS__PTHREADTYPES_H_ >#define _SYS__PTHREADTYPES_H_ > >/* > * Forward structure definitions. > * > * These are mostly opaque to the user. > */ >struct pthread; >struct pthread_attr; >struct pthread_cond; >struct pthread_cond_attr; >struct pthread_mutex; >struct pthread_mutex_attr; >struct pthread_once; >struct pthread_rwlock; >struct pthread_rwlockattr; >struct pthread_barrier; >struct pthread_barrier_attr; >struct pthread_spinlock; > >/* > * Primitive system data type definitions required by P1003.1c. > * > * Note that P1003.1c specifies that there are no defined comparison > * or assignment operators for the types pthread_attr_t, pthread_cond_t, > * pthread_condattr_t, pthread_mutex_t, pthread_mutexattr_t. > */ >#ifndef _PTHREAD_T_DECLARED >typedef struct pthread *pthread_t; >#define _PTHREAD_T_DECLARED >#endif ># 68 "/usr/include/sys/_pthreadtypes.h" 3 4 >typedef struct pthread_attr *pthread_attr_t; >typedef struct pthread_mutex *pthread_mutex_t; >typedef struct pthread_mutex_attr *pthread_mutexattr_t; >typedef struct pthread_cond *pthread_cond_t; >typedef struct pthread_cond_attr *pthread_condattr_t; >typedef int pthread_key_t; >typedef struct pthread_once pthread_once_t; >typedef struct pthread_rwlock *pthread_rwlock_t; >typedef struct pthread_rwlockattr *pthread_rwlockattr_t; >typedef struct pthread_barrier *pthread_barrier_t; >typedef struct pthread_barrierattr *pthread_barrierattr_t; >typedef struct pthread_spinlock *pthread_spinlock_t; > >/* > * Additional type definitions: > * > * Note that P1003.1c reserves the prefixes pthread_ and PTHREAD_ for > * use in header symbols. > */ >typedef void *pthread_addr_t; >typedef void *(*pthread_startroutine_t)(void *); > >/* > * Once definitions. > */ >struct pthread_once { > int state; > pthread_mutex_t mutex; >}; > >#endif /* ! _SYS__PTHREADTYPES_H_ */ ># 99 "/usr/include/sys/_pthreadtypes.h" 3 4 ># 43 "/usr/include/pthread.h" 2 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <machine/_limits.h> >#endif /* expanded by -frewrite-includes */ ># 43 "/usr/include/pthread.h" 3 4 ># 1 "/usr/include/machine/_limits.h" 1 3 4 >/*- > * This file is in the public domain. > */ >/* $FreeBSD: head/sys/i386/include/_limits.h 232262 2012-02-28 18:24:28Z tijl $ */ > >#if 0 /* expanded by -frewrite-includes */ >#include <x86/_limits.h> >#endif /* expanded by -frewrite-includes */ ># 6 "/usr/include/machine/_limits.h" 3 4 ># 7 "/usr/include/machine/_limits.h" 3 4 ># 44 "/usr/include/pthread.h" 2 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <machine/_types.h> >#endif /* expanded by -frewrite-includes */ ># 44 "/usr/include/pthread.h" 3 4 ># 1 "/usr/include/machine/_types.h" 1 3 4 >/*- > * This file is in the public domain. > */ >/* $FreeBSD: head/sys/i386/include/_types.h 232261 2012-02-28 18:15:28Z tijl $ */ > >#if 0 /* expanded by -frewrite-includes */ >#include <x86/_types.h> >#endif /* expanded by -frewrite-includes */ ># 6 "/usr/include/machine/_types.h" 3 4 ># 7 "/usr/include/machine/_types.h" 3 4 ># 45 "/usr/include/pthread.h" 2 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_sigset.h> >#endif /* expanded by -frewrite-includes */ ># 45 "/usr/include/pthread.h" 3 4 ># 1 "/usr/include/sys/_sigset.h" 1 3 4 >/*- > * Copyright (c) 1982, 1986, 1989, 1991, 1993 > * The Regents of the University of California. All rights reserved. > * (c) UNIX System Laboratories, Inc. > * All or some portions of this file are derived from material licensed > * to the University of California by American Telephone and Telegraph > * Co. or Unix System Laboratories, Inc. and are reproduced herein with > * the permission of UNIX System Laboratories, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)signal.h 8.4 (Berkeley) 5/4/95 > * $FreeBSD: head/sys/sys/_sigset.h 314436 2017-02-28 23:42:47Z imp $ > */ > >#ifndef _SYS__SIGSET_H_ >#define _SYS__SIGSET_H_ > >/* > * sigset_t macros. > */ >#define _SIG_WORDS 4 >#define _SIG_MAXSIG 128 >#define _SIG_IDX(sig) ((sig) - 1) >#define _SIG_WORD(sig) (_SIG_IDX(sig) >> 5) >#define _SIG_BIT(sig) (1 << (_SIG_IDX(sig) & 31)) >#define _SIG_VALID(sig) ((sig) <= _SIG_MAXSIG && (sig) > 0) > >typedef struct __sigset { > __uint32_t __bits[_SIG_WORDS]; >} __sigset_t; > >#if defined(_KERNEL) && defined(COMPAT_43) >typedef unsigned int osigset_t; >#endif ># 58 "/usr/include/sys/_sigset.h" 3 4 > >#endif /* !_SYS__SIGSET_H_ */ ># 60 "/usr/include/sys/_sigset.h" 3 4 ># 46 "/usr/include/pthread.h" 2 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sched.h> >#endif /* expanded by -frewrite-includes */ ># 46 "/usr/include/pthread.h" 3 4 ># 1 "/usr/include/sched.h" 1 3 4 >/*- > * Copyright (c) 1996, 1997 > * HD Associates, Inc. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. All advertising materials mentioning features or use of this software > * must display the following acknowledgement: > * This product includes software developed by HD Associates, Inc > * and Jukka Antero Ukkonen. > * 4. Neither the name of the author nor the names of any co-contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY HD ASSOCIATES AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL HD ASSOCIATES OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > */ > >/*- > * Copyright (c) 2002-2008, Jeffrey Roberson <jeff@freebsd.org> > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice unmodified, this list of conditions, and the following > * disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR > * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES > * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. > * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, > * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT > * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, > * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY > * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT > * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF > * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > * > * $FreeBSD: head/sys/sys/sched.h 301026 2016-05-31 08:07:40Z ed $ > */ > >#ifndef _SCHED_H_ >#define _SCHED_H_ > >#ifdef _KERNEL >/* > * General scheduling info. > * > * sched_load: > * Total runnable non-ithread threads in the system. > * > * sched_runnable: > * Runnable threads for this processor. > */ >int sched_load(void); >int sched_rr_interval(void); >int sched_runnable(void); > >/* > * Proc related scheduling hooks. > */ >void sched_exit(struct proc *p, struct thread *childtd); >void sched_fork(struct thread *td, struct thread *childtd); >void sched_fork_exit(struct thread *td); >void sched_class(struct thread *td, int class); >void sched_nice(struct proc *p, int nice); > >/* > * Threads are switched in and out, block on resources, have temporary > * priorities inherited from their procs, and use up cpu time. > */ >void sched_exit_thread(struct thread *td, struct thread *child); >u_int sched_estcpu(struct thread *td); >void sched_fork_thread(struct thread *td, struct thread *child); >void sched_lend_prio(struct thread *td, u_char prio); >void sched_lend_user_prio(struct thread *td, u_char pri); >fixpt_t sched_pctcpu(struct thread *td); >void sched_prio(struct thread *td, u_char prio); >void sched_sleep(struct thread *td, int prio); >void sched_switch(struct thread *td, struct thread *newtd, int flags); >void sched_throw(struct thread *td); >void sched_unlend_prio(struct thread *td, u_char prio); >void sched_user_prio(struct thread *td, u_char prio); >void sched_userret(struct thread *td); >void sched_wakeup(struct thread *td); >#ifdef RACCT >#ifdef SCHED_4BSD >fixpt_t sched_pctcpu_delta(struct thread *td); >#endif ># 110 "/usr/include/sched.h" 3 4 >#endif ># 111 "/usr/include/sched.h" 3 4 > >/* > * Threads are moved on and off of run queues > */ >void sched_add(struct thread *td, int flags); >void sched_clock(struct thread *td); >void sched_preempt(struct thread *td); >void sched_rem(struct thread *td); >void sched_relinquish(struct thread *td); >struct thread *sched_choose(void); >void sched_idletd(void *); > >/* > * Binding makes cpu affinity permanent while pinning is used to temporarily > * hold a thread on a particular CPU. > */ >void sched_bind(struct thread *td, int cpu); >static __inline void sched_pin(void); >void sched_unbind(struct thread *td); >static __inline void sched_unpin(void); >int sched_is_bound(struct thread *td); >void sched_affinity(struct thread *td); > >/* > * These procedures tell the process data structure allocation code how > * many bytes to actually allocate. > */ >int sched_sizeof_proc(void); >int sched_sizeof_thread(void); > >/* > * This routine provides a consistent thread name for use with KTR graphing > * functions. > */ >char *sched_tdname(struct thread *td); >#ifdef KTR >void sched_clear_tdname(struct thread *td); >#endif ># 149 "/usr/include/sched.h" 3 4 > >static __inline void >sched_pin(void) >{ > curthread->td_pinned++; > __compiler_membar(); >} > >static __inline void >sched_unpin(void) >{ > __compiler_membar(); > curthread->td_pinned--; >} > >/* sched_add arguments (formerly setrunqueue) */ >#define SRQ_BORING 0x0000 /* No special circumstances. */ >#define SRQ_YIELDING 0x0001 /* We are yielding (from mi_switch). */ >#define SRQ_OURSELF 0x0002 /* It is ourself (from mi_switch). */ >#define SRQ_INTR 0x0004 /* It is probably urgent. */ >#define SRQ_PREEMPTED 0x0008 /* has been preempted.. be kind */ >#define SRQ_BORROWING 0x0010 /* Priority updated due to prio_lend */ > >/* Scheduler stats. */ >#ifdef SCHED_STATS >DPCPU_DECLARE(long, sched_switch_stats[SWT_COUNT]); > >#define SCHED_STAT_DEFINE_VAR(name, ptr, descr) \ >static void name ## _add_proc(void *dummy __unused) \ >{ \ > \ > SYSCTL_ADD_PROC(NULL, \ > SYSCTL_STATIC_CHILDREN(_kern_sched_stats), OID_AUTO, \ > #name, CTLTYPE_LONG|CTLFLAG_RD|CTLFLAG_MPSAFE, \ > ptr, 0, sysctl_dpcpu_long, "LU", descr); \ >} \ >SYSINIT(name, SI_SUB_LAST, SI_ORDER_MIDDLE, name ## _add_proc, NULL); > >#define SCHED_STAT_DEFINE(name, descr) \ > DPCPU_DEFINE(unsigned long, name); \ > SCHED_STAT_DEFINE_VAR(name, &DPCPU_NAME(name), descr) >/* > * Sched stats are always incremented in critical sections so no atomic > * is necesssary to increment them. > */ >#define SCHED_STAT_INC(var) DPCPU_GET(var)++; >#else ># 196 "/usr/include/sched.h" 3 4 >#define SCHED_STAT_DEFINE_VAR(name, descr, ptr) >#define SCHED_STAT_DEFINE(name, descr) >#define SCHED_STAT_INC(var) (void)0 >#endif ># 200 "/usr/include/sched.h" 3 4 > >/* > * Fixup scheduler state for proc0 and thread0 > */ >void schedinit(void); >#endif /* _KERNEL */ ># 206 "/usr/include/sched.h" 3 4 > >/* POSIX 1003.1b Process Scheduling */ > >/* > * POSIX scheduling policies > */ >#define SCHED_FIFO 1 >#define SCHED_OTHER 2 >#define SCHED_RR 3 > >struct sched_param { > int sched_priority; >}; > >/* > * POSIX scheduling declarations for userland. > */ >#ifndef _KERNEL >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 224 "/usr/include/sched.h" 3 4 ># 225 "/usr/include/sched.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_timespec.h> >#endif /* expanded by -frewrite-includes */ ># 225 "/usr/include/sched.h" 3 4 ># 1 "/usr/include/sys/_timespec.h" 1 3 4 >/*- > * Copyright (c) 1982, 1986, 1993 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)time.h 8.5 (Berkeley) 5/4/95 > * from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp > * $FreeBSD: head/sys/sys/_timespec.h 314436 2017-02-28 23:42:47Z imp $ > */ > >#ifndef _SYS__TIMESPEC_H_ >#define _SYS__TIMESPEC_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 37 "/usr/include/sys/_timespec.h" 3 4 ># 38 "/usr/include/sys/_timespec.h" 3 4 > >#ifndef _TIME_T_DECLARED >typedef __time_t time_t; >#define _TIME_T_DECLARED >#endif ># 43 "/usr/include/sys/_timespec.h" 3 4 > >struct timespec { > time_t tv_sec; /* seconds */ > long tv_nsec; /* and nanoseconds */ >}; > >#endif /* !_SYS__TIMESPEC_H_ */ ># 50 "/usr/include/sys/_timespec.h" 3 4 ># 226 "/usr/include/sched.h" 2 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 226 "/usr/include/sched.h" 3 4 ># 227 "/usr/include/sched.h" 3 4 > >#ifndef _PID_T_DECLARED >typedef __pid_t pid_t; >#define _PID_T_DECLARED >#endif ># 232 "/usr/include/sched.h" 3 4 > >__BEGIN_DECLS >int sched_get_priority_max(int); >int sched_get_priority_min(int); >int sched_getparam(pid_t, struct sched_param *); >int sched_getscheduler(pid_t); >int sched_rr_get_interval(pid_t, struct timespec *); >int sched_setparam(pid_t, const struct sched_param *); >int sched_setscheduler(pid_t, int, const struct sched_param *); >int sched_yield(void); >__END_DECLS > >#endif ># 245 "/usr/include/sched.h" 3 4 >#endif /* !_SCHED_H_ */ ># 246 "/usr/include/sched.h" 3 4 ># 47 "/usr/include/pthread.h" 2 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <time.h> >#endif /* expanded by -frewrite-includes */ ># 47 "/usr/include/pthread.h" 3 4 ># 1 "/usr/include/time.h" 1 3 4 >/* > * Copyright (c) 1989, 1993 > * The Regents of the University of California. All rights reserved. > * (c) UNIX System Laboratories, Inc. > * All or some portions of this file are derived from material licensed > * to the University of California by American Telephone and Telegraph > * Co. or Unix System Laboratories, Inc. and are reproduced herein with > * the permission of UNIX System Laboratories, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)time.h 8.3 (Berkeley) 1/21/94 > */ > >/* > * $FreeBSD: head/include/time.h 315526 2017-03-19 00:51:12Z vangyzen $ > */ > >#ifndef _TIME_H_ >#define _TIME_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 44 "/usr/include/time.h" 3 4 ># 45 "/usr/include/time.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_null.h> >#endif /* expanded by -frewrite-includes */ ># 45 "/usr/include/time.h" 3 4 ># 46 "/usr/include/time.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 46 "/usr/include/time.h" 3 4 ># 47 "/usr/include/time.h" 3 4 > >#if __POSIX_VISIBLE > 0 && __POSIX_VISIBLE < 200112 || __BSD_VISIBLE >/* > * Frequency of the clock ticks reported by times(). Deprecated - use > * sysconf(_SC_CLK_TCK) instead. (Removed in 1003.1-2001.) > */ >#define CLK_TCK 128 >#endif ># 55 "/usr/include/time.h" 3 4 > >/* Frequency of the clock ticks reported by clock(). */ >#define CLOCKS_PER_SEC 128 > >#ifndef _CLOCK_T_DECLARED >typedef __clock_t clock_t; >#define _CLOCK_T_DECLARED >#endif ># 63 "/usr/include/time.h" 3 4 > >#ifndef _TIME_T_DECLARED >typedef __time_t time_t; >#define _TIME_T_DECLARED >#endif ># 68 "/usr/include/time.h" 3 4 > >#ifndef _SIZE_T_DECLARED >typedef __size_t size_t; >#define _SIZE_T_DECLARED >#endif ># 73 "/usr/include/time.h" 3 4 > >#if __POSIX_VISIBLE >= 199309 >/* > * New in POSIX 1003.1b-1993. > */ >#ifndef _CLOCKID_T_DECLARED >typedef __clockid_t clockid_t; >#define _CLOCKID_T_DECLARED >#endif ># 82 "/usr/include/time.h" 3 4 > >#ifndef _TIMER_T_DECLARED >typedef __timer_t timer_t; >#define _TIMER_T_DECLARED >#endif ># 87 "/usr/include/time.h" 3 4 > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/timespec.h> >#endif /* expanded by -frewrite-includes */ ># 88 "/usr/include/time.h" 3 4 ># 1 "/usr/include/sys/timespec.h" 1 3 4 >/*- > * Copyright (c) 1982, 1986, 1993 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)time.h 8.5 (Berkeley) 5/4/95 > * from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp > * $FreeBSD: head/sys/sys/timespec.h 314436 2017-02-28 23:42:47Z imp $ > */ > >#ifndef _SYS_TIMESPEC_H_ >#define _SYS_TIMESPEC_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 37 "/usr/include/sys/timespec.h" 3 4 ># 38 "/usr/include/sys/timespec.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_timespec.h> >#endif /* expanded by -frewrite-includes */ ># 38 "/usr/include/sys/timespec.h" 3 4 ># 39 "/usr/include/sys/timespec.h" 3 4 > >#if __BSD_VISIBLE >#define TIMEVAL_TO_TIMESPEC(tv, ts) \ > do { \ > (ts)->tv_sec = (tv)->tv_sec; \ > (ts)->tv_nsec = (tv)->tv_usec * 1000; \ > } while (0) >#define TIMESPEC_TO_TIMEVAL(tv, ts) \ > do { \ > (tv)->tv_sec = (ts)->tv_sec; \ > (tv)->tv_usec = (ts)->tv_nsec / 1000; \ > } while (0) > >#endif /* __BSD_VISIBLE */ ># 53 "/usr/include/sys/timespec.h" 3 4 > >/* > * Structure defined by POSIX.1b to be like a itimerval, but with > * timespecs. Used in the timer_*() system calls. > */ >struct itimerspec { > struct timespec it_interval; > struct timespec it_value; >}; > >#endif /* _SYS_TIMESPEC_H_ */ ># 64 "/usr/include/sys/timespec.h" 3 4 ># 89 "/usr/include/time.h" 2 3 4 >#endif /* __POSIX_VISIBLE >= 199309 */ ># 90 "/usr/include/time.h" 3 4 > >#if __POSIX_VISIBLE >= 200112 >#ifndef _PID_T_DECLARED >typedef __pid_t pid_t; >#define _PID_T_DECLARED >#endif ># 96 "/usr/include/time.h" 3 4 >#endif ># 97 "/usr/include/time.h" 3 4 > >/* These macros are also in sys/time.h. */ >#if !defined(CLOCK_REALTIME) && __POSIX_VISIBLE >= 200112 >#define CLOCK_REALTIME 0 >#ifdef __BSD_VISIBLE >#define CLOCK_VIRTUAL 1 >#define CLOCK_PROF 2 >#endif ># 105 "/usr/include/time.h" 3 4 >#define CLOCK_MONOTONIC 4 >#define CLOCK_UPTIME 5 /* FreeBSD-specific. */ >#define CLOCK_UPTIME_PRECISE 7 /* FreeBSD-specific. */ >#define CLOCK_UPTIME_FAST 8 /* FreeBSD-specific. */ >#define CLOCK_REALTIME_PRECISE 9 /* FreeBSD-specific. */ >#define CLOCK_REALTIME_FAST 10 /* FreeBSD-specific. */ >#define CLOCK_MONOTONIC_PRECISE 11 /* FreeBSD-specific. */ >#define CLOCK_MONOTONIC_FAST 12 /* FreeBSD-specific. */ >#define CLOCK_SECOND 13 /* FreeBSD-specific. */ >#define CLOCK_THREAD_CPUTIME_ID 14 >#define CLOCK_PROCESS_CPUTIME_ID 15 >#endif /* !defined(CLOCK_REALTIME) && __POSIX_VISIBLE >= 200112 */ ># 117 "/usr/include/time.h" 3 4 > >#if !defined(TIMER_ABSTIME) && __POSIX_VISIBLE >= 200112 >#if __BSD_VISIBLE >#define TIMER_RELTIME 0x0 /* relative timer */ >#endif ># 122 "/usr/include/time.h" 3 4 >#define TIMER_ABSTIME 0x1 /* absolute timer */ >#endif /* !defined(TIMER_ABSTIME) && __POSIX_VISIBLE >= 200112 */ ># 124 "/usr/include/time.h" 3 4 > >struct tm { > int tm_sec; /* seconds after the minute [0-60] */ > int tm_min; /* minutes after the hour [0-59] */ > int tm_hour; /* hours since midnight [0-23] */ > int tm_mday; /* day of the month [1-31] */ > int tm_mon; /* months since January [0-11] */ > int tm_year; /* years since 1900 */ > int tm_wday; /* days since Sunday [0-6] */ > int tm_yday; /* days since January 1 [0-365] */ > int tm_isdst; /* Daylight Savings Time flag */ > long tm_gmtoff; /* offset from UTC in seconds */ > char *tm_zone; /* timezone abbreviation */ >}; > >#if __POSIX_VISIBLE >extern char *tzname[]; >#endif ># 142 "/usr/include/time.h" 3 4 > >__BEGIN_DECLS >char *asctime(const struct tm *); >clock_t clock(void); >char *ctime(const time_t *); >double difftime(time_t, time_t); >/* XXX missing: getdate() */ >struct tm *gmtime(const time_t *); >struct tm *localtime(const time_t *); >time_t mktime(struct tm *); >size_t strftime(char * __restrict, size_t, const char * __restrict, > const struct tm * __restrict); >time_t time(time_t *); >#if __POSIX_VISIBLE >= 200112 >struct sigevent; >int timer_create(clockid_t, struct sigevent *__restrict, timer_t *__restrict); >int timer_delete(timer_t); >int timer_gettime(timer_t, struct itimerspec *); >int timer_getoverrun(timer_t); >int timer_settime(timer_t, int, const struct itimerspec *__restrict, > struct itimerspec *__restrict); >#endif ># 164 "/usr/include/time.h" 3 4 >#if __POSIX_VISIBLE >void tzset(void); >#endif ># 167 "/usr/include/time.h" 3 4 > >#if __POSIX_VISIBLE >= 199309 >int clock_getres(clockid_t, struct timespec *); >int clock_gettime(clockid_t, struct timespec *); >int clock_settime(clockid_t, const struct timespec *); >int nanosleep(const struct timespec *, struct timespec *); >#endif /* __POSIX_VISIBLE >= 199309 */ ># 174 "/usr/include/time.h" 3 4 > >#if __POSIX_VISIBLE >= 200112 >int clock_getcpuclockid(pid_t, clockid_t *); >int clock_nanosleep(clockid_t, int, const struct timespec *, struct timespec *); >#endif ># 179 "/usr/include/time.h" 3 4 > >#if __POSIX_VISIBLE >= 199506 >char *asctime_r(const struct tm *, char *); >char *ctime_r(const time_t *, char *); >struct tm *gmtime_r(const time_t *, struct tm *); >struct tm *localtime_r(const time_t *, struct tm *); >#endif ># 186 "/usr/include/time.h" 3 4 > >#if __XSI_VISIBLE >char *strptime(const char * __restrict, const char * __restrict, > struct tm * __restrict); >#endif ># 191 "/usr/include/time.h" 3 4 > >#if __BSD_VISIBLE >char *timezone(int, int); /* XXX XSI conflict */ >void tzsetwall(void); >time_t timelocal(struct tm * const); >time_t timegm(struct tm * const); >int timer_oshandle_np(timer_t timerid); >#endif /* __BSD_VISIBLE */ ># 199 "/usr/include/time.h" 3 4 > >#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_) >#if 0 /* expanded by -frewrite-includes */ >#include <xlocale/_time.h> >#endif /* expanded by -frewrite-includes */ ># 201 "/usr/include/time.h" 3 4 ># 1 "/usr/include/xlocale/_time.h" 1 3 4 >/*- > * Copyright (c) 2011, 2012 The FreeBSD Foundation > * All rights reserved. > * > * This software was developed by David Chisnall under sponsorship from > * the FreeBSD Foundation. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: head/include/xlocale/_time.h 231673 2012-02-14 12:03:23Z theraven $ > */ > >#ifndef _LOCALE_T_DEFINED >#define _LOCALE_T_DEFINED >typedef struct _xlocale *locale_t; >#endif ># 36 "/usr/include/xlocale/_time.h" 3 4 > >/* > * This file is included from both locale.h and xlocale.h. We need to expose > * the declarations unconditionally if we are included from xlocale.h, but only > * if we are in POSIX2008 mode if included from locale.h. > */ >#ifndef _XLOCALE_LOCALE1_H >#define _XLOCALE_LOCALE1_H > >size_t strftime_l(char * __restrict, size_t, const char * __restrict, > const struct tm * __restrict, locale_t) __strftimelike(3, 0); > >#endif /* _XLOCALE_LOCALE1_H */ ># 49 "/usr/include/xlocale/_time.h" 3 4 > >#ifdef _XLOCALE_H_ >#ifndef _XLOCALE_LOCALE2_H >#define _XLOCALE_LOCALE2_H > >char *strptime_l(const char * __restrict, const char * __restrict, > struct tm * __restrict, locale_t); > >#endif /* _XLOCALE_LOCALE2_H */ ># 58 "/usr/include/xlocale/_time.h" 3 4 >#endif /* _XLOCALE_H_ */ ># 59 "/usr/include/xlocale/_time.h" 3 4 ># 202 "/usr/include/time.h" 2 3 4 >#endif ># 203 "/usr/include/time.h" 3 4 >__END_DECLS > >#endif /* !_TIME_H_ */ ># 206 "/usr/include/time.h" 3 4 ># 48 "/usr/include/pthread.h" 2 3 4 > >__NULLABILITY_PRAGMA_PUSH > >/* > * Run-time invariant values: > */ >#define PTHREAD_DESTRUCTOR_ITERATIONS 4 >#define PTHREAD_KEYS_MAX 256 >#define PTHREAD_STACK_MIN __MINSIGSTKSZ >#define PTHREAD_THREADS_MAX __ULONG_MAX >#define PTHREAD_BARRIER_SERIAL_THREAD -1 > >/* > * Flags for threads and thread attributes. > */ >#define PTHREAD_DETACHED 0x1 >#define PTHREAD_SCOPE_SYSTEM 0x2 >#define PTHREAD_INHERIT_SCHED 0x4 >#define PTHREAD_NOFLOAT 0x8 > >#define PTHREAD_CREATE_DETACHED PTHREAD_DETACHED >#define PTHREAD_CREATE_JOINABLE 0 >#define PTHREAD_SCOPE_PROCESS 0 >#define PTHREAD_EXPLICIT_SCHED 0 > >/* > * Values for process shared/private attributes. > */ >#define PTHREAD_PROCESS_PRIVATE 0 >#define PTHREAD_PROCESS_SHARED 1 > >/* > * Flags for cancelling threads > */ >#define PTHREAD_CANCEL_ENABLE 0 >#define PTHREAD_CANCEL_DISABLE 1 >#define PTHREAD_CANCEL_DEFERRED 0 >#define PTHREAD_CANCEL_ASYNCHRONOUS 2 >#define PTHREAD_CANCELED ((void *) 1) > >/* > * Flags for once initialization. > */ >#define PTHREAD_NEEDS_INIT 0 >#define PTHREAD_DONE_INIT 1 > >/* > * Static once initialization values. > */ >#define PTHREAD_ONCE_INIT { PTHREAD_NEEDS_INIT, NULL } > >/* > * Static initialization values. > */ >#define PTHREAD_MUTEX_INITIALIZER NULL >#define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP ((pthread_mutex_t)1) >#define PTHREAD_COND_INITIALIZER NULL >#define PTHREAD_RWLOCK_INITIALIZER NULL > >/* > * Default attribute arguments (draft 4, deprecated). > */ >#ifndef PTHREAD_KERNEL >#define pthread_condattr_default NULL >#define pthread_mutexattr_default NULL >#define pthread_attr_default NULL >#endif ># 115 "/usr/include/pthread.h" 3 4 > >#define PTHREAD_PRIO_NONE 0 >#define PTHREAD_PRIO_INHERIT 1 >#define PTHREAD_PRIO_PROTECT 2 > >/* > * Mutex types (Single UNIX Specification, Version 2, 1997). > * > * Note that a mutex attribute with one of the following types: > * > * PTHREAD_MUTEX_NORMAL > * PTHREAD_MUTEX_RECURSIVE > * > * will deviate from POSIX specified semantics. > */ >enum pthread_mutextype { > PTHREAD_MUTEX_ERRORCHECK = 1, /* Default POSIX mutex */ > PTHREAD_MUTEX_RECURSIVE = 2, /* Recursive mutex */ > PTHREAD_MUTEX_NORMAL = 3, /* No error checking */ > PTHREAD_MUTEX_ADAPTIVE_NP = 4, /* Adaptive mutex, spins briefly before blocking on lock */ > PTHREAD_MUTEX_TYPE_MAX >}; > >#define PTHREAD_MUTEX_DEFAULT PTHREAD_MUTEX_ERRORCHECK > >#define PTHREAD_MUTEX_STALLED 0 >#define PTHREAD_MUTEX_ROBUST 1 > >struct _pthread_cleanup_info { > __uintptr_t pthread_cleanup_pad[8]; >}; > >/* > * Thread function prototype definitions: > */ >__BEGIN_DECLS >int pthread_atfork(void (*)(void), void (*)(void), void (*)(void)); >int pthread_attr_destroy(pthread_attr_t * _Nonnull); >int pthread_attr_getstack( > const pthread_attr_t * _Nonnull __restrict, > void ** _Nonnull __restrict, > size_t * _Nonnull __restrict); >int pthread_attr_getstacksize(const pthread_attr_t * _Nonnull, > size_t * _Nonnull); >int pthread_attr_getguardsize(const pthread_attr_t * _Nonnull, > size_t * _Nonnull); >int pthread_attr_getstackaddr(const pthread_attr_t *, void **); >int pthread_attr_getdetachstate(const pthread_attr_t * _Nonnull, > int * _Nonnull); >int pthread_attr_init(pthread_attr_t * _Nonnull); >int pthread_attr_setstacksize(pthread_attr_t * _Nonnull, size_t); >int pthread_attr_setguardsize(pthread_attr_t * _Nonnull, size_t); >int pthread_attr_setstack(pthread_attr_t * _Nonnull, void *, > size_t); >int pthread_attr_setstackaddr(pthread_attr_t *, void *); >int pthread_attr_setdetachstate(pthread_attr_t * _Nonnull, int); >int pthread_barrier_destroy(pthread_barrier_t * _Nonnull); >int pthread_barrier_init(pthread_barrier_t * _Nonnull, > const pthread_barrierattr_t *, unsigned); >int pthread_barrier_wait(pthread_barrier_t * _Nonnull); >int pthread_barrierattr_destroy(pthread_barrierattr_t * _Nonnull); >int pthread_barrierattr_getpshared( > const pthread_barrierattr_t * _Nonnull, int * _Nonnull); >int pthread_barrierattr_init(pthread_barrierattr_t * _Nonnull); >int pthread_barrierattr_setpshared(pthread_barrierattr_t * _Nonnull, > int); > >#define pthread_cleanup_push(cleanup_routine, cleanup_arg) \ > { \ > struct _pthread_cleanup_info __cleanup_info__; \ > __pthread_cleanup_push_imp(cleanup_routine, cleanup_arg,\ > &__cleanup_info__); \ > { > >#define pthread_cleanup_pop(execute) \ > (void)0; \ > } \ > __pthread_cleanup_pop_imp(execute); \ > } > >int pthread_condattr_destroy(pthread_condattr_t * _Nonnull); >int pthread_condattr_getclock(const pthread_condattr_t * _Nonnull, > clockid_t * _Nonnull); >int pthread_condattr_getpshared(const pthread_condattr_t * _Nonnull, > int * _Nonnull); >int pthread_condattr_init(pthread_condattr_t * _Nonnull); >int pthread_condattr_setclock(pthread_condattr_t * _Nonnull, > clockid_t); >int pthread_condattr_setpshared(pthread_condattr_t * _Nonnull, int); >int pthread_cond_broadcast(pthread_cond_t * _Nonnull); >int pthread_cond_destroy(pthread_cond_t * _Nonnull); >int pthread_cond_init(pthread_cond_t * _Nonnull, > const pthread_condattr_t *); >int pthread_cond_signal(pthread_cond_t * _Nonnull); >int pthread_cond_timedwait(pthread_cond_t * _Nonnull, > pthread_mutex_t * _Nonnull __mutex, > const struct timespec * _Nonnull) > __requires_exclusive(*__mutex); >int pthread_cond_wait(pthread_cond_t * _Nonnull, > pthread_mutex_t * _Nonnull __mutex) > __requires_exclusive(*__mutex); >int pthread_create(pthread_t * _Nonnull, const pthread_attr_t *, > void *(* _Nonnull) (void *), void *); >int pthread_detach(pthread_t); >int pthread_equal(pthread_t, pthread_t); >void pthread_exit(void *) __dead2; >void *pthread_getspecific(pthread_key_t); >int pthread_getcpuclockid(pthread_t, clockid_t * _Nonnull); >int pthread_join(pthread_t, void **); >int pthread_key_create(pthread_key_t * _Nonnull, > void (*) (void *)); >int pthread_key_delete(pthread_key_t); >int pthread_mutexattr_init(pthread_mutexattr_t * _Nonnull); >int pthread_mutexattr_destroy(pthread_mutexattr_t * _Nonnull); >int pthread_mutexattr_getpshared( > const pthread_mutexattr_t * _Nonnull, int * _Nonnull); >int pthread_mutexattr_gettype(pthread_mutexattr_t * _Nonnull, > int * _Nonnull); >int pthread_mutexattr_settype(pthread_mutexattr_t * _Nonnull, int); >int pthread_mutexattr_setpshared(pthread_mutexattr_t * _Nonnull, > int); >int pthread_mutex_consistent(pthread_mutex_t * _Nonnull __mutex) > __requires_exclusive(*__mutex); >int pthread_mutex_destroy(pthread_mutex_t * _Nonnull __mutex) > __requires_unlocked(*__mutex); >int pthread_mutex_init(pthread_mutex_t * _Nonnull __mutex, > const pthread_mutexattr_t *) > __requires_unlocked(*__mutex); >int pthread_mutex_lock(pthread_mutex_t * _Nonnull __mutex) > __locks_exclusive(*__mutex); >int pthread_mutex_trylock(pthread_mutex_t * _Nonnull __mutex) > __trylocks_exclusive(0, *__mutex); >int pthread_mutex_timedlock(pthread_mutex_t * _Nonnull __mutex, > const struct timespec * _Nonnull) > __trylocks_exclusive(0, *__mutex); >int pthread_mutex_unlock(pthread_mutex_t * _Nonnull __mutex) > __unlocks(*__mutex); >int pthread_once(pthread_once_t * _Nonnull, > void (* _Nonnull) (void)); >int pthread_rwlock_destroy(pthread_rwlock_t * _Nonnull __rwlock) > __requires_unlocked(*__rwlock); >int pthread_rwlock_init(pthread_rwlock_t * _Nonnull __rwlock, > const pthread_rwlockattr_t *) > __requires_unlocked(*__rwlock); >int pthread_rwlock_rdlock(pthread_rwlock_t * _Nonnull __rwlock) > __locks_shared(*__rwlock); >int pthread_rwlock_timedrdlock(pthread_rwlock_t * _Nonnull __rwlock, > const struct timespec * _Nonnull) > __trylocks_shared(0, *__rwlock); >int pthread_rwlock_timedwrlock(pthread_rwlock_t * _Nonnull __rwlock, > const struct timespec * _Nonnull) > __trylocks_exclusive(0, *__rwlock); >int pthread_rwlock_tryrdlock(pthread_rwlock_t * _Nonnull __rwlock) > __trylocks_shared(0, *__rwlock); >int pthread_rwlock_trywrlock(pthread_rwlock_t * _Nonnull __rwlock) > __trylocks_exclusive(0, *__rwlock); >int pthread_rwlock_unlock(pthread_rwlock_t * _Nonnull __rwlock) > __unlocks(*__rwlock); >int pthread_rwlock_wrlock(pthread_rwlock_t * _Nonnull __rwlock) > __locks_exclusive(*__rwlock); >int pthread_rwlockattr_destroy(pthread_rwlockattr_t * _Nonnull); >int pthread_rwlockattr_getkind_np( > const pthread_rwlockattr_t * _Nonnull, int *); >int pthread_rwlockattr_getpshared( > const pthread_rwlockattr_t * _Nonnull, int * _Nonnull); >int pthread_rwlockattr_init(pthread_rwlockattr_t * _Nonnull); >int pthread_rwlockattr_setkind_np(pthread_rwlockattr_t * _Nonnull, > int); >int pthread_rwlockattr_setpshared(pthread_rwlockattr_t * _Nonnull, > int); >pthread_t pthread_self(void); >int pthread_setspecific(pthread_key_t, const void *); > >int pthread_spin_init(pthread_spinlock_t * _Nonnull __spin, int) > __requires_unlocked(*__spin); >int pthread_spin_destroy(pthread_spinlock_t * _Nonnull __spin) > __requires_unlocked(*__spin); >int pthread_spin_lock(pthread_spinlock_t * _Nonnull __spin) > __locks_exclusive(*__spin); >int pthread_spin_trylock(pthread_spinlock_t * _Nonnull __spin) > __trylocks_exclusive(0, *__spin); >int pthread_spin_unlock(pthread_spinlock_t * _Nonnull __spin) > __unlocks(*__spin); >int pthread_cancel(pthread_t); >int pthread_setcancelstate(int, int *); >int pthread_setcanceltype(int, int *); >void pthread_testcancel(void); > >#if __BSD_VISIBLE >int pthread_getprio(pthread_t); >int pthread_setprio(pthread_t, int); >void pthread_yield(void); >#endif ># 308 "/usr/include/pthread.h" 3 4 > >int pthread_mutexattr_getprioceiling(pthread_mutexattr_t *, int *); >int pthread_mutexattr_setprioceiling(pthread_mutexattr_t *, int); >int pthread_mutex_getprioceiling(pthread_mutex_t *, int *); >int pthread_mutex_setprioceiling(pthread_mutex_t *, int, int *); > >int pthread_mutexattr_getprotocol(pthread_mutexattr_t *, int *); >int pthread_mutexattr_setprotocol(pthread_mutexattr_t *, int); > >int pthread_mutexattr_getrobust( > pthread_mutexattr_t * _Nonnull __restrict, > int * _Nonnull __restrict); >int pthread_mutexattr_setrobust(pthread_mutexattr_t * _Nonnull, > int); > >int pthread_attr_getinheritsched(const pthread_attr_t *, int *); >int pthread_attr_getschedparam(const pthread_attr_t * _Nonnull, > struct sched_param * _Nonnull); >int pthread_attr_getschedpolicy(const pthread_attr_t * _Nonnull, > int * _Nonnull); >int pthread_attr_getscope(const pthread_attr_t * _Nonnull, > int * _Nonnull); >int pthread_attr_setinheritsched(pthread_attr_t *, int); >int pthread_attr_setschedparam(pthread_attr_t * _Nonnull, > const struct sched_param * _Nonnull); >int pthread_attr_setschedpolicy(pthread_attr_t * _Nonnull, int); >int pthread_attr_setscope(pthread_attr_t * _Nonnull, int); >int pthread_getschedparam(pthread_t pthread, int * _Nonnull, > struct sched_param * _Nonnull); >int pthread_setschedparam(pthread_t, int, > const struct sched_param * _Nonnull); >#if __XSI_VISIBLE >int pthread_getconcurrency(void); >int pthread_setconcurrency(int); >#endif ># 343 "/usr/include/pthread.h" 3 4 > >void __pthread_cleanup_push_imp(void (*)(void *), void *, > struct _pthread_cleanup_info *); >void __pthread_cleanup_pop_imp(int); >__END_DECLS >__NULLABILITY_PRAGMA_POP > >#endif /* !_PTHREAD_H_ */ ># 351 "/usr/include/pthread.h" 3 4 ># 78 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_criticalsection.h" 2 >BEGIN_AS_NAMESPACE > >class asCThreadCriticalSection >{ >public: > asCThreadCriticalSection(); > ~asCThreadCriticalSection(); > > void Enter(); > void Leave(); > bool TryEnter(); > >protected: > pthread_mutex_t cs; >}; > >class asCThreadReadWriteLock >{ >public: > asCThreadReadWriteLock(); > ~asCThreadReadWriteLock(); > > void AcquireExclusive(); > void ReleaseExclusive(); > bool TryAcquireExclusive(); > > void AcquireShared(); > void ReleaseShared(); > bool TryAcquireShared(); > >protected: > pthread_rwlock_t lock; >}; > >#elif defined(AS_WINDOWS_THREADS) ># 113 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_criticalsection.h" > >END_AS_NAMESPACE >#ifdef AS_XBOX360 >#if 0 /* expanded by -frewrite-includes */ >#include <xtl.h> >#endif /* expanded by -frewrite-includes */ ># 116 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_criticalsection.h" ># 117 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_criticalsection.h" >#else ># 118 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_criticalsection.h" >#define WIN32_LEAN_AND_MEAN >#ifndef _WIN32_WINNT > #define _WIN32_WINNT 0x0600 // We need this to get the declaration for Windows Phone compatible Ex functions >#endif ># 122 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_criticalsection.h" >#if 0 /* expanded by -frewrite-includes */ >#include <windows.h> >#endif /* expanded by -frewrite-includes */ ># 122 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_criticalsection.h" ># 123 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_criticalsection.h" >#endif ># 124 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_criticalsection.h" >BEGIN_AS_NAMESPACE > >// Undefine macros that cause problems in our code >#undef GetObject >#undef RegisterClass > >class asCThreadCriticalSection >{ >public: > asCThreadCriticalSection(); > ~asCThreadCriticalSection(); > > void Enter(); > void Leave(); > bool TryEnter(); > >protected: > CRITICAL_SECTION cs; >}; > >class asCThreadReadWriteLock >{ >public: > asCThreadReadWriteLock(); > ~asCThreadReadWriteLock(); > > void AcquireExclusive(); > void ReleaseExclusive(); > > void AcquireShared(); > void ReleaseShared(); > >protected: > // The Slim Read Write Lock object, SRWLOCK, is more efficient > // but it is only available from Windows Vista so we cannot use it and > // maintain compatibility with olders versions of Windows. > > // Critical sections and semaphores are available on Windows XP and onwards. > // Windows XP is oldest version we support with multithreading. > > // The implementation is based on the following article, that shows > // how to implement a fair read/write lock that doesn't risk starving > // the writers: > > // http://doc.qt.nokia.com/qq/qq11-mutex.html > > // TODO: Allow use of SRWLOCK through configuration in as_config.h > > CRITICAL_SECTION writeLock; > HANDLE readLocks; >}; > >// This constant really should be a member of asCThreadReadWriteLock, >// but it gives a compiler error on MSVC6 so I'm leaving it outside >static const asUINT maxReaders = 10; > >#endif ># 181 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_criticalsection.h" > >#endif ># 183 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_criticalsection.h" > >END_AS_NAMESPACE > >#endif ># 187 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_criticalsection.h" > ># 107 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_memory.h" 2 >#if 0 /* expanded by -frewrite-includes */ >#include "as_array.h" >#endif /* expanded by -frewrite-includes */ ># 107 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_memory.h" ># 1 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_array.h" 1 >/* > AngelCode Scripting Library > Copyright (c) 2003-2015 Andreas Jonsson > > This software is provided 'as-is', without any express or implied > warranty. In no event will the authors be held liable for any > damages arising from the use of this software. > > Permission is granted to anyone to use this software for any > purpose, including commercial applications, and to alter it and > redistribute it freely, subject to the following restrictions: > > 1. The origin of this software must not be misrepresented; you > must not claim that you wrote the original software. If you use > this software in a product, an acknowledgment in the product > documentation would be appreciated but is not required. > > 2. Altered source versions must be plainly marked as such, and > must not be misrepresented as being the original software. > > 3. This notice may not be removed or altered from any source > distribution. > > The original version of this library can be located at: > http://www.angelcode.com/angelscript/ > > Andreas Jonsson > andreas@angelcode.com >*/ > >#ifndef AS_ARRAY_H >#define AS_ARRAY_H > >#if !defined(AS_NO_MEMORY_H) >#if 0 /* expanded by -frewrite-includes */ >#include <memory.h> >#endif /* expanded by -frewrite-includes */ ># 35 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_array.h" ># 36 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_array.h" >#endif ># 37 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_array.h" >#if 0 /* expanded by -frewrite-includes */ >#include <string.h> // some compilers declare memcpy() here >#endif /* expanded by -frewrite-includes */ ># 37 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_array.h" ># 1 "/usr/include/c++/v1/string.h" 1 3 >// -*- C++ -*- >//===--------------------------- string.h ---------------------------------===// >// >// The LLVM Compiler Infrastructure >// >// This file is distributed under the University of Illinois Open Source >// License. See LICENSE.TXT for details. >// >//===----------------------------------------------------------------------===// > >#ifndef _LIBCPP_STRING_H >#define _LIBCPP_STRING_H > >/* > string.h synopsis > >Macros: > > NULL > >Types: > > size_t > >void* memcpy(void* restrict s1, const void* restrict s2, size_t n); >void* memmove(void* s1, const void* s2, size_t n); >char* strcpy (char* restrict s1, const char* restrict s2); >char* strncpy(char* restrict s1, const char* restrict s2, size_t n); >char* strcat (char* restrict s1, const char* restrict s2); >char* strncat(char* restrict s1, const char* restrict s2, size_t n); >int memcmp(const void* s1, const void* s2, size_t n); >int strcmp (const char* s1, const char* s2); >int strncmp(const char* s1, const char* s2, size_t n); >int strcoll(const char* s1, const char* s2); >size_t strxfrm(char* restrict s1, const char* restrict s2, size_t n); >const void* memchr(const void* s, int c, size_t n); > void* memchr( void* s, int c, size_t n); >const char* strchr(const char* s, int c); > char* strchr( char* s, int c); >size_t strcspn(const char* s1, const char* s2); >const char* strpbrk(const char* s1, const char* s2); > char* strpbrk( char* s1, const char* s2); >const char* strrchr(const char* s, int c); > char* strrchr( char* s, int c); >size_t strspn(const char* s1, const char* s2); >const char* strstr(const char* s1, const char* s2); > char* strstr( char* s1, const char* s2); >char* strtok(char* restrict s1, const char* restrict s2); >void* memset(void* s, int c, size_t n); >char* strerror(int errnum); >size_t strlen(const char* s); > >*/ > >#if 0 /* expanded by -frewrite-includes */ >#include <__config> >#endif /* expanded by -frewrite-includes */ ># 55 "/usr/include/c++/v1/string.h" 3 ># 56 "/usr/include/c++/v1/string.h" 3 > >#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) >#if 0 /* expanded by -frewrite-includes */ >#pragma GCC system_header >#endif /* expanded by -frewrite-includes */ ># 59 "/usr/include/c++/v1/string.h" 3 >#endif ># 60 "/usr/include/c++/v1/string.h" 3 > >#if 0 /* expanded by -frewrite-includes */ >#include_next <string.h> >#endif /* expanded by -frewrite-includes */ ># 61 "/usr/include/c++/v1/string.h" 3 ># 1 "/usr/include/string.h" 1 3 4 >/*- > * Copyright (c) 1990, 1993 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)string.h 8.1 (Berkeley) 6/2/93 > * $FreeBSD: head/include/string.h 316213 2017-03-30 04:57:26Z kib $ > */ > >#ifndef _STRING_H_ >#define _STRING_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 36 "/usr/include/string.h" 3 4 ># 37 "/usr/include/string.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_null.h> >#endif /* expanded by -frewrite-includes */ ># 37 "/usr/include/string.h" 3 4 ># 38 "/usr/include/string.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 38 "/usr/include/string.h" 3 4 ># 39 "/usr/include/string.h" 3 4 > >/* > * Prototype functions which were historically defined in <string.h>, but > * are required by POSIX to be prototyped in <strings.h>. > */ >#if __BSD_VISIBLE >#if 0 /* expanded by -frewrite-includes */ >#include <strings.h> >#endif /* expanded by -frewrite-includes */ ># 45 "/usr/include/string.h" 3 4 ># 1 "/usr/include/strings.h" 1 3 4 >/*- > * Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: head/include/strings.h 272673 2014-10-07 04:54:11Z delphij $ > */ > >#ifndef _STRINGS_H_ >#define _STRINGS_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 32 "/usr/include/strings.h" 3 4 ># 33 "/usr/include/strings.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 33 "/usr/include/strings.h" 3 4 ># 34 "/usr/include/strings.h" 3 4 > >#ifndef _SIZE_T_DECLARED >typedef __size_t size_t; >#define _SIZE_T_DECLARED >#endif ># 39 "/usr/include/strings.h" 3 4 > >__BEGIN_DECLS >#if __BSD_VISIBLE || __POSIX_VISIBLE <= 200112 >int bcmp(const void *, const void *, size_t) __pure; /* LEGACY */ >void bcopy(const void *, void *, size_t); /* LEGACY */ >void bzero(void *, size_t); /* LEGACY */ >#endif ># 46 "/usr/include/strings.h" 3 4 >#if __BSD_VISIBLE >void explicit_bzero(void *, size_t); >#endif ># 49 "/usr/include/strings.h" 3 4 >#if __XSI_VISIBLE >int ffs(int) __pure2; >#endif ># 52 "/usr/include/strings.h" 3 4 >#if __BSD_VISIBLE >int ffsl(long) __pure2; >int ffsll(long long) __pure2; >int fls(int) __pure2; >int flsl(long) __pure2; >int flsll(long long) __pure2; >#endif ># 59 "/usr/include/strings.h" 3 4 >#if __BSD_VISIBLE || __POSIX_VISIBLE <= 200112 >char *index(const char *, int) __pure; /* LEGACY */ >char *rindex(const char *, int) __pure; /* LEGACY */ >#endif ># 63 "/usr/include/strings.h" 3 4 >int strcasecmp(const char *, const char *) __pure; >int strncasecmp(const char *, const char *, size_t) __pure; > >#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_) >#if 0 /* expanded by -frewrite-includes */ >#include <xlocale/_strings.h> >#endif /* expanded by -frewrite-includes */ ># 67 "/usr/include/strings.h" 3 4 ># 1 "/usr/include/xlocale/_strings.h" 1 3 4 >/*- > * Copyright (c) 2011, 2012 The FreeBSD Foundation > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: head/include/xlocale/_strings.h 266865 2014-05-30 01:09:07Z pfg $ > */ > >#ifndef _LOCALE_T_DEFINED >#define _LOCALE_T_DEFINED >typedef struct _xlocale *locale_t; >#endif ># 33 "/usr/include/xlocale/_strings.h" 3 4 > >/* > * This file is included from both strings.h and xlocale.h. We need to expose > * the declarations unconditionally if we are included from xlocale.h, but only > * if we are in POSIX2008 mode if included from string.h. > */ > >#ifndef _XLOCALE_STRINGS1_H >#define _XLOCALE_STRINGS1_H > >/* > * POSIX2008 functions > */ >int strcasecmp_l(const char *, const char *, locale_t); >int strncasecmp_l(const char *, const char *, size_t, locale_t); >#endif /* _XLOCALE_STRINGS1_H */ ># 49 "/usr/include/xlocale/_strings.h" 3 4 ># 68 "/usr/include/strings.h" 2 3 4 >#endif ># 69 "/usr/include/strings.h" 3 4 >__END_DECLS > >#endif /* _STRINGS_H_ */ ># 72 "/usr/include/strings.h" 3 4 ># 46 "/usr/include/string.h" 2 3 4 >#endif ># 47 "/usr/include/string.h" 3 4 > >#ifndef _SIZE_T_DECLARED >typedef __size_t size_t; >#define _SIZE_T_DECLARED >#endif ># 52 "/usr/include/string.h" 3 4 > >__BEGIN_DECLS >#if __XSI_VISIBLE >= 600 >void *memccpy(void * __restrict, const void * __restrict, int, size_t); >#endif ># 57 "/usr/include/string.h" 3 4 >void *memchr(const void *, int, size_t) __pure; >#if __BSD_VISIBLE >void *memrchr(const void *, int, size_t) __pure; >#endif ># 61 "/usr/include/string.h" 3 4 >int memcmp(const void *, const void *, size_t) __pure; >void *memcpy(void * __restrict, const void * __restrict, size_t); >#if __BSD_VISIBLE >void *memmem(const void *, size_t, const void *, size_t) __pure; >#endif ># 66 "/usr/include/string.h" 3 4 >void *memmove(void *, const void *, size_t); >void *memset(void *, int, size_t); >#if __POSIX_VISIBLE >= 200809 >char *stpcpy(char * __restrict, const char * __restrict); >char *stpncpy(char * __restrict, const char * __restrict, size_t); >#endif ># 72 "/usr/include/string.h" 3 4 >#if __BSD_VISIBLE >char *strcasestr(const char *, const char *) __pure; >#endif ># 75 "/usr/include/string.h" 3 4 >char *strcat(char * __restrict, const char * __restrict); >char *strchr(const char *, int) __pure; >#if __BSD_VISIBLE >char *strchrnul(const char*, int) __pure; >#endif ># 80 "/usr/include/string.h" 3 4 >int strcmp(const char *, const char *) __pure; >int strcoll(const char *, const char *); >char *strcpy(char * __restrict, const char * __restrict); >size_t strcspn(const char *, const char *) __pure; >#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >char *strdup(const char *) __malloc_like; >#endif ># 87 "/usr/include/string.h" 3 4 >char *strerror(int); >#if __POSIX_VISIBLE >= 200112 >int strerror_r(int, char *, size_t); >#endif ># 91 "/usr/include/string.h" 3 4 >#if __BSD_VISIBLE >size_t strlcat(char * __restrict, const char * __restrict, size_t); >size_t strlcpy(char * __restrict, const char * __restrict, size_t); >#endif ># 95 "/usr/include/string.h" 3 4 >size_t strlen(const char *) __pure; >#if __BSD_VISIBLE >void strmode(int, char *); >#endif ># 99 "/usr/include/string.h" 3 4 >char *strncat(char * __restrict, const char * __restrict, size_t); >int strncmp(const char *, const char *, size_t) __pure; >char *strncpy(char * __restrict, const char * __restrict, size_t); >#if __POSIX_VISIBLE >= 200809 >char *strndup(const char *, size_t) __malloc_like; >size_t strnlen(const char *, size_t) __pure; >#endif ># 106 "/usr/include/string.h" 3 4 >#if __BSD_VISIBLE >char *strnstr(const char *, const char *, size_t) __pure; >#endif ># 109 "/usr/include/string.h" 3 4 >char *strpbrk(const char *, const char *) __pure; >char *strrchr(const char *, int) __pure; >#if __BSD_VISIBLE >char *strsep(char **, const char *); >#endif ># 114 "/usr/include/string.h" 3 4 >#if __POSIX_VISIBLE >= 200809 >char *strsignal(int); >#endif ># 117 "/usr/include/string.h" 3 4 >size_t strspn(const char *, const char *) __pure; >char *strstr(const char *, const char *) __pure; >char *strtok(char * __restrict, const char * __restrict); >#if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE >= 500 >char *strtok_r(char *, const char *, char **); >#endif ># 123 "/usr/include/string.h" 3 4 >size_t strxfrm(char * __restrict, const char * __restrict, size_t); >#if __BSD_VISIBLE > >#ifndef _SWAB_DECLARED >#define _SWAB_DECLARED > >#ifndef _SSIZE_T_DECLARED >typedef __ssize_t ssize_t; >#define _SSIZE_T_DECLARED >#endif /* _SIZE_T_DECLARED */ ># 133 "/usr/include/string.h" 3 4 > >void swab(const void * __restrict, void * __restrict, ssize_t); >#endif /* _SWAB_DECLARED */ ># 136 "/usr/include/string.h" 3 4 > >int timingsafe_bcmp(const void *, const void *, size_t); >int timingsafe_memcmp(const void *, const void *, size_t); >#endif /* __BSD_VISIBLE */ ># 140 "/usr/include/string.h" 3 4 > >#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_) >#if 0 /* expanded by -frewrite-includes */ >#include <xlocale/_string.h> >#endif /* expanded by -frewrite-includes */ ># 142 "/usr/include/string.h" 3 4 ># 1 "/usr/include/xlocale/_string.h" 1 3 4 >/*- > * Copyright (c) 2011, 2012 The FreeBSD Foundation > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: head/include/xlocale/_string.h 266865 2014-05-30 01:09:07Z pfg $ > */ > >#ifndef _LOCALE_T_DEFINED >#define _LOCALE_T_DEFINED >typedef struct _xlocale *locale_t; >#endif ># 33 "/usr/include/xlocale/_string.h" 3 4 > >/* > * This file is included from both string.h and xlocale.h. We need to expose > * the declarations unconditionally if we are included from xlocale.h, but only > * if we are in POSIX2008 mode if included from string.h. > */ > >#ifndef _XLOCALE_STRING1_H >#define _XLOCALE_STRING1_H > >/* > * POSIX2008 functions > */ >int strcoll_l(const char *, const char *, locale_t); >size_t strxfrm_l(char *, const char *, size_t, locale_t); >#endif /* _XLOCALE_STRING1_H */ ># 49 "/usr/include/xlocale/_string.h" 3 4 > >/* > * xlocale extensions > */ >#ifdef _XLOCALE_H_ >#ifndef _XLOCALE_STRING2_H >#define _XLOCALE_STRING2_H >char *strcasestr_l(const char *, const char *, locale_t); > >#endif /* _XLOCALE_STRING2_H */ ># 59 "/usr/include/xlocale/_string.h" 3 4 >#endif /* _XLOCALE_H_ */ ># 60 "/usr/include/xlocale/_string.h" 3 4 ># 143 "/usr/include/string.h" 2 3 4 >#endif ># 144 "/usr/include/string.h" 3 4 > >#if __EXT1_VISIBLE > >#ifndef _RSIZE_T_DEFINED >#define _RSIZE_T_DEFINED >typedef size_t rsize_t; >#endif ># 151 "/usr/include/string.h" 3 4 > >#ifndef _ERRNO_T_DEFINED >#define _ERRNO_T_DEFINED >typedef int errno_t; >#endif ># 156 "/usr/include/string.h" 3 4 > >/* ISO/IEC 9899:2011 K.3.7.4.1.1 */ >errno_t memset_s(void *, rsize_t, int, rsize_t); >#endif /* __EXT1_VISIBLE */ ># 160 "/usr/include/string.h" 3 4 >__END_DECLS > >#endif /* _STRING_H_ */ ># 163 "/usr/include/string.h" 3 4 ># 62 "/usr/include/c++/v1/string.h" 2 3 > >// MSVCRT, GNU libc and its derivates may already have the correct prototype in >// <string.h>. This macro can be defined by users if their C library provides >// the right signature. >#if defined(__CORRECT_ISO_CPP_STRING_H_PROTO) || defined(_LIBCPP_MSVCRT) || \ > defined(__sun__) || defined(_STRING_H_CPLUSPLUS_98_CONFORMANCE_) >#define _LIBCPP_STRING_H_HAS_CONST_OVERLOADS >#endif ># 70 "/usr/include/c++/v1/string.h" 3 > >#if defined(__cplusplus) && !defined(_LIBCPP_STRING_H_HAS_CONST_OVERLOADS) && defined(_LIBCPP_PREFERRED_OVERLOAD) >extern "C++" { >inline _LIBCPP_INLINE_VISIBILITY >char* __libcpp_strchr(const char* __s, int __c) {return (char*)strchr(__s, __c);} >inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD >const char* strchr(const char* __s, int __c) {return __libcpp_strchr(__s, __c);} >inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD > char* strchr( char* __s, int __c) {return __libcpp_strchr(__s, __c);} > >inline _LIBCPP_INLINE_VISIBILITY >char* __libcpp_strpbrk(const char* __s1, const char* __s2) {return (char*)strpbrk(__s1, __s2);} >inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD >const char* strpbrk(const char* __s1, const char* __s2) {return __libcpp_strpbrk(__s1, __s2);} >inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD > char* strpbrk( char* __s1, const char* __s2) {return __libcpp_strpbrk(__s1, __s2);} > >inline _LIBCPP_INLINE_VISIBILITY >char* __libcpp_strrchr(const char* __s, int __c) {return (char*)strrchr(__s, __c);} >inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD >const char* strrchr(const char* __s, int __c) {return __libcpp_strrchr(__s, __c);} >inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD > char* strrchr( char* __s, int __c) {return __libcpp_strrchr(__s, __c);} > >inline _LIBCPP_INLINE_VISIBILITY >void* __libcpp_memchr(const void* __s, int __c, size_t __n) {return (void*)memchr(__s, __c, __n);} >inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD >const void* memchr(const void* __s, int __c, size_t __n) {return __libcpp_memchr(__s, __c, __n);} >inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD > void* memchr( void* __s, int __c, size_t __n) {return __libcpp_memchr(__s, __c, __n);} > >inline _LIBCPP_INLINE_VISIBILITY >char* __libcpp_strstr(const char* __s1, const char* __s2) {return (char*)strstr(__s1, __s2);} >inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD >const char* strstr(const char* __s1, const char* __s2) {return __libcpp_strstr(__s1, __s2);} >inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD > char* strstr( char* __s1, const char* __s2) {return __libcpp_strstr(__s1, __s2);} >} >#endif ># 109 "/usr/include/c++/v1/string.h" 3 > >#endif // _LIBCPP_STRING_H ># 111 "/usr/include/c++/v1/string.h" 3 ># 38 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_array.h" 2 > >#ifdef _MSC_VER >#pragma warning(disable:4345) // warning about a change in how the code is handled in this version >#endif ># 42 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_array.h" > >BEGIN_AS_NAMESPACE > >template <class T> class asCArray >{ >public: > asCArray(); > asCArray(const asCArray<T> &); > asCArray(asUINT reserve); > ~asCArray(); > > void Allocate(asUINT numElements, bool keepData); > void AllocateNoConstruct(asUINT numElements, bool keepData); > asUINT GetCapacity() const; > > void PushLast(const T &element); > T PopLast(); > > bool SetLength(asUINT numElements); > bool SetLengthNoConstruct(asUINT numElements); > asUINT GetLength() const; > > void Copy(const T*, asUINT count); > asCArray<T> &operator =(const asCArray<T> &); > void SwapWith(asCArray<T> &other); > > const T &operator [](asUINT index) const; > T &operator [](asUINT index); > T *AddressOf(); > const T *AddressOf() const; > > bool Concatenate(const asCArray<T> &); > void Concatenate(T*, unsigned int count); > > bool Exists(const T &element) const; > int IndexOf(const T &element) const; > void RemoveIndex(asUINT index); // Removes the entry without reordering the array > void RemoveValue(const T &element); // Removes the value without reordering the array > void RemoveIndexUnordered(asUINT index); // Removes the entry without keeping the order > > bool operator==(const asCArray<T> &) const; > bool operator!=(const asCArray<T> &) const; > >protected: > T *array; > asUINT length; // 32bits is enough for all uses of this array > asUINT maxLength; > char buf[2*4*AS_PTR_SIZE]; // Avoid dynamically allocated memory for tiny arrays >}; > >// Implementation > >template <class T> >T *asCArray<T>::AddressOf() >{ > return array; >} > >template <class T> >const T *asCArray<T>::AddressOf() const >{ > return array; >} > >template <class T> >asCArray<T>::asCArray(void) >{ > array = 0; > length = 0; > maxLength = 0; >} > >template <class T> >asCArray<T>::asCArray(const asCArray<T> ©) >{ > array = 0; > length = 0; > maxLength = 0; > > *this = copy; >} > >template <class T> >asCArray<T>::asCArray(asUINT reserve) >{ > array = 0; > length = 0; > maxLength = 0; > > Allocate(reserve, false); >} > >template <class T> >asCArray<T>::~asCArray(void) >{ > // Allocating a zero length array will free all memory > Allocate(0,0); >} > >template <class T> >asUINT asCArray<T>::GetLength() const >{ > return length; >} > >template <class T> >const T &asCArray<T>::operator [](asUINT index) const >{ > asASSERT(index < length); > > return array[index]; >} > >template <class T> >T &asCArray<T>::operator [](asUINT index) >{ > asASSERT(index < length); > > return array[index]; >} > >template <class T> >void asCArray<T>::PushLast(const T &element) >{ > if( length == maxLength ) > { > if( maxLength == 0 ) > Allocate(1, false); > else > Allocate(2*maxLength, true); > > if( length == maxLength ) > { > // Out of memory. Return without doing anything > return; > } > } > > array[length++] = element; >} > >template <class T> >T asCArray<T>::PopLast() >{ > asASSERT(length > 0); > > return array[--length]; >} > >template <class T> >void asCArray<T>::Allocate(asUINT numElements, bool keepData) >{ > // We have 4 situations > // 1. The previous array is 8 bytes or smaller and the new array is also 8 bytes or smaller > // 2. The previous array is 8 bytes or smaller and the new array is larger than 8 bytes > // 3. The previous array is larger than 8 bytes and the new array is 8 bytes or smaller > // 4. The previous array is larger than 8 bytes and the new array is also larger than 8 bytes > > T *tmp = 0; > if( numElements ) > { > if( sizeof(T)*numElements <= sizeof(buf) ) > // Use the internal buffer > tmp = reinterpret_cast<T*>(buf); > else > { > // Allocate the array and construct each of the elements > tmp = asNEWARRAY(T,numElements); > if( tmp == 0 ) > { > // Out of memory. Return without doing anything > return; > } > } > > if( array == tmp ) > { > // Construct only the newly allocated elements > for( asUINT n = length; n < numElements; n++ ) > new (&tmp[n]) T(); > } > else > { > // Construct all elements > for( asUINT n = 0; n < numElements; n++ ) > new (&tmp[n]) T(); > } > } > > if( array ) > { > asUINT oldLength = length; > > if( array == tmp ) > { > if( keepData ) > { > if( length > numElements ) > length = numElements; > } > else > length = 0; > > // Call the destructor for elements that are no longer used > for( asUINT n = length; n < oldLength; n++ ) > array[n].~T(); > } > else > { > if( keepData ) > { > if( length > numElements ) > length = numElements; > > for( asUINT n = 0; n < length; n++ ) > tmp[n] = array[n]; > } > else > length = 0; > > // Call the destructor for all elements > for( asUINT n = 0; n < oldLength; n++ ) > array[n].~T(); > > if( array != reinterpret_cast<T*>(buf) ) > asDELETEARRAY(array); > } > } > > array = tmp; > maxLength = numElements; >} > >template <class T> >void asCArray<T>::AllocateNoConstruct(asUINT numElements, bool keepData) >{ > // We have 4 situations > // 1. The previous array is 8 bytes or smaller and the new array is also 8 bytes or smaller > // 2. The previous array is 8 bytes or smaller and the new array is larger than 8 bytes > // 3. The previous array is larger than 8 bytes and the new array is 8 bytes or smaller > // 4. The previous array is larger than 8 bytes and the new array is also larger than 8 bytes > > T *tmp = 0; > if( numElements ) > { > if( sizeof(T)*numElements <= sizeof(buf) ) > // Use the internal buffer > tmp = reinterpret_cast<T*>(buf); > else > { > // Allocate the array and construct each of the elements > tmp = asNEWARRAY(T,numElements); > if( tmp == 0 ) > { > // Out of memory. Return without doing anything > return; > } > } > } > > if( array ) > { > if( array == tmp ) > { > if( keepData ) > { > if( length > numElements ) > length = numElements; > } > else > length = 0; > } > else > { > if( keepData ) > { > if( length > numElements ) > length = numElements; > > memcpy(tmp, array, sizeof(T)*length); > } > else > length = 0; > > if( array != reinterpret_cast<T*>(buf) ) > asDELETEARRAY(array); > } > } > > array = tmp; > maxLength = numElements; >} > >template <class T> >asUINT asCArray<T>::GetCapacity() const >{ > return maxLength; >} > >template <class T> >bool asCArray<T>::SetLength(asUINT numElements) >{ > if( numElements > maxLength ) > { > Allocate(numElements, true); > if( numElements > maxLength ) > { > // Out of memory. Return without doing anything > return false; > } > } > > length = numElements; > return true; >} > >template <class T> >bool asCArray<T>::SetLengthNoConstruct(asUINT numElements) >{ > if( numElements > maxLength ) > { > AllocateNoConstruct(numElements, true); > if( numElements > maxLength ) > { > // Out of memory. Return without doing anything > return false; > } > } > > length = numElements; > return true; >} > >template <class T> >void asCArray<T>::Copy(const T *data, asUINT count) >{ > if( maxLength < count ) > { > Allocate(count, false); > if( maxLength < count ) > { > // Out of memory. Return without doing anything > return; > } > } > > for( asUINT n = 0; n < count; n++ ) > array[n] = data[n]; > > length = count; >} > >template <class T> >asCArray<T> &asCArray<T>::operator =(const asCArray<T> ©) >{ > Copy(copy.array, copy.length); > > return *this; >} > >template <class T> >void asCArray<T>::SwapWith(asCArray<T> &other) >{ > T *tmpArray = array; > asUINT tmpLength = length; > asUINT tmpMaxLength = maxLength; > char tmpBuf[sizeof(buf)]; > memcpy(tmpBuf, buf, sizeof(buf)); > > array = other.array; > length = other.length; > maxLength = other.maxLength; > memcpy(buf, other.buf, sizeof(buf)); > > other.array = tmpArray; > other.length = tmpLength; > other.maxLength = tmpMaxLength; > memcpy(other.buf, tmpBuf, sizeof(buf)); > > // If the data is in the internal buffer, then the array pointer must refer to it > if( array == reinterpret_cast<T*>(other.buf) ) > array = reinterpret_cast<T*>(buf); > if( other.array == reinterpret_cast<T*>(buf) ) > other.array = reinterpret_cast<T*>(other.buf); >} > >template <class T> >bool asCArray<T>::operator ==(const asCArray<T> &other) const >{ > if( length != other.length ) return false; > > for( asUINT n = 0; n < length; n++ ) > if( array[n] != other.array[n] ) > return false; > > return true; >} > >template <class T> >bool asCArray<T>::operator !=(const asCArray<T> &other) const >{ > return !(*this == other); >} > > >// Returns false if the concatenation wasn't successful due to out of memory >template <class T> >bool asCArray<T>::Concatenate(const asCArray<T> &other) >{ > if( maxLength < length + other.length ) > { > Allocate(length + other.length, true); > if( maxLength < length + other.length ) > { > // Out of memory > return false; > } > } > > for( asUINT n = 0; n < other.length; n++ ) > array[length+n] = other.array[n]; > > length += other.length; > > // Success > return true; >} > >template <class T> >void asCArray<T>::Concatenate(T* other, unsigned int count) >{ > for( unsigned int c = 0; c < count; c++ ) > PushLast(other[c]); >} > >template <class T> >bool asCArray<T>::Exists(const T &e) const >{ > return IndexOf(e) == -1 ? false : true; >} > >template <class T> >int asCArray<T>::IndexOf(const T &e) const >{ > for( asUINT n = 0; n < length; n++ ) > if( array[n] == e ) return static_cast<int>(n); > > return -1; >} > >template <class T> >void asCArray<T>::RemoveIndex(asUINT index) >{ > if( index < length ) > { > for( asUINT n = index; n < length-1; n++ ) > array[n] = array[n+1]; > > PopLast(); > } >} > >template <class T> >void asCArray<T>::RemoveValue(const T &e) >{ > for( asUINT n = 0; n < length; n++ ) > { > if( array[n] == e ) > { > RemoveIndex(n); > break; > } > } >} > >template <class T> >void asCArray<T>::RemoveIndexUnordered(asUINT index) >{ > if( index == length - 1 ) > PopLast(); > else if( index < length ) > array[index] = PopLast(); >} > >END_AS_NAMESPACE > >#endif ># 529 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_array.h" ># 108 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_memory.h" 2 > >BEGIN_AS_NAMESPACE > >class asCMemoryMgr >{ >public: > asCMemoryMgr(); > ~asCMemoryMgr(); > > void FreeUnusedMemory(); > > void *AllocScriptNode(); > void FreeScriptNode(void *ptr); > >#ifndef AS_NO_COMPILER > void *AllocByteInstruction(); > void FreeByteInstruction(void *ptr); >#endif ># 126 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_memory.h" > >protected: > DECLARECRITICALSECTION(cs) > asCArray<void *> scriptNodePool; > asCArray<void *> byteInstructionPool; >}; > >END_AS_NAMESPACE > >#endif ># 136 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_memory.h" ># 1257 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" 2 > >#ifdef AS_USE_NAMESPACE >using namespace AngelScript; >#endif ># 1261 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" > >#endif ># 1263 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_config.h" ># 43 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_callfunc_x86.cpp" 2 > >#ifndef AS_MAX_PORTABILITY >#ifdef AS_X86 > >#if 0 /* expanded by -frewrite-includes */ >#include "as_callfunc.h" >#endif /* expanded by -frewrite-includes */ ># 47 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_callfunc_x86.cpp" ># 1 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_callfunc.h" 1 >/* > AngelCode Scripting Library > Copyright (c) 2003-2015 Andreas Jonsson > > This software is provided 'as-is', without any express or implied > warranty. In no event will the authors be held liable for any > damages arising from the use of this software. > > Permission is granted to anyone to use this software for any > purpose, including commercial applications, and to alter it and > redistribute it freely, subject to the following restrictions: > > 1. The origin of this software must not be misrepresented; you > must not claim that you wrote the original software. If you use > this software in a product, an acknowledgment in the product > documentation would be appreciated but is not required. > > 2. Altered source versions must be plainly marked as such, and > must not be misrepresented as being the original software. > > 3. This notice may not be removed or altered from any source > distribution. > > The original version of this library can be located at: > http://www.angelcode.com/angelscript/ > > Andreas Jonsson > andreas@angelcode.com >*/ > > >// >// as_callfunc.h >// >// These functions handle the actual calling of system functions >// > > >#ifndef AS_CALLFUNC_H >#define AS_CALLFUNC_H > >#if 0 /* expanded by -frewrite-includes */ >#include "as_array.h" >#endif /* expanded by -frewrite-includes */ ># 42 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_callfunc.h" ># 43 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_callfunc.h" > >BEGIN_AS_NAMESPACE > >class asCContext; >class asCScriptEngine; >class asCScriptFunction; >class asCObjectType; >struct asSSystemFunctionInterface; > >int DetectCallingConvention(bool isMethod, const asSFuncPtr &ptr, int callConv, void *auxiliary, asSSystemFunctionInterface *internal); > >int PrepareSystemFunctionGeneric(asCScriptFunction *func, asSSystemFunctionInterface *internal, asCScriptEngine *engine); > >int PrepareSystemFunction(asCScriptFunction *func, asSSystemFunctionInterface *internal, asCScriptEngine *engine); > >int CallSystemFunction(int id, asCContext *context); > >inline asPWORD FuncPtrToUInt(asFUNCTION_t func) >{ > // A little trickery as the C++ standard doesn't allow direct > // conversion between function pointer and data pointer > union { asFUNCTION_t func; asPWORD idx; } u; > u.func = func; > > return u.idx; >} > >enum internalCallConv >{ > ICC_GENERIC_FUNC, > ICC_GENERIC_FUNC_RETURNINMEM, // never used > ICC_CDECL, > ICC_CDECL_RETURNINMEM, > ICC_STDCALL, > ICC_STDCALL_RETURNINMEM, > ICC_THISCALL, > ICC_THISCALL_RETURNINMEM, > ICC_VIRTUAL_THISCALL, > ICC_VIRTUAL_THISCALL_RETURNINMEM, > ICC_CDECL_OBJLAST, > ICC_CDECL_OBJLAST_RETURNINMEM, > ICC_CDECL_OBJFIRST, > ICC_CDECL_OBJFIRST_RETURNINMEM, > ICC_GENERIC_METHOD, > ICC_GENERIC_METHOD_RETURNINMEM, // never used > ICC_THISCALL_OBJLAST, > ICC_THISCALL_OBJLAST_RETURNINMEM, > ICC_VIRTUAL_THISCALL_OBJLAST, > ICC_VIRTUAL_THISCALL_OBJLAST_RETURNINMEM, > ICC_THISCALL_OBJFIRST, > ICC_THISCALL_OBJFIRST_RETURNINMEM, > ICC_VIRTUAL_THISCALL_OBJFIRST, > ICC_VIRTUAL_THISCALL_OBJFIRST_RETURNINMEM >}; > >struct asSSystemFunctionInterface >{ > asFUNCTION_t func; > int baseOffset; > internalCallConv callConv; > int scriptReturnSize; > bool hostReturnInMemory; > bool hostReturnFloat; > int hostReturnSize; > int paramSize; > bool takesObjByVal; > asCArray<bool> paramAutoHandles; // TODO: Should be able to remove this array. Perhaps the flags can be stored together with the inOutFlags in asCScriptFunction? > bool returnAutoHandle; > void *auxiliary; // can be used for functors, e.g. by asCALL_THISCALL_ASGLOBAL or asCALL_THISCALL_OBJFIRST > > struct SClean > { > asCObjectType *ot; // argument type for clean up > short op; // clean up operation: 0 = release, 1 = free, 2 = destruct then free > short off; // argument offset on the stack > }; > asCArray<SClean> cleanArgs; > > asSSystemFunctionInterface() {} > > asSSystemFunctionInterface(const asSSystemFunctionInterface &in) > { > *this = in; > } > > asSSystemFunctionInterface &operator=(const asSSystemFunctionInterface &in) > { > func = in.func; > baseOffset = in.baseOffset; > callConv = in.callConv; > scriptReturnSize = in.scriptReturnSize; > hostReturnInMemory = in.hostReturnInMemory; > hostReturnFloat = in.hostReturnFloat; > hostReturnSize = in.hostReturnSize; > paramSize = in.paramSize; > takesObjByVal = in.takesObjByVal; > paramAutoHandles = in.paramAutoHandles; > returnAutoHandle = in.returnAutoHandle; > auxiliary = in.auxiliary; > cleanArgs = in.cleanArgs; > return *this; > } >}; > >END_AS_NAMESPACE > >#endif ># 150 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_callfunc.h" > ># 48 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_callfunc_x86.cpp" 2 >#if 0 /* expanded by -frewrite-includes */ >#include "as_scriptengine.h" >#endif /* expanded by -frewrite-includes */ ># 48 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_callfunc_x86.cpp" ># 1 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_scriptengine.h" 1 >/* > AngelCode Scripting Library > Copyright (c) 2003-2016 Andreas Jonsson > > This software is provided 'as-is', without any express or implied > warranty. In no event will the authors be held liable for any > damages arising from the use of this software. > > Permission is granted to anyone to use this software for any > purpose, including commercial applications, and to alter it and > redistribute it freely, subject to the following restrictions: > > 1. The origin of this software must not be misrepresented; you > must not claim that you wrote the original software. If you use > this software in a product, an acknowledgment in the product > documentation would be appreciated but is not required. > > 2. Altered source versions must be plainly marked as such, and > must not be misrepresented as being the original software. > > 3. This notice may not be removed or altered from any source > distribution. > > The original version of this library can be located at: > http://www.angelcode.com/angelscript/ > > Andreas Jonsson > andreas@angelcode.com >*/ > > >// >// as_scriptengine.h >// >// The implementation of the script engine interface >// > > > >#ifndef AS_SCRIPTENGINE_H >#define AS_SCRIPTENGINE_H > >#if 0 /* expanded by -frewrite-includes */ >#include "as_config.h" >#endif /* expanded by -frewrite-includes */ ># 43 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_scriptengine.h" ># 44 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_scriptengine.h" >#if 0 /* expanded by -frewrite-includes */ >#include "as_atomic.h" >#endif /* expanded by -frewrite-includes */ ># 44 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_scriptengine.h" ># 1 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_atomic.h" 1 >/* > AngelCode Scripting Library > Copyright (c) 2003-2013 Andreas Jonsson > > This software is provided 'as-is', without any express or implied > warranty. In no event will the authors be held liable for any > damages arising from the use of this software. > > Permission is granted to anyone to use this software for any > purpose, including commercial applications, and to alter it and > redistribute it freely, subject to the following restrictions: > > 1. The origin of this software must not be misrepresented; you > must not claim that you wrote the original software. If you use > this software in a product, an acknowledgment in the product > documentation would be appreciated but is not required. > > 2. Altered source versions must be plainly marked as such, and > must not be misrepresented as being the original software. > > 3. This notice may not be removed or altered from any source > distribution. > > The original version of this library can be located at: > http://www.angelcode.com/angelscript/ > > Andreas Jonsson > andreas@angelcode.com >*/ > > >// >// as_atomic.h >// >// The asCAtomic class provides methods for performing threadsafe >// operations on a single dword, e.g. reference counting and >// bitfields. >// > > > >#ifndef AS_ATOMIC_H >#define AS_ATOMIC_H > >#if 0 /* expanded by -frewrite-includes */ >#include "as_config.h" >#endif /* expanded by -frewrite-includes */ ># 45 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_atomic.h" ># 46 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_atomic.h" > >BEGIN_AS_NAMESPACE > >class asCAtomic >{ >public: > asCAtomic(); > > asDWORD get() const; > void set(asDWORD val); > > // Increase and return new value > asDWORD atomicInc(); > > // Decrease and return new value > asDWORD atomicDec(); > >protected: > asDWORD value; >}; > >END_AS_NAMESPACE > >#endif ># 70 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_atomic.h" ># 45 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_scriptengine.h" 2 >#if 0 /* expanded by -frewrite-includes */ >#include "as_scriptfunction.h" >#endif /* expanded by -frewrite-includes */ ># 45 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_scriptengine.h" ># 1 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_scriptfunction.h" 1 >/* > AngelCode Scripting Library > Copyright (c) 2003-2016 Andreas Jonsson > > This software is provided 'as-is', without any express or implied > warranty. In no event will the authors be held liable for any > damages arising from the use of this software. > > Permission is granted to anyone to use this software for any > purpose, including commercial applications, and to alter it and > redistribute it freely, subject to the following restrictions: > > 1. The origin of this software must not be misrepresented; you > must not claim that you wrote the original software. If you use > this software in a product, an acknowledgment in the product > documentation would be appreciated but is not required. > > 2. Altered source versions must be plainly marked as such, and > must not be misrepresented as being the original software. > > 3. This notice may not be removed or altered from any source > distribution. > > The original version of this library can be located at: > http://www.angelcode.com/angelscript/ > > Andreas Jonsson > andreas@angelcode.com >*/ > > >// >// as_scriptfunction.h >// >// A container for a compiled script function >// > > > >#ifndef AS_SCRIPTFUNCTION_H >#define AS_SCRIPTFUNCTION_H > >#if 0 /* expanded by -frewrite-includes */ >#include "as_config.h" >#endif /* expanded by -frewrite-includes */ ># 43 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_scriptfunction.h" ># 44 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_scriptfunction.h" >#if 0 /* expanded by -frewrite-includes */ >#include "as_string.h" >#endif /* expanded by -frewrite-includes */ ># 44 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_scriptfunction.h" ># 1 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_string.h" 1 >/* > AngelCode Scripting Library > Copyright (c) 2003-2014 Andreas Jonsson > > This software is provided 'as-is', without any express or implied > warranty. In no event will the authors be held liable for any > damages arising from the use of this software. > > Permission is granted to anyone to use this software for any > purpose, including commercial applications, and to alter it and > redistribute it freely, subject to the following restrictions: > > 1. The origin of this software must not be misrepresented; you > must not claim that you wrote the original software. If you use > this software in a product, an acknowledgment in the product > documentation would be appreciated but is not required. > > 2. Altered source versions must be plainly marked as such, and > must not be misrepresented as being the original software. > > 3. This notice may not be removed or altered from any source > distribution. > > The original version of this library can be located at: > http://www.angelcode.com/angelscript/ > > Andreas Jonsson > andreas@angelcode.com >*/ > >// This class has been designed to be easy to use, but not necessarily efficiency. >// It doesn't use shared string memory, or reference counting. It keeps track of >// string length, memory size. It also makes sure that the string is null-terminated. > >#ifndef AS_STRING_H >#define AS_STRING_H > >#if 0 /* expanded by -frewrite-includes */ >#include <stdio.h> >#endif /* expanded by -frewrite-includes */ ># 38 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_string.h" ># 1 "/usr/include/c++/v1/stdio.h" 1 3 >// -*- C++ -*- >//===---------------------------- stdio.h ---------------------------------===// >// >// The LLVM Compiler Infrastructure >// >// This file is dual licensed under the MIT and the University of Illinois Open >// Source Licenses. See LICENSE.TXT for details. >// >//===----------------------------------------------------------------------===// > >#if defined(__need_FILE) || defined(__need___FILE) > >#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) >#if 0 /* expanded by -frewrite-includes */ >#pragma GCC system_header >#endif /* expanded by -frewrite-includes */ ># 15 "/usr/include/c++/v1/stdio.h" 3 >#endif ># 16 "/usr/include/c++/v1/stdio.h" 3 > >#if 0 /* expanded by -frewrite-includes */ >#include_next <stdio.h> >#endif /* expanded by -frewrite-includes */ ># 17 "/usr/include/c++/v1/stdio.h" 3 ># 18 "/usr/include/c++/v1/stdio.h" 3 > >#elif !defined(_LIBCPP_STDIO_H) ># 20 "/usr/include/c++/v1/stdio.h" 3 >#define _LIBCPP_STDIO_H > >/* > stdio.h synopsis > >Macros: > > BUFSIZ > EOF > FILENAME_MAX > FOPEN_MAX > L_tmpnam > NULL > SEEK_CUR > SEEK_END > SEEK_SET > TMP_MAX > _IOFBF > _IOLBF > _IONBF > stderr > stdin > stdout > >Types: > >FILE >fpos_t >size_t > >int remove(const char* filename); >int rename(const char* old, const char* new); >FILE* tmpfile(void); >char* tmpnam(char* s); >int fclose(FILE* stream); >int fflush(FILE* stream); >FILE* fopen(const char* restrict filename, const char* restrict mode); >FILE* freopen(const char* restrict filename, const char * restrict mode, > FILE * restrict stream); >void setbuf(FILE* restrict stream, char* restrict buf); >int setvbuf(FILE* restrict stream, char* restrict buf, int mode, size_t size); >int fprintf(FILE* restrict stream, const char* restrict format, ...); >int fscanf(FILE* restrict stream, const char * restrict format, ...); >int printf(const char* restrict format, ...); >int scanf(const char* restrict format, ...); >int snprintf(char* restrict s, size_t n, const char* restrict format, ...); // C99 >int sprintf(char* restrict s, const char* restrict format, ...); >int sscanf(const char* restrict s, const char* restrict format, ...); >int vfprintf(FILE* restrict stream, const char* restrict format, va_list arg); >int vfscanf(FILE* restrict stream, const char* restrict format, va_list arg); // C99 >int vprintf(const char* restrict format, va_list arg); >int vscanf(const char* restrict format, va_list arg); // C99 >int vsnprintf(char* restrict s, size_t n, const char* restrict format, // C99 > va_list arg); >int vsprintf(char* restrict s, const char* restrict format, va_list arg); >int vsscanf(const char* restrict s, const char* restrict format, va_list arg); // C99 >int fgetc(FILE* stream); >char* fgets(char* restrict s, int n, FILE* restrict stream); >int fputc(int c, FILE* stream); >int fputs(const char* restrict s, FILE* restrict stream); >int getc(FILE* stream); >int getchar(void); >char* gets(char* s); // removed in C++14 >int putc(int c, FILE* stream); >int putchar(int c); >int puts(const char* s); >int ungetc(int c, FILE* stream); >size_t fread(void* restrict ptr, size_t size, size_t nmemb, > FILE* restrict stream); >size_t fwrite(const void* restrict ptr, size_t size, size_t nmemb, > FILE* restrict stream); >int fgetpos(FILE* restrict stream, fpos_t* restrict pos); >int fseek(FILE* stream, long offset, int whence); >int fsetpos(FILE*stream, const fpos_t* pos); >long ftell(FILE* stream); >void rewind(FILE* stream); >void clearerr(FILE* stream); >int feof(FILE* stream); >int ferror(FILE* stream); >void perror(const char* s); >*/ > >#if 0 /* expanded by -frewrite-includes */ >#include <__config> >#endif /* expanded by -frewrite-includes */ ># 102 "/usr/include/c++/v1/stdio.h" 3 ># 103 "/usr/include/c++/v1/stdio.h" 3 > >#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) >#if 0 /* expanded by -frewrite-includes */ >#pragma GCC system_header >#endif /* expanded by -frewrite-includes */ ># 106 "/usr/include/c++/v1/stdio.h" 3 >#endif ># 107 "/usr/include/c++/v1/stdio.h" 3 > >#if 0 /* expanded by -frewrite-includes */ >#include_next <stdio.h> >#endif /* expanded by -frewrite-includes */ ># 108 "/usr/include/c++/v1/stdio.h" 3 ># 1 "/usr/include/stdio.h" 1 3 4 >/*- > * Copyright (c) 1990, 1993 > * The Regents of the University of California. All rights reserved. > * > * This code is derived from software contributed to Berkeley by > * Chris Torek. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)stdio.h 8.5 (Berkeley) 4/29/95 > * $FreeBSD: head/include/stdio.h 318749 2017-05-23 16:12:50Z vangyzen $ > */ > >#ifndef _STDIO_H_ >#define _STDIO_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 39 "/usr/include/stdio.h" 3 4 ># 40 "/usr/include/stdio.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_null.h> >#endif /* expanded by -frewrite-includes */ ># 40 "/usr/include/stdio.h" 3 4 ># 41 "/usr/include/stdio.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 41 "/usr/include/stdio.h" 3 4 ># 42 "/usr/include/stdio.h" 3 4 > >__NULLABILITY_PRAGMA_PUSH > >typedef __off_t fpos_t; > >#ifndef _SIZE_T_DECLARED >typedef __size_t size_t; >#define _SIZE_T_DECLARED >#endif ># 51 "/usr/include/stdio.h" 3 4 > >#if __POSIX_VISIBLE >= 200809 >#ifndef _OFF_T_DECLARED >#define _OFF_T_DECLARED >typedef __off_t off_t; >#endif ># 57 "/usr/include/stdio.h" 3 4 >#ifndef _SSIZE_T_DECLARED >#define _SSIZE_T_DECLARED >typedef __ssize_t ssize_t; >#endif ># 61 "/usr/include/stdio.h" 3 4 >#endif ># 62 "/usr/include/stdio.h" 3 4 > >#ifndef _OFF64_T_DECLARED >#define _OFF64_T_DECLARED >typedef __off64_t off64_t; >#endif ># 67 "/usr/include/stdio.h" 3 4 > >#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >#ifndef _VA_LIST_DECLARED >typedef __va_list va_list; >#define _VA_LIST_DECLARED >#endif ># 73 "/usr/include/stdio.h" 3 4 >#endif ># 74 "/usr/include/stdio.h" 3 4 > >#define _FSTDIO /* Define for new stdio with functions. */ > >/* > * NB: to fit things in six character monocase externals, the stdio > * code uses the prefix `__s' for stdio objects, typically followed > * by a three-character attempt at a mnemonic. > */ > >/* stdio buffers */ >struct __sbuf { > unsigned char *_base; > int _size; >}; > >/* > * stdio state variables. > * > * The following always hold: > * > * if (_flags&(__SLBF|__SWR)) == (__SLBF|__SWR), > * _lbfsize is -_bf._size, else _lbfsize is 0 > * if _flags&__SRD, _w is 0 > * if _flags&__SWR, _r is 0 > * > * This ensures that the getc and putc macros (or inline functions) never > * try to write or read from a file that is in `read' or `write' mode. > * (Moreover, they can, and do, automatically switch from read mode to > * write mode, and back, on "r+" and "w+" files.) > * > * _lbfsize is used only to make the inline line-buffered output stream > * code as compact as possible. > * > * _ub, _up, and _ur are used when ungetc() pushes back more characters > * than fit in the current _bf, or when ungetc() pushes back a character > * that does not match the previous one in _bf. When this happens, > * _ub._base becomes non-nil (i.e., a stream has ungetc() data iff > * _ub._base!=NULL) and _up and _ur save the current values of _p and _r. > * > * Certain members of __sFILE are accessed directly via macros or > * inline functions. To preserve ABI compat, these members must not > * be disturbed. These members are marked below with (*). > */ >struct __sFILE { > unsigned char *_p; /* (*) current position in (some) buffer */ > int _r; /* (*) read space left for getc() */ > int _w; /* (*) write space left for putc() */ > short _flags; /* (*) flags, below; this FILE is free if 0 */ > short _file; /* (*) fileno, if Unix descriptor, else -1 */ > struct __sbuf _bf; /* (*) the buffer (at least 1 byte, if !NULL) */ > int _lbfsize; /* (*) 0 or -_bf._size, for inline putc */ > > /* operations */ > void *_cookie; /* (*) cookie passed to io functions */ > int (* _Nullable _close)(void *); > int (* _Nullable _read)(void *, char *, int); > fpos_t (* _Nullable _seek)(void *, fpos_t, int); > int (* _Nullable _write)(void *, const char *, int); > > /* separate buffer for long sequences of ungetc() */ > struct __sbuf _ub; /* ungetc buffer */ > unsigned char *_up; /* saved _p when _p is doing ungetc data */ > int _ur; /* saved _r when _r is counting ungetc data */ > > /* tricks to meet minimum requirements even when malloc() fails */ > unsigned char _ubuf[3]; /* guarantee an ungetc() buffer */ > unsigned char _nbuf[1]; /* guarantee a getc() buffer */ > > /* separate buffer for fgetln() when line crosses buffer boundary */ > struct __sbuf _lb; /* buffer for fgetln() */ > > /* Unix stdio files get aligned to block boundaries on fseek() */ > int _blksize; /* stat.st_blksize (may be != _bf._size) */ > fpos_t _offset; /* current lseek offset */ > > struct pthread_mutex *_fl_mutex; /* used for MT-safety */ > struct pthread *_fl_owner; /* current owner */ > int _fl_count; /* recursive lock count */ > int _orientation; /* orientation for fwide() */ > __mbstate_t _mbstate; /* multibyte conversion state */ > int _flags2; /* additional flags */ >}; >#ifndef _STDFILE_DECLARED >#define _STDFILE_DECLARED >typedef struct __sFILE FILE; >#endif ># 160 "/usr/include/stdio.h" 3 4 >#ifndef _STDSTREAM_DECLARED >__BEGIN_DECLS >extern FILE *__stdinp; >extern FILE *__stdoutp; >extern FILE *__stderrp; >__END_DECLS >#define _STDSTREAM_DECLARED >#endif ># 168 "/usr/include/stdio.h" 3 4 > >#define __SLBF 0x0001 /* line buffered */ >#define __SNBF 0x0002 /* unbuffered */ >#define __SRD 0x0004 /* OK to read */ >#define __SWR 0x0008 /* OK to write */ > /* RD and WR are never simultaneously asserted */ >#define __SRW 0x0010 /* open for reading & writing */ >#define __SEOF 0x0020 /* found EOF */ >#define __SERR 0x0040 /* found error */ >#define __SMBF 0x0080 /* _bf._base is from malloc */ >#define __SAPP 0x0100 /* fdopen()ed in append mode */ >#define __SSTR 0x0200 /* this is an sprintf/snprintf string */ >#define __SOPT 0x0400 /* do fseek() optimization */ >#define __SNPT 0x0800 /* do not do fseek() optimization */ >#define __SOFF 0x1000 /* set iff _offset is in fact correct */ >#define __SMOD 0x2000 /* true => fgetln modified _p text */ >#define __SALC 0x4000 /* allocate string space dynamically */ >#define __SIGN 0x8000 /* ignore this file in _fwalk */ > >#define __S2OAP 0x0001 /* O_APPEND mode is set */ > >/* > * The following three definitions are for ANSI C, which took them > * from System V, which brilliantly took internal interface macros and > * made them official arguments to setvbuf(), without renaming them. > * Hence, these ugly _IOxxx names are *supposed* to appear in user code. > * > * Although numbered as their counterparts above, the implementation > * does not rely on this. > */ >#define _IOFBF 0 /* setvbuf should set fully buffered */ >#define _IOLBF 1 /* setvbuf should set line buffered */ >#define _IONBF 2 /* setvbuf should set unbuffered */ > >#define BUFSIZ 1024 /* size of buffer used by setbuf */ >#define EOF (-1) > >/* > * FOPEN_MAX is a minimum maximum, and is the number of streams that > * stdio can provide without attempting to allocate further resources > * (which could fail). Do not use this for anything. > */ > /* must be == _POSIX_STREAM_MAX <limits.h> */ >#ifndef FOPEN_MAX >#define FOPEN_MAX 20 /* must be <= OPEN_MAX <sys/syslimits.h> */ >#endif ># 214 "/usr/include/stdio.h" 3 4 >#define FILENAME_MAX 1024 /* must be <= PATH_MAX <sys/syslimits.h> */ > >/* System V/ANSI C; this is the wrong way to do this, do *not* use these. */ >#if __XSI_VISIBLE >#define P_tmpdir "/tmp/" >#endif ># 220 "/usr/include/stdio.h" 3 4 >#define L_tmpnam 1024 /* XXX must be == PATH_MAX */ >#define TMP_MAX 308915776 > >#ifndef SEEK_SET >#define SEEK_SET 0 /* set file offset to offset */ >#endif ># 226 "/usr/include/stdio.h" 3 4 >#ifndef SEEK_CUR >#define SEEK_CUR 1 /* set file offset to current plus offset */ >#endif ># 229 "/usr/include/stdio.h" 3 4 >#ifndef SEEK_END >#define SEEK_END 2 /* set file offset to EOF plus offset */ >#endif ># 232 "/usr/include/stdio.h" 3 4 > >#define stdin __stdinp >#define stdout __stdoutp >#define stderr __stderrp > >__BEGIN_DECLS >#ifdef _XLOCALE_H_ >#if 0 /* expanded by -frewrite-includes */ >#include <xlocale/_stdio.h> >#endif /* expanded by -frewrite-includes */ ># 239 "/usr/include/stdio.h" 3 4 ># 240 "/usr/include/stdio.h" 3 4 >#endif ># 241 "/usr/include/stdio.h" 3 4 >/* > * Functions defined in ANSI C standard. > */ >void clearerr(FILE *); >int fclose(FILE *); >int feof(FILE *); >int ferror(FILE *); >int fflush(FILE *); >int fgetc(FILE *); >int fgetpos(FILE * __restrict, fpos_t * __restrict); >char *fgets(char * __restrict, int, FILE * __restrict); >FILE *fopen(const char * __restrict, const char * __restrict); >int fprintf(FILE * __restrict, const char * __restrict, ...); >int fputc(int, FILE *); >int fputs(const char * __restrict, FILE * __restrict); >size_t fread(void * __restrict, size_t, size_t, FILE * __restrict); >FILE *freopen(const char * __restrict, const char * __restrict, FILE * __restrict); >int fscanf(FILE * __restrict, const char * __restrict, ...); >int fseek(FILE *, long, int); >int fsetpos(FILE *, const fpos_t *); >long ftell(FILE *); >size_t fwrite(const void * __restrict, size_t, size_t, FILE * __restrict); >int getc(FILE *); >int getchar(void); >char *gets(char *); >void perror(const char *); >int printf(const char * __restrict, ...); >int putc(int, FILE *); >int putchar(int); >int puts(const char *); >int remove(const char *); >int rename(const char *, const char *); >void rewind(FILE *); >int scanf(const char * __restrict, ...); >void setbuf(FILE * __restrict, char * __restrict); >int setvbuf(FILE * __restrict, char * __restrict, int, size_t); >int sprintf(char * __restrict, const char * __restrict, ...); >int sscanf(const char * __restrict, const char * __restrict, ...); >FILE *tmpfile(void); >char *tmpnam(char *); >int ungetc(int, FILE *); >int vfprintf(FILE * __restrict, const char * __restrict, > __va_list); >int vprintf(const char * __restrict, __va_list); >int vsprintf(char * __restrict, const char * __restrict, > __va_list); > >#if __ISO_C_VISIBLE >= 1999 >int snprintf(char * __restrict, size_t, const char * __restrict, > ...) __printflike(3, 4); >int vfscanf(FILE * __restrict, const char * __restrict, __va_list) > __scanflike(2, 0); >int vscanf(const char * __restrict, __va_list) __scanflike(1, 0); >int vsnprintf(char * __restrict, size_t, const char * __restrict, > __va_list) __printflike(3, 0); >int vsscanf(const char * __restrict, const char * __restrict, __va_list) > __scanflike(2, 0); >#endif ># 299 "/usr/include/stdio.h" 3 4 > >/* > * Functions defined in all versions of POSIX 1003.1. > */ >#if __BSD_VISIBLE || (__POSIX_VISIBLE && __POSIX_VISIBLE <= 199506) >#define L_cuserid 17 /* size for cuserid(3); MAXLOGNAME, legacy */ >#endif ># 306 "/usr/include/stdio.h" 3 4 > >#if __POSIX_VISIBLE >#define L_ctermid 1024 /* size for ctermid(3); PATH_MAX */ > >char *ctermid(char *); >FILE *fdopen(int, const char *); >int fileno(FILE *); >#endif /* __POSIX_VISIBLE */ ># 314 "/usr/include/stdio.h" 3 4 > >#if __POSIX_VISIBLE >= 199209 >int pclose(FILE *); >FILE *popen(const char *, const char *); >#endif ># 319 "/usr/include/stdio.h" 3 4 > >#if __POSIX_VISIBLE >= 199506 >int ftrylockfile(FILE *); >void flockfile(FILE *); >void funlockfile(FILE *); > >/* > * These are normally used through macros as defined below, but POSIX > * requires functions as well. > */ >int getc_unlocked(FILE *); >int getchar_unlocked(void); >int putc_unlocked(int, FILE *); >int putchar_unlocked(int); >#endif ># 334 "/usr/include/stdio.h" 3 4 >#if __BSD_VISIBLE >void clearerr_unlocked(FILE *); >int feof_unlocked(FILE *); >int ferror_unlocked(FILE *); >int fileno_unlocked(FILE *); >#endif ># 340 "/usr/include/stdio.h" 3 4 > >#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >= 500 >int fseeko(FILE *, __off_t, int); >__off_t ftello(FILE *); >#endif ># 345 "/usr/include/stdio.h" 3 4 > >#if __BSD_VISIBLE || __XSI_VISIBLE > 0 && __XSI_VISIBLE < 600 >int getw(FILE *); >int putw(int, FILE *); >#endif /* BSD or X/Open before issue 6 */ ># 350 "/usr/include/stdio.h" 3 4 > >#if __XSI_VISIBLE >char *tempnam(const char *, const char *); >#endif ># 354 "/usr/include/stdio.h" 3 4 > >#if __POSIX_VISIBLE >= 200809 >FILE *fmemopen(void * __restrict, size_t, const char * __restrict); >ssize_t getdelim(char ** __restrict, size_t * __restrict, int, > FILE * __restrict); >FILE *open_memstream(char **, size_t *); >int renameat(int, const char *, int, const char *); >int vdprintf(int, const char * __restrict, __va_list) __printflike(2, 0); >/* _WITH_GETLINE to allow pre 11 sources to build on 11+ systems */ >ssize_t getline(char ** __restrict, size_t * __restrict, FILE * __restrict); >int dprintf(int, const char * __restrict, ...) __printflike(2, 3); >#endif /* __POSIX_VISIBLE >= 200809 */ ># 366 "/usr/include/stdio.h" 3 4 > >/* > * Routines that are purely local. > */ >#if __BSD_VISIBLE >int asprintf(char **, const char *, ...) __printflike(2, 3); >char *ctermid_r(char *); >void fcloseall(void); >int fdclose(FILE *, int *); >char *fgetln(FILE *, size_t *); >const char *fmtcheck(const char *, const char *) __format_arg(2); >int fpurge(FILE *); >void setbuffer(FILE *, char *, int); >int setlinebuf(FILE *); >int vasprintf(char **, const char *, __va_list) > __printflike(2, 0); > >/* > * The system error table contains messages for the first sys_nerr > * positive errno values. Use strerror() or strerror_r() from <string.h> > * instead. > */ >extern const int sys_nerr; >extern const char * const sys_errlist[]; > >/* > * Stdio function-access interface. > */ >FILE *funopen(const void *, > int (* _Nullable)(void *, char *, int), > int (* _Nullable)(void *, const char *, int), > fpos_t (* _Nullable)(void *, fpos_t, int), > int (* _Nullable)(void *)); >#define fropen(cookie, fn) funopen(cookie, fn, 0, 0, 0) >#define fwopen(cookie, fn) funopen(cookie, 0, fn, 0, 0) > >typedef __ssize_t cookie_read_function_t(void *, char *, size_t); >typedef __ssize_t cookie_write_function_t(void *, const char *, size_t); >typedef int cookie_seek_function_t(void *, off64_t *, int); >typedef int cookie_close_function_t(void *); >typedef struct { > cookie_read_function_t *read; > cookie_write_function_t *write; > cookie_seek_function_t *seek; > cookie_close_function_t *close; >} cookie_io_functions_t; >FILE *fopencookie(void *, const char *, cookie_io_functions_t); > >/* > * Portability hacks. See <sys/types.h>. > */ >#ifndef _FTRUNCATE_DECLARED >#define _FTRUNCATE_DECLARED >int ftruncate(int, __off_t); >#endif ># 421 "/usr/include/stdio.h" 3 4 >#ifndef _LSEEK_DECLARED >#define _LSEEK_DECLARED >__off_t lseek(int, __off_t, int); >#endif ># 425 "/usr/include/stdio.h" 3 4 >#ifndef _MMAP_DECLARED >#define _MMAP_DECLARED >void *mmap(void *, size_t, int, int, int, __off_t); >#endif ># 429 "/usr/include/stdio.h" 3 4 >#ifndef _TRUNCATE_DECLARED >#define _TRUNCATE_DECLARED >int truncate(const char *, __off_t); >#endif ># 433 "/usr/include/stdio.h" 3 4 >#endif /* __BSD_VISIBLE */ ># 434 "/usr/include/stdio.h" 3 4 > >/* > * Functions internal to the implementation. > */ >int __srget(FILE *); >int __swbuf(int, FILE *); > >/* > * The __sfoo macros are here so that we can > * define function versions in the C library. > */ >#define __sgetc(p) (--(p)->_r < 0 ? __srget(p) : (int)(*(p)->_p++)) >#if defined(__GNUC__) && defined(__STDC__) >static __inline int __sputc(int _c, FILE *_p) { > if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n')) > return (*_p->_p++ = _c); > else > return (__swbuf(_c, _p)); >} >#else ># 454 "/usr/include/stdio.h" 3 4 >/* > * This has been tuned to generate reasonable code on the vax using pcc. > */ >#define __sputc(c, p) \ > (--(p)->_w < 0 ? \ > (p)->_w >= (p)->_lbfsize ? \ > (*(p)->_p = (c)), *(p)->_p != '\n' ? \ > (int)*(p)->_p++ : \ > __swbuf('\n', p) : \ > __swbuf((int)(c), p) : \ > (*(p)->_p = (c), (int)*(p)->_p++)) >#endif ># 466 "/usr/include/stdio.h" 3 4 > >#ifndef __LIBC_ISTHREADED_DECLARED >#define __LIBC_ISTHREADED_DECLARED >extern int __isthreaded; >#endif ># 471 "/usr/include/stdio.h" 3 4 > >#ifndef __cplusplus > >#define __sfeof(p) (((p)->_flags & __SEOF) != 0) >#define __sferror(p) (((p)->_flags & __SERR) != 0) >#define __sclearerr(p) ((void)((p)->_flags &= ~(__SERR|__SEOF))) >#define __sfileno(p) ((p)->_file) > > >#define feof(p) (!__isthreaded ? __sfeof(p) : (feof)(p)) >#define ferror(p) (!__isthreaded ? __sferror(p) : (ferror)(p)) >#define clearerr(p) (!__isthreaded ? __sclearerr(p) : (clearerr)(p)) > >#if __POSIX_VISIBLE >#define fileno(p) (!__isthreaded ? __sfileno(p) : (fileno)(p)) >#endif ># 487 "/usr/include/stdio.h" 3 4 > >#define getc(fp) (!__isthreaded ? __sgetc(fp) : (getc)(fp)) >#define putc(x, fp) (!__isthreaded ? __sputc(x, fp) : (putc)(x, fp)) > >#define getchar() getc(stdin) >#define putchar(x) putc(x, stdout) > >#if __BSD_VISIBLE >/* > * See ISO/IEC 9945-1 ANSI/IEEE Std 1003.1 Second Edition 1996-07-12 > * B.8.2.7 for the rationale behind the *_unlocked() macros. > */ >#define feof_unlocked(p) __sfeof(p) >#define ferror_unlocked(p) __sferror(p) >#define clearerr_unlocked(p) __sclearerr(p) >#define fileno_unlocked(p) __sfileno(p) >#endif ># 504 "/usr/include/stdio.h" 3 4 >#if __POSIX_VISIBLE >= 199506 >#define getc_unlocked(fp) __sgetc(fp) >#define putc_unlocked(x, fp) __sputc(x, fp) > >#define getchar_unlocked() getc_unlocked(stdin) >#define putchar_unlocked(x) putc_unlocked(x, stdout) >#endif ># 511 "/usr/include/stdio.h" 3 4 >#endif /* __cplusplus */ ># 512 "/usr/include/stdio.h" 3 4 > >__END_DECLS >__NULLABILITY_PRAGMA_POP > >#endif /* !_STDIO_H_ */ ># 517 "/usr/include/stdio.h" 3 4 ># 109 "/usr/include/c++/v1/stdio.h" 2 3 > >#ifdef __cplusplus > >// snprintf >#if defined(_LIBCPP_MSVCRT_LIKE) >extern "C" { >int vasprintf(char **sptr, const char *__restrict fmt, va_list ap); >} >#endif ># 118 "/usr/include/c++/v1/stdio.h" 3 > >#undef getc >#undef putc >#undef clearerr >#undef feof >#undef ferror > >#endif ># 126 "/usr/include/c++/v1/stdio.h" 3 > >#endif // _LIBCPP_STDIO_H ># 128 "/usr/include/c++/v1/stdio.h" 3 ># 39 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_string.h" 2 >#if 0 /* expanded by -frewrite-includes */ >#include <string.h> >#endif /* expanded by -frewrite-includes */ ># 39 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_string.h" ># 40 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_string.h" > >class asCString >{ >public: > asCString(); > ~asCString(); > >#ifdef AS_CAN_USE_CPP11 > asCString(asCString &&); > asCString &operator =(asCString &&); >#endif // c++11 ># 51 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_string.h" > > asCString(const asCString &); > asCString(const char *); > asCString(const char *, size_t length); > explicit asCString(char); > > void Allocate(size_t len, bool keepData); > void SetLength(size_t len); > size_t GetLength() const; > > void Concatenate(const char *str, size_t length); > asCString &operator +=(const asCString &); > asCString &operator +=(const char *); > asCString &operator +=(char); > > void Assign(const char *str, size_t length); > asCString &operator =(const asCString &); > asCString &operator =(const char *); > asCString &operator =(char); > > asCString SubString(size_t start, size_t length = (size_t)(-1)) const; > > int FindLast(const char *str, int *count = 0) const; > > size_t Format(const char *fmt, ...); > > int Compare(const char *str) const; > int Compare(const asCString &str) const; > int Compare(const char *str, size_t length) const; > > char *AddressOf(); > const char *AddressOf() const; > char &operator [](size_t index); > const char &operator[](size_t index) const; > size_t RecalculateLength(); > >protected: > unsigned int length; > union > { > char *dynamic; > char local[12]; > }; >}; > >// Helper functions > >bool operator ==(const asCString &, const asCString &); >bool operator !=(const asCString &, const asCString &); > >bool operator ==(const asCString &, const char *); >bool operator !=(const asCString &, const char *); > >bool operator ==(const char *, const asCString &); >bool operator !=(const char *, const asCString &); > >bool operator <(const asCString &, const asCString &); > >asCString operator +(const asCString &, const char *); >asCString operator +(const char *, const asCString &); >asCString operator +(const asCString &, const asCString &); > >// a wrapper for using the pointer of asCString in asCMap >class asCStringPointer >{ >public: > asCStringPointer(); > asCStringPointer(const char *str, size_t len); > asCStringPointer(asCString *cstr); > > const char *AddressOf() const; > size_t GetLength() const; > > bool operator==(const asCStringPointer& other) const; > bool operator<(const asCStringPointer& other) const; > >private: > // Either string/length or cstring is stored > const char *string; > size_t length; > asCString *cstring; >}; > >#endif ># 135 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_string.h" ># 45 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_scriptfunction.h" 2 >#if 0 /* expanded by -frewrite-includes */ >#include "as_array.h" >#endif /* expanded by -frewrite-includes */ ># 45 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_scriptfunction.h" ># 46 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_scriptfunction.h" >#if 0 /* expanded by -frewrite-includes */ >#include "as_datatype.h" >#endif /* expanded by -frewrite-includes */ ># 46 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_scriptfunction.h" ># 1 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_datatype.h" 1 >/* > AngelCode Scripting Library > Copyright (c) 2003-2016 Andreas Jonsson > > This software is provided 'as-is', without any express or implied > warranty. In no event will the authors be held liable for any > damages arising from the use of this software. > > Permission is granted to anyone to use this software for any > purpose, including commercial applications, and to alter it and > redistribute it freely, subject to the following restrictions: > > 1. The origin of this software must not be misrepresented; you > must not claim that you wrote the original software. If you use > this software in a product, an acknowledgment in the product > documentation would be appreciated but is not required. > > 2. Altered source versions must be plainly marked as such, and > must not be misrepresented as being the original software. > > 3. This notice may not be removed or altered from any source > distribution. > > The original version of this library can be located at: > http://www.angelcode.com/angelscript/ > > Andreas Jonsson > andreas@angelcode.com >*/ > > >// >// as_datatype.h >// >// This class describes the datatype for expressions during compilation >// > > > >#ifndef AS_DATATYPE_H >#define AS_DATATYPE_H > >#if 0 /* expanded by -frewrite-includes */ >#include "as_tokendef.h" >#endif /* expanded by -frewrite-includes */ ># 43 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_datatype.h" ># 1 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_tokendef.h" 1 >/* > AngelCode Scripting Library > Copyright (c) 2003-2016 Andreas Jonsson > > This software is provided 'as-is', without any express or implied > warranty. In no event will the authors be held liable for any > damages arising from the use of this software. > > Permission is granted to anyone to use this software for any > purpose, including commercial applications, and to alter it and > redistribute it freely, subject to the following restrictions: > > 1. The origin of this software must not be misrepresented; you > must not claim that you wrote the original software. If you use > this software in a product, an acknowledgment in the product > documentation would be appreciated but is not required. > > 2. Altered source versions must be plainly marked as such, and > must not be misrepresented as being the original software. > > 3. This notice may not be removed or altered from any source > distribution. > > The original version of this library can be located at: > http://www.angelcode.com/angelscript/ > > Andreas Jonsson > andreas@angelcode.com >*/ > > >// >// as_tokendef.h >// >// Definitions for tokens identifiable by the tokenizer >// > > >#ifndef AS_TOKENDEF_H >#define AS_TOKENDEF_H > >#if 0 /* expanded by -frewrite-includes */ >#include "as_config.h" >#endif /* expanded by -frewrite-includes */ ># 42 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_tokendef.h" ># 43 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_tokendef.h" > >BEGIN_AS_NAMESPACE > >enum eTokenType >{ > ttUnrecognizedToken, > > ttEnd, // End of file > > // White space and comments > ttWhiteSpace, // ' ', '\t', '\r', '\n', UTF8 byte-order-mark > ttOnelineComment, // // \n > ttMultilineComment, // /* */ > > // Atoms > ttIdentifier, // abc123 > ttIntConstant, // 1234 > ttFloatConstant, // 12.34e56f > ttDoubleConstant, // 12.34e56 > ttStringConstant, // "123" > ttMultilineStringConstant, // > ttHeredocStringConstant, // """text""" > ttNonTerminatedStringConstant, // "123 > ttBitsConstant, // 0xFFFF > > // Math operators > ttPlus, // + > ttMinus, // - > ttStar, // * > ttSlash, // / > ttPercent, // % > ttStarStar, // ** > > ttHandle, // @ > > ttAddAssign, // += > ttSubAssign, // -= > ttMulAssign, // *= > ttDivAssign, // /= > ttModAssign, // %= > ttPowAssign, // **= > > ttOrAssign, // |= > ttAndAssign, // &= > ttXorAssign, // ^= > ttShiftLeftAssign, // <<= > ttShiftRightLAssign, // >>= > ttShiftRightAAssign, // >>>= > > ttInc, // ++ > ttDec, // -- > > ttDot, // . > ttScope, // :: > > // Statement tokens > ttAssignment, // = > ttEndStatement, // ; > ttListSeparator, // , > ttStartStatementBlock, // { > ttEndStatementBlock, // } > ttOpenParanthesis, // ( > ttCloseParanthesis, // ) > ttOpenBracket, // [ > ttCloseBracket, // ] > ttAmp, // & > > // Bitwise operators > ttBitOr, // | > ttBitNot, // ~ > ttBitXor, // ^ > ttBitShiftLeft, // << > ttBitShiftRight, // >> // TODO: In Java this is the arithmetical shift > ttBitShiftRightArith, // >>> // TODO: In Java this is the logical shift > > // Compare operators > ttEqual, // == > ttNotEqual, // != > ttLessThan, // < > ttGreaterThan, // > > ttLessThanOrEqual, // <= > ttGreaterThanOrEqual, // >= > > ttQuestion, // ? > ttColon, // : > > // Reserved keywords > ttIf, // if > ttElse, // else > ttFor, // for > ttWhile, // while > ttBool, // bool > ttFuncDef, // funcdef > ttImport, // import > ttInt, // int > ttInt8, // int8 > ttInt16, // int16 > ttInt64, // int64 > ttInterface, // interface > ttIs, // is > ttNotIs, // !is > ttUInt, // uint > ttUInt8, // uint8 > ttUInt16, // uint16 > ttUInt64, // uint64 > ttFloat, // float > ttVoid, // void > ttTrue, // true > ttFalse, // false > ttReturn, // return > ttNot, // not > ttAnd, // and, && > ttOr, // or, || > ttXor, // xor, ^^ > ttBreak, // break > ttContinue, // continue > ttConst, // const > ttDo, // do > ttDouble, // double > ttSwitch, // switch > ttCase, // case > ttDefault, // default > ttIn, // in > ttOut, // out > ttInOut, // inout > ttNull, // null > ttClass, // class > ttTypedef, // typedef > ttEnum, // enum > ttCast, // cast > ttPrivate, // private > ttProtected, // protected > ttNamespace, // namespace > ttMixin, // mixin > ttAuto // auto >}; > >struct sTokenWord >{ > const char *word; > size_t wordLength; > eTokenType tokenType; >}; > >#define asTokenDef(str, tok) {str, sizeof(str)-1, tok} > >sTokenWord const tokenWords[] = >{ > asTokenDef("+" , ttPlus), > asTokenDef("+=" , ttAddAssign), > asTokenDef("++" , ttInc), > asTokenDef("-" , ttMinus), > asTokenDef("-=" , ttSubAssign), > asTokenDef("--" , ttDec), > asTokenDef("*" , ttStar), > asTokenDef("*=" , ttMulAssign), > asTokenDef("/" , ttSlash), > asTokenDef("/=" , ttDivAssign), > asTokenDef("%" , ttPercent), > asTokenDef("%=" , ttModAssign), > asTokenDef("**" , ttStarStar), > asTokenDef("**=" , ttPowAssign), > asTokenDef("=" , ttAssignment), > asTokenDef("==" , ttEqual), > asTokenDef("." , ttDot), > asTokenDef("|" , ttBitOr), > asTokenDef("|=" , ttOrAssign), > asTokenDef("||" , ttOr), > asTokenDef("&" , ttAmp), > asTokenDef("&=" , ttAndAssign), > asTokenDef("&&" , ttAnd), > asTokenDef("^" , ttBitXor), > asTokenDef("^=" , ttXorAssign), > asTokenDef("^^" , ttXor), > asTokenDef("<" , ttLessThan), > asTokenDef("<=" , ttLessThanOrEqual), > asTokenDef("<<" , ttBitShiftLeft), > asTokenDef("<<=" , ttShiftLeftAssign), > asTokenDef(">" , ttGreaterThan), > asTokenDef(">=" , ttGreaterThanOrEqual), > asTokenDef(">>" , ttBitShiftRight), > asTokenDef(">>=" , ttShiftRightLAssign), > asTokenDef(">>>" , ttBitShiftRightArith), > asTokenDef(">>>=" , ttShiftRightAAssign), > asTokenDef("~" , ttBitNot), > asTokenDef(";" , ttEndStatement), > asTokenDef("," , ttListSeparator), > asTokenDef("{" , ttStartStatementBlock), > asTokenDef("}" , ttEndStatementBlock), > asTokenDef("(" , ttOpenParanthesis), > asTokenDef(")" , ttCloseParanthesis), > asTokenDef("[" , ttOpenBracket), > asTokenDef("]" , ttCloseBracket), > asTokenDef("?" , ttQuestion), > asTokenDef(":" , ttColon), > asTokenDef("::" , ttScope), > asTokenDef("!" , ttNot), > asTokenDef("!=" , ttNotEqual), > asTokenDef("!is" , ttNotIs), > asTokenDef("@" , ttHandle), > asTokenDef("and" , ttAnd), > asTokenDef("auto" , ttAuto), > asTokenDef("bool" , ttBool), > asTokenDef("break" , ttBreak), > asTokenDef("case" , ttCase), > asTokenDef("cast" , ttCast), > asTokenDef("class" , ttClass), > asTokenDef("const" , ttConst), > asTokenDef("continue" , ttContinue), > asTokenDef("default" , ttDefault), > asTokenDef("do" , ttDo), >#ifdef AS_USE_DOUBLE_AS_FLOAT > asTokenDef("double" , ttFloat), >#else ># 257 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_tokendef.h" > asTokenDef("double" , ttDouble), >#endif ># 259 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_tokendef.h" > asTokenDef("else" , ttElse), > asTokenDef("enum" , ttEnum), > asTokenDef("false" , ttFalse), > asTokenDef("float" , ttFloat), > asTokenDef("for" , ttFor), > asTokenDef("funcdef" , ttFuncDef), > asTokenDef("if" , ttIf), > asTokenDef("import" , ttImport), > asTokenDef("in" , ttIn), > asTokenDef("inout" , ttInOut), > asTokenDef("int" , ttInt), > asTokenDef("int8" , ttInt8), > asTokenDef("int16" , ttInt16), > asTokenDef("int32" , ttInt), > asTokenDef("int64" , ttInt64), > asTokenDef("interface" , ttInterface), > asTokenDef("is" , ttIs), > asTokenDef("mixin" , ttMixin), > asTokenDef("namespace" , ttNamespace), > asTokenDef("not" , ttNot), > asTokenDef("null" , ttNull), > asTokenDef("or" , ttOr), > asTokenDef("out" , ttOut), > asTokenDef("private" , ttPrivate), > asTokenDef("protected" , ttProtected), > asTokenDef("return" , ttReturn), > asTokenDef("switch" , ttSwitch), > asTokenDef("true" , ttTrue), > asTokenDef("typedef" , ttTypedef), > asTokenDef("uint" , ttUInt), > asTokenDef("uint8" , ttUInt8), > asTokenDef("uint16" , ttUInt16), > asTokenDef("uint32" , ttUInt), > asTokenDef("uint64" , ttUInt64), > asTokenDef("void" , ttVoid), > asTokenDef("while" , ttWhile), > asTokenDef("xor" , ttXor), >}; > >const unsigned int numTokenWords = sizeof(tokenWords)/sizeof(sTokenWord); > >const char * const whiteSpace = " \t\r\n"; > >// Some keywords that are not considered tokens by the parser >// These only have meaning in specific situations. Outside these >// situations they are treated as normal identifiers. >const char * const THIS_TOKEN = "this"; >const char * const FROM_TOKEN = "from"; >const char * const SUPER_TOKEN = "super"; >const char * const SHARED_TOKEN = "shared"; >const char * const FINAL_TOKEN = "final"; >const char * const OVERRIDE_TOKEN = "override"; >const char * const GET_TOKEN = "get"; >const char * const SET_TOKEN = "set"; >const char * const ABSTRACT_TOKEN = "abstract"; >const char * const FUNCTION_TOKEN = "function"; >const char * const IF_HANDLE_TOKEN = "if_handle_then_const"; > >END_AS_NAMESPACE > >#endif ># 320 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_tokendef.h" ># 44 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_datatype.h" 2 >#if 0 /* expanded by -frewrite-includes */ >#include "as_string.h" >#endif /* expanded by -frewrite-includes */ ># 44 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_datatype.h" ># 45 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_datatype.h" > >BEGIN_AS_NAMESPACE > >struct asSTypeBehaviour; >class asCScriptEngine; >class asCTypeInfo; >class asCScriptFunction; >class asCModule; >class asCObjectType; >class asCEnumType; >struct asSNameSpace; > >// TODO: refactor: Reference should not be part of the datatype. This should be stored separately, e.g. in asCExprValue >// MakeReference, MakeReadOnly, IsReference, IsReadOnly should be removed > >class asCDataType >{ >public: > asCDataType(); > asCDataType(const asCDataType &); > ~asCDataType(); > > bool IsValid() const; > > asCString Format(asSNameSpace *currNs, bool includeNamespace = false) const; > > static asCDataType CreatePrimitive(eTokenType tt, bool isConst); > static asCDataType CreateType(asCTypeInfo *ti, bool isConst); > static asCDataType CreateAuto(bool isConst); > static asCDataType CreateObjectHandle(asCTypeInfo *ot, bool isConst); > static asCDataType CreateNullHandle(); > > int MakeHandle(bool b, bool acceptHandleForScope = false); > int MakeArray(asCScriptEngine *engine, asCModule *requestingModule); > int MakeReference(bool b); > int MakeReadOnly(bool b); > int MakeHandleToConst(bool b); > void SetIfHandleThenConst(bool b) { ifHandleThenConst = b; } > bool HasIfHandleThenConst() const { return ifHandleThenConst; } > > bool IsTemplate() const; > bool IsScriptObject() const; > bool IsPrimitive() const; > bool IsMathType() const; > bool IsObject() const; > bool IsReference() const {return isReference;} > bool IsAuto() const {return isAuto;} > bool IsReadOnly() const; > bool IsIntegerType() const; > bool IsUnsignedType() const; > bool IsFloatType() const; > bool IsDoubleType() const; > bool IsBooleanType() const; > bool IsObjectHandle() const {return isObjectHandle;} > bool IsHandleToAuto() const {return isAuto && isObjectHandle;} > bool IsHandleToConst() const; > bool IsArrayType() const; > bool IsEnumType() const; > bool IsAnyType() const {return tokenType == ttQuestion;} > bool IsHandleToAsHandleType() const {return isHandleToAsHandleType;} > bool IsAbstractClass() const; > bool IsInterface() const; > bool IsFuncdef() const; > > bool IsObjectConst() const; > > bool IsEqualExceptRef(const asCDataType &) const; > bool IsEqualExceptRefAndConst(const asCDataType &) const; > bool IsEqualExceptConst(const asCDataType &) const; > bool IsNullHandle() const; > > bool SupportHandles() const; > bool CanBeInstantiated() const; > bool CanBeCopied() const; > > bool operator ==(const asCDataType &) const; > bool operator !=(const asCDataType &) const; > > asCDataType GetSubType(asUINT subtypeIndex = 0) const; > eTokenType GetTokenType() const {return tokenType;} > asCTypeInfo *GetTypeInfo() const { return typeInfo; } > > int GetSizeOnStackDWords() const; > int GetSizeInMemoryBytes() const; > int GetSizeInMemoryDWords() const; >#ifdef WIP_16BYTE_ALIGN > int GetAlignment() const; >#endif ># 133 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_datatype.h" > > void SetTokenType(eTokenType tt) {tokenType = tt;} > void SetTypeInfo(asCTypeInfo *ti) {typeInfo = ti;} > > asCDataType &operator =(const asCDataType &); > > asSTypeBehaviour *GetBehaviour() const; > >protected: > // Base object type > eTokenType tokenType; > > // Behaviour type > asCTypeInfo *typeInfo; > > // Top level > bool isReference:1; > bool isReadOnly:1; > bool isObjectHandle:1; > bool isConstHandle:1; > bool isAuto:1; > bool isHandleToAsHandleType:1; // Used by the compiler to know how to initialize the object > bool ifHandleThenConst:1; // Used when creating template instances to determine if a handle should be const or not > char dummy:1; >}; > >END_AS_NAMESPACE > >#endif ># 162 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_datatype.h" ># 47 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_scriptfunction.h" 2 >#if 0 /* expanded by -frewrite-includes */ >#include "as_atomic.h" >#endif /* expanded by -frewrite-includes */ ># 47 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_scriptfunction.h" ># 48 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_scriptfunction.h" > >BEGIN_AS_NAMESPACE > >class asCScriptEngine; >class asCModule; >class asCConfigGroup; >class asCGlobalProperty; >class asCScriptNode; >class asCFuncdefType; >struct asSNameSpace; > >struct asSScriptVariable >{ > asCString name; > asCDataType type; > int stackOffset; > asUINT declaredAtProgramPos; >}; > >enum asEListPatternNodeType >{ > asLPT_REPEAT, > asLPT_REPEAT_SAME, > asLPT_START, > asLPT_END, > asLPT_TYPE >}; > >struct asSListPatternNode >{ > asSListPatternNode(asEListPatternNodeType t) : type(t), next(0) {} > virtual ~asSListPatternNode() {}; > virtual asSListPatternNode *Duplicate() { return asNEW(asSListPatternNode)(type); } > asEListPatternNodeType type; > asSListPatternNode *next; >}; > >struct asSListPatternDataTypeNode : public asSListPatternNode >{ > asSListPatternDataTypeNode(const asCDataType &dt) : asSListPatternNode(asLPT_TYPE), dataType(dt) {} > asSListPatternNode *Duplicate() { return asNEW(asSListPatternDataTypeNode)(dataType); } > asCDataType dataType; >}; > >enum asEObjVarInfoOption >{ > asOBJ_UNINIT, > asOBJ_INIT, > asBLOCK_BEGIN, > asBLOCK_END >}; > >struct asSObjectVariableInfo >{ > asUINT programPos; > int variableOffset; > asEObjVarInfoOption option; >}; > >struct asSSystemFunctionInterface; > >// TODO: Might be interesting to allow enumeration of accessed global variables, and >// also functions/methods that are being called. This could be used to build a >// code database with call graphs, etc. > >void RegisterScriptFunction(asCScriptEngine *engine); > >class asCScriptFunction : public asIScriptFunction >{ >public: > // From asIScriptFunction > asIScriptEngine *GetEngine() const; > > // Memory management > int AddRef() const; > int Release() const; > > // Miscellaneous > int GetId() const; > asEFuncType GetFuncType() const; > const char *GetModuleName() const; > asIScriptModule *GetModule() const; > const char *GetScriptSectionName() const; > const char *GetConfigGroup() const; > asDWORD GetAccessMask() const; > void *GetAuxiliary() const; > > // Function signature > asITypeInfo *GetObjectType() const; > const char *GetObjectName() const; > const char *GetName() const; > const char *GetNamespace() const; > const char *GetDeclaration(bool includeObjectName = true, bool includeNamespace = false, bool includeParamNames = false) const; > bool IsReadOnly() const; > bool IsPrivate() const; > bool IsProtected() const; > bool IsFinal() const; > bool IsOverride() const; > bool IsShared() const; > asUINT GetParamCount() const; > int GetParam(asUINT index, int *typeId, asDWORD *flags = 0, const char **name = 0, const char **defaultArg = 0) const; >#ifdef AS_DEPRECATED > // Deprecated, since 2.29.0, 2014-04-06 > int GetParamTypeId(asUINT index, asDWORD *flags = 0) const; >#endif ># 153 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_scriptfunction.h" > int GetReturnTypeId(asDWORD *flags = 0) const; > > // Type id for function pointers > int GetTypeId() const; > bool IsCompatibleWithTypeId(int typeId) const; > > // Delegates > void *GetDelegateObject() const; > asITypeInfo *GetDelegateObjectType() const; > asIScriptFunction *GetDelegateFunction() const; > > // Debug information > asUINT GetVarCount() const; > int GetVar(asUINT index, const char **name, int *typeId = 0) const; > const char * GetVarDecl(asUINT index, bool includeNamespace = false) const; > int FindNextLineWithCode(int line) const; > > // For JIT compilation > asDWORD *GetByteCode(asUINT *length = 0); > > // User data > void *SetUserData(void *userData, asPWORD type); > void *GetUserData(asPWORD type) const; > >public: > //----------------------------------- > // Internal methods > > asCScriptFunction(asCScriptEngine *engine, asCModule *mod, asEFuncType funcType); > ~asCScriptFunction(); > > // Keep an internal reference counter to separate references coming from > // application or script objects and references coming from the script code > int AddRefInternal(); > int ReleaseInternal(); > > void DestroyHalfCreated(); > > // TODO: operator== > // TODO: The asIScriptFunction should provide operator== and operator!= that should do a > // a value comparison. Two delegate objects that point to the same object and class method should compare as equal > // TODO: The operator== should also be provided in script as opEquals to allow the same comparison in script > // To do this we'll need some way to adapt the argtype for opEquals for each funcdef, preferrably without instantiating lots of different methods > // Perhaps reusing 'auto' to mean the same type as the object > //bool operator==(const asCScriptFunction &other) const; > > void DestroyInternal(); > > void AddVariable(asCString &name, asCDataType &type, int stackOffset); > > int GetSpaceNeededForArguments(); > int GetSpaceNeededForReturnValue(); > asCString GetDeclarationStr(bool includeObjectName = true, bool includeNamespace = false, bool includeParamNames = false) const; > int GetLineNumber(int programPosition, int *sectionIdx); > void ComputeSignatureId(); > bool IsSignatureEqual(const asCScriptFunction *func) const; > bool IsSignatureExceptNameEqual(const asCScriptFunction *func) const; > bool IsSignatureExceptNameEqual(const asCDataType &retType, const asCArray<asCDataType> ¶mTypes, const asCArray<asETypeModifiers> &inOutFlags, const asCObjectType *type, bool isReadOnly) const; > bool IsSignatureExceptNameAndReturnTypeEqual(const asCScriptFunction *fun) const; > bool IsSignatureExceptNameAndReturnTypeEqual(const asCArray<asCDataType> ¶mTypes, const asCArray<asETypeModifiers> &inOutFlags, const asCObjectType *type, bool isReadOnly) const; > bool IsSignatureExceptNameAndObjectTypeEqual(const asCScriptFunction *func) const; > > asCTypeInfo *GetTypeInfoOfLocalVar(short varOffset); > > void MakeDelegate(asCScriptFunction *func, void *obj); > > int RegisterListPattern(const char *decl, asCScriptNode *listPattern); > int ParseListPattern(asSListPatternNode *&target, const char *decl, asCScriptNode *listPattern); > > bool DoesReturnOnStack() const; > > void JITCompile(); > > void AddReferences(); > void ReleaseReferences(); > > void AllocateScriptFunctionData(); > void DeallocateScriptFunctionData(); > > asCGlobalProperty *GetPropertyByGlobalVarPtr(void *gvarPtr); > > // GC methods (for delegates) > int GetRefCount(); > void SetFlag(); > bool GetFlag(); > void EnumReferences(asIScriptEngine *engine); > void ReleaseAllHandles(asIScriptEngine *engine); > >public: > //----------------------------------- > // Properties > > mutable asCAtomic externalRefCount; // Used for external referneces > asCAtomic internalRefCount; // Used for internal references > mutable bool gcFlag; > asCScriptEngine *engine; > asCModule *module; > > asCArray<asPWORD> userData; > > // Function signature > asCString name; > asCDataType returnType; > asCArray<asCDataType> parameterTypes; > asCArray<asCString> parameterNames; > asCArray<asETypeModifiers> inOutFlags; > asCArray<asCString *> defaultArgs; > bool isReadOnly; > bool isPrivate; > bool isProtected; > bool isFinal; > bool isOverride; > asCObjectType *objectType; > int signatureId; > > int id; > > asEFuncType funcType; > asDWORD accessMask; > bool isShared; > > // Namespace will be null for funcdefs that are declared as child funcdefs > // of a class. In this case the namespace shall be taken from the parentClass > // in the funcdefType > asSNameSpace *nameSpace; > > asCFuncdefType *funcdefType; // Doesn't increase refCount > > // Used by asFUNC_DELEGATE > void *objForDelegate; > asCScriptFunction *funcForDelegate; > > // Used by list factory behaviour > asSListPatternNode *listPattern; > > // Used by asFUNC_SCRIPT > struct ScriptFunctionData > { > // Bytecode for the script function > asCArray<asDWORD> byteCode; > > // The stack space needed for the local variables > asDWORD variableSpace; > > // These hold information on objects and function pointers, including temporary > // variables used by exception handler and when saving bytecode > asCArray<asCTypeInfo*> objVariableTypes; > asCArray<int> objVariablePos; > > // The first variables in above array are allocated on the heap, the rest on the stack. > // This variable shows how many are on the heap. > asUINT objVariablesOnHeap; > > // Holds information on scope for object variables on the stack > asCArray<asSObjectVariableInfo> objVariableInfo; > > // The stack needed to execute the function > int stackNeeded; > > // JIT compiled code of this function > asJITFunction jitFunction; > > // Holds debug information on explicitly declared variables > asCArray<asSScriptVariable*> variables; > // Store position, line number pairs for debug information > asCArray<int> lineNumbers; > // Store the script section where the code was declared > int scriptSectionIdx; > // Store the location where the function was declared (row in the lower 20 bits, and column in the upper 12) > int declaredAt; > // Store position/index pairs if the bytecode is compiled from multiple script sections > asCArray<int> sectionIdxs; > }; > ScriptFunctionData *scriptData; > > // Stub functions and delegates don't own the object and parameters > bool dontCleanUpOnException; > > // Used by asFUNC_VIRTUAL > int vfTableIdx; > > // Used by asFUNC_SYSTEM > asSSystemFunctionInterface *sysFuncIntf; >}; > >const char * const DELEGATE_FACTORY = "$dlgte"; >asCScriptFunction *CreateDelegate(asCScriptFunction *func, void *obj); > >END_AS_NAMESPACE > >#endif ># 344 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_scriptfunction.h" ># 46 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_scriptengine.h" 2 >#if 0 /* expanded by -frewrite-includes */ >#include "as_array.h" >#endif /* expanded by -frewrite-includes */ ># 46 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_scriptengine.h" ># 47 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_scriptengine.h" >#if 0 /* expanded by -frewrite-includes */ >#include "as_datatype.h" >#endif /* expanded by -frewrite-includes */ ># 47 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_scriptengine.h" ># 48 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_scriptengine.h" >#if 0 /* expanded by -frewrite-includes */ >#include "as_objecttype.h" >#endif /* expanded by -frewrite-includes */ ># 48 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_scriptengine.h" ># 1 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_objecttype.h" 1 >/* > AngelCode Scripting Library > Copyright (c) 2003-2016 Andreas Jonsson > > This software is provided 'as-is', without any express or implied > warranty. In no event will the authors be held liable for any > damages arising from the use of this software. > > Permission is granted to anyone to use this software for any > purpose, including commercial applications, and to alter it and > redistribute it freely, subject to the following restrictions: > > 1. The origin of this software must not be misrepresented; you > must not claim that you wrote the original software. If you use > this software in a product, an acknowledgment in the product > documentation would be appreciated but is not required. > > 2. Altered source versions must be plainly marked as such, and > must not be misrepresented as being the original software. > > 3. This notice may not be removed or altered from any source > distribution. > > The original version of this library can be located at: > http://www.angelcode.com/angelscript/ > > Andreas Jonsson > andreas@angelcode.com >*/ > > > >// >// as_objecttype.h >// >// A class for storing object type information >// > > > >#ifndef AS_OBJECTTYPE_H >#define AS_OBJECTTYPE_H > >#if 0 /* expanded by -frewrite-includes */ >#include "as_property.h" >#endif /* expanded by -frewrite-includes */ ># 44 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_objecttype.h" ># 1 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_property.h" 1 >/* > AngelCode Scripting Library > Copyright (c) 2003-2015 Andreas Jonsson > > This software is provided 'as-is', without any express or implied > warranty. In no event will the authors be held liable for any > damages arising from the use of this software. > > Permission is granted to anyone to use this software for any > purpose, including commercial applications, and to alter it and > redistribute it freely, subject to the following restrictions: > > 1. The origin of this software must not be misrepresented; you > must not claim that you wrote the original software. If you use > this software in a product, an acknowledgment in the product > documentation would be appreciated but is not required. > > 2. Altered source versions must be plainly marked as such, and > must not be misrepresented as being the original software. > > 3. This notice may not be removed or altered from any source > distribution. > > The original version of this library can be located at: > http://www.angelcode.com/angelscript/ > > Andreas Jonsson > andreas@angelcode.com >*/ > > >// >// as_property.h >// >// A class for storing object property information >// > > > >#ifndef AS_PROPERTY_H >#define AS_PROPERTY_H > >#if 0 /* expanded by -frewrite-includes */ >#include "as_string.h" >#endif /* expanded by -frewrite-includes */ ># 43 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_property.h" ># 44 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_property.h" >#if 0 /* expanded by -frewrite-includes */ >#include "as_datatype.h" >#endif /* expanded by -frewrite-includes */ ># 44 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_property.h" ># 45 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_property.h" >#if 0 /* expanded by -frewrite-includes */ >#include "as_atomic.h" >#endif /* expanded by -frewrite-includes */ ># 45 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_property.h" ># 46 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_property.h" >#if 0 /* expanded by -frewrite-includes */ >#include "as_scriptfunction.h" >#endif /* expanded by -frewrite-includes */ ># 46 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_property.h" ># 47 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_property.h" >#if 0 /* expanded by -frewrite-includes */ >#include "as_symboltable.h" >#endif /* expanded by -frewrite-includes */ ># 47 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_property.h" ># 1 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_symboltable.h" 1 >/* > AngelCode Scripting Library > Copyright (c) 2012-2015 Andreas Jonsson > > This software is provided 'as-is', without any express or implied > warranty. In no event will the authors be held liable for any > damages arising from the use of this software. > > Permission is granted to anyone to use this software for any > purpose, including commercial applications, and to alter it and > redistribute it freely, subject to the following restrictions: > > 1. The origin of this software must not be misrepresented; you > must not claim that you wrote the original software. If you use > this software in a product, an acknowledgment in the product > documentation would be appreciated but is not required. > > 2. Altered source versions must be plainly marked as such, and > must not be misrepresented as being the original software. > > 3. This notice may not be removed or altered from any source > distribution. > > The original version of this library can be located at: > http://www.angelcode.com/angelscript/ > > Andreas Jonsson > andreas@angelcode.com >*/ > > >// >// as_symboltable.h >// >// Created on: Jun 19, 2012 >// Author: Markus Lenger, a.k.a. mlengerx >// >// This class is used for fast symbol lookups while parsing or loading bytecode >// > >#ifndef AS_SYMBOLTABLE_H >#define AS_SYMBOLTABLE_H > >#if 0 /* expanded by -frewrite-includes */ >#include "as_config.h" >#endif /* expanded by -frewrite-includes */ ># 44 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_symboltable.h" ># 45 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_symboltable.h" >#if 0 /* expanded by -frewrite-includes */ >#include "as_memory.h" >#endif /* expanded by -frewrite-includes */ ># 45 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_symboltable.h" ># 46 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_symboltable.h" >#if 0 /* expanded by -frewrite-includes */ >#include "as_string.h" >#endif /* expanded by -frewrite-includes */ ># 46 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_symboltable.h" ># 47 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_symboltable.h" >#if 0 /* expanded by -frewrite-includes */ >#include "as_map.h" >#endif /* expanded by -frewrite-includes */ ># 47 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_symboltable.h" ># 1 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_map.h" 1 >/* > AngelCode Scripting Library > Copyright (c) 2003-2013 Andreas Jonsson > > This software is provided 'as-is', without any express or implied > warranty. In no event will the authors be held liable for any > damages arising from the use of this software. > > Permission is granted to anyone to use this software for any > purpose, including commercial applications, and to alter it and > redistribute it freely, subject to the following restrictions: > > 1. The origin of this software must not be misrepresented; you > must not claim that you wrote the original software. If you use > this software in a product, an acknowledgment in the product > documentation would be appreciated but is not required. > > 2. Altered source versions must be plainly marked as such, and > must not be misrepresented as being the original software. > > 3. This notice may not be removed or altered from any source > distribution. > > The original version of this library can be located at: > http://www.angelcode.com/angelscript/ > > Andreas Jonsson > andreas@angelcode.com >*/ > > >// >// as_map.h >// >// This class is used for mapping a value to another >// > > >#ifndef AS_MAP_H >#define AS_MAP_H > >template <class KEY, class VAL> struct asSMapNode; > >template <class KEY, class VAL> class asCMap >{ >public: > asCMap(); > ~asCMap(); > > int Insert(const KEY &key, const VAL &value); > int Insert(asSMapNode<KEY,VAL> *node); > int GetCount() const; > > const KEY &GetKey(const asSMapNode<KEY,VAL> *cursor) const; > const VAL &GetValue(const asSMapNode<KEY,VAL> *cursor) const; > VAL &GetValue(asSMapNode<KEY,VAL> *cursor); > > void Erase(asSMapNode<KEY,VAL> *cursor); > asSMapNode<KEY,VAL> *Remove(asSMapNode<KEY,VAL> *cursor); > void EraseAll(); > > void SwapWith(asCMap<KEY,VAL> &other); > > // Returns true as long as cursor is valid > > bool MoveTo(asSMapNode<KEY,VAL> **out, const KEY &key) const; > bool MoveFirst(asSMapNode<KEY,VAL> **out) const; > bool MoveLast(asSMapNode<KEY,VAL> **out) const; > bool MoveNext(asSMapNode<KEY,VAL> **out, asSMapNode<KEY,VAL> *cursor) const; > bool MovePrev(asSMapNode<KEY,VAL> **out, asSMapNode<KEY,VAL> *cursor) const; > > // For debugging only > > int CheckIntegrity(asSMapNode<KEY,VAL> *node) const; > >protected: > // Don't allow value assignment > asCMap &operator=(const asCMap &) { return *this; } > > void BalanceInsert(asSMapNode<KEY,VAL> *node); > void BalanceErase(asSMapNode<KEY,VAL> *child, asSMapNode<KEY,VAL> *parent); > > int EraseAll(asSMapNode<KEY,VAL> *node); > int RotateLeft(asSMapNode<KEY,VAL> *node); > int RotateRight(asSMapNode<KEY,VAL> *node); > > asSMapNode<KEY,VAL> *root; > asSMapNode<KEY,VAL> dummy; > > int count; >}; > >//--------------------------------------------------------------------------- >// Implementation > >// Properties of a Red-Black Tree >// >// 1. The root is always black >// 2. All single paths from the root to leafs >// contain the same amount of black nodes >// 3. No red node can have a red node as parent > >#define ISRED(x) ((x != 0) && (x)->isRed) >#define ISBLACK(x) (!ISRED(x)) > >template <class KEY, class VAL> struct asSMapNode >{ > asSMapNode() {parent = 0; left = 0; right = 0; isRed = true;} > void Init(KEY k, VAL v) {key = k; value = v; parent = 0; left = 0; right = 0; isRed = true;} > > asSMapNode *parent; > asSMapNode *left; > asSMapNode *right; > bool isRed; > > KEY key; > VAL value; >}; > >template <class KEY, class VAL> >asCMap<KEY, VAL>::asCMap() >{ > root = 0; > count = 0; >} > >template <class KEY, class VAL> >asCMap<KEY, VAL>::~asCMap() >{ > EraseAll(); >} > >template <class KEY, class VAL> >void asCMap<KEY,VAL>::SwapWith(asCMap<KEY,VAL> &other) >{ > asSMapNode<KEY,VAL> *tmpRoot = root; > int tmpCount = count; > > root = other.root; > count = other.count; > > other.root = tmpRoot; > other.count = tmpCount; >} > >template <class KEY, class VAL> >void asCMap<KEY, VAL>::EraseAll() >{ > EraseAll(root); > root = 0; >} > >template <class KEY, class VAL> >int asCMap<KEY, VAL>::EraseAll(asSMapNode<KEY, VAL> *p) >{ > if( p == 0 ) return -1; > > EraseAll( p->left ); > EraseAll( p->right ); > > typedef asSMapNode<KEY,VAL> node_t; > asDELETE(p,node_t); > > count--; > > return 0; >} > >template <class KEY, class VAL> >int asCMap<KEY, VAL>::GetCount() const >{ > return count; >} > >template <class KEY, class VAL> >int asCMap<KEY, VAL>::Insert(const KEY &key, const VAL &value) >{ > typedef asSMapNode<KEY,VAL> node_t; > asSMapNode<KEY,VAL> *nnode = asNEW(node_t); > if( nnode == 0 ) > { > // Out of memory > return -1; > } > > nnode->key = key; > nnode->value = value; > > return Insert(nnode); >} > >template <class KEY, class VAL> >int asCMap<KEY, VAL>::Insert(asSMapNode<KEY,VAL> *nnode) >{ > // Insert the node > if( root == 0 ) > root = nnode; > else > { > asSMapNode<KEY,VAL> *p = root; > for(;;) > { > if( nnode->key < p->key ) > { > if( p->left == 0 ) > { > nnode->parent = p; > p->left = nnode; > break; > } > else > p = p->left; > } > else > { > if( p->right == 0 ) > { > nnode->parent = p; > p->right = nnode; > break; > } > else > p = p->right; > } > } > } > > BalanceInsert(nnode); > > count++; > > return 0; >} > >template <class KEY, class VAL> >void asCMap<KEY, VAL>::BalanceInsert(asSMapNode<KEY, VAL> *node) >{ > // The node, that is red, can't have a red parent > while( node != root && node->parent->isRed ) > { > // Check color of uncle > if( node->parent == node->parent->parent->left ) > { > asSMapNode<KEY,VAL> *uncle = node->parent->parent->right; > if( ISRED(uncle) ) > { > // B > // R R > // N > > // Change color on parent, uncle, and grand parent > node->parent->isRed = false; > uncle->isRed = false; > node->parent->parent->isRed = true; > > // Continue balancing from grand parent > node = node->parent->parent; > } > else > { > // B > // R B > // N > > if( node == node->parent->right ) > { > // Make the node a left child > node = node->parent; > RotateLeft(node); > } > > // Change color on parent and grand parent > // Then rotate grand parent to the right > node->parent->isRed = false; > node->parent->parent->isRed = true; > RotateRight(node->parent->parent); > } > } > else > { > asSMapNode<KEY,VAL> *uncle = node->parent->parent->left; > if( ISRED(uncle) ) > { > // B > // R R > // N > > // Change color on parent, uncle, and grand parent > // Continue balancing from grand parent > node->parent->isRed = false; > uncle->isRed = false; > node = node->parent->parent; > node->isRed = true; > } > else > { > // B > // B R > // N > > if( node == node->parent->left ) > { > // Make the node a right child > node = node->parent; > RotateRight(node); > } > > // Change color on parent and grand parent > // Then rotate grand parent to the right > node->parent->isRed = false; > node->parent->parent->isRed = true; > RotateLeft(node->parent->parent); > } > } > } > > root->isRed = false; >} > >// For debugging purposes only >template <class KEY, class VAL> >int asCMap<KEY, VAL>::CheckIntegrity(asSMapNode<KEY, VAL> *node) const >{ > if( node == 0 ) > { > if( root == 0 ) > return 0; > else if( ISRED(root) ) > return -1; > else > node = root; > } > > int left = 0, right = 0; > if( node->left ) > left = CheckIntegrity(node->left); > if( node->right ) > right = CheckIntegrity(node->right); > > if( left != right || left == -1 ) > return -1; > > if( ISBLACK(node) ) > return left+1; > > return left; >} > >// Returns true if successful >template <class KEY, class VAL> >bool asCMap<KEY, VAL>::MoveTo(asSMapNode<KEY,VAL> **out, const KEY &key) const >{ > asSMapNode<KEY,VAL> *p = root; > while( p ) > { > if( key < p->key ) > p = p->left; > else if( key == p->key ) > { > if( out ) *out = p; > return true; > } > else > p = p->right; > } > > if( out ) *out = 0; > return false; >} > >template <class KEY, class VAL> >void asCMap<KEY, VAL>::Erase(asSMapNode<KEY,VAL> *cursor) >{ > asSMapNode<KEY,VAL> *node = Remove(cursor); > asASSERT( node == cursor ); > > typedef asSMapNode<KEY,VAL> node_t; > asDELETE(node,node_t); >} > >template <class KEY, class VAL> >asSMapNode<KEY,VAL> *asCMap<KEY, VAL>::Remove(asSMapNode<KEY,VAL> *cursor) >{ > if( cursor == 0 ) return 0; > > asSMapNode<KEY,VAL> *node = cursor; > > //--------------------------------------------------- > // Choose the node that will replace the erased one > asSMapNode<KEY,VAL> *remove; > if( node->left == 0 || node->right == 0 ) > remove = node; > else > { > remove = node->right; > while( remove->left ) remove = remove->left; > } > > //-------------------------------------------------- > // Remove the node > asSMapNode<KEY,VAL> *child; > if( remove->left ) > child = remove->left; > else > child = remove->right; > > if( child ) child->parent = remove->parent; > if( remove->parent ) > { > if( remove == remove->parent->left ) > remove->parent->left = child; > else > remove->parent->right = child; > } > else > root = child; > > // If we remove a black node we must make sure the tree is balanced > if( ISBLACK(remove) ) > BalanceErase(child, remove->parent); > > //---------------------------------------- > // Replace the erased node with the removed one > if( remove != node ) > { > if( node->parent ) > { > if( node->parent->left == node ) > node->parent->left = remove; > else > node->parent->right = remove; > } > else > root = remove; > > remove->isRed = node->isRed; > remove->parent = node->parent; > > remove->left = node->left; > if( remove->left ) remove->left->parent = remove; > remove->right = node->right; > if( remove->right ) remove->right->parent = remove; > } > > count--; > > return node; >} > >// Call method only if removed node was black >// child is the child of the removed node >template <class KEY, class VAL> >void asCMap<KEY, VAL>::BalanceErase(asSMapNode<KEY, VAL> *child, asSMapNode<KEY, VAL> *parent) >{ > // If child is red > // Color child black > // Terminate > > // These tests assume brother is to the right. > > // 1. Brother is red > // Color parent red and brother black > // Rotate parent left > // Transforms to 2b > // 2a. Parent and brother is black, brother's children are black > // Color brother red > // Continue test with parent as child > // 2b. Parent is red, brother is black, brother's children are black > // Color parent black and brother red > // Terminate > // 3. Brother is black, and brother's left is red and brother's right is black > // Color brother red and brother's left black > // Rotate brother to right > // Transforms to 4. > // 4. Brother is black, brother's right is red > // Color brother's right black > // Color brother to color of parent > // Color parent black > // Rotate parent left > // Terminate > > while( child != root && ISBLACK(child) ) > { > if( child == parent->left ) > { > asSMapNode<KEY,VAL> *brother = parent->right; > > // Case 1 > if( ISRED(brother) ) > { > brother->isRed = false; > parent->isRed = true; > RotateLeft(parent); > brother = parent->right; > } > > // Case 2 > if( brother == 0 ) break; > if( ISBLACK(brother->left) && ISBLACK(brother->right) ) > { > // Case 2b > if( ISRED(parent) ) > { > parent->isRed = false; > brother->isRed = true; > break; > } > > brother->isRed = true; > child = parent; > parent = child->parent; > } > else > { > // Case 3 > if( ISBLACK(brother->right) ) > { > brother->left->isRed = false; > brother->isRed = true; > RotateRight(brother); > brother = parent->right; > } > > // Case 4 > brother->isRed = parent->isRed; > parent->isRed = false; > brother->right->isRed = false; > RotateLeft(parent); > break; > } > } > else > { > asSMapNode<KEY,VAL> *brother = parent->left; > > // Case 1 > if( ISRED(brother) ) > { > brother->isRed = false; > parent->isRed = true; > RotateRight(parent); > brother = parent->left; > } > > // Case 2 > if( brother == 0 ) break; > if( ISBLACK(brother->left) && ISBLACK(brother->right) ) > { > // Case 2b > if( ISRED(parent) ) > { > parent->isRed = false; > brother->isRed = true; > break; > } > > brother->isRed = true; > child = parent; > parent = child->parent; > } > else > { > // Case 3 > if( ISBLACK(brother->left) ) > { > brother->right->isRed = false; > brother->isRed = true; > RotateLeft(brother); > brother = parent->left; > } > > // Case 4 > brother->isRed = parent->isRed; > parent->isRed = false; > brother->left->isRed = false; > RotateRight(parent); > break; > } > } > } > > if( child ) > child->isRed = false; >} > >template <class KEY, class VAL> >int asCMap<KEY, VAL>::RotateRight(asSMapNode<KEY, VAL> *node) >{ > // P L // > // / \ / \ // > // L R => Ll P // > // / \ / \ // > // Ll Lr Lr R // > > if( node->left == 0 ) return -1; > > asSMapNode<KEY,VAL> *left = node->left; > > // Update parent > if( node->parent ) > { > asSMapNode<KEY,VAL> *parent = node->parent; > if( parent->left == node ) > parent->left = left; > else > parent->right = left; > > left->parent = parent; > } > else > { > root = left; > left->parent = 0; > } > > // Move left's right child to node's left child > node->left = left->right; > if( node->left ) node->left->parent = node; > > // Put node as left's right child > left->right = node; > node->parent = left; > > return 0; >} > >template <class KEY, class VAL> >int asCMap<KEY, VAL>::RotateLeft(asSMapNode<KEY, VAL> *node) >{ > // P R // > // / \ / \ // > // L R => P Rr // > // / \ / \ // > // Rl Rr L Rl // > > if( node->right == 0 ) return -1; > > asSMapNode<KEY,VAL> *right = node->right; > > // Update parent > if( node->parent ) > { > asSMapNode<KEY,VAL> *parent = node->parent; > if( parent->right == node ) > parent->right = right; > else > parent->left = right; > > right->parent = parent; > } > else > { > root = right; > right->parent = 0; > } > > // Move right's left child to node's right child > node->right = right->left; > if( node->right ) node->right->parent = node; > > // Put node as right's left child > right->left = node; > node->parent = right; > > return 0; >} > >template <class KEY, class VAL> >const VAL &asCMap<KEY, VAL>::GetValue(const asSMapNode<KEY,VAL> *cursor) const >{ > if( cursor == 0 ) > return dummy.value; > > return cursor->value; >} > >template <class KEY, class VAL> >VAL &asCMap<KEY, VAL>::GetValue(asSMapNode<KEY,VAL> *cursor) >{ > if( cursor == 0 ) > return dummy.value; > > return cursor->value; >} > >template <class KEY, class VAL> >const KEY &asCMap<KEY, VAL>::GetKey(const asSMapNode<KEY,VAL> *cursor) const >{ > if( cursor == 0 ) > return dummy.key; > > return cursor->key; >} > >template <class KEY, class VAL> >bool asCMap<KEY, VAL>::MoveFirst(asSMapNode<KEY,VAL> **out) const >{ > *out = root; > if( root == 0 ) return false; > > while( (*out)->left ) > *out = (*out)->left; > > return true; >} > >template <class KEY, class VAL> >bool asCMap<KEY, VAL>::MoveLast(asSMapNode<KEY,VAL> **out) const >{ > *out = root; > if( root == 0 ) return false; > > while( (*out)->right ) > *out = (*out)->right; > > return true; >} > >template <class KEY, class VAL> >bool asCMap<KEY, VAL>::MoveNext(asSMapNode<KEY,VAL> **out, asSMapNode<KEY,VAL> *cursor) const >{ > if( cursor == 0 ) > { > *out = 0; > return false; > } > > if( cursor->right == 0 ) > { > // Move upwards until we find a parent node to the right > while( cursor->parent && cursor->parent->right == cursor ) > cursor = cursor->parent; > > cursor = cursor->parent; > *out = cursor; > if( cursor == 0 ) > return false; > > return true; > } > > cursor = cursor->right; > while( cursor->left ) > cursor = cursor->left; > > *out = cursor; > return true; >} > >template <class KEY, class VAL> >bool asCMap<KEY, VAL>::MovePrev(asSMapNode<KEY,VAL> **out, asSMapNode<KEY,VAL> *cursor) const >{ > if( cursor == 0 ) > { > *out = 0; > return false; > } > > if( cursor->left == 0 ) > { > // Move upwards until we find a parent node to the left > while( cursor->parent && cursor->parent->left == cursor ) > cursor = cursor->parent; > > cursor = cursor->parent; > > *out = cursor; > if( cursor == 0 ) > return false; > > return true; > } > > cursor = cursor->left; > while( cursor->right ) > cursor = cursor->right; > > *out = cursor; > return true; >} > > > > >#endif ># 786 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_map.h" > ># 48 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_symboltable.h" 2 >#if 0 /* expanded by -frewrite-includes */ >#include "as_datatype.h" >#endif /* expanded by -frewrite-includes */ ># 48 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_symboltable.h" ># 49 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_symboltable.h" >#if 0 /* expanded by -frewrite-includes */ >#include "as_namespace.h" >#endif /* expanded by -frewrite-includes */ ># 49 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_symboltable.h" ># 1 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_namespace.h" 1 >/* > AngelCode Scripting Library > Copyright (c) 2013-2014 Andreas Jonsson > > This software is provided 'as-is', without any express or implied > warranty. In no event will the authors be held liable for any > damages arising from the use of this software. > > Permission is granted to anyone to use this software for any > purpose, including commercial applications, and to alter it and > redistribute it freely, subject to the following restrictions: > > 1. The origin of this software must not be misrepresented; you > must not claim that you wrote the original software. If you use > this software in a product, an acknowledgment in the product > documentation would be appreciated but is not required. > > 2. Altered source versions must be plainly marked as such, and > must not be misrepresented as being the original software. > > 3. This notice may not be removed or altered from any source > distribution. > > The original version of this library can be located at: > http://www.angelcode.com/angelscript/ > > Andreas Jonsson > andreas@angelcode.com >*/ > > >#ifndef AS_NAMESPACE_H >#define AS_NAMESPACE_H > >#if 0 /* expanded by -frewrite-includes */ >#include "as_string.h" >#endif /* expanded by -frewrite-includes */ ># 35 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_namespace.h" ># 36 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_namespace.h" > >BEGIN_AS_NAMESPACE > >struct asSNameSpace >{ > asCString name; > > // TODO: namespace: A namespace should have access masks. The application should be > // able to restrict specific namespaces from access to specific modules >}; > > >struct asSNameSpaceNamePair >{ > const asSNameSpace *ns; > asCString name; > > asSNameSpaceNamePair() : ns(0) {} > asSNameSpaceNamePair(const asSNameSpace *_ns, const asCString &_name) : ns(_ns), name(_name) {} > > asSNameSpaceNamePair &operator=(const asSNameSpaceNamePair &other) > { > ns = other.ns; > name = other.name; > return *this; > } > > bool operator==(const asSNameSpaceNamePair &other) const > { > return (ns == other.ns && name == other.name); > } > > bool operator<(const asSNameSpaceNamePair &other) const > { > return (ns < other.ns || (ns == other.ns && name < other.name)); > } >}; > >END_AS_NAMESPACE > >#endif ># 77 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_namespace.h" > ># 50 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_symboltable.h" 2 > > >BEGIN_AS_NAMESPACE > > > > > >// Interface to avoid nested templates which is not well supported by older compilers, e.g. MSVC6 >struct asIFilter >{ > virtual bool operator()(const void*) const = 0; > virtual ~asIFilter() {}; >}; > > > > >// forward declaration >template<class T> >class asCSymbolTable; > > > > >// Iterator that allows iterating in index order >template<class T, class T2 = T> >class asCSymbolTableIterator >{ >public: > T2* operator*() const; > T2* operator->() const; > asCSymbolTableIterator<T, T2>& operator++(int); > asCSymbolTableIterator<T, T2>& operator--(int); > operator bool() const; > int GetIndex() const { return m_idx; } > >private: > friend class asCSymbolTable<T>; > asCSymbolTableIterator<T, T2>(asCSymbolTable<T> *table); > > void Next(); > void Previous(); > > asCSymbolTable<T>* m_table; > unsigned int m_idx; >}; > > > > >// Symbol table mapping namespace + name to symbols >// The structure keeps the entries indexed in an array so the indices will not change >// There is also a map for a quick lookup. The map supports multiple entries with the same name >template<class T> >class asCSymbolTable >{ >public: > typedef asCSymbolTableIterator<T, T> iterator; > typedef asCSymbolTableIterator<T, const T> const_iterator; > > asCSymbolTable(asUINT initialCapacity = 0); > > int GetFirstIndex(const asSNameSpace *ns, const asCString &name, const asIFilter &comparator) const; > int GetFirstIndex(const asSNameSpace *ns, const asCString &name) const; > int GetLastIndex() const; > > int GetIndex(const T*) const; > > T* GetFirst(const asSNameSpace *ns, const asCString &name, const asIFilter &comparator) const; > T* GetFirst(const asSNameSpace *ns, const asCString &name); > const T* GetFirst(const asSNameSpace *ns, const asCString &name) const; > T* Get(asUINT index); > const T* Get(asUINT index) const; > T* GetLast(); > const T* GetLast() const; > > const asCArray<asUINT> &GetIndexes(const asSNameSpace *ns, const asCString &name) const; > > asUINT Put(T* entry); > > asUINT GetSize() const; > > void SwapWith(asCSymbolTable<T> &other); > > void Clear(); > bool Erase(asUINT idx); > void Allocate(asUINT elem_cnt, bool keep_data); > > iterator List(); > const_iterator List() const; > >private: > // Don't allow assignment > asCSymbolTable<T>& operator=(const asCSymbolTable<T> &other) { return *this; } > > friend class asCSymbolTableIterator<T, T>; > friend class asCSymbolTableIterator<T, const T>; > > void GetKey(const T *entry, asSNameSpaceNamePair &key) const; > bool CheckIdx(asUINT idx) const; > > asCMap<asSNameSpaceNamePair, asCArray<asUINT> > m_map; > asCArray<T*> m_entries; > unsigned int m_size; >}; > > > > >template<class T> >void asCSymbolTable<T>::SwapWith(asCSymbolTable<T> &other) >{ > m_map.SwapWith(other.m_map); > m_entries.SwapWith(other.m_entries); > > asUINT tmp = m_size; > m_size = other.m_size; > other.m_size = tmp; >} > > > > >// Constructor >// initialCapacity gives the number of entries to allocate in advance >template<class T> >asCSymbolTable<T>::asCSymbolTable(asUINT initialCapacity) : m_entries(initialCapacity) >{ > m_size = 0; >} > > > >template<class T> >int asCSymbolTable<T>::GetFirstIndex( > const asSNameSpace *ns, > const asCString &name, > const asIFilter &filter) const >{ > asSNameSpaceNamePair key(ns, name); > > asSMapNode<asSNameSpaceNamePair, asCArray<asUINT> > *cursor; > if( m_map.MoveTo(&cursor, key) ) > { > const asCArray<asUINT> &arr = m_map.GetValue(cursor); > for( asUINT n = 0; n < arr.GetLength(); n++ ) > { > T *entry = m_entries[arr[n]]; > if( entry && filter(entry) ) > return arr[n]; > } > } > > return -1; >} > > > >template<class T> >const asCArray<asUINT> &asCSymbolTable<T>::GetIndexes(const asSNameSpace *ns, const asCString &name) const >{ > asSNameSpaceNamePair key(ns, name); > > asSMapNode<asSNameSpaceNamePair, asCArray<asUINT> > *cursor; > if( m_map.MoveTo(&cursor, key) ) > return m_map.GetValue(cursor); > > static asCArray<asUINT> dummy; > return dummy; >} > > > > >template<class T> >T* asCSymbolTable<T>::GetFirst(const asSNameSpace *ns, const asCString &name, const asIFilter &comp) const >{ > int idx = GetFirstIndex(ns, name, comp); > if (idx != -1) return m_entries[idx]; > return 0; >} > > > > >template<class T> >int asCSymbolTable<T>::GetFirstIndex(const asSNameSpace *ns, const asCString &name) const >{ > asSNameSpaceNamePair key(ns, name); > > asSMapNode<asSNameSpaceNamePair, asCArray<asUINT> > *cursor; > if( m_map.MoveTo(&cursor, key) ) > return m_map.GetValue(cursor)[0]; > > return -1; >} > > > > >// Find the index of a certain symbol >// ATTENTION: this function has linear runtime complexity O(n)!! >template<class T> >int asCSymbolTable<T>::GetIndex(const T* entry) const >{ > for( asUINT n = 0; n < m_entries.GetLength(); n++ ) > if( m_entries[n] == entry ) > return n; > > return -1; >} > > > > > > >template<class T> >T* asCSymbolTable<T>::Get(asUINT idx) >{ > if( !CheckIdx(idx) ) > return 0; > > return m_entries[idx]; >} > >template<class T> >const T* asCSymbolTable<T>::Get(asUINT idx) const >{ > return const_cast< asCSymbolTable<T>* >(this)->Get(idx); >} > > > > > >template<class T> >T* asCSymbolTable<T>::GetFirst(const asSNameSpace *ns, const asCString &name) >{ > int idx = GetFirstIndex(ns, name); > return Get(idx); >} > >template<class T> >const T* asCSymbolTable<T>::GetFirst(const asSNameSpace *ns, const asCString &name) const >{ > return const_cast< asCSymbolTable<T>* >(this)->GetFirst(ns, name); >} > > > > > >template<class T> >T* asCSymbolTable<T>::GetLast() >{ > return Get(GetLastIndex()); >} > >template<class T> >const T* asCSymbolTable<T>::GetLast() const >{ > return const_cast< asCSymbolTable<T>* >(this)->GetLast(); >} > > > > > >// Clear the symbol table >// ATTENTION: The contained symbols are not rleased. This is up to the client >template<class T> >void asCSymbolTable<T>::Clear() >{ > m_entries.SetLength(0); > m_map.EraseAll(); > m_size = 0; >} > > > > >// Pre-allocate slots for elemCnt entries >template<class T> >void asCSymbolTable<T>::Allocate(asUINT elemCnt, bool keepData) >{ > asASSERT( elemCnt >= m_entries.GetLength() ); > m_entries.Allocate(elemCnt, keepData); > if( !keepData ) > m_map.EraseAll(); >} > > > >template<class T> >bool asCSymbolTable<T>::Erase(asUINT idx) >{ > if( !CheckIdx(idx) ) > { > asASSERT(false); > return false; > } > > T *entry = m_entries[idx]; > asASSERT(entry); > if( !entry ) > return false; > > // Remove the symbol from the lookup map > asSNameSpaceNamePair key; > GetKey(entry, key); > > asSMapNode<asSNameSpaceNamePair, asCArray<asUINT> > *cursor; > if( m_map.MoveTo(&cursor, key) ) > { > asCArray<asUINT> &arr = m_map.GetValue(cursor); > arr.RemoveValue(idx); > if( arr.GetLength() == 0 ) > m_map.Erase(cursor); > } > else > asASSERT(false); > > // Remove the symbol from the indexed array > if( idx == m_entries.GetLength() - 1 ) > m_entries.PopLast(); > else > { > // Must keep the array packed > int prevIdx = int(m_entries.GetLength()-1); > m_entries[idx] = m_entries.PopLast(); > > // Update the index in the lookup map > entry = m_entries[idx]; > GetKey(entry, key); > if( m_map.MoveTo(&cursor, key) ) > { > asCArray<asUINT> &arr = m_map.GetValue(cursor); > arr[arr.IndexOf(prevIdx)] = idx; > } > else > asASSERT(false); > } > m_size--; > > return true; >} > > > > >template<class T> >asUINT asCSymbolTable<T>::Put(T *entry) >{ > asUINT idx = m_entries.GetLength(); > asSNameSpaceNamePair key; > GetKey(entry, key); > > asSMapNode<asSNameSpaceNamePair, asCArray<asUINT> > *cursor; > if( m_map.MoveTo(&cursor, key) ) > m_map.GetValue(cursor).PushLast(idx); > else > { > asCArray<asUINT> arr(1); > arr.PushLast(idx); > m_map.Insert(key, arr); > } > > m_entries.PushLast(entry); > m_size++; > return idx; >} > > > > >// Return key for specified symbol (namespace and name are used to generate the key) >template<class T> >void asCSymbolTable<T>::GetKey(const T *entry, asSNameSpaceNamePair &key) const >{ > key = asSNameSpaceNamePair(entry->nameSpace, entry->name); >} > > > > >template<class T> >asUINT asCSymbolTable<T>::GetSize() const >{ > return m_size; >} > > > > >template<class T> >bool asCSymbolTable<T>::CheckIdx(asUINT idx) const >{ > return idx < m_entries.GetLength(); >} > > > > >template<class T> >int asCSymbolTable<T>::GetLastIndex() const >{ > int idx = int(m_entries.GetLength()) - 1; > asASSERT( idx == -1 || m_entries[idx] ); > return idx; >} > > > > >template<class T> >asCSymbolTableIterator<T, T> asCSymbolTable<T>::List() >{ > return asCSymbolTableIterator<T, T>(this); >} > > > > >template<class T> >typename asCSymbolTable<T>::const_iterator asCSymbolTable<T>::List() const >{ > return asCSymbolTableIterator<T, const T>(const_cast< asCSymbolTable<T> *>(this)); >} > > >///////////////////////////////////////////////////////////////////////////////////////////////// >// Iterator > > >template<class T, class T2> >asCSymbolTableIterator<T, T2>::asCSymbolTableIterator(asCSymbolTable<T> *table) : m_table(table), m_idx(0) >{ > asUINT sz = m_table->m_entries.GetLength(); > while( m_idx < sz && m_table->m_entries[m_idx] == 0 ) > m_idx++; >} > > > >template<class T, class T2> >T2* asCSymbolTableIterator<T, T2>::operator*() const >{ > asASSERT(m_table->CheckIdx(m_idx)); > return m_table->m_entries[m_idx]; >} > > > >template<class T, class T2> >T2* asCSymbolTableIterator<T, T2>::operator->() const >{ > asASSERT(m_table->CheckIdx(m_idx)); > return m_table->m_entries[m_idx]; >} > > > >template<class T, class T2> >asCSymbolTableIterator<T, T2>& asCSymbolTableIterator<T, T2>::operator++(int) >{ > Next(); > return *this; >} > > > >// Return true if more elements are following >// ATTENTION: When deleting the object currently pointed to by this iterator this >// method returns false even though there might be more elements in the list >template<class T, class T2> >asCSymbolTableIterator<T, T2>::operator bool() const >{ > return m_idx < m_table->m_entries.GetLength() && m_table->m_entries[m_idx] != 0; >} > > > >template<class T, class T2> >void asCSymbolTableIterator<T, T2>::Next() >{ > asUINT sz = m_table->m_entries.GetLength(); > m_idx++; > while( m_idx < sz && m_table->m_entries[m_idx] == 0 ) > m_idx++; >} > > > >template<class T, class T2> >void asCSymbolTableIterator<T, T2>::Previous() >{ > // overflow on stepping over first element > asUINT sz = m_table->m_entries.GetLength(); > m_idx--; > while( m_idx < sz && m_table->m_entries[m_idx] == 0 ) > m_idx--; >} > > > >template<class T, class T2> >asCSymbolTableIterator<T, T2>& asCSymbolTableIterator<T, T2>::operator--(int) >{ > Previous(); > return *this; >} > > >END_AS_NAMESPACE > >#endif // AS_SYMBOLTABLE_H ># 568 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_symboltable.h" ># 48 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_property.h" 2 > >BEGIN_AS_NAMESPACE > >struct asSNameSpace; > >class asCObjectProperty >{ >public: > asCObjectProperty() {accessMask = 0xFFFFFFFF;} > asCObjectProperty(const asCObjectProperty &o) : name(o.name), type(o.type), byteOffset(o.byteOffset), accessMask(o.accessMask), isPrivate(o.isPrivate), isProtected(o.isProtected), isInherited(o.isInherited) {} > asCString name; > asCDataType type; > int byteOffset; > asDWORD accessMask; > bool isPrivate; > bool isProtected; > bool isInherited; >}; > >class asCGlobalProperty >{ >public: > asCGlobalProperty(); > ~asCGlobalProperty(); > > void AddRef(); > void Release(); > void DestroyInternal(); > > void *GetAddressOfValue(); > void AllocateMemory(); > void SetRegisteredAddress(void *p); > void *GetRegisteredAddress() const; > > asCString name; > asCDataType type; > asUINT id; > asSNameSpace *nameSpace; > > void SetInitFunc(asCScriptFunction *initFunc); > asCScriptFunction *GetInitFunc(); > >//protected: > // This is only stored for registered properties, and keeps the pointer given by the application > void *realAddress; > > bool memoryAllocated; > void *memory; > asQWORD storage; > > asCScriptFunction *initFunc; > > asDWORD accessMask; > > // The global property structure is reference counted, so that the > // engine can keep track of how many references to the property there are. > asCAtomic refCount; >}; > >class asCCompGlobPropType : public asIFilter >{ >public: > const asCDataType &m_type; > > asCCompGlobPropType(const asCDataType &type) : m_type(type) {} > > bool operator()(const void *p) const > { > const asCGlobalProperty* prop = reinterpret_cast<const asCGlobalProperty*>(p); > return prop->type == m_type; > } > >private: > // The assignment operator is required for MSVC9, otherwise it will complain that it is not possible to auto generate the operator > asCCompGlobPropType &operator=(const asCCompGlobPropType &) {return *this;} >}; > >END_AS_NAMESPACE > >#endif ># 128 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_property.h" ># 45 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_objecttype.h" 2 >#if 0 /* expanded by -frewrite-includes */ >#include "as_array.h" >#endif /* expanded by -frewrite-includes */ ># 45 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_objecttype.h" ># 46 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_objecttype.h" >#if 0 /* expanded by -frewrite-includes */ >#include "as_scriptfunction.h" >#endif /* expanded by -frewrite-includes */ ># 46 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_objecttype.h" ># 47 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_objecttype.h" >#if 0 /* expanded by -frewrite-includes */ >#include "as_typeinfo.h" >#endif /* expanded by -frewrite-includes */ ># 47 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_objecttype.h" ># 1 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_typeinfo.h" 1 >/* > AngelCode Scripting Library > Copyright (c) 2003-2016 Andreas Jonsson > > This software is provided 'as-is', without any express or implied > warranty. In no event will the authors be held liable for any > damages arising from the use of this software. > > Permission is granted to anyone to use this software for any > purpose, including commercial applications, and to alter it and > redistribute it freely, subject to the following restrictions: > > 1. The origin of this software must not be misrepresented; you > must not claim that you wrote the original software. If you use > this software in a product, an acknowledgment in the product > documentation would be appreciated but is not required. > > 2. Altered source versions must be plainly marked as such, and > must not be misrepresented as being the original software. > > 3. This notice may not be removed or altered from any source > distribution. > > The original version of this library can be located at: > http://www.angelcode.com/angelscript/ > > Andreas Jonsson > andreas@angelcode.com >*/ > > >// >// as_typeinfo.h >// > > > >#ifndef AS_TYPEINFO_H >#define AS_TYPEINFO_H > >#if 0 /* expanded by -frewrite-includes */ >#include "as_config.h" >#endif /* expanded by -frewrite-includes */ ># 41 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_typeinfo.h" ># 42 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_typeinfo.h" >#if 0 /* expanded by -frewrite-includes */ >#include "as_string.h" >#endif /* expanded by -frewrite-includes */ ># 42 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_typeinfo.h" ># 43 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_typeinfo.h" >#if 0 /* expanded by -frewrite-includes */ >#include "as_atomic.h" >#endif /* expanded by -frewrite-includes */ ># 43 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_typeinfo.h" ># 44 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_typeinfo.h" >#if 0 /* expanded by -frewrite-includes */ >#include "as_datatype.h" >#endif /* expanded by -frewrite-includes */ ># 44 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_typeinfo.h" ># 45 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_typeinfo.h" > >BEGIN_AS_NAMESPACE > >class asCScriptEngine; >class asCModule; >class asCObjectType; >class asCEnumType; >class asCTypedefType; >class asCFuncdefType; >struct asSNameSpace; > >// TODO: type: asCPrimitiveType shall be implemented to represent primitives (void, int, double, etc) > >// TODO: type: asCTypeInfo should have an internal virtual method GetBehaviours. For asCObjectType it >// should return the beh member. For asCFuncdefType it should return the beh member of >// engine->functionBehaviours. This will allow the code that needs the behaviour to handle >// both object types and funcdefs the same way > >class asCTypeInfo : public asITypeInfo >{ >public: > //===================================== > // From asITypeInfo > //===================================== > asIScriptEngine *GetEngine() const; > const char *GetConfigGroup() const; > asDWORD GetAccessMask() const; > asIScriptModule *GetModule() const; > > // Memory management > int AddRef() const; > int Release() const; > > // Type info > const char *GetName() const; > const char *GetNamespace() const; > asITypeInfo *GetBaseType() const { return 0; } > bool DerivesFrom(const asITypeInfo *objType) const { UNUSED_VAR(objType); return 0; } > asDWORD GetFlags() const; > asUINT GetSize() const; > int GetTypeId() const; > int GetSubTypeId(asUINT subtypeIndex = 0) const { UNUSED_VAR(subtypeIndex); return -1; } > asITypeInfo *GetSubType(asUINT subtypeIndex = 0) const { UNUSED_VAR(subtypeIndex); return 0; } > asUINT GetSubTypeCount() const { return 0; } > > // Interfaces > asUINT GetInterfaceCount() const { return 0; } > asITypeInfo *GetInterface(asUINT index) const { UNUSED_VAR(index); return 0; } > bool Implements(const asITypeInfo *objType) const { UNUSED_VAR(objType); return false; } > > // Factories > asUINT GetFactoryCount() const { return 0; } > asIScriptFunction *GetFactoryByIndex(asUINT index) const { UNUSED_VAR(index); return 0; } > asIScriptFunction *GetFactoryByDecl(const char *decl) const { UNUSED_VAR(decl); return 0; } > > // Methods > asUINT GetMethodCount() const { return 0; } > asIScriptFunction *GetMethodByIndex(asUINT index, bool getVirtual) const { UNUSED_VAR(index); UNUSED_VAR(getVirtual); return 0; } > asIScriptFunction *GetMethodByName(const char *in_name, bool getVirtual) const { UNUSED_VAR(in_name); UNUSED_VAR(getVirtual); return 0; } > asIScriptFunction *GetMethodByDecl(const char *decl, bool getVirtual) const { UNUSED_VAR(decl); UNUSED_VAR(getVirtual); return 0; } > > // Properties > asUINT GetPropertyCount() const { return 0; } > int GetProperty(asUINT index, const char **name, int *typeId, bool *isPrivate, bool *isProtected, int *offset, bool *isReference, asDWORD *accessMask) const; > const char *GetPropertyDeclaration(asUINT index, bool includeNamespace = false) const { UNUSED_VAR(index); UNUSED_VAR(includeNamespace); return 0; } > > // Behaviours > asUINT GetBehaviourCount() const { return 0; } > asIScriptFunction *GetBehaviourByIndex(asUINT index, asEBehaviours *outBehaviour) const { UNUSED_VAR(index); UNUSED_VAR(outBehaviour); return 0; } > > // Child types > asUINT GetChildFuncdefCount() const { return 0; } > asITypeInfo *GetChildFuncdef(asUINT index) const { UNUSED_VAR(index); return 0; } > asITypeInfo *GetParentType() const { return 0; } > > // Enums > virtual asUINT GetEnumValueCount() const { return 0; } > virtual const char *GetEnumValueByIndex(asUINT index, int *outValue) const { UNUSED_VAR(index); if (outValue) *outValue = 0; return 0; } > > // Typedef > virtual int GetTypedefTypeId() const { return asERROR; } > > // Funcdef > virtual asIScriptFunction *GetFuncdefSignature() const { return 0; } > > // User data > void *SetUserData(void *data, asPWORD type); > void *GetUserData(asPWORD type) const; > > //=========================================== > // Internal > //=========================================== >public: > asCTypeInfo(asCScriptEngine *engine); > virtual ~asCTypeInfo(); > > // Keep an internal reference counter to separate references coming from > // application or script objects and references coming from the script code > virtual int AddRefInternal(); > virtual int ReleaseInternal(); > > virtual void DestroyInternal() {} > > void CleanUserData(); > > bool IsShared() const; > > // These can be safely used on null pointers (which will return null) > friend asCObjectType *CastToObjectType(asCTypeInfo *); > friend asCEnumType *CastToEnumType(asCTypeInfo *); > friend asCTypedefType *CastToTypedefType(asCTypeInfo *); > friend asCFuncdefType *CastToFuncdefType(asCTypeInfo *); > > > asCString name; > asSNameSpace *nameSpace; > int size; > mutable int typeId; > asDWORD flags; > asDWORD accessMask; > > // Store the script section where the code was declared > int scriptSectionIdx; > // Store the location where the function was declared (row in the lower 20 bits, and column in the upper 12) > int declaredAt; > > asCScriptEngine *engine; > asCModule *module; > asCArray<asPWORD> userData; > >protected: > friend class asCScriptEngine; > friend class asCConfigGroup; > friend class asCModule; > asCTypeInfo(); > > mutable asCAtomic externalRefCount; > asCAtomic internalRefCount; >}; > >struct asSEnumValue >{ > asCString name; > int value; >}; > >class asCEnumType : public asCTypeInfo >{ >public: > asCEnumType(asCScriptEngine *engine) : asCTypeInfo(engine) {} > ~asCEnumType(); > > asCArray<asSEnumValue*> enumValues; > > asUINT GetEnumValueCount() const; > const char *GetEnumValueByIndex(asUINT index, int *outValue) const; > >protected: > asCEnumType() : asCTypeInfo() {} >}; > >class asCTypedefType : public asCTypeInfo >{ >public: > asCTypedefType(asCScriptEngine *engine) : asCTypeInfo(engine) {} > ~asCTypedefType(); > > void DestroyInternal(); > > asCDataType aliasForType; // increase refCount for typeinfo inside datatype > > int GetTypedefTypeId() const; > >protected: > asCTypedefType() : asCTypeInfo() {} >}; > >class asCFuncdefType : public asCTypeInfo >{ >public: > asCFuncdefType(asCScriptEngine *engine, asCScriptFunction *func); > ~asCFuncdefType(); > > asIScriptFunction *GetFuncdefSignature() const; > asITypeInfo *GetParentType() const; > > void DestroyInternal(); > asCScriptFunction *funcdef; // increases refCount > asCObjectType *parentClass; // doesn't increase refCount > >protected: > asCFuncdefType() : asCTypeInfo(), funcdef(0), parentClass(0) {} >}; > >END_AS_NAMESPACE > >#endif ># 242 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_typeinfo.h" ># 48 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_objecttype.h" 2 > >BEGIN_AS_NAMESPACE > >struct asSTypeBehaviour >{ > asSTypeBehaviour() > { > factory = 0; > listFactory = 0; > copyfactory = 0; > construct = 0; > copyconstruct = 0; > destruct = 0; > copy = 0; > addref = 0; > release = 0; > gcGetRefCount = 0; > gcSetFlag = 0; > gcGetFlag = 0; > gcEnumReferences = 0; > gcReleaseAllReferences = 0; > templateCallback = 0; > getWeakRefFlag = 0; > } > > int factory; > int listFactory; // Used for initialization lists only > int copyfactory; > int construct; > int copyconstruct; > int destruct; > int copy; > int addref; > int release; > int templateCallback; > > // GC behaviours > int gcGetRefCount; > int gcSetFlag; > int gcGetFlag; > int gcEnumReferences; > int gcReleaseAllReferences; > > // Weakref behaviours > int getWeakRefFlag; > > asCArray<int> factories; > asCArray<int> constructors; >}; > >class asCScriptEngine; >struct asSNameSpace; > >class asCObjectType : public asCTypeInfo >{ >public: > asITypeInfo *GetBaseType() const; > bool DerivesFrom(const asITypeInfo *objType) const; > int GetSubTypeId(asUINT subtypeIndex = 0) const; > asITypeInfo *GetSubType(asUINT subtypeIndex = 0) const; > asUINT GetSubTypeCount() const; > asUINT GetInterfaceCount() const; > asITypeInfo *GetInterface(asUINT index) const; > bool Implements(const asITypeInfo *objType) const; > asUINT GetFactoryCount() const; > asIScriptFunction *GetFactoryByIndex(asUINT index) const; > asIScriptFunction *GetFactoryByDecl(const char *decl) const; > asUINT GetMethodCount() const; > asIScriptFunction *GetMethodByIndex(asUINT index, bool getVirtual) const; > asIScriptFunction *GetMethodByName(const char *name, bool getVirtual) const; > asIScriptFunction *GetMethodByDecl(const char *decl, bool getVirtual) const; > asUINT GetPropertyCount() const; > int GetProperty(asUINT index, const char **name, int *typeId, bool *isPrivate, bool *isProtected, int *offset, bool *isReference, asDWORD *accessMask) const; > const char *GetPropertyDeclaration(asUINT index, bool includeNamespace = false) const; > asUINT GetBehaviourCount() const; > asIScriptFunction *GetBehaviourByIndex(asUINT index, asEBehaviours *outBehaviour) const; > asUINT GetChildFuncdefCount() const; > asITypeInfo *GetChildFuncdef(asUINT index) const; > >public: > asCObjectType(asCScriptEngine *engine); > ~asCObjectType(); > void DestroyInternal(); > > void ReleaseAllFunctions(); > > bool IsInterface() const; > > asCObjectProperty *AddPropertyToClass(const asCString &name, const asCDataType &dt, bool isPrivate, bool isProtected, bool isInherited); > void ReleaseAllProperties(); > >#ifdef WIP_16BYTE_ALIGN > int alignment; >#endif ># 142 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_objecttype.h" > asCArray<asCObjectProperty*> properties; > asCArray<int> methods; > > // TODO: These are not used by template types. Should perhaps create a derived class to save memory on ordinary object types > asCArray<asCObjectType*> interfaces; > asCArray<asUINT> interfaceVFTOffsets; > asCObjectType * derivedFrom; > asCArray<asCScriptFunction*> virtualFunctionTable; > > // Used for funcdefs declared as members of class. > // TODO: child funcdef: Should be possible to enumerate these from application > asCArray<asCFuncdefType*> childFuncDefs; > > asSTypeBehaviour beh; > > // Used for template types > asCArray<asCDataType> templateSubTypes; // increases refCount for typeinfo held in datatype > bool acceptValueSubType; > bool acceptRefSubType; > >protected: > friend class asCScriptEngine; > friend class asCConfigGroup; > friend class asCModule; > asCObjectType(); >}; > >END_AS_NAMESPACE > >#endif ># 172 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_objecttype.h" ># 49 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_scriptengine.h" 2 >#if 0 /* expanded by -frewrite-includes */ >#include "as_module.h" >#endif /* expanded by -frewrite-includes */ ># 49 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_scriptengine.h" ># 1 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_module.h" 1 >/* > AngelCode Scripting Library > Copyright (c) 2003-2015 Andreas Jonsson > > This software is provided 'as-is', without any express or implied > warranty. In no event will the authors be held liable for any > damages arising from the use of this software. > > Permission is granted to anyone to use this software for any > purpose, including commercial applications, and to alter it and > redistribute it freely, subject to the following restrictions: > > 1. The origin of this software must not be misrepresented; you > must not claim that you wrote the original software. If you use > this software in a product, an acknowledgment in the product > documentation would be appreciated but is not required. > > 2. Altered source versions must be plainly marked as such, and > must not be misrepresented as being the original software. > > 3. This notice may not be removed or altered from any source > distribution. > > The original version of this library can be located at: > http://www.angelcode.com/angelscript/ > > Andreas Jonsson > andreas@angelcode.com >*/ > > > >// >// as_module.h >// >// A class that holds a script module >// > >#ifndef AS_MODULE_H >#define AS_MODULE_H > >#if 0 /* expanded by -frewrite-includes */ >#include "as_config.h" >#endif /* expanded by -frewrite-includes */ ># 42 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_module.h" ># 43 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_module.h" >#if 0 /* expanded by -frewrite-includes */ >#include "as_symboltable.h" >#endif /* expanded by -frewrite-includes */ ># 43 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_module.h" ># 44 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_module.h" >#if 0 /* expanded by -frewrite-includes */ >#include "as_atomic.h" >#endif /* expanded by -frewrite-includes */ ># 44 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_module.h" ># 45 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_module.h" >#if 0 /* expanded by -frewrite-includes */ >#include "as_string.h" >#endif /* expanded by -frewrite-includes */ ># 45 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_module.h" ># 46 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_module.h" >#if 0 /* expanded by -frewrite-includes */ >#include "as_array.h" >#endif /* expanded by -frewrite-includes */ ># 46 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_module.h" ># 47 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_module.h" >#if 0 /* expanded by -frewrite-includes */ >#include "as_datatype.h" >#endif /* expanded by -frewrite-includes */ ># 47 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_module.h" ># 48 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_module.h" >#if 0 /* expanded by -frewrite-includes */ >#include "as_scriptfunction.h" >#endif /* expanded by -frewrite-includes */ ># 48 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_module.h" ># 49 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_module.h" >#if 0 /* expanded by -frewrite-includes */ >#include "as_property.h" >#endif /* expanded by -frewrite-includes */ ># 49 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_module.h" ># 50 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_module.h" > >BEGIN_AS_NAMESPACE > >// TODO: import: Remove this when the imported functions are removed >const int FUNC_IMPORTED = 0x40000000; > >class asCScriptEngine; >class asCCompiler; >class asCBuilder; >class asCContext; >class asCConfigGroup; >class asCTypedefType; >class asCFuncdefType; >struct asSNameSpace; > >struct sBindInfo >{ > asCScriptFunction *importedFunctionSignature; > asCString importFromModule; > int boundFunctionId; >}; > >struct sObjectTypePair >{ > asCObjectType *a; > asCObjectType *b; >}; > > >// TODO: import: Remove function imports. When I have implemented function >// pointers the function imports should be deprecated. > >// TODO: Need a separate interface for compiling scripts. The asIScriptCompiler >// will have a target module, and will allow the compilation of an entire >// script or just individual functions within the scope of the module >// >// With this separation it will be possible to compile the library without >// the compiler, thus giving a much smaller binary executable. > >// TODO: There should be a special compile option that will let the application >// recompile an already compiled script. The compiler should check if no >// destructive changes have been made (changing function signatures, etc) >// then it should simply replace the bytecode within the functions without >// changing the values of existing global properties, etc. > >class asCModule : public asIScriptModule >{ >//------------------------------------------- >// Public interface >//-------------------------------------------- >public: > virtual asIScriptEngine *GetEngine() const; > virtual void SetName(const char *name); > virtual const char *GetName() const; > virtual void Discard(); > > // Compilation > virtual int AddScriptSection(const char *name, const char *code, size_t codeLength, int lineOffset); > virtual int Build(); > virtual int CompileFunction(const char *sectionName, const char *code, int lineOffset, asDWORD reserved, asIScriptFunction **outFunc); > virtual int CompileGlobalVar(const char *sectionName, const char *code, int lineOffset); > virtual asDWORD SetAccessMask(asDWORD accessMask); > virtual int SetDefaultNamespace(const char *nameSpace); > virtual const char *GetDefaultNamespace() const; > > // Script functions > virtual asUINT GetFunctionCount() const; > virtual asIScriptFunction *GetFunctionByIndex(asUINT index) const; > virtual asIScriptFunction *GetFunctionByDecl(const char *decl) const; > virtual asIScriptFunction *GetFunctionByName(const char *name) const; > virtual int RemoveFunction(asIScriptFunction *func); > > // Script global variables > // TODO: interface: Should be called InitGlobalVars, and should have a bool to reset in case already initialized > virtual int ResetGlobalVars(asIScriptContext *ctx); > virtual asUINT GetGlobalVarCount() const; > virtual int GetGlobalVarIndexByName(const char *name) const; > virtual int GetGlobalVarIndexByDecl(const char *decl) const; > virtual const char *GetGlobalVarDeclaration(asUINT index, bool includeNamespace) const; > virtual int GetGlobalVar(asUINT index, const char **name, const char **nameSpace, int *typeId, bool *isConst) const; > virtual void *GetAddressOfGlobalVar(asUINT index); > virtual int RemoveGlobalVar(asUINT index); > > // Type identification > virtual asUINT GetObjectTypeCount() const; > virtual asITypeInfo *GetObjectTypeByIndex(asUINT index) const; >#ifdef AS_DEPRECATED > // Deprecated since 2.31.0, 2015-12-06 > virtual asITypeInfo *GetObjectTypeByName(const char *name) const; > virtual asITypeInfo *GetObjectTypeByDecl(const char *decl) const; >#endif ># 141 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_module.h" > virtual int GetTypeIdByDecl(const char *decl) const; > virtual asITypeInfo *GetTypeInfoByName(const char *name) const; > virtual asITypeInfo *GetTypeInfoByDecl(const char *decl) const; > > // Enums > virtual asUINT GetEnumCount() const; > virtual asITypeInfo *GetEnumByIndex(asUINT index) const; >#ifdef AS_DEPRECATED > // Deprecated since 2.31.0, 2015-12-06 > virtual int GetEnumValueCount(int enumTypeId) const; > virtual const char * GetEnumValueByIndex(int enumTypeId, asUINT index, int *outValue) const; >#endif ># 153 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_module.h" > > // Typedefs > virtual asUINT GetTypedefCount() const; > virtual asITypeInfo *GetTypedefByIndex(asUINT index) const; > > // Dynamic binding between modules > virtual asUINT GetImportedFunctionCount() const; > virtual int GetImportedFunctionIndexByDecl(const char *decl) const; > virtual const char *GetImportedFunctionDeclaration(asUINT importIndex) const; > virtual const char *GetImportedFunctionSourceModule(asUINT importIndex) const; > virtual int BindImportedFunction(asUINT index, asIScriptFunction *func); > virtual int UnbindImportedFunction(asUINT importIndex); > virtual int BindAllImportedFunctions(); > virtual int UnbindAllImportedFunctions(); > > // Bytecode Saving/Loading > virtual int SaveByteCode(asIBinaryStream *out, bool stripDebugInfo) const; > virtual int LoadByteCode(asIBinaryStream *in, bool *wasDebugInfoStripped); > > // User data > virtual void *SetUserData(void *data, asPWORD type); > virtual void *GetUserData(asPWORD type) const; > >//----------------------------------------------- >// Internal >//----------------------------------------------- > asCModule(const char *name, asCScriptEngine *engine); > ~asCModule(); > >//protected: > friend class asCScriptEngine; > friend class asCBuilder; > friend class asCCompiler; > friend class asCContext; > friend class asCRestore; > > void InternalReset(); > bool IsEmpty() const; > bool HasExternalReferences(bool shuttingDown); > > int CallInit(asIScriptContext *ctx); > void CallExit(); > > void JITCompile(); > >#ifndef AS_NO_COMPILER > int AddScriptFunction(int sectionIdx, int declaredAt, int id, const asCString &name, const asCDataType &returnType, const asCArray<asCDataType> ¶ms, const asCArray<asCString> ¶mNames, const asCArray<asETypeModifiers> &inOutFlags, const asCArray<asCString *> &defaultArgs, bool isInterface, asCObjectType *objType = 0, bool isConstMethod = false, bool isGlobalFunction = false, bool isPrivate = false, bool isProtected = false, bool isFinal = false, bool isOverride = false, bool isShared = false, asSNameSpace *ns = 0); > int AddScriptFunction(asCScriptFunction *func); > int AddImportedFunction(int id, const asCString &name, const asCDataType &returnType, const asCArray<asCDataType> ¶ms, const asCArray<asETypeModifiers> &inOutFlags, const asCArray<asCString *> &defaultArgs, asSNameSpace *ns, const asCString &moduleName); > int AddFuncDef(const asCString &name, asSNameSpace *ns, asCObjectType *parent); >#endif ># 204 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_module.h" > > int GetNextImportedFunctionId(); > asCScriptFunction *GetImportedFunction(int funcId) const; > asCTypeInfo *GetType(const char *type, asSNameSpace *ns); > asCObjectType *GetObjectType(const char *type, asSNameSpace *ns); > asCGlobalProperty *AllocateGlobalProperty(const char *name, const asCDataType &dt, asSNameSpace *ns); > > asCString name; > > asCScriptEngine *engine; > asCBuilder *builder; > asCArray<asPWORD> userData; > asDWORD accessMask; > asSNameSpace *defaultNamespace; > > // This array holds all functions, class members, factories, etc that were compiled with the module. > // These references hold an internal reference to the function object. > asCArray<asCScriptFunction *> scriptFunctions; // increases ref count > // This array holds global functions declared in the module. These references are not counted, > // as the same pointer is always present in the scriptFunctions array too. > asCSymbolTable<asCScriptFunction> globalFunctions; // doesn't increase ref count > // This array holds imported functions in the module. > asCArray<sBindInfo *> bindInformations; // increases ref count > // This array holds template instance types created for the module's object types > asCArray<asCObjectType*> templateInstances; // increases ref count > > // This array holds the global variables declared in the script > asCSymbolTable<asCGlobalProperty> scriptGlobals; // increases ref count > bool isGlobalVarInitialized; > > // This array holds class and interface types > asCArray<asCObjectType*> classTypes; // increases ref count > // This array holds enum types > asCArray<asCEnumType*> enumTypes; // increases ref count > // This array holds typedefs > asCArray<asCTypedefType*> typeDefs; // increases ref count > // This array holds the funcdefs declared in the module > asCArray<asCFuncdefType*> funcDefs; // increases ref count >}; > >END_AS_NAMESPACE > >#endif ># 247 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_module.h" ># 50 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_scriptengine.h" 2 >#if 0 /* expanded by -frewrite-includes */ >#include "as_callfunc.h" >#endif /* expanded by -frewrite-includes */ ># 50 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_scriptengine.h" ># 51 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_scriptengine.h" >#if 0 /* expanded by -frewrite-includes */ >#include "as_configgroup.h" >#endif /* expanded by -frewrite-includes */ ># 51 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_scriptengine.h" ># 1 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_configgroup.h" 1 >/* > AngelCode Scripting Library > Copyright (c) 2003-2015 Andreas Jonsson > > This software is provided 'as-is', without any express or implied > warranty. In no event will the authors be held liable for any > damages arising from the use of this software. > > Permission is granted to anyone to use this software for any > purpose, including commercial applications, and to alter it and > redistribute it freely, subject to the following restrictions: > > 1. The origin of this software must not be misrepresented; you > must not claim that you wrote the original software. If you use > this software in a product, an acknowledgment in the product > documentation would be appreciated but is not required. > > 2. Altered source versions must be plainly marked as such, and > must not be misrepresented as being the original software. > > 3. This notice may not be removed or altered from any source > distribution. > > The original version of this library can be located at: > http://www.angelcode.com/angelscript/ > > Andreas Jonsson > andreas@angelcode.com >*/ > > >// >// as_configgroup.h >// >// This class holds configuration groups for the engine >// > > > >#ifndef AS_CONFIGGROUP_H >#define AS_CONFIGGROUP_H > >#if 0 /* expanded by -frewrite-includes */ >#include "as_config.h" >#endif /* expanded by -frewrite-includes */ ># 43 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_configgroup.h" ># 44 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_configgroup.h" >#if 0 /* expanded by -frewrite-includes */ >#include "as_string.h" >#endif /* expanded by -frewrite-includes */ ># 44 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_configgroup.h" ># 45 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_configgroup.h" >#if 0 /* expanded by -frewrite-includes */ >#include "as_array.h" >#endif /* expanded by -frewrite-includes */ ># 45 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_configgroup.h" ># 46 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_configgroup.h" >#if 0 /* expanded by -frewrite-includes */ >#include "as_objecttype.h" >#endif /* expanded by -frewrite-includes */ ># 46 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_configgroup.h" ># 47 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_configgroup.h" > >BEGIN_AS_NAMESPACE > >class asCConfigGroup >{ >public: > asCConfigGroup(); > ~asCConfigGroup(); > > // Memory management > int AddRef(); > int Release(); > > asCTypeInfo *FindType(const char *name); > void RefConfigGroup(asCConfigGroup *group); > > bool HasLiveObjects(); > void RemoveConfiguration(asCScriptEngine *engine, bool notUsed = false); > > void AddReferencesForFunc(asCScriptEngine *engine, asCScriptFunction *func); > void AddReferencesForType(asCScriptEngine *engine, asCTypeInfo *type); > > asCString groupName; > int refCount; > > asCArray<asCTypeInfo*> types; > asCArray<asCScriptFunction*> scriptFunctions; > asCArray<asCGlobalProperty*> globalProps; > asCArray<asCConfigGroup*> referencedConfigGroups; > > // This array holds the generated template instances that are used > // by the config group as part of function signature or property > asCArray<asCObjectType*> generatedTemplateInstances; >}; > >END_AS_NAMESPACE > >#endif ># 85 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_configgroup.h" ># 52 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_scriptengine.h" 2 >#if 0 /* expanded by -frewrite-includes */ >#include "as_memory.h" >#endif /* expanded by -frewrite-includes */ ># 52 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_scriptengine.h" ># 53 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_scriptengine.h" >#if 0 /* expanded by -frewrite-includes */ >#include "as_gc.h" >#endif /* expanded by -frewrite-includes */ ># 53 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_scriptengine.h" ># 1 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_gc.h" 1 >/* > AngelCode Scripting Library > Copyright (c) 2003-2015 Andreas Jonsson > > This software is provided 'as-is', without any express or implied > warranty. In no event will the authors be held liable for any > damages arising from the use of this software. > > Permission is granted to anyone to use this software for any > purpose, including commercial applications, and to alter it and > redistribute it freely, subject to the following restrictions: > > 1. The origin of this software must not be misrepresented; you > must not claim that you wrote the original software. If you use > this software in a product, an acknowledgment in the product > documentation would be appreciated but is not required. > > 2. Altered source versions must be plainly marked as such, and > must not be misrepresented as being the original software. > > 3. This notice may not be removed or altered from any source > distribution. > > The original version of this library can be located at: > http://www.angelcode.com/angelscript/ > > Andreas Jonsson > andreas@angelcode.com >*/ > > >// >// as_gc.h >// >// The garbage collector is used to resolve cyclic references >// > > > >#ifndef AS_GC_H >#define AS_GC_H > >#if 0 /* expanded by -frewrite-includes */ >#include "as_config.h" >#endif /* expanded by -frewrite-includes */ ># 43 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_gc.h" ># 44 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_gc.h" >#if 0 /* expanded by -frewrite-includes */ >#include "as_array.h" >#endif /* expanded by -frewrite-includes */ ># 44 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_gc.h" ># 45 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_gc.h" >#if 0 /* expanded by -frewrite-includes */ >#include "as_map.h" >#endif /* expanded by -frewrite-includes */ ># 45 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_gc.h" ># 46 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_gc.h" >#if 0 /* expanded by -frewrite-includes */ >#include "as_thread.h" >#endif /* expanded by -frewrite-includes */ ># 46 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_gc.h" ># 1 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_thread.h" 1 >/* > AngelCode Scripting Library > Copyright (c) 2003-2014 Andreas Jonsson > > This software is provided 'as-is', without any express or implied > warranty. In no event will the authors be held liable for any > damages arising from the use of this software. > > Permission is granted to anyone to use this software for any > purpose, including commercial applications, and to alter it and > redistribute it freely, subject to the following restrictions: > > 1. The origin of this software must not be misrepresented; you > must not claim that you wrote the original software. If you use > this software in a product, an acknowledgment in the product > documentation would be appreciated but is not required. > > 2. Altered source versions must be plainly marked as such, and > must not be misrepresented as being the original software. > > 3. This notice may not be removed or altered from any source > distribution. > > The original version of this library can be located at: > http://www.angelcode.com/angelscript/ > > Andreas Jonsson > andreas@angelcode.com >*/ > > > >// >// as_thread.h >// >// Classes for multi threading support >// > >#ifndef AS_THREAD_H >#define AS_THREAD_H > >#if 0 /* expanded by -frewrite-includes */ >#include "as_config.h" >#endif /* expanded by -frewrite-includes */ ># 42 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_thread.h" ># 43 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_thread.h" >#if 0 /* expanded by -frewrite-includes */ >#include "as_string.h" >#endif /* expanded by -frewrite-includes */ ># 43 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_thread.h" ># 44 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_thread.h" >#if 0 /* expanded by -frewrite-includes */ >#include "as_array.h" >#endif /* expanded by -frewrite-includes */ ># 44 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_thread.h" ># 45 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_thread.h" >#if 0 /* expanded by -frewrite-includes */ >#include "as_map.h" >#endif /* expanded by -frewrite-includes */ ># 45 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_thread.h" ># 46 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_thread.h" >#if 0 /* expanded by -frewrite-includes */ >#include "as_criticalsection.h" >#endif /* expanded by -frewrite-includes */ ># 46 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_thread.h" ># 47 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_thread.h" > >BEGIN_AS_NAMESPACE > >class asCThreadLocalData; > >class asCThreadManager : public asIThreadManager >{ >public: > static asCThreadLocalData *GetLocalData(); > static int CleanupLocalData(); > > static int Prepare(asIThreadManager *externalThreadMgr); > static void Unprepare(); > > // This read/write lock can be used by the application to provide simple synchronization > DECLAREREADWRITELOCK(appRWLock) > >protected: > asCThreadManager(); > ~asCThreadManager(); > > // No need to use the atomic int here, as it will only be > // updated within the thread manager's critical section > int refCount; > >#ifndef AS_NO_THREADS >#if defined(_MSC_VER) && defined(AS_WINDOWS_THREADS) && (WINAPI_FAMILY & WINAPI_FAMILY_PHONE_APP) > // On Windows Store we must use MSVC specific thread variables for thread > // local storage, as the TLS API isn't available. On desktop we can't use > // this as it may cause problems if the library is used in a dll. > // ref: http://msdn.microsoft.com/en-us/library/2s9wt68x.aspx > // ref: http://msdn.microsoft.com/en-us/library/9w1sdazb.aspx > __declspec(thread) static asCThreadLocalData *tld; >#else ># 81 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_thread.h" > asDWORD tlsKey; >#endif ># 83 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_thread.h" > DECLARECRITICALSECTION(criticalSection); >#else ># 85 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_thread.h" > asCThreadLocalData *tld; >#endif ># 87 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_thread.h" >}; > >//====================================================================== > >class asIScriptContext; > >class asCThreadLocalData >{ >public: > asCArray<asIScriptContext *> activeContexts; > asCString string; > >protected: > friend class asCThreadManager; > > asCThreadLocalData(); > ~asCThreadLocalData(); >}; > >END_AS_NAMESPACE > >#endif ># 109 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_thread.h" ># 47 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_gc.h" 2 > >BEGIN_AS_NAMESPACE > >class asCScriptEngine; >class asCObjectType; > >class asCGarbageCollector >{ >public: > asCGarbageCollector(); > ~asCGarbageCollector(); > > int GarbageCollect(asDWORD flags, asUINT iterations); > void GetStatistics(asUINT *currentSize, asUINT *totalDestroyed, asUINT *totalDetected, asUINT *newObjects, asUINT *totalNewDestroyed) const; > void GCEnumCallback(void *reference); > int AddScriptObjectToGC(void *obj, asCObjectType *objType); > int GetObjectInGC(asUINT idx, asUINT *seqNbr, void **obj, asITypeInfo **type); > > int ReportAndReleaseUndestroyedObjects(); > > asCScriptEngine *engine; > >protected: > struct asSObjTypePair {void *obj; asCObjectType *type; asUINT seqNbr;}; > struct asSIntTypePair {int i; asCObjectType *type;}; > typedef asSMapNode<void*, asSIntTypePair> asSMapNode_t; > > enum egcDestroyState > { > destroyGarbage_init = 0, > destroyGarbage_loop, > destroyGarbage_haveMore > }; > > enum egcDetectState > { > clearCounters_init = 0, > clearCounters_loop, > buildMap_init, > buildMap_loop, > countReferences_init, > countReferences_loop, > detectGarbage_init, > detectGarbage_loop1, > detectGarbage_loop2, > verifyUnmarked_init, > verifyUnmarked_loop, > breakCircles_init, > breakCircles_loop, > breakCircles_haveGarbage > }; > > int DestroyNewGarbage(); > int DestroyOldGarbage(); > int IdentifyGarbageWithCyclicRefs(); > asSObjTypePair GetNewObjectAtIdx(int idx); > asSObjTypePair GetOldObjectAtIdx(int idx); > void RemoveNewObjectAtIdx(int idx); > void RemoveOldObjectAtIdx(int idx); > void MoveObjectToOldList(int idx); > void MoveAllObjectsToOldList(); > > // Holds all the objects known by the garbage collector > asCArray<asSObjTypePair> gcNewObjects; > asCArray<asSObjTypePair> gcOldObjects; > > // This array temporarily holds references to objects known to be live objects > asCArray<void*> liveObjects; > > // This map holds objects currently being searched for cyclic references, it also holds a > // counter that gives the number of references to the object that the GC can't reach > asCMap<void*, asSIntTypePair> gcMap; > > // State variables > egcDestroyState destroyNewState; > egcDestroyState destroyOldState; > asUINT destroyNewIdx; > asUINT destroyOldIdx; > asUINT numDestroyed; > asUINT numNewDestroyed; > egcDetectState detectState; > asUINT detectIdx; > asUINT numDetected; > asUINT numAdded; > asUINT seqAtSweepStart[3]; > asSMapNode_t *gcMapCursor; > bool isProcessing; > > // We'll keep a pool of nodes to avoid allocating memory all the time > asSMapNode_t *GetNode(void *obj, asSIntTypePair it); > void ReturnNode(asSMapNode_t *node); > asCArray<asSMapNode_t*> freeNodes; > > // Critical section for multithreaded access > DECLARECRITICALSECTION(gcCritical) // Used for adding/removing objects > DECLARECRITICALSECTION(gcCollecting) // Used for processing >}; > >END_AS_NAMESPACE > >#endif ># 148 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_gc.h" ># 54 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_scriptengine.h" 2 >#if 0 /* expanded by -frewrite-includes */ >#include "as_tokenizer.h" >#endif /* expanded by -frewrite-includes */ ># 54 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_scriptengine.h" ># 1 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_tokenizer.h" 1 >/* > AngelCode Scripting Library > Copyright (c) 2003-2013 Andreas Jonsson > > This software is provided 'as-is', without any express or implied > warranty. In no event will the authors be held liable for any > damages arising from the use of this software. > > Permission is granted to anyone to use this software for any > purpose, including commercial applications, and to alter it and > redistribute it freely, subject to the following restrictions: > > 1. The origin of this software must not be misrepresented; you > must not claim that you wrote the original software. If you use > this software in a product, an acknowledgment in the product > documentation would be appreciated but is not required. > > 2. Altered source versions must be plainly marked as such, and > must not be misrepresented as being the original software. > > 3. This notice may not be removed or altered from any source > distribution. > > The original version of this library can be located at: > http://www.angelcode.com/angelscript/ > > Andreas Jonsson > andreas@angelcode.com >*/ > > >// >// as_tokenizer.cpp >// >// This class identifies tokens from the script code >// > > > >#ifndef AS_TOKENIZER_H >#define AS_TOKENIZER_H > >#if 0 /* expanded by -frewrite-includes */ >#include "as_config.h" >#endif /* expanded by -frewrite-includes */ ># 43 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_tokenizer.h" ># 44 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_tokenizer.h" >#if 0 /* expanded by -frewrite-includes */ >#include "as_tokendef.h" >#endif /* expanded by -frewrite-includes */ ># 44 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_tokenizer.h" ># 45 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_tokenizer.h" >#if 0 /* expanded by -frewrite-includes */ >#include "as_map.h" >#endif /* expanded by -frewrite-includes */ ># 45 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_tokenizer.h" ># 46 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_tokenizer.h" >#if 0 /* expanded by -frewrite-includes */ >#include "as_string.h" >#endif /* expanded by -frewrite-includes */ ># 46 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_tokenizer.h" ># 47 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_tokenizer.h" > >BEGIN_AS_NAMESPACE > >class asCTokenizer >{ >public: > eTokenType GetToken(const char *source, size_t sourceLength, size_t *tokenLength, asETokenClass *tc = 0) const; > > static const char *GetDefinition(int tokenType); > >protected: > friend class asCScriptEngine; > > asCTokenizer(); > ~asCTokenizer(); > > asETokenClass ParseToken(const char *source, size_t sourceLength, size_t &tokenLength, eTokenType &tokenType) const; > bool IsWhiteSpace(const char *source, size_t sourceLength, size_t &tokenLength, eTokenType &tokenType) const; > bool IsComment(const char *source, size_t sourceLength, size_t &tokenLength, eTokenType &tokenType) const; > bool IsConstant(const char *source, size_t sourceLength, size_t &tokenLength, eTokenType &tokenType) const; > bool IsKeyWord(const char *source, size_t sourceLength, size_t &tokenLength, eTokenType &tokenType) const; > bool IsIdentifier(const char *source, size_t sourceLength, size_t &tokenLength, eTokenType &tokenType) const; > bool IsDigitInRadix(char ch, int radix) const; > > const asCScriptEngine *engine; > > const sTokenWord **keywordTable[256]; >}; > >END_AS_NAMESPACE > >#endif ># 79 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_tokenizer.h" > ># 55 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_scriptengine.h" 2 > >BEGIN_AS_NAMESPACE > >class asCBuilder; >class asCContext; > >// TODO: import: Remove this when import is removed >struct sBindInfo; > >class asCScriptEngine : public asIScriptEngine >{ >//============================================================= >// From asIScriptEngine >//============================================================= >public: > // Memory management > virtual int AddRef() const; > virtual int Release() const; > virtual int ShutDownAndRelease(); > > // Engine properties > virtual int SetEngineProperty(asEEngineProp property, asPWORD value); > virtual asPWORD GetEngineProperty(asEEngineProp property) const; > > // Compiler messages > virtual int SetMessageCallback(const asSFuncPtr &callback, void *obj, asDWORD callConv); > virtual int ClearMessageCallback(); > virtual int WriteMessage(const char *section, int row, int col, asEMsgType type, const char *message); > > // JIT Compiler > virtual int SetJITCompiler(asIJITCompiler *compiler); > virtual asIJITCompiler *GetJITCompiler() const; > > // Global functions > virtual int RegisterGlobalFunction(const char *declaration, const asSFuncPtr &funcPointer, asDWORD callConv, void *auxiliary = 0); > virtual asUINT GetGlobalFunctionCount() const; > virtual asIScriptFunction *GetGlobalFunctionByIndex(asUINT index) const; > virtual asIScriptFunction *GetGlobalFunctionByDecl(const char *declaration) const; > > // Global properties > virtual int RegisterGlobalProperty(const char *declaration, void *pointer); > virtual asUINT GetGlobalPropertyCount() const; > virtual int GetGlobalPropertyByIndex(asUINT index, const char **name, const char **nameSpace = 0, int *typeId = 0, bool *isConst = 0, const char **configGroup = 0, void **pointer = 0, asDWORD *accessMask = 0) const; > virtual int GetGlobalPropertyIndexByName(const char *name) const; > virtual int GetGlobalPropertyIndexByDecl(const char *decl) const; > > // Type registration > virtual int RegisterObjectType(const char *obj, int byteSize, asDWORD flags); > virtual int RegisterObjectProperty(const char *obj, const char *declaration, int byteOffset); > virtual int RegisterObjectMethod(const char *obj, const char *declaration, const asSFuncPtr &funcPointer, asDWORD callConv, void *auxiliary = 0); > virtual int RegisterObjectBehaviour(const char *obj, asEBehaviours behaviour, const char *declaration, const asSFuncPtr &funcPointer, asDWORD callConv, void *auxiliary = 0); > virtual int RegisterInterface(const char *name); > virtual int RegisterInterfaceMethod(const char *intf, const char *declaration); > virtual asUINT GetObjectTypeCount() const; > virtual asITypeInfo *GetObjectTypeByIndex(asUINT index) const; >#ifdef AS_DEPRECATED > // Deprecated since 2.31.0, 2015-12-06 > virtual asITypeInfo *GetObjectTypeByName(const char *name) const; > virtual asITypeInfo *GetObjectTypeByDecl(const char *decl) const; >#endif ># 115 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_scriptengine.h" > > // String factory > virtual int RegisterStringFactory(const char *datatype, const asSFuncPtr &factoryFunc, asDWORD callConv, void *auxiliary = 0); > virtual int GetStringFactoryReturnTypeId(asDWORD *flags) const; > > // Default array type > virtual int RegisterDefaultArrayType(const char *type); > virtual int GetDefaultArrayTypeId() const; > > // Enums > virtual int RegisterEnum(const char *type); > virtual int RegisterEnumValue(const char *type, const char *name, int value); > virtual asUINT GetEnumCount() const; > virtual asITypeInfo *GetEnumByIndex(asUINT index) const; >#ifdef AS_DEPRECATED > // Deprecated since 2.31.0, 2015-12-06 > virtual int GetEnumValueCount(int enumTypeId) const; > virtual const char * GetEnumValueByIndex(int enumTypeId, asUINT index, int *outValue) const; >#endif ># 134 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_scriptengine.h" > > // Funcdefs > virtual int RegisterFuncdef(const char *decl); > virtual asUINT GetFuncdefCount() const; > virtual asITypeInfo *GetFuncdefByIndex(asUINT index) const; > > // Typedefs > // TODO: interface: Should perhaps rename this to Alias, since it doesn't really create a new type > virtual int RegisterTypedef(const char *type, const char *decl); > virtual asUINT GetTypedefCount() const; > virtual asITypeInfo *GetTypedefByIndex(asUINT index) const; > > // Configuration groups > virtual int BeginConfigGroup(const char *groupName); > virtual int EndConfigGroup(); > virtual int RemoveConfigGroup(const char *groupName); > virtual asDWORD SetDefaultAccessMask(asDWORD defaultMask); > virtual int SetDefaultNamespace(const char *nameSpace); > virtual const char *GetDefaultNamespace() const; > > // Script modules > virtual asIScriptModule *GetModule(const char *module, asEGMFlags flag); > virtual int DiscardModule(const char *module); > virtual asUINT GetModuleCount() const; > virtual asIScriptModule *GetModuleByIndex(asUINT index) const; > > // Script functions > virtual asIScriptFunction *GetFunctionById(int funcId) const; >#ifdef AS_DEPRECATED > // deprecated since 2.31.0, 2016-01-01 > virtual asIScriptFunction *GetFuncdefFromTypeId(int typeId) const; >#endif ># 166 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_scriptengine.h" > > // Type identification >#ifdef AS_DEPRECATED > // Deprecated since 2.31.0, 2015-12-06 > virtual asITypeInfo *GetObjectTypeById(int typeId) const; >#endif ># 172 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_scriptengine.h" > virtual int GetTypeIdByDecl(const char *decl) const; > virtual const char *GetTypeDeclaration(int typeId, bool includeNamespace = false) const; > virtual int GetSizeOfPrimitiveType(int typeId) const; > virtual asITypeInfo *GetTypeInfoById(int typeId) const; > virtual asITypeInfo *GetTypeInfoByName(const char *name) const; > virtual asITypeInfo *GetTypeInfoByDecl(const char *decl) const; > > // Script execution > virtual asIScriptContext *CreateContext(); > virtual void *CreateScriptObject(const asITypeInfo *type); > virtual void *CreateScriptObjectCopy(void *obj, const asITypeInfo *type); > virtual void *CreateUninitializedScriptObject(const asITypeInfo *type); > virtual asIScriptFunction *CreateDelegate(asIScriptFunction *func, void *obj); > virtual int AssignScriptObject(void *dstObj, void *srcObj, const asITypeInfo *type); > virtual void ReleaseScriptObject(void *obj, const asITypeInfo *type); > virtual void AddRefScriptObject(void *obj, const asITypeInfo *type); > virtual int RefCastObject(void *obj, asITypeInfo *fromType, asITypeInfo *toType, void **newPtr, bool useOnlyImplicitCast = false); >#ifdef AS_DEPRECATED > // Deprecated since 2.30.0, 2014-11-04 > virtual bool IsHandleCompatibleWithObject(void *obj, int objTypeId, int handleTypeId) const; >#endif ># 193 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_scriptengine.h" > virtual asILockableSharedBool *GetWeakRefFlagOfScriptObject(void *obj, const asITypeInfo *type) const; > > // Context pooling > virtual asIScriptContext *RequestContext(); > virtual void ReturnContext(asIScriptContext *ctx); > virtual int SetContextCallbacks(asREQUESTCONTEXTFUNC_t requestCtx, asRETURNCONTEXTFUNC_t returnCtx, void *param = 0); > > // String interpretation > virtual asETokenClass ParseToken(const char *string, size_t stringLength = 0, asUINT *tokenLength = 0) const; > > // Garbage collection > virtual int GarbageCollect(asDWORD flags = asGC_FULL_CYCLE, asUINT numIterations = 1); > virtual void GetGCStatistics(asUINT *currentSize, asUINT *totalDestroyed, asUINT *totalDetected, asUINT *newObjects, asUINT *totalNewDestroyed) const; > virtual int NotifyGarbageCollectorOfNewObject(void *obj, asITypeInfo *type); > virtual int GetObjectInGC(asUINT idx, asUINT *seqNbr, void **obj = 0, asITypeInfo **type = 0); > virtual void GCEnumCallback(void *reference); > > // User data > virtual void *SetUserData(void *data, asPWORD type); > virtual void *GetUserData(asPWORD type) const; > virtual void SetEngineUserDataCleanupCallback(asCLEANENGINEFUNC_t callback, asPWORD type); > virtual void SetModuleUserDataCleanupCallback(asCLEANMODULEFUNC_t callback, asPWORD type); > virtual void SetContextUserDataCleanupCallback(asCLEANCONTEXTFUNC_t callback, asPWORD type); > virtual void SetFunctionUserDataCleanupCallback(asCLEANFUNCTIONFUNC_t callback, asPWORD type); >#ifdef AS_DEPRECATED > // Deprecated since 2.31.0, 2015-12-06 > virtual void SetObjectTypeUserDataCleanupCallback(asCLEANTYPEINFOFUNC_t callback, asPWORD type); >#endif ># 221 "/usr/ports/cad/openvsp/work/OpenVSP-OpenVSP_3.13.1/src/external/angelscript/sdk/angelscript/source/as_scriptengine.h" > virtual void SetTypeInfoUserDataCleanupCallback(asCLEANTYPEINFOFUNC_t callback, asPWORD type); > virtual void SetScriptObjectUserDataCleanupCallback(asCLEANSCRIPTOBJECTFUNC_t callback, asPWORD type); > >//=========================================================== >// internal methods >//=========================================================== >public: > asCScriptEngine(); > virtual ~asCScriptEngine(); > >//protected: > friend class asCBuilder; > friend class asCCompiler; > friend class asCContext; > friend class asCDataType; > friend class asCModule; > friend class asCRestore; > friend class asCByteCode; > friend int PrepareSystemFunction(asCScriptFunction *func, asSSystemFunctionInterface *internal, asCScriptEngine *engine); > > int RegisterMethodToObjectType(asCObjectType *objectType, const char *declaration, const asSFuncPtr &funcPointer, asDWORD callConv, void *auxiliary = 0); > int RegisterBehaviourToObjectType(asCObjectType *objectType, asEBehaviours behaviour, const char *decl, const asSFuncPtr &funcPointer, asDWORD callConv, void *auxiliary = 0); > > int VerifyVarTypeNotInFunction(asCScriptFunction *func); > > void *CallAlloc(const asCObjectType *objType) const; > void CallFree(void *obj) const; > > void *CallGlobalFunctionRetPtr(int func) const; > void *CallGlobalFunctionRetPtr(int func, void *param1) const; > void *CallGlobalFunctionRetPtr(asSSystemFunctionInterface *func, asCScriptFunction *desc) const; > void *CallGlobalFunctionRetPtr(asSSystemFunctionInterface *i, asCScriptFunction *s, void *param1) const; > void CallObjectMethod(void *obj, int func) const; > void CallObjectMethod(void *obj, void *param, int func) const; > void CallObjectMethod(void *obj, asSSystemFunctionInterface *func, asCScriptFunction *desc) const; > void CallObjectMethod(void *obj, void *param, asSSystemFunctionInterface *func, asCScriptFunction *desc) const; > bool CallObjectMethodRetBool(void *obj, int func) const; > int CallObjectMethodRetInt(void *obj, int func) const; > void *CallObjectMethodRetPtr(void *obj, int func) const; > void *CallObjectMethodRetPtr(void *obj, int param1, asCScriptFunction *func) const; > void CallGlobalFunction(void *param1, void *param2, asSSystemFunctionInterface *func, asCScriptFunction *desc) const; > bool CallGlobalFunctionRetBool(void *param1, void *param2, asSSystemFunctionInterface *func, asCScriptFunction *desc) const; > int CallScriptObjectMethod(void *obj, int func); > > void ConstructScriptObjectCopy(void *mem, void *obj, asCObjectType *type); > > void DeleteDiscardedModules(); > > void RemoveTemplateInstanceType(asCObjectType *t); > > asCConfigGroup *FindConfigGroupForFunction(int funcId) const; > asCConfigGroup *FindConfigGroupForGlobalVar(int gvarId) const; > asCConfigGroup *FindConfigGroupForTypeInfo(const asCTypeInfo *type) const; > asCConfigGroup *FindConfigGroupForFuncDef(const asCFuncdefType *funcDef) const; > > int RequestBuild(); > void BuildCompleted(); > > void PrepareEngine(); > bool isPrepared; > > int CreateContext(asIScriptContext **context, bool isInternal); > > asCTypeInfo *GetRegisteredType(const asCString &name, asSNameSpace *ns) const; > > asCObjectType *GetListPatternType(int listPatternFuncId); > void DestroyList(asBYTE *buffer, const asCObjectType *listPatternType); > void DestroySubList(asBYTE *&buffer, asSListPatternNode *&patternNode); > > int AddBehaviourFunction(asCScriptFunction &func, asSSystemFunctionInterface &internal); > > asCString GetFunctionDeclaration(int funcId); > > asCScriptFunction *GetScriptFunction(int funcId) const; > > asCModule *GetModule(const char *name, bool create); > asCModule *GetModuleFromFuncId(int funcId); > > int GetMethodIdByDecl(const asCObjectType *ot, const char *decl, asCModule *mod); > int GetFactoryIdByDecl(const asCObjectType *ot, const char *decl); > > int GetNextScriptFunctionId(); > void AddScriptFunction(asCScriptFunction *func); > void RemoveScriptFunction(asCScriptFunction *func); > void RemoveFuncdef(asCFuncdefType *func); > > int ConfigError(int err, const char *funcName, const char *arg1, const char *arg2); > > int GetTypeIdFromDataType(const asCDataType &dt) const; > asCDataType GetDataTypeFromTypeId(int typeId) const; > asCObjectType *GetObjectTypeFromTypeId(int typeId) const; > void RemoveFromTypeIdMap(asCTypeInfo *type); > > bool IsTemplateType(const char *name) const; > int SetTemplateRestrictions(asCObjectType *templateType, asCScriptFunction *func, const char *caller, const char *decl); > asCObjectType *GetTemplateInstanceType(asCObjectType *templateType, asCArray<asCDataType> &subTypes, asCModule *requestingModule); > asCScriptFunction *GenerateTemplateFactoryStub(asCObjectType *templateType, asCObjectType *templateInstanceType, int origFactoryId); > bool GenerateNewTemplateFunction(asCObjectType *templateType, asCObjectType *templateInstanceType, asCScriptFunction *templateFunc, asCScriptFunction **newFunc); > asCFuncdefType *GenerateNewTemplateFuncdef(asCObjectType *templateType, asCObjectType *templateInstanceType, asCFuncdefType *templateFuncdef); > asCDataType DetermineTypeForTemplate(const asCDataType &orig, asCObjectType *tmpl, asCObjectType *ot); > bool RequireTypeReplacement(asCDataType &type, asCObjectType *templateType); > > asCModule *FindNewOwnerForSharedType(asCTypeInfo *type, asCModule *mod); > asCModule *FindNewOwnerForSharedFunc(asCScriptFunction *func, asCModule *mod); > > asCFuncdefType *FindMatchingFuncdef(asCScriptFunction *func, asCModule *mod); > > // String constants > // TODO: Must free unused string constants, thus the ref count for each must be tracked > int AddConstantString(const char *str, size_t length); > const asCString &GetConstantString(int id); > > // Global property management > asCGlobalProperty *AllocateGlobalProperty(); > void RemoveGlobalProperty(asCGlobalProperty *prop); > > int GetScriptSectionNameIndex(const char *name); > > // Namespace management > asSNameSpace *AddNameSpace(const char *name); > asSNameSpace *FindNameSpace(const char *name) const; > asSNameSpace *GetParentNameSpace(asSNameSpace *ns) const; > >//=========================================================== >// internal properties >//=========================================================== > asCMemoryMgr memoryMgr; > > asUINT initialContextStackSize; > > asCObjectType *defaultArrayObjectType; > asCObjectType scriptTypeBehaviours; > asCObjectType functionBehaviours; > > // Registered interface > asCArray<asCObjectType *> registeredObjTypes; // doesn't increase ref count > asCArray<asCTypedefType *> registeredTypeDefs; // doesn't increase ref count > asCArray<asCEnumType *> registeredEnums; // doesn't increase ref count > // TODO: memory savings: Since there can be only one property with the same name a simpler symbol table should be used for global props > asCSymbolTable<asCGlobalProperty> registeredGlobalProps; // increases ref count > asCSymbolTable<asCScriptFunction> registeredGlobalFuncs; > asCArray<asCFuncdefType *> registeredFuncDefs; // doesn't increase ref count > asCArray<asCObjectType *> registeredTemplateTypes; // do