├── .gitattributes
├── .github
└── workflows
│ ├── main.yml
│ ├── package.yml
│ ├── setup
│ └── action.yml
│ └── test.yml
├── .gitignore
├── Changes.md
├── LICENSE.txt
├── README.md
├── build-tool
└── BuildCommon.xml
├── docs
├── CompileCache.md
├── ThreadsAndStacks.md
└── build_xml
│ ├── Compiler.md
│ ├── Defines.md
│ ├── Files.md
│ ├── HaxeTarget.md
│ ├── Linker.md
│ ├── README.md
│ ├── Stripper.md
│ ├── Tags.md
│ ├── Targets.md
│ ├── TopLevel.md
│ ├── XmlInjection.md
│ └── example.xml
├── haxelib.json
├── haxelib.xml
├── hxcpp
├── Builder.hx
└── NekoInit.hx
├── include
├── Array.h
├── Dynamic.h
├── Enum.h
├── cpp
│ ├── CppInt32__.h
│ ├── FastIterator.h
│ ├── Int64.h
│ ├── Pointer.h
│ ├── Variant.h
│ └── VirtualArray.h
├── hx
│ ├── Anon.h
│ ├── Boot.h
│ ├── CFFI.h
│ ├── CFFIAPI.h
│ ├── CFFIJsPrime.h
│ ├── CFFILoader.h
│ ├── CFFINekoLoader.h
│ ├── CFFIPrime.h
│ ├── Class.h
│ ├── Debug.h
│ ├── DynamicImpl.h
│ ├── DynamicImpl.tpl
│ ├── ErrorCodes.h
│ ├── FieldRef.h
│ ├── Functions.h
│ ├── GC.h
│ ├── GcTypeInference.h
│ ├── GenMacro.hx
│ ├── HeaderVersion.h
│ ├── HxcppMain.h
│ ├── IndexRef.h
│ ├── Interface.h
│ ├── LessThanEq.h
│ ├── Macros.h
│ ├── Macros.tpl
│ ├── MacrosFixed.h
│ ├── MacrosJumbo.h
│ ├── MacrosJumbo.tpl
│ ├── Memory.h
│ ├── Native.h
│ ├── NekoFunc.h
│ ├── OS.h
│ ├── ObjcHelpers.h
│ ├── Object.h
│ ├── Operators.h
│ ├── QuickVec.h
│ ├── Scriptable.h
│ ├── StackContext.h
│ ├── StdLibs.h
│ ├── StdString.h
│ ├── StringAlloc.h
│ ├── Telemetry.h
│ ├── TelemetryTracy.h
│ ├── Thread.h
│ ├── Tls.h
│ ├── Undefine.h
│ └── Unordered.h
├── hxMath.h
├── hxString.h
├── hxcpp.h
└── null.h
├── java
└── org
│ └── haxe
│ └── HXCPP.java
├── project
├── Build.xml
├── compile-cppia-arm64.hxml
├── compile-cppia.hxml
└── thirdparty
│ ├── Makefile
│ ├── config
│ └── mbedtls
│ │ └── include
│ │ ├── mbedtls_config.h
│ │ └── threading_alt.h
│ ├── mbedtls-2.28.2
│ ├── .gitattributes
│ ├── .gitignore
│ ├── .globalrc
│ ├── .mypy.ini
│ ├── .pylintrc
│ ├── .travis.yml
│ ├── BRANCHES.md
│ ├── BUGS.md
│ ├── CMakeLists.txt
│ ├── CONTRIBUTING.md
│ ├── ChangeLog
│ ├── DartConfiguration.tcl
│ ├── LICENSE
│ ├── Makefile
│ ├── README.md
│ ├── SECURITY.md
│ ├── SUPPORT.md
│ ├── dco.txt
│ ├── include
│ │ ├── .gitignore
│ │ ├── CMakeLists.txt
│ │ ├── mbedtls
│ │ │ ├── aes.h
│ │ │ ├── aesni.h
│ │ │ ├── arc4.h
│ │ │ ├── aria.h
│ │ │ ├── asn1.h
│ │ │ ├── asn1write.h
│ │ │ ├── base64.h
│ │ │ ├── bignum.h
│ │ │ ├── blowfish.h
│ │ │ ├── bn_mul.h
│ │ │ ├── camellia.h
│ │ │ ├── ccm.h
│ │ │ ├── certs.h
│ │ │ ├── chacha20.h
│ │ │ ├── chachapoly.h
│ │ │ ├── check_config.h
│ │ │ ├── cipher.h
│ │ │ ├── cipher_internal.h
│ │ │ ├── cmac.h
│ │ │ ├── compat-1.3.h
│ │ │ ├── config.h
│ │ │ ├── config_psa.h
│ │ │ ├── constant_time.h
│ │ │ ├── ctr_drbg.h
│ │ │ ├── debug.h
│ │ │ ├── des.h
│ │ │ ├── dhm.h
│ │ │ ├── ecdh.h
│ │ │ ├── ecdsa.h
│ │ │ ├── ecjpake.h
│ │ │ ├── ecp.h
│ │ │ ├── ecp_internal.h
│ │ │ ├── entropy.h
│ │ │ ├── entropy_poll.h
│ │ │ ├── error.h
│ │ │ ├── gcm.h
│ │ │ ├── havege.h
│ │ │ ├── hkdf.h
│ │ │ ├── hmac_drbg.h
│ │ │ ├── md.h
│ │ │ ├── md2.h
│ │ │ ├── md4.h
│ │ │ ├── md5.h
│ │ │ ├── md_internal.h
│ │ │ ├── memory_buffer_alloc.h
│ │ │ ├── net.h
│ │ │ ├── net_sockets.h
│ │ │ ├── nist_kw.h
│ │ │ ├── oid.h
│ │ │ ├── padlock.h
│ │ │ ├── pem.h
│ │ │ ├── pk.h
│ │ │ ├── pk_internal.h
│ │ │ ├── pkcs11.h
│ │ │ ├── pkcs12.h
│ │ │ ├── pkcs5.h
│ │ │ ├── platform.h
│ │ │ ├── platform_time.h
│ │ │ ├── platform_util.h
│ │ │ ├── poly1305.h
│ │ │ ├── psa_util.h
│ │ │ ├── ripemd160.h
│ │ │ ├── rsa.h
│ │ │ ├── rsa_internal.h
│ │ │ ├── sha1.h
│ │ │ ├── sha256.h
│ │ │ ├── sha512.h
│ │ │ ├── ssl.h
│ │ │ ├── ssl_cache.h
│ │ │ ├── ssl_ciphersuites.h
│ │ │ ├── ssl_cookie.h
│ │ │ ├── ssl_internal.h
│ │ │ ├── ssl_ticket.h
│ │ │ ├── threading.h
│ │ │ ├── timing.h
│ │ │ ├── version.h
│ │ │ ├── x509.h
│ │ │ ├── x509_crl.h
│ │ │ ├── x509_crt.h
│ │ │ ├── x509_csr.h
│ │ │ └── xtea.h
│ │ └── psa
│ │ │ ├── crypto.h
│ │ │ ├── crypto_builtin_composites.h
│ │ │ ├── crypto_builtin_primitives.h
│ │ │ ├── crypto_compat.h
│ │ │ ├── crypto_config.h
│ │ │ ├── crypto_driver_common.h
│ │ │ ├── crypto_driver_contexts_composites.h
│ │ │ ├── crypto_driver_contexts_primitives.h
│ │ │ ├── crypto_extra.h
│ │ │ ├── crypto_platform.h
│ │ │ ├── crypto_se_driver.h
│ │ │ ├── crypto_sizes.h
│ │ │ ├── crypto_struct.h
│ │ │ ├── crypto_types.h
│ │ │ └── crypto_values.h
│ └── library
│ │ ├── .gitignore
│ │ ├── CMakeLists.txt
│ │ ├── Makefile
│ │ ├── aes.c
│ │ ├── aesni.c
│ │ ├── arc4.c
│ │ ├── aria.c
│ │ ├── asn1parse.c
│ │ ├── asn1write.c
│ │ ├── base64.c
│ │ ├── bignum.c
│ │ ├── blowfish.c
│ │ ├── camellia.c
│ │ ├── ccm.c
│ │ ├── certs.c
│ │ ├── chacha20.c
│ │ ├── chachapoly.c
│ │ ├── check_crypto_config.h
│ │ ├── cipher.c
│ │ ├── cipher_wrap.c
│ │ ├── cmac.c
│ │ ├── common.h
│ │ ├── constant_time.c
│ │ ├── constant_time_internal.h
│ │ ├── constant_time_invasive.h
│ │ ├── ctr_drbg.c
│ │ ├── debug.c
│ │ ├── des.c
│ │ ├── dhm.c
│ │ ├── ecdh.c
│ │ ├── ecdsa.c
│ │ ├── ecjpake.c
│ │ ├── ecp.c
│ │ ├── ecp_curves.c
│ │ ├── ecp_invasive.h
│ │ ├── entropy.c
│ │ ├── entropy_poll.c
│ │ ├── error.c
│ │ ├── gcm.c
│ │ ├── havege.c
│ │ ├── hkdf.c
│ │ ├── hmac_drbg.c
│ │ ├── md.c
│ │ ├── md2.c
│ │ ├── md4.c
│ │ ├── md5.c
│ │ ├── memory_buffer_alloc.c
│ │ ├── mps_common.h
│ │ ├── mps_error.h
│ │ ├── mps_reader.c
│ │ ├── mps_reader.h
│ │ ├── mps_trace.c
│ │ ├── mps_trace.h
│ │ ├── net_sockets.c
│ │ ├── nist_kw.c
│ │ ├── oid.c
│ │ ├── padlock.c
│ │ ├── pem.c
│ │ ├── pk.c
│ │ ├── pk_wrap.c
│ │ ├── pkcs11.c
│ │ ├── pkcs12.c
│ │ ├── pkcs5.c
│ │ ├── pkparse.c
│ │ ├── pkwrite.c
│ │ ├── platform.c
│ │ ├── platform_util.c
│ │ ├── poly1305.c
│ │ ├── psa_crypto.c
│ │ ├── psa_crypto_aead.c
│ │ ├── psa_crypto_aead.h
│ │ ├── psa_crypto_cipher.c
│ │ ├── psa_crypto_cipher.h
│ │ ├── psa_crypto_client.c
│ │ ├── psa_crypto_core.h
│ │ ├── psa_crypto_driver_wrappers.c
│ │ ├── psa_crypto_driver_wrappers.h
│ │ ├── psa_crypto_ecp.c
│ │ ├── psa_crypto_ecp.h
│ │ ├── psa_crypto_hash.c
│ │ ├── psa_crypto_hash.h
│ │ ├── psa_crypto_invasive.h
│ │ ├── psa_crypto_its.h
│ │ ├── psa_crypto_mac.c
│ │ ├── psa_crypto_mac.h
│ │ ├── psa_crypto_random_impl.h
│ │ ├── psa_crypto_rsa.c
│ │ ├── psa_crypto_rsa.h
│ │ ├── psa_crypto_se.c
│ │ ├── psa_crypto_se.h
│ │ ├── psa_crypto_slot_management.c
│ │ ├── psa_crypto_slot_management.h
│ │ ├── psa_crypto_storage.c
│ │ ├── psa_crypto_storage.h
│ │ ├── psa_its_file.c
│ │ ├── ripemd160.c
│ │ ├── rsa.c
│ │ ├── rsa_internal.c
│ │ ├── sha1.c
│ │ ├── sha256.c
│ │ ├── sha512.c
│ │ ├── ssl_cache.c
│ │ ├── ssl_ciphersuites.c
│ │ ├── ssl_cli.c
│ │ ├── ssl_cookie.c
│ │ ├── ssl_msg.c
│ │ ├── ssl_srv.c
│ │ ├── ssl_ticket.c
│ │ ├── ssl_tls.c
│ │ ├── ssl_tls13_keys.c
│ │ ├── ssl_tls13_keys.h
│ │ ├── threading.c
│ │ ├── timing.c
│ │ ├── version.c
│ │ ├── version_features.c
│ │ ├── x509.c
│ │ ├── x509_create.c
│ │ ├── x509_crl.c
│ │ ├── x509_crt.c
│ │ ├── x509_csr.c
│ │ ├── x509write_crt.c
│ │ ├── x509write_csr.c
│ │ └── xtea.c
│ ├── mbedtls-files.xml
│ ├── mbedtls-flags.xml
│ ├── pcre2-10.42
│ ├── .bazelrc
│ ├── .github
│ │ └── workflows
│ │ │ ├── build.yml
│ │ │ ├── cifuzz.yml
│ │ │ ├── codeql.yml
│ │ │ └── scorecards.yml
│ ├── 132html
│ ├── AUTHORS
│ ├── BUILD.bazel
│ ├── CMakeLists.txt
│ ├── COPYING
│ ├── ChangeLog
│ ├── CheckMan
│ ├── CleanTxt
│ ├── Detrail
│ ├── HACKING
│ ├── LICENCE
│ ├── MODULE.bazel
│ ├── Makefile.am
│ ├── NEWS
│ ├── NON-AUTOTOOLS-BUILD
│ ├── PrepareRelease
│ ├── README
│ ├── README.md
│ ├── RunGrepTest
│ ├── RunGrepTest.bat
│ ├── RunTest
│ ├── RunTest.bat
│ ├── WORKSPACE.bazel
│ ├── autogen.sh
│ ├── cmake
│ │ ├── COPYING-CMAKE-SCRIPTS
│ │ ├── FindEditline.cmake
│ │ ├── FindPackageHandleStandardArgs.cmake
│ │ ├── FindReadline.cmake
│ │ ├── pcre2-config-version.cmake.in
│ │ └── pcre2-config.cmake.in
│ ├── config-cmake.h.in
│ ├── configure.ac
│ ├── index.md
│ ├── libpcre2-16.pc.in
│ ├── libpcre2-32.pc.in
│ ├── libpcre2-8.pc.in
│ ├── libpcre2-posix.pc.in
│ ├── m4
│ │ ├── ax_pthread.m4
│ │ └── pcre2_visibility.m4
│ ├── maint
│ │ ├── GenerateCommon.py
│ │ ├── GenerateTest26.py
│ │ ├── GenerateUcd.py
│ │ ├── GenerateUcpHeader.py
│ │ ├── GenerateUcpTables.py
│ │ ├── ManyConfigTests
│ │ ├── README
│ │ ├── Unicode.tables
│ │ │ ├── BidiMirroring.txt
│ │ │ ├── CaseFolding.txt
│ │ │ ├── DerivedBidiClass.txt
│ │ │ ├── DerivedCoreProperties.txt
│ │ │ ├── DerivedGeneralCategory.txt
│ │ │ ├── GraphemeBreakProperty.txt
│ │ │ ├── PropList.txt
│ │ │ ├── PropertyAliases.txt
│ │ │ ├── PropertyValueAliases.txt
│ │ │ ├── ScriptExtensions.txt
│ │ │ ├── Scripts.txt
│ │ │ ├── UnicodeData.txt
│ │ │ └── emoji-data.txt
│ │ ├── pcre2_chartables.c.non-standard
│ │ ├── ucptest.c
│ │ ├── ucptestdata
│ │ │ ├── testinput1
│ │ │ ├── testinput2
│ │ │ ├── testoutput1
│ │ │ └── testoutput2
│ │ └── utf8.c
│ ├── pcre2-config.in
│ ├── pcre2_fuzzer.dict
│ ├── pcre2_fuzzer.options
│ ├── perltest.sh
│ └── src
│ │ ├── config.h
│ │ ├── config.h.in
│ │ ├── pcre2.h
│ │ ├── pcre2.h.in
│ │ ├── pcre2_auto_possess.c
│ │ ├── pcre2_chartables.c
│ │ ├── pcre2_compile.c
│ │ ├── pcre2_config.c
│ │ ├── pcre2_context.c
│ │ ├── pcre2_convert.c
│ │ ├── pcre2_dfa_match.c
│ │ ├── pcre2_dftables.c
│ │ ├── pcre2_error.c
│ │ ├── pcre2_extuni.c
│ │ ├── pcre2_find_bracket.c
│ │ ├── pcre2_fuzzsupport.c
│ │ ├── pcre2_internal.h
│ │ ├── pcre2_intmodedep.h
│ │ ├── pcre2_jit_compile.c
│ │ ├── pcre2_jit_match.c
│ │ ├── pcre2_jit_misc.c
│ │ ├── pcre2_jit_neon_inc.h
│ │ ├── pcre2_jit_simd_inc.h
│ │ ├── pcre2_jit_test.c
│ │ ├── pcre2_maketables.c
│ │ ├── pcre2_match.c
│ │ ├── pcre2_match_data.c
│ │ ├── pcre2_newline.c
│ │ ├── pcre2_ord2utf.c
│ │ ├── pcre2_pattern_info.c
│ │ ├── pcre2_printint.c
│ │ ├── pcre2_script_run.c
│ │ ├── pcre2_serialize.c
│ │ ├── pcre2_string_utils.c
│ │ ├── pcre2_study.c
│ │ ├── pcre2_substitute.c
│ │ ├── pcre2_substring.c
│ │ ├── pcre2_tables.c
│ │ ├── pcre2_ucd.c
│ │ ├── pcre2_ucp.h
│ │ ├── pcre2_ucptables.c
│ │ ├── pcre2_valid_utf.c
│ │ ├── pcre2_xclass.c
│ │ ├── pcre2demo.c
│ │ ├── pcre2grep.c
│ │ ├── pcre2posix.c
│ │ ├── pcre2posix.h
│ │ ├── pcre2posix_test.c
│ │ ├── pcre2test.c
│ │ └── sljit
│ │ ├── sljitConfig.h
│ │ ├── sljitConfigInternal.h
│ │ ├── sljitExecAllocator.c
│ │ ├── sljitLir.c
│ │ ├── sljitLir.h
│ │ ├── sljitNativeARM_32.c
│ │ ├── sljitNativeARM_64.c
│ │ ├── sljitNativeARM_T2_32.c
│ │ ├── sljitNativeMIPS_32.c
│ │ ├── sljitNativeMIPS_64.c
│ │ ├── sljitNativeMIPS_common.c
│ │ ├── sljitNativePPC_32.c
│ │ ├── sljitNativePPC_64.c
│ │ ├── sljitNativePPC_common.c
│ │ ├── sljitNativeRISCV_32.c
│ │ ├── sljitNativeRISCV_64.c
│ │ ├── sljitNativeRISCV_common.c
│ │ ├── sljitNativeS390X.c
│ │ ├── sljitNativeX86_32.c
│ │ ├── sljitNativeX86_64.c
│ │ ├── sljitNativeX86_common.c
│ │ ├── sljitProtExecAllocator.c
│ │ ├── sljitUtils.c
│ │ └── sljitWXExecAllocator.c
│ ├── sqlite-3.40.1
│ ├── shell.c
│ ├── sqlite3.c
│ ├── sqlite3.h
│ └── sqlite3ext.h
│ ├── tracy-0.12.0
│ ├── README.md
│ ├── TracyClient.cpp
│ ├── client
│ │ ├── TracyAlloc.cpp
│ │ ├── TracyArmCpuTable.hpp
│ │ ├── TracyCallstack.cpp
│ │ ├── TracyCallstack.h
│ │ ├── TracyCallstack.hpp
│ │ ├── TracyCpuid.hpp
│ │ ├── TracyDebug.hpp
│ │ ├── TracyDxt1.cpp
│ │ ├── TracyDxt1.hpp
│ │ ├── TracyFastVector.hpp
│ │ ├── TracyKCore.cpp
│ │ ├── TracyKCore.hpp
│ │ ├── TracyLock.hpp
│ │ ├── TracyOverride.cpp
│ │ ├── TracyProfiler.cpp
│ │ ├── TracyProfiler.hpp
│ │ ├── TracyRingBuffer.hpp
│ │ ├── TracyScoped.hpp
│ │ ├── TracyStringHelpers.hpp
│ │ ├── TracySysPower.cpp
│ │ ├── TracySysPower.hpp
│ │ ├── TracySysTime.cpp
│ │ ├── TracySysTime.hpp
│ │ ├── TracySysTrace.cpp
│ │ ├── TracySysTrace.hpp
│ │ ├── TracyThread.hpp
│ │ ├── tracy_SPSCQueue.h
│ │ ├── tracy_concurrentqueue.h
│ │ ├── tracy_rpmalloc.cpp
│ │ └── tracy_rpmalloc.hpp
│ ├── common
│ │ ├── TracyAlign.hpp
│ │ ├── TracyAlloc.hpp
│ │ ├── TracyApi.h
│ │ ├── TracyColor.hpp
│ │ ├── TracyForceInline.hpp
│ │ ├── TracyMutex.hpp
│ │ ├── TracyProtocol.hpp
│ │ ├── TracyQueue.hpp
│ │ ├── TracySocket.cpp
│ │ ├── TracySocket.hpp
│ │ ├── TracyStackFrames.cpp
│ │ ├── TracyStackFrames.hpp
│ │ ├── TracySystem.cpp
│ │ ├── TracySystem.hpp
│ │ ├── TracyUwp.hpp
│ │ ├── TracyVersion.hpp
│ │ ├── TracyYield.hpp
│ │ ├── tracy_lz4.cpp
│ │ ├── tracy_lz4.hpp
│ │ ├── tracy_lz4hc.cpp
│ │ └── tracy_lz4hc.hpp
│ ├── libbacktrace
│ │ ├── LICENSE
│ │ ├── alloc.cpp
│ │ ├── backtrace.hpp
│ │ ├── config.h
│ │ ├── dwarf.cpp
│ │ ├── elf.cpp
│ │ ├── fileline.cpp
│ │ ├── filenames.hpp
│ │ ├── internal.hpp
│ │ ├── macho.cpp
│ │ ├── mmapio.cpp
│ │ ├── posix.cpp
│ │ ├── sort.cpp
│ │ └── state.cpp
│ └── tracy
│ │ ├── Tracy.hpp
│ │ ├── TracyC.h
│ │ ├── TracyCUDA.hpp
│ │ ├── TracyD3D11.hpp
│ │ ├── TracyD3D12.hpp
│ │ ├── TracyLua.hpp
│ │ ├── TracyMetal.hmm
│ │ ├── TracyOpenCL.hpp
│ │ ├── TracyOpenGL.hpp
│ │ └── TracyVulkan.hpp
│ └── zlib-1.3.1
│ ├── CMakeLists.txt
│ ├── ChangeLog
│ ├── FAQ
│ ├── INDEX
│ ├── LICENSE
│ ├── Makefile
│ ├── Makefile.in
│ ├── README
│ ├── adler32.c
│ ├── compress.c
│ ├── configure
│ ├── crc32.c
│ ├── crc32.h
│ ├── deflate.c
│ ├── deflate.h
│ ├── gzclose.c
│ ├── gzguts.h
│ ├── gzlib.c
│ ├── gzread.c
│ ├── gzwrite.c
│ ├── infback.c
│ ├── inffast.c
│ ├── inffast.h
│ ├── inffixed.h
│ ├── inflate.c
│ ├── inflate.h
│ ├── inftrees.c
│ ├── inftrees.h
│ ├── make_vms.com
│ ├── treebuild.xml
│ ├── trees.c
│ ├── trees.h
│ ├── uncompr.c
│ ├── zconf.h
│ ├── zconf.h.cmakein
│ ├── zconf.h.in
│ ├── zlib.3
│ ├── zlib.3.pdf
│ ├── zlib.h
│ ├── zlib.map
│ ├── zlib.pc.cmakein
│ ├── zlib.pc.in
│ ├── zutil.c
│ └── zutil.h
├── run.n
├── src
├── Array.cpp
├── Dynamic.cpp
├── Enum.cpp
├── ExampleMain.cpp
├── Math.cpp
├── ObjcData.mm
├── String.cpp
└── hx
│ ├── AbcOpCodes.h
│ ├── AndroidCompat.cpp
│ ├── Anon.cpp
│ ├── Boot.cpp
│ ├── CFFI.cpp
│ ├── Class.cpp
│ ├── Date.cpp
│ ├── Debug.cpp
│ ├── Debugger.cpp
│ ├── Hash.cpp
│ ├── Hash.h
│ ├── Lib.cpp
│ ├── NoFiles.cpp
│ ├── Object.cpp
│ ├── Profiler.cpp
│ ├── RunLibs.cpp
│ ├── StdLibs.cpp
│ ├── Telemetry.cpp
│ ├── TelemetryTracy.cpp
│ ├── Thread.cpp
│ ├── Unicase.h
│ ├── cppia
│ ├── ArrayBuiltin.cpp
│ ├── ArrayVirtual.cpp
│ ├── Cppia.cpp
│ ├── Cppia.h
│ ├── CppiaClasses.cpp
│ ├── CppiaCompiler.cpp
│ ├── CppiaCompiler.h
│ ├── CppiaCtx.cpp
│ ├── CppiaFunction.cpp
│ ├── CppiaModule.cpp
│ ├── CppiaOps.inc
│ ├── CppiaStream.h
│ ├── CppiaVars.cpp
│ ├── GlobalBuiltin.cpp
│ ├── HaxeNative.cpp
│ ├── StringBuiltin.cpp
│ └── sljit_src
│ │ ├── README
│ │ ├── sljitConfig.h
│ │ ├── sljitConfigInternal.h
│ │ ├── sljitExecAllocator.c
│ │ ├── sljitLir.c
│ │ ├── sljitLir.h
│ │ ├── sljitNativeARM_32.c
│ │ ├── sljitNativeARM_64.c
│ │ ├── sljitNativeARM_T2_32.c
│ │ ├── sljitNativeMIPS_32.c
│ │ ├── sljitNativeMIPS_64.c
│ │ ├── sljitNativeMIPS_common.c
│ │ ├── sljitNativePPC_32.c
│ │ ├── sljitNativePPC_64.c
│ │ ├── sljitNativePPC_common.c
│ │ ├── sljitNativeSPARC_32.c
│ │ ├── sljitNativeSPARC_common.c
│ │ ├── sljitNativeTILEGX-encoder.c
│ │ ├── sljitNativeTILEGX_64.c
│ │ ├── sljitNativeX86_32.c
│ │ ├── sljitNativeX86_64.c
│ │ ├── sljitNativeX86_common.c
│ │ ├── sljitProtExecAllocator.c
│ │ └── sljitUtils.c
│ ├── gc
│ ├── GcCommon.cpp
│ ├── GcRegCapture.cpp
│ ├── GcRegCapture.h
│ └── Immix.cpp
│ └── libs
│ ├── mysql
│ ├── Build.xml
│ ├── Mysql.cpp
│ ├── my_api.cpp
│ ├── my_proto.cpp
│ ├── my_proto.h
│ ├── mysql.h
│ ├── sha1.cpp
│ ├── sha1.h
│ ├── socket.cpp
│ └── socket.h
│ ├── regexp
│ ├── Build.xml
│ ├── RegExp.cpp
│ └── pcre2_sources.xml
│ ├── sqlite
│ ├── Build.xml
│ └── Sqlite.cpp
│ ├── ssl
│ ├── Build.xml
│ └── SSL.cpp
│ ├── std
│ ├── Build.xml
│ ├── File.cpp
│ ├── Process.cpp
│ ├── Random.cpp
│ ├── Socket.cpp
│ └── Sys.cpp
│ └── zlib
│ ├── Build.xml
│ └── ZLib.cpp
├── test
├── README.md
├── RunTests.hx
├── cffi
│ ├── compile-neko.hxml
│ ├── compile-utf8.hxml
│ ├── compile.hxml
│ ├── project
│ │ ├── Project.cpp
│ │ └── build.xml
│ └── src
│ │ ├── Loader.hx
│ │ ├── TestCffi.hx
│ │ ├── TestMain.hx
│ │ └── TestPrime.hx
├── cppia
│ ├── Client.hx
│ ├── ClientExtendedExtendedRoot.hx
│ ├── ClientExtends.hx
│ ├── ClientExtends2.hx
│ ├── ClientIHostImpl.hx
│ ├── Common.hx
│ ├── CppiaHost.hx
│ ├── HostBase.hx
│ ├── HostExtendedRoot.hx
│ ├── HostRoot.hx
│ ├── IClientHostInterface.hx
│ ├── IClientInterface.hx
│ ├── IFoo.hx
│ ├── IHostInterface.hx
│ ├── LocalFunctionExceptions.hx
│ ├── cases
│ │ └── TestCommon.hx
│ ├── compile-client.hxml
│ ├── compile-host.hxml
│ └── pack
│ │ └── HostInterface.hx
├── debugger
│ ├── App.hx
│ ├── Lines.hx
│ ├── TestDebugger.hx
│ └── compile.hxml
├── extern-lib
│ ├── api
│ │ ├── HaxeApi.hx
│ │ └── HaxeObject.hx
│ ├── compile-api.hxml
│ └── impl
│ │ └── HaxeImpl.hx
├── extern-use
│ ├── Build.xml
│ └── Main.cpp
├── haxe
│ ├── TestIntHash.hx
│ ├── TestKeywords.hx
│ ├── TestMain.hx
│ ├── TestObjectHash.hx
│ ├── TestSort.hx
│ ├── TestStringHash.hx
│ ├── TestTypes.hx
│ ├── TestWeakHash.hx
│ ├── compile.hxml
│ ├── compile_nme.nmml
│ ├── file
│ │ ├── TestFile.hx
│ │ └── empty.txt
│ ├── gc
│ │ ├── TestBigStack.hx
│ │ ├── TestGC.hx
│ │ ├── TestGCThreaded.hx
│ │ └── ZoneTest.cpp
│ └── native
│ │ └── TestFinalizer.hx
├── native
│ ├── Native.hx
│ ├── NativeGen.hx
│ ├── compile.hxml
│ ├── externs
│ │ ├── RGB.hx
│ │ ├── Rectangle.hx
│ │ ├── RectangleApi.hx
│ │ ├── RectangleDef.h
│ │ ├── RectangleImpl.cpp
│ │ └── ShortPtr.hx
│ ├── lib
│ │ ├── LibInclude.h
│ │ └── RGB.cpp
│ └── tests
│ │ ├── TestGlobalNamespace.hx
│ │ ├── TestNativeEnum.hx
│ │ ├── TestNativeGen.hx
│ │ ├── TestNonVirtual.hx
│ │ ├── TestPtr.hx
│ │ ├── TestRectangle.hx
│ │ ├── TestRgb.hx
│ │ └── TestStdio.hx
├── opMatrix
│ └── MkOps.hx
├── snippets
│ └── messagebox
│ │ ├── MessageBox.hx
│ │ └── compile.hxml
├── std
│ ├── Test.hx
│ ├── Test.nmml
│ ├── compile32.hxml
│ ├── compile64.hxml
│ ├── compileArm64.hxml
│ └── testAndroid.hxml
├── telemetry
│ ├── TestBasic.hx
│ ├── TestMain.hx
│ ├── compile.hxml
│ └── test.bat
└── threads
│ ├── Test.hx
│ ├── ThreadCode.cpp
│ ├── a.txt
│ └── compile.hxml
├── toolchain
├── android-toolchain-clang.xml
├── android-toolchain-gcc.xml
├── android-toolchain.xml
├── appletvos-toolchain.xml
├── appletvsim-toolchain.xml
├── blackberry-toolchain.xml
├── common-defines.xml
├── cygwin-toolchain.xml
├── dospath.bat
├── emscripten-toolchain.xml
├── example.hxcpp_config.xml
├── finish-setup.xml
├── gcc-toolchain.xml
├── gcw0-toolchain.xml
├── gph-toolchain.xml
├── haxe-target.xml
├── iphoneos-toolchain.xml
├── iphonesim-toolchain.xml
├── linux-toolchain.xml
├── mac-toolchain.xml
├── mingw-toolchain.xml
├── msvc-arm64-setup.bat
├── msvc-setup.bat
├── msvc-toolchain.xml
├── msvc-winrt-setup.bat
├── msvc-winrt64-setup.bat
├── msvc64-setup.bat
├── nvcc-setup.xml
├── setup.xml
├── tizen-toolchain.xml
├── watchos-toolchain.xml
├── watchsimulator-toolchain.xml
└── webos-toolchain.xml
└── tools
├── azure-pipelines
└── build.yml
├── build
├── Build.hx
└── compile.hxml
├── haxe
├── build_linux.sh
└── build_osx.sh
├── hxcpp
├── BuildTool.hx
├── CompileCache.hx
├── Compiler.hx
├── CopyFile.hx
├── File.hx
├── FileGroup.hx
├── HLSL.hx
├── Linker.hx
├── Log.hx
├── Manifester.hx
├── PathManager.hx
├── Prelinker.hx
├── ProcessManager.hx
├── Profile.hx
├── Setup.hx
├── Stripper.hx
├── Target.hx
├── ThreadPool.hx
├── Tools.hx
├── compile-cpp.hxml
└── compile.hxml
├── run
├── RunMain.hx
└── compile.hxml
└── version
└── Write.hx
/.gitattributes:
--------------------------------------------------------------------------------
1 | project/thirdparty/*/** linguist-vendored
2 |
--------------------------------------------------------------------------------
/.github/workflows/main.yml:
--------------------------------------------------------------------------------
1 | name: main
2 | on: [push, pull_request]
3 |
4 | jobs:
5 | Windows32:
6 | strategy:
7 | fail-fast: false
8 | matrix:
9 | haxe: [ 4.3.4, latest ]
10 | uses: ./.github/workflows/test.yml
11 | name: Test Windows (32bit)
12 | with:
13 | haxe: ${{ matrix.haxe }}
14 | arch: 32
15 | sep: \
16 | ext: .dll
17 | os: windows-latest
18 |
19 | Windows64:
20 | strategy:
21 | fail-fast: false
22 | matrix:
23 | haxe: [ 4.3.4, latest ]
24 | uses: ./.github/workflows/test.yml
25 | name: Test Windows (64bit)
26 | with:
27 | haxe: ${{ matrix.haxe }}
28 | arch: 64
29 | sep: \
30 | ext: .dll
31 | os: windows-latest
32 |
33 | MacOS64:
34 | strategy:
35 | fail-fast: false
36 | matrix:
37 | haxe: [ 4.3.4, latest ]
38 | uses: ./.github/workflows/test.yml
39 | name: Test MacOS (x86_64)
40 | with:
41 | haxe: ${{ matrix.haxe }}
42 | arch: 64
43 | sep: /
44 | ext: .dylib
45 | os: macos-13
46 |
47 | MacOSArm:
48 | strategy:
49 | fail-fast: false
50 | matrix:
51 | haxe: [ 4.3.4, latest ]
52 | uses: ./.github/workflows/test.yml
53 | name: Test MacOS (Arm64)
54 | with:
55 | haxe: ${{ matrix.haxe }}
56 | arch: Arm64
57 | sep: /
58 | ext: .dylib
59 | os: macos-latest
60 |
61 | Linux32:
62 | strategy:
63 | fail-fast: false
64 | matrix:
65 | haxe: [ 4.3.4, latest ]
66 | uses: ./.github/workflows/test.yml
67 | name: Test Linux (32bit)
68 | with:
69 | haxe: ${{ matrix.haxe }}
70 | arch: 32
71 | sep: /
72 | ext: .dso
73 | os: ubuntu-latest
74 |
75 | Linux64:
76 | strategy:
77 | fail-fast: false
78 | matrix:
79 | haxe: [ 4.3.4, latest ]
80 | uses: ./.github/workflows/test.yml
81 | name: Test Linux (64bit)
82 | with:
83 | haxe: ${{ matrix.haxe }}
84 | arch: 64
85 | sep: /
86 | ext: .dso
87 | os: ubuntu-latest
88 |
--------------------------------------------------------------------------------
/.github/workflows/setup/action.yml:
--------------------------------------------------------------------------------
1 | name: setup
2 | inputs:
3 | haxe:
4 | required: true
5 | type: string
6 | runs:
7 | using: composite
8 | steps:
9 | - name: install haxe
10 | uses: Aidan63/setup-haxe@3d3101bcd0a2001699fc8295f4d9eddd0724d3e9
11 | with:
12 | haxe-version: ${{ inputs.haxe }}
13 |
14 | - name: install haxe libraries
15 | shell: pwsh
16 | run: |
17 | haxelib git utest https://github.com/haxe-utest/utest
18 | haxelib git hx4compat https://github.com/HaxeFoundation/hx4compat
19 | haxelib dev hxcpp ${{ github.workspace }}
20 | haxelib list
21 |
22 | - name: install native libraries
23 | if: runner.os == 'Linux'
24 | shell: pwsh
25 | run: |
26 | sudo apt-get update -qqy
27 | sudo apt-get install -qqy gcc-multilib g++-multilib
28 |
29 | - name: build run.n
30 | working-directory: tools/run
31 | shell: pwsh
32 | run: haxe compile.hxml
33 |
34 | - name: build hxcpp
35 | working-directory: tools/hxcpp
36 | shell: pwsh
37 | run: haxe compile.hxml
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | obj
2 | bin
3 | lib
4 | project/cppia_bin
5 | test/ndlls/cpp
6 | test/ndlls/cpp64
7 | test/std/arm32
8 | test/std/arm64
9 | test/std/cpp32
10 | test/std/cpp64
11 | test/std/mybase.db
12 | test/std/hxcpp.db
13 | test/opMatrix/Ops.hx
14 | test/opMatrix/cpp
15 | test/haxe/cpp
16 | test/telemetry/cpp
17 | test/extern-lib/gen-externs
18 | test/cffi/project/ndll
19 | test/snippets/messagebox/cpp
20 | test/haxe/gc/big.txt
21 | tools/hxcpp/cpp
22 | hxcpp.n
23 | .DS_Store
24 |
25 | *.swp
26 | *.exe
27 | *.pdb
28 | *.ilk
29 |
30 | .vscode
31 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | * Copyright (c) 2008 by the contributors
2 | * All rights reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following condition is met:
6 | * * Redistributions of source code must retain the above copyright
7 | * notice, this list of conditions and the following disclaimer.
8 | *
9 | * See individual source files for additional license information.
10 | *
11 | * THIS SOFTWARE IS PROVIDED BY THE HAXE PROJECT CONTRIBUTORS ``AS IS'' AND ANY
12 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
13 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
14 | * DISCLAIMED.
15 |
16 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # hxcpp
2 |
3 | [](https://dev.azure.com/HaxeFoundation/GitHubPublic/_build/latest?definitionId=3&branchName=master)
4 |
5 | hxcpp is the runtime support for the c++ backend of the [haxe](http://haxe.org/) compiler. This contains the headers, libraries and support code required to generate a fully compiled executable from haxe code.
6 |
7 |
8 | # building the tools
9 |
10 | ```
11 | REPO=$(pwd)
12 | cd ${REPO}/tools/run
13 | haxe compile.hxml
14 | cd ${REPO}/tools/hxcpp
15 | haxe compile.hxml
16 | cd $REPO
17 | ```
18 |
19 | # cppia
20 |
21 | You first need to build the cppia host.
22 |
23 | ```
24 | REPO=$(pwd)
25 | cd ${REPO}/project
26 | haxe compile-cppia.hxml
27 | cd $REPO
28 | ```
29 |
30 | Then you can do `haxelib run hxcpp file.cppia`.
31 |
--------------------------------------------------------------------------------
/build-tool/BuildCommon.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/docs/build_xml/Stripper.md:
--------------------------------------------------------------------------------
1 | Stripper
2 | --------
3 |
4 | A stripper is used to remove debug information in release builds on gcc-like systems. It may contain entries:
5 |
6 | - *exe* - Override stripper command
7 | ```xml
8 |
9 | ```
10 |
11 | - *flag* - Add flag to stripper command
12 | ```xml
13 |
14 | ```
15 |
16 |
--------------------------------------------------------------------------------
/docs/build_xml/Tags.md:
--------------------------------------------------------------------------------
1 | Tags
2 | ----
3 |
4 | Tags are identifiers that link compiler flags with specific files. Usually, they are defined in a files group with the 'tags' attribute as a comma separated list, and with the 'tag' attribute on a compiler 'flag' node. Files are then compiled with all the flags that have matching tags.
5 |
6 | By restricting tags to certain files, only a sub-set of files needs to be recompiled when conditions change, and files without the relevant tags can reuse their object files. This can save a lot of time, since some flags only apply to a few files.
7 |
8 | Files can override the group tags by specifying their own 'tags' attribute. Groups can add tags with the 'tag' node.
9 |
10 | Some tags have standard meanings when compiling haxe code:
11 | - *haxe* - The haxe tag adds all the required compiler flags to get haxe-generated code to compile correctly, and should be added to files that depend directly or indirectly on hxcpp.h.
12 | - *static* - This will add the STATIC_LINK define when appropriate, which is used for generating cffi glue. It should be added to cffi code that might generate static libraries.
13 | - *gc* - These flags only affect the garbage-collection files
14 | - *hxstring* - These flags only affect String.cpp
15 | - *optimization tags* - each file is assumed to have exactly 1 optimization tags. If none is explicitly specified, then the default is used depending on whether it is a debug or release build. They are:
16 | + optim-std = alias for 'debug' or 'release' depending on build
17 | + debug
18 | + release
19 | + optim-none
20 | + optim-size
21 |
22 | Setting one of these tags is useful for compiling your library in release mode, even if haxe has -debug. Some very big files are slow to compile in release mode, so using a less optimized mode can be faster.
23 |
24 |
25 | The tags attribute can be added to a haxe-generated file using the `@:fileXml` meta, eg:
26 | ```haxe
27 | @:fileXml("tags='haxe,optim-none'")
28 | class MyClass { ...
29 | ```
30 |
31 | Here, the class is compiled with the normal haxe flags, but has the optimizations disabled, which can lead to much faster compiler times in some circumstances.
32 |
--------------------------------------------------------------------------------
/docs/build_xml/XmlInjection.md:
--------------------------------------------------------------------------------
1 | Xml Injection
2 | -------------
3 |
4 | When using external code in hxcpp, it is often useful to add libraries, include paths or compiler flags to the build process. This can be done with the `@:buildXml` class meta-data. eg,
5 |
6 | ```haxe
7 | @:buildXml("
8 |
9 |
10 |
11 | ")
12 | @:keep
13 | class StaticNme
14 | {
15 | ...
16 | ```
17 |
18 | So, by referencing a given class (you just 'import' the class, no need to use it because it has the @:keep meta-data), the xml fragment is also included.
19 |
20 | Here, the xml fragment is copied verbatim into the generated Build.xml immediately after the standard file lists. This example adds a library to the haxe target, but you could also add flags to files nodes, or files to another files node or target. Another possibility is to add an include command to pull in a whole external xml file. This can help avoid some syntax awkwardness needed when quoting strings in meta-data, and allows a normal xml editor to be used.
21 |
22 | It is also possible to replace the `__main__` file group to skip the standard initialization code and use a custom bootstrap procedure.
23 |
24 |
--------------------------------------------------------------------------------
/docs/build_xml/example.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/haxelib.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "hxcpp",
3 | "url": "https://github.com/HaxeFoundation/hxcpp/",
4 | "license": "BSD",
5 | "tags": ["haxe", "hxcpp", "cpp"],
6 | "description": "Hxcpp is the runtime support for the C++ backend of the Haxe compiler. This contains the headers, libraries and support code required to generate a fully compiled executable from Haxe code.",
7 | "version": "4.3.0",
8 | "releasenote": "See Changes.md",
9 | "contributors": ["gamehaxe", "HaxeFoundation"],
10 | "binaryversion": 48,
11 | "dependencies": {
12 |
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/haxelib.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Hxcpp is the runtime support for the c++ backend of the haxe compiler. This release constains the headers, libraries and support code required to generate a fully compiled executable from haxe code.
4 | See Changes.txt
5 |
6 |
--------------------------------------------------------------------------------
/hxcpp/NekoInit.hx:
--------------------------------------------------------------------------------
1 | package hxcpp;
2 |
3 | class NekoInit
4 | {
5 | public static function nekoInit(inModuleName:String) : Bool
6 | {
7 | var init = neko.Lib.load(inModuleName, "neko_init", 5);
8 |
9 | if (init != null)
10 | {
11 | init( function(s) return new String(s),
12 | function(len:Int) { var r = []; if (len > 0) r[len - 1] = null; return r; },
13 | null,
14 | true,
15 | false);
16 | return true;
17 |
18 | }
19 | return false;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/include/hx/Boot.h:
--------------------------------------------------------------------------------
1 | #ifndef HX_BOOT_H
2 | #define HX_BOOT_H
3 |
4 | // Properly construct all the classes defined in the haxe code
5 | void __boot_all();
6 |
7 | namespace hx
8 | {
9 |
10 | // Initializer the hxcpp runtime system
11 | HXCPP_EXTERN_CLASS_ATTRIBUTES void Boot();
12 |
13 | }
14 |
15 | #endif
16 |
--------------------------------------------------------------------------------
/include/hx/ErrorCodes.h:
--------------------------------------------------------------------------------
1 | #ifndef HX_ERROR_CODES
2 | #define HX_ERROR_CODES
3 |
4 | // --- Exteral constants, used inline
5 | #define HX_INVALID_CAST Dynamic(HX_CSTRING("Invalid Cast"))
6 | #define HX_INVALID_INTERFACE Dynamic(HX_CSTRING("Object does not implement interface"))
7 | #define HX_INDEX_OUT_OF_BOUNDS Dynamic(HX_CSTRING("Index Out of Bounds"))
8 | #define HX_INVALID_CONSTRUCTOR Dynamic(HX_CSTRING("Invalid constructor"))
9 | #define HX_INVALID_ENUM_CONSTRUCTOR(_enum_name, _constructor_name) \
10 | Dynamic(HX_CSTRING("Invalid enum constructor for ") + \
11 | HX_CSTRING(_enum_name) + \
12 | HX_CSTRING(": ") + \
13 | _constructor_name)
14 | #define HX_INVALID_OBJECT Dynamic(HX_CSTRING("Invalid object"))
15 | #define HX_INVALID_ARG_COUNT Dynamic(HX_CSTRING("Invalid Arg Count"))
16 | #define HX_NULL_FUNCTION_POINTER Dynamic(HX_CSTRING("Null Function Pointer"))
17 | #define HX_INVALID_ENUM_ARG_COUNT(_enum_name, _constructor_name, _count, _expected) \
18 | Dynamic(HX_CSTRING("Invalid enum arg count for ") + \
19 | HX_CSTRING(_enum_name) + \
20 | HX_CSTRING(".") + \
21 | _constructor_name + \
22 | HX_CSTRING(": expected ") + \
23 | ::String(_expected) + \
24 | HX_CSTRING(", got ") + \
25 | ::String(_count))
26 |
27 | #endif
28 |
--------------------------------------------------------------------------------
/include/hx/Functions.h:
--------------------------------------------------------------------------------
1 | #ifndef HX_FUNCTIONS_H
2 | #define HX_FUNCTIONS_H
3 | #include
4 |
5 | namespace hx
6 | {
7 | struct HXCPP_EXTERN_CLASS_ATTRIBUTES LocalFunc : public hx::Object
8 | {
9 | int __GetType() const { return vtFunction; }
10 | inline void DoMarkThis(hx::MarkContext *__inCtx) { }
11 | #ifdef HXCPP_VISIT_ALLOCS
12 | inline void DoVisitThis(hx::VisitContext *__inCtx) { }
13 | #endif
14 | };
15 |
16 | struct HXCPP_EXTERN_CLASS_ATTRIBUTES LocalThisFunc : public LocalFunc
17 | {
18 | Dynamic __this;
19 | void __SetThis(Dynamic inThis) { __this = inThis; }
20 | inline void DoMarkThis(hx::MarkContext *__inCtx) { HX_MARK_MEMBER(__this); }
21 | #ifdef HXCPP_VISIT_ALLOCS
22 | inline void DoVisitThis(hx::VisitContext *__inCtx) { HX_VISIT_MEMBER(__this); }
23 | #endif
24 | };
25 |
26 | }
27 |
28 | #endif
29 |
--------------------------------------------------------------------------------
/include/hx/HeaderVersion.h:
--------------------------------------------------------------------------------
1 | #ifndef HXCPP_HEADER_VERSION
2 | #define HXCPP_HEADER_VERSION 330
3 | #endif
4 |
--------------------------------------------------------------------------------
/include/hx/IndexRef.h:
--------------------------------------------------------------------------------
1 | #ifndef HX_INDEX_REF_H
2 | #define HX_INDEX_REF_H
3 |
4 | namespace hx
5 | {
6 |
7 | }
8 |
9 | #endif
10 |
--------------------------------------------------------------------------------
/include/hx/Interface.h:
--------------------------------------------------------------------------------
1 | #ifndef HX_INTERFACE_H
2 | #define HX_INTERFACE_H
3 |
4 | namespace hx
5 | {
6 |
7 | HXCPP_EXTERN_CLASS_ATTRIBUTES void InvalidInterface();
8 |
9 | template
10 | inline T interface_cast(void *ptr)
11 | {
12 | #if defined(HXCPP_GC_CHECK_POINTER) || defined(HXCPP_DEBUG)
13 | if (!ptr) hx::InvalidInterface();
14 | #endif
15 | return static_cast(ptr);
16 | }
17 |
18 | template
19 | inline T interface_check(T inObj,int interfaceId)
20 | {
21 | Dynamic d(inObj);
22 | if ( !d.mPtr || !d->_hx_getInterface(interfaceId))
23 | hx::BadCast();
24 | return inObj;
25 | }
26 |
27 | }
28 |
29 |
30 | #endif
31 |
32 |
--------------------------------------------------------------------------------
/include/hx/MacrosJumbo.tpl:
--------------------------------------------------------------------------------
1 | #ifndef HX_MACROS_JUMBO_H
2 | #define HX_MACROS_JUMBO_H
3 |
4 | ::foreach LOCALS::
5 | #define HX_BEGIN_LOCAL_FUNC_S::ARG::(SUPER,name,::TYPE_ARGS::) \
6 | struct name : public SUPER { \
7 | ::TYPE_DECL::; \
8 | void __Mark(hx::MarkContext *__inCtx) { DoMarkThis(__inCtx); ::MARKS:: } \
9 | void __Visit(hx::VisitContext *__inCtx) { DoVisitThis(__inCtx); ::VISITS:: } \
10 | name(::CONSTRUCT_ARGS::) : ::CONSTRUCT_VARS:: {}::end::
11 |
12 | #define HX_LOCAL_RUN _hx_run
13 |
14 | ::foreach LOCALS::
15 | #define HX_END_LOCAL_FUNC::ARG::(ret) HX_DYNAMIC_CALL::ARG::(ret, HX_LOCAL_RUN ) };::end::
16 |
17 | // For compatibility until next version of haxe is released
18 | ::foreach LOCALS::
19 | #define HX_BEGIN_LOCAL_FUNC::ARG::(name,::TYPE_ARGS::) \
20 | HX_BEGIN_LOCAL_FUNC_S::ARG::(hx::LocalFunc,name,::TYPE_ARGS::)::end::
21 |
22 |
23 | #endif
24 |
25 |
26 |
--------------------------------------------------------------------------------
/include/hx/Memory.h:
--------------------------------------------------------------------------------
1 | #ifdef HX_MEMORY_H_OVERRIDE
2 | // Users can define their own header to use here, but there is no API
3 | // compatibility gaurantee for future changes.
4 | #include HX_MEMORY_H_OVERRIDE
5 |
6 | // Todo - special version?
7 | inline void HxFreeGCBlock(void *p) {
8 | HxFree(p);
9 | }
10 |
11 | #else
12 |
13 | #ifndef HX_MEMORY_H
14 | #define HX_MEMORY_H
15 |
16 | #include
17 |
18 | inline void *HxAlloc(size_t size) {
19 | return malloc(size);
20 | }
21 |
22 | inline void HxFree(void *p) {
23 | free(p);
24 | }
25 |
26 | void *HxAllocGCBlock(size_t size);
27 | void HxFreeGCBlock(void *p);
28 |
29 |
30 | #endif
31 |
32 | #endif
33 |
--------------------------------------------------------------------------------
/include/hx/OS.h:
--------------------------------------------------------------------------------
1 | #ifndef HX_OS_H
2 | #define HX_OS_H
3 |
4 | // OS FLAGS
5 | #if defined(_WIN32)
6 | # define NEKO_WINDOWS
7 | #endif
8 |
9 | #if defined(__APPLE__) || defined(__MACH__) || defined(macintosh)
10 | # define NEKO_MAC
11 | #endif
12 |
13 | #if defined(linux) || defined(__linux__)
14 | # define NEKO_LINUX
15 | #endif
16 |
17 | #if defined(__FreeBSD_kernel__)
18 | # define NEKO_GNUKBSD
19 | #endif
20 |
21 | #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
22 | # define NEKO_BSD
23 | #endif
24 |
25 | // COMPILER/PROCESSOR FLAGS
26 | #if defined(__GNUC__)
27 | # define NEKO_GCC
28 | #endif
29 |
30 | #if defined(_MSC_VER)
31 | # define NEKO_VCC
32 | #endif
33 |
34 | #if defined(__MINGW32__)
35 | # define NEKO_MINGW
36 | #endif
37 |
38 | #if defined(__i386__) || defined(_WIN32)
39 | # define NEKO_X86
40 | #endif
41 |
42 | #if defined(__ppc__)
43 | # define NEKO_PPC
44 | #endif
45 |
46 | #if defined(_64BITS)
47 | # define NEKO_64BITS
48 | #endif
49 |
50 | #if defined(NEKO_LINUX) || defined(NEKO_MAC) || defined(NEKO_BSD) || defined(NEKO_GNUKBSD)
51 | # define NEKO_POSIX
52 | #endif
53 |
54 | #if defined(NEKO_GCC)
55 | # define NEKO_THREADED
56 | # define NEKO_DIRECT_THREADED
57 | #endif
58 |
59 | #include
60 | #ifndef NEKO_VCC
61 | # include
62 | #endif
63 |
64 |
65 |
66 |
67 |
68 | #undef EXPORT
69 | #undef IMPORT
70 | #if defined(NEKO_VCC) || defined(NEKO_MINGW)
71 | # define INLINE __inline
72 | # define EXPORT __declspec( dllexport )
73 | # define IMPORT __declspec( dllimport )
74 | #elif defined (HX_LINUX)
75 | # define INLINE inline
76 | # define EXPORT __attribute__ ((visibility("default")))
77 | # define IMPORT
78 | #else
79 | # define INLINE inline
80 | # define EXPORT __attribute__ ((visibility("default")))
81 | # define IMPORT
82 | #endif
83 |
84 | #ifdef NEKO_POSIX
85 | # include
86 | # define POSIX_LABEL(name) name:
87 | # define HANDLE_EINTR(label) if( errno == EINTR ) goto label
88 | # define HANDLE_FINTR(f,label) if( ferror(f) && errno == EINTR ) goto label
89 | #else
90 | # define POSIX_LABEL(name)
91 | # define HANDLE_EINTR(label)
92 | # define HANDLE_FINTR(f,label)
93 | #endif
94 |
95 |
96 | #endif
97 |
--------------------------------------------------------------------------------
/include/hx/StdString.h:
--------------------------------------------------------------------------------
1 | #ifndef HX_STD_STRING_INCLUDEDED
2 | #define HX_STD_STRING_INCLUDEDED
3 |
4 | #include
5 |
6 | namespace hx
7 | {
8 | class StdString : public std::string
9 | {
10 | public:
11 | StdString() : std::string() { }
12 | StdString(const char *inPtr) : std::string(inPtr) { }
13 | StdString(const char *inPtr, int inLen) : std::string(inPtr, inLen) { }
14 | StdString(const std::string &inS) : std::string(inS) { }
15 | StdString(const StdString &inS) : std::string(inS) { }
16 |
17 | #if (HXCPP_API_LEVEL>1)
18 | StdString(const Dynamic &inS) : std::string(inS.mPtr ? inS.mPtr->toString().utf8_str() : "null") { }
19 | StdString(const String &inS) : std::string(inS.utf8_str()) { }
20 | String toString() const { return String(c_str(),size()).dup(); }
21 | String toString() { return String(c_str(),size()).dup(); }
22 | operator Dynamic() const { return const_cast(this)->toString(); }
23 | #endif
24 |
25 | inline const StdString &toStdString() const { return *this; }
26 |
27 | };
28 | }
29 |
30 | #endif
31 |
--------------------------------------------------------------------------------
/include/hx/StringAlloc.h:
--------------------------------------------------------------------------------
1 | #ifndef HX_STRING_ALLOC
2 | #define HX_STRING_ALLOC
3 |
4 | #include
5 | #include
6 |
7 | namespace hx
8 | {
9 |
10 | class IStringAlloc
11 | {
12 | public:
13 | virtual void *allocBytes(size_t inBytes) = 0;
14 |
15 | protected:
16 | ~IStringAlloc(){};
17 | };
18 |
19 | template
20 | class StringAlloc : public IStringAlloc
21 | {
22 | char buffer[STACK];
23 | size_t alloced;
24 | char *heap;
25 |
26 | public:
27 | inline StringAlloc() : alloced(0), heap(0) { }
28 | ~StringAlloc()
29 | {
30 | if (heap)
31 | free(heap);
32 | }
33 | void *allocBytes(size_t inBytes)
34 | {
35 | if (inBytes<=STACK)
36 | return buffer;
37 | if (inBytes>alloced)
38 | {
39 | alloced = inBytes;
40 | heap = (char *)realloc(heap, alloced);
41 | }
42 | return heap;
43 | }
44 | private:
45 | StringAlloc(const StringAlloc &);
46 | void operator=(const StringAlloc &);
47 | };
48 |
49 | typedef StringAlloc<100> strbuf;
50 |
51 | } // end namespace hx
52 |
53 | #endif
54 |
--------------------------------------------------------------------------------
/include/hx/Telemetry.h:
--------------------------------------------------------------------------------
1 | #ifndef HX_TELEMETRY_H
2 | #define HX_TELEMETRY_H
3 |
4 | #define HX_TELEMETRY_VERSION 1
5 |
6 | #include
7 | #include
8 |
9 | struct TelemetryFrame
10 | {
11 | // microseconds, always valid
12 | int gctime;
13 | int gcoverhead;
14 |
15 | // Valid only if profiler is enabled
16 | std::vector *samples;
17 | std::vector *names;
18 |
19 | // Valid only if allocations (and profiler) are enabled
20 | std::vector *allocation_data;
21 | std::vector *stacks;
22 | };
23 |
24 | // --- Telemetry -----------------------------------------------------------------
25 |
26 | int __hxcpp_hxt_start_telemetry(bool profiler, bool allocations);
27 | void __hxcpp_hxt_stash_telemetry();
28 | TelemetryFrame* __hxcpp_hxt_dump_telemetry(int thread_num);
29 | void __hxcpp_hxt_ignore_allocs(int delta);
30 |
31 | // expose these from GCInternal
32 | int __hxcpp_gc_reserved_bytes();
33 | int __hxcpp_gc_used_bytes();
34 |
35 | #endif
36 |
--------------------------------------------------------------------------------
/include/hx/TelemetryTracy.h:
--------------------------------------------------------------------------------
1 | #ifndef HX_TELEMETRY_TRACY_H
2 | #define HX_TELEMETRY_TRACY_H
3 |
4 | #ifndef HXCPP_TRACY
5 | #error "Error: HXCPP_TRACY must be defined."
6 | #endif
7 |
8 | #define TRACY_ENABLE
9 | #include
10 | #include "../../project/thirdparty/tracy-0.12.0/tracy/TracyC.h"
11 | #include "../../project/thirdparty/tracy-0.12.0/tracy/Tracy.hpp"
12 |
13 | #ifdef HXCPP_TRACY_MEMORY
14 | #ifdef HXCPP_GC_MOVING
15 | #error "Error: HXCPP_TRACY_MEMORY is not supported when HXCPP_GC_MOVING is active."
16 | #endif
17 | #ifdef HXCPP_GC_GENERATIONAL
18 | #error "Error: HXCPP_TRACY_MEMORY is not supported when HXCPP_GC_GENERATIONAL is active."
19 | #endif
20 | #endif
21 |
22 | #ifdef HXCPP_TRACY_INCLUDE_CALLSTACKS
23 | #define HXCPP_TRACY_ZONE(name) \
24 | ::hx::strbuf TracyConcat(_hx_tracy_str_buffer, TracyLine); \
25 | int TracyConcat(_hx_tracy_str_length, TracyLine); \
26 | const char *TracyConcat(_hx_tracy_str_buffer_ptr, TracyLine) = name.utf8_str(&TracyConcat(_hx_tracy_str_buffer, TracyLine), false, &TracyConcat(_hx_tracy_str_length, TracyLine)); \
27 | ::tracy::ScopedZone TracyConcat(_hx_tracy_scoped_zone,TracyLine)(_hx_stackframe.lineNumber, _hx_stackframe.position->fileName, strlen(_hx_stackframe.position->fileName), _hx_stackframe.position->fullName, strlen(_hx_stackframe.position->fullName), TracyConcat(_hx_tracy_str_buffer_ptr, TracyLine), TracyConcat(_hx_tracy_str_length, TracyLine), __hxcpp_tracy_get_zone_count());
28 | #else
29 | #define HXCPP_TRACY_ZONE(name) \
30 | ::hx::strbuf TracyConcat(_hx_tracy_str_buffer, TracyLine); \
31 | int TracyConcat(_hx_tracy_str_length, TracyLine); \
32 | const char *TracyConcat(_hx_tracy_str_buffer_ptr, TracyLine) = name.utf8_str(&TracyConcat(_hx_tracy_str_buffer, TracyLine), false, &TracyConcat(_hx_tracy_str_length, TracyLine)); \
33 | ::tracy::ScopedZone TracyConcat(_hx_tracy_scoped_zone,TracyLine)(_hx_stackframe.lineNumber, _hx_stackframe.position->fileName, strlen(_hx_stackframe.position->fileName), _hx_stackframe.position->fullName, strlen(_hx_stackframe.position->fullName), TracyConcat(_hx_tracy_str_buffer_ptr, TracyLine), TracyConcat(_hx_tracy_str_length, TracyLine), -1);
34 | #endif
35 |
36 | void __hxcpp_tracy_framemark();
37 | void __hxcpp_tracy_plot(::String name, ::Float val);
38 | void __hxcpp_tracy_plot_config(::String name, uint8_t format, bool step, bool fill, int color);
39 | void __hxcpp_tracy_message(::String msg, int color);
40 | void __hxcpp_tracy_message_app_info(::String info);
41 | void __hxcpp_tracy_set_thread_name_and_group(String name, int groupHint);
42 | int __hxcpp_tracy_get_zone_count();
43 |
44 | #endif
45 |
--------------------------------------------------------------------------------
/include/hx/Undefine.h:
--------------------------------------------------------------------------------
1 | #ifndef HX_UNDEFINE_H
2 | #define HX_UNDEFINE_H
3 |
4 | #undef TRUE
5 | #undef FALSE
6 | #undef BOOLEAN
7 | #undef ERROR
8 | #undef NO_ERROR
9 | #undef DELETE
10 | #undef OPTIONS
11 | #undef IN
12 | #undef OUT
13 | #undef ALTERNATE
14 | #undef OPTIONAL
15 | #undef DOUBLE_CLICK
16 | #undef DIFFERENCE
17 | #undef POINT
18 | #undef RECT
19 | #undef OVERFLOW
20 | #undef UNDERFLOW
21 | #undef DOMAIN
22 | #undef TRANSPARENT
23 | #undef CONST
24 | #undef CopyFile
25 | #undef COLOR_HIGHLIGHT
26 | #undef __valid
27 |
28 | #endif
29 |
--------------------------------------------------------------------------------
/include/hx/Unordered.h:
--------------------------------------------------------------------------------
1 | #ifndef HX_UNORDERED_INCLUDED
2 | #define HX_UNORDERED_INCLUDED
3 |
4 | #if (defined(_MSC_VER) && (_MSC_VER >= 1800)) || ( defined(__GNUC__) && defined(HXCPP_CPP11) )
5 | #include
6 | #include
7 |
8 | namespace hx
9 | {
10 |
11 | template
12 | struct UnorderedSet : public std::unordered_set { };
13 |
14 | template
15 | struct UnorderedMap : public std::unordered_map { };
16 |
17 | }
18 |
19 |
20 | #else
21 |
22 | #include
23 | #include