cpyte 4.2.3__tar.gz → 4.2.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cpyte-4.2.3/source/cpyte.egg-info → cpyte-4.2.5}/PKG-INFO +1 -1
- {cpyte-4.2.3 → cpyte-4.2.5}/source/cpyte/__init__.py +1 -1
- {cpyte-4.2.3 → cpyte-4.2.5}/source/cpyte/compiling.py +2 -1
- {cpyte-4.2.3 → cpyte-4.2.5}/source/cpyte/gc_runtime.c +13 -10
- {cpyte-4.2.3 → cpyte-4.2.5/source/cpyte.egg-info}/PKG-INFO +1 -1
- {cpyte-4.2.3 → cpyte-4.2.5}/MANIFEST.in +0 -0
- {cpyte-4.2.3 → cpyte-4.2.5}/pyproject.toml +0 -0
- {cpyte-4.2.3 → cpyte-4.2.5}/readme.md +0 -0
- {cpyte-4.2.3 → cpyte-4.2.5}/setup.cfg +0 -0
- {cpyte-4.2.3 → cpyte-4.2.5}/source/cpyte/__main__.py +0 -0
- {cpyte-4.2.3 → cpyte-4.2.5}/source/cpyte/_bignum_bc.py +0 -0
- {cpyte-4.2.3 → cpyte-4.2.5}/source/cpyte/_runtime_bc.py +0 -0
- {cpyte-4.2.3 → cpyte-4.2.5}/source/cpyte/astparse.py +0 -0
- {cpyte-4.2.3 → cpyte-4.2.5}/source/cpyte/bignum.c +0 -0
- {cpyte-4.2.3 → cpyte-4.2.5}/source/cpyte/bytecoding.py +0 -0
- {cpyte-4.2.3 → cpyte-4.2.5}/source/cpyte/clib.py +0 -0
- {cpyte-4.2.3 → cpyte-4.2.5}/source/cpyte/extension_hooks.py +0 -0
- {cpyte-4.2.3 → cpyte-4.2.5}/source/cpyte/formatter.py +0 -0
- {cpyte-4.2.3 → cpyte-4.2.5}/source/cpyte/generate_bc.py +0 -0
- {cpyte-4.2.3 → cpyte-4.2.5}/source/cpyte/lexar.py +0 -0
- {cpyte-4.2.3 → cpyte-4.2.5}/source/cpyte/linker.py +0 -0
- {cpyte-4.2.3 → cpyte-4.2.5}/source/cpyte/lsp_server.py +0 -0
- {cpyte-4.2.3 → cpyte-4.2.5}/source/cpyte/mainpie.py +0 -0
- {cpyte-4.2.3 → cpyte-4.2.5}/source/cpyte/optimizations.py +0 -0
- {cpyte-4.2.3 → cpyte-4.2.5}/source/cpyte/package_manifest.py +0 -0
- {cpyte-4.2.3 → cpyte-4.2.5}/source/cpyte/runtime.c +0 -0
- {cpyte-4.2.3 → cpyte-4.2.5}/source/cpyte/runtime_scorpion.c +0 -0
- {cpyte-4.2.3 → cpyte-4.2.5}/source/cpyte/sef.py +0 -0
- {cpyte-4.2.3 → cpyte-4.2.5}/source/cpyte/semantic_analasis.py +0 -0
- {cpyte-4.2.3 → cpyte-4.2.5}/source/cpyte/ugc.h +0 -0
- {cpyte-4.2.3 → cpyte-4.2.5}/source/cpyte/ui.py +0 -0
- {cpyte-4.2.3 → cpyte-4.2.5}/source/cpyte/update_check.py +0 -0
- {cpyte-4.2.3 → cpyte-4.2.5}/source/cpyte/winjit_patch.py +0 -0
- {cpyte-4.2.3 → cpyte-4.2.5}/source/cpyte/winjit_stubs.c +0 -0
- {cpyte-4.2.3 → cpyte-4.2.5}/source/cpyte.egg-info/SOURCES.txt +0 -0
- {cpyte-4.2.3 → cpyte-4.2.5}/source/cpyte.egg-info/dependency_links.txt +0 -0
- {cpyte-4.2.3 → cpyte-4.2.5}/source/cpyte.egg-info/entry_points.txt +0 -0
- {cpyte-4.2.3 → cpyte-4.2.5}/source/cpyte.egg-info/requires.txt +0 -0
- {cpyte-4.2.3 → cpyte-4.2.5}/source/cpyte.egg-info/top_level.txt +0 -0
- {cpyte-4.2.3 → cpyte-4.2.5}/test/test_bignum_jit.py +0 -0
- {cpyte-4.2.3 → cpyte-4.2.5}/test/test_fuzz_del_has.py +0 -0
|
@@ -463,12 +463,13 @@ def _find_llvm_cc():
|
|
|
463
463
|
return _llvm_cc_cache
|
|
464
464
|
import shutil
|
|
465
465
|
|
|
466
|
+
triple = host_target().triple
|
|
466
467
|
for name in ("clang", "cc", "gcc"):
|
|
467
468
|
exe = shutil.which(name)
|
|
468
469
|
if exe:
|
|
469
470
|
try:
|
|
470
471
|
r = subprocess.run(
|
|
471
|
-
[exe, "-S", "-emit-llvm", "-O0", "-o", "-", "-xc", "-"],
|
|
472
|
+
[exe, "-S", "-emit-llvm", "-O0", "-target", triple, "-o", "-", "-xc", "-"],
|
|
472
473
|
input="int __x = 0;",
|
|
473
474
|
capture_output=True,
|
|
474
475
|
text=True,
|
|
@@ -14,6 +14,9 @@
|
|
|
14
14
|
* License: BSD-2-Clause (ugc) + project license
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
+
#if !defined(_WIN32) && !defined(_GNU_SOURCE)
|
|
18
|
+
#define _GNU_SOURCE 1
|
|
19
|
+
#endif
|
|
17
20
|
#define UGC_IMPLEMENTATION
|
|
18
21
|
#define UGC_USE_TAGGED_POINTER 0
|
|
19
22
|
#include <stddef.h>
|
|
@@ -112,16 +115,19 @@ typedef struct {
|
|
|
112
115
|
|
|
113
116
|
/* Thread-local storage for TLAB.
|
|
114
117
|
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
*
|
|
118
|
+
* Native TLS (`__declspec(thread)` / `__thread`) is avoided on every POSIX
|
|
119
|
+
* platform: the JIT path compiles this file to LLVM IR and emits a native
|
|
120
|
+
* object via llvmlite's MCJIT, and the compiler lowers native TLS to a
|
|
121
|
+
* `thread_local` LLVM global, which RuntimeDyld refuses to allocate
|
|
122
|
+
* (`LLVM ERROR: allocation of TLS not implemented`; on macOS arm64 it would
|
|
123
|
+
* also require the TLVP relocation ARM64_RELOC_TLVP_LOAD_PAGEOFF12). We back
|
|
124
|
+
* the per-thread TLAB with a pthread key instead, so the emitted object is
|
|
125
|
+
* TLS-free and each thread still gets its own buffer. Windows keeps native
|
|
126
|
+
* TLS (no POSIX threads available). */
|
|
121
127
|
#ifdef _WIN32
|
|
122
128
|
__declspec(thread) static tlab_t tlab = {NULL, NULL, NULL};
|
|
123
129
|
# define TLAB_GET() (&tlab)
|
|
124
|
-
#
|
|
130
|
+
#else
|
|
125
131
|
static pthread_key_t tlab_key;
|
|
126
132
|
static pthread_once_t tlab_key_once = PTHREAD_ONCE_INIT;
|
|
127
133
|
static void tlab_key_create(void) { pthread_key_create(&tlab_key, NULL); }
|
|
@@ -135,9 +141,6 @@ static tlab_t* tlab_get(void) {
|
|
|
135
141
|
return tl;
|
|
136
142
|
}
|
|
137
143
|
# define TLAB_GET() tlab_get()
|
|
138
|
-
#else
|
|
139
|
-
static __thread tlab_t tlab = {NULL, NULL, NULL};
|
|
140
|
-
# define TLAB_GET() (&tlab)
|
|
141
144
|
#endif
|
|
142
145
|
|
|
143
146
|
static void* tlab_alloc(size_t size) {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|