重置上传,新增了多个标准库,开始 TransPyV 自举实验
This commit is contained in:
@@ -1,14 +1,53 @@
|
||||
import w32.win32console as w32cmd
|
||||
import viperstring as string
|
||||
import memhub
|
||||
import stdlib
|
||||
import stdio
|
||||
import hello
|
||||
import this
|
||||
import t, c
|
||||
|
||||
|
||||
pagecode: t.CDefine = 65001
|
||||
|
||||
def add(x: int, y: int): return x + y
|
||||
def minus(x: int, y: int): return x - y
|
||||
|
||||
@t.CExport
|
||||
def main() -> int:
|
||||
w32cmd.SetConsoleOutputCP(pagecode)
|
||||
w32cmd.SetConsoleCP(pagecode)
|
||||
print("你好,世界")
|
||||
this.this()
|
||||
return 0
|
||||
# this.this()
|
||||
hello.helloworld()
|
||||
|
||||
#p: bytes = stdlib.malloc(1024)
|
||||
#hub = memhub.MemSlab(p, 1024)
|
||||
#p1: bytes = hub.alloc(10)
|
||||
#p2: bytes = hub.alloc(10)
|
||||
#string.memset(p1, 0, 10)
|
||||
#string.memset(p2, 0, 10)
|
||||
#string.memcpy(p2, "11111111111111111\0", 13+5)
|
||||
#print(p1)
|
||||
#print(p2)
|
||||
#print(t.CUInt64T(p2) - t.CUInt64T(p1))
|
||||
|
||||
func_p: t.Callable[[int, int], int] = add
|
||||
print(func_p(66, 4))
|
||||
func_p = minus
|
||||
print(func_p(66, 6))
|
||||
|
||||
fp: t.Callable[[int, int], int] = t.CUInt64T(func_p)
|
||||
print(fp(67, 7))
|
||||
|
||||
#ppp: int = 1
|
||||
#while ppp:
|
||||
# ppp += 1
|
||||
#print(ppp)
|
||||
|
||||
#lower_est: t.CUInt64T = 0
|
||||
#lower_est -= 1
|
||||
#print(lower_est)
|
||||
|
||||
pass
|
||||
|
||||
return 0
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
{"stdio": "6f62fe05c5ea1ceb", "w32.win32base": "7e529fe7a078cfef", "win32base": "7e529fe7a078cfef", "this": "a7bc8c01684c0001", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "benchmark_main": "c1371d3dc6b676c2", "stdint": "f5522571bcce7bcb", "w32.win32file": "f6b51804a0ba8ff0", "win32file": "f6b51804a0ba8ff0", "w32.fileio": "0035c95a18d4f8e8", "fileio": "0035c95a18d4f8e8", "w32.win32memory": "72e2d5ccb7cedcf1", "win32memory": "72e2d5ccb7cedcf1", "w32.win32process": "067c78e9f121dce3", "win32process": "067c78e9f121dce3", "w32.win32sync": "06f53cc594b4ac6c", "win32sync": "06f53cc594b4ac6c", "w32.winsock2": "6446627d4f07a1b5", "winsock2": "6446627d4f07a1b5"}
|
||||
@@ -1 +0,0 @@
|
||||
{"w32.win32base": "7e529fe7a078cfef", "win32base": "7e529fe7a078cfef", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "stdint": "f5522571bcce7bcb", "benchmark_main": "f71cf01f35e2325a", "w32.win32file": "f6b51804a0ba8ff0", "win32file": "f6b51804a0ba8ff0", "w32.fileio": "203a3999d5300163", "fileio": "203a3999d5300163", "w32.win32memory": "72e2d5ccb7cedcf1", "win32memory": "72e2d5ccb7cedcf1", "w32.win32process": "067c78e9f121dce3", "win32process": "067c78e9f121dce3", "w32.win32sync": "06f53cc594b4ac6c", "win32sync": "06f53cc594b4ac6c"}
|
||||
@@ -1 +0,0 @@
|
||||
{"w32.win32base": "7e529fe7a078cfef", "win32base": "7e529fe7a078cfef", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "stdint": "f5522571bcce7bcb", "benchmark_main": "f71cf01f35e2325a", "w32.win32file": "f6b51804a0ba8ff0", "win32file": "f6b51804a0ba8ff0", "w32.fileio": "203a3999d5300163", "fileio": "203a3999d5300163", "w32.win32memory": "72e2d5ccb7cedcf1", "win32memory": "72e2d5ccb7cedcf1", "w32.win32process": "067c78e9f121dce3", "win32process": "067c78e9f121dce3", "w32.win32sync": "06f53cc594b4ac6c", "win32sync": "06f53cc594b4ac6c"}
|
||||
1
thistest/output/6166aecc7fa7ad65.deps.json
Normal file
1
thistest/output/6166aecc7fa7ad65.deps.json
Normal file
@@ -0,0 +1 @@
|
||||
{"atom": "271ea3decb810db2", "viperstring": "3624cfde3c5cb6cb", "hello": "6166aecc7fa7ad65", "stdio": "6f62fe05c5ea1ceb", "w32.win32base": "7e529fe7a078cfef", "win32base": "7e529fe7a078cfef", "benchmark_main": "8c37156d7b67c1f5", "stdlib": "90c53dd6db8d41cf", "string": "9474791561654346", "this": "a7bc8c01684c0001", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "viperio": "c9f4be41ca1cc2b4", "memhub": "f3560b99de458aec", "stdint": "f5522571bcce7bcb", "w32.win32file": "f6b51804a0ba8ff0", "win32file": "f6b51804a0ba8ff0", "w32.fileio": "0035c95a18d4f8e8", "fileio": "0035c95a18d4f8e8", "w32.win32memory": "72e2d5ccb7cedcf1", "win32memory": "72e2d5ccb7cedcf1", "w32.win32process": "067c78e9f121dce3", "win32process": "067c78e9f121dce3", "w32.win32sync": "06f53cc594b4ac6c", "win32sync": "06f53cc594b4ac6c", "w32.winsock2": "6446627d4f07a1b5", "winsock2": "6446627d4f07a1b5"}
|
||||
@@ -1 +0,0 @@
|
||||
{"stdio": "6f62fe05c5ea1ceb", "w32.win32base": "7e529fe7a078cfef", "win32base": "7e529fe7a078cfef", "this": "a7bc8c01684c0001", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "benchmark_main": "c1371d3dc6b676c2", "stdint": "f5522571bcce7bcb", "w32.win32file": "f6b51804a0ba8ff0", "win32file": "f6b51804a0ba8ff0", "w32.fileio": "0035c95a18d4f8e8", "fileio": "0035c95a18d4f8e8", "w32.win32memory": "72e2d5ccb7cedcf1", "win32memory": "72e2d5ccb7cedcf1", "w32.win32process": "067c78e9f121dce3", "win32process": "067c78e9f121dce3", "w32.win32sync": "06f53cc594b4ac6c", "win32sync": "06f53cc594b4ac6c", "w32.winsock2": "6446627d4f07a1b5", "winsock2": "6446627d4f07a1b5"}
|
||||
@@ -1 +0,0 @@
|
||||
{"w32.win32base": "7e529fe7a078cfef", "win32base": "7e529fe7a078cfef", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "stdint": "f5522571bcce7bcb", "benchmark_main": "f71cf01f35e2325a", "w32.win32file": "f6b51804a0ba8ff0", "win32file": "f6b51804a0ba8ff0", "w32.fileio": "203a3999d5300163", "fileio": "203a3999d5300163", "w32.win32memory": "72e2d5ccb7cedcf1", "win32memory": "72e2d5ccb7cedcf1", "w32.win32process": "067c78e9f121dce3", "win32process": "067c78e9f121dce3", "w32.win32sync": "06f53cc594b4ac6c", "win32sync": "06f53cc594b4ac6c"}
|
||||
@@ -1 +0,0 @@
|
||||
{"w32.win32base": "7e529fe7a078cfef", "win32base": "7e529fe7a078cfef", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "stdint": "f5522571bcce7bcb", "benchmark_main": "f71cf01f35e2325a", "w32.win32file": "f6b51804a0ba8ff0", "win32file": "f6b51804a0ba8ff0", "w32.fileio": "203a3999d5300163", "fileio": "203a3999d5300163", "w32.win32memory": "72e2d5ccb7cedcf1", "win32memory": "72e2d5ccb7cedcf1", "w32.win32process": "067c78e9f121dce3", "win32process": "067c78e9f121dce3", "w32.win32sync": "06f53cc594b4ac6c", "win32sync": "06f53cc594b4ac6c"}
|
||||
1
thistest/output/8c37156d7b67c1f5.deps.json
Normal file
1
thistest/output/8c37156d7b67c1f5.deps.json
Normal file
@@ -0,0 +1 @@
|
||||
{"atom": "271ea3decb810db2", "viperstring": "3624cfde3c5cb6cb", "hello": "6166aecc7fa7ad65", "stdio": "6f62fe05c5ea1ceb", "w32.win32base": "7e529fe7a078cfef", "win32base": "7e529fe7a078cfef", "stdlib": "90c53dd6db8d41cf", "string": "9474791561654346", "this": "a7bc8c01684c0001", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "viperio": "c9f4be41ca1cc2b4", "memhub": "f3560b99de458aec", "stdint": "f5522571bcce7bcb", "viperstring.string": "9474791561654346"}
|
||||
Binary file not shown.
@@ -1 +1 @@
|
||||
{"stdio": "6f62fe05c5ea1ceb", "w32.win32base": "7e529fe7a078cfef", "win32base": "7e529fe7a078cfef", "this": "a7bc8c01684c0001", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "benchmark_main": "c1371d3dc6b676c2", "stdint": "f5522571bcce7bcb", "w32.win32file": "f6b51804a0ba8ff0", "win32file": "f6b51804a0ba8ff0", "w32.fileio": "0035c95a18d4f8e8", "fileio": "0035c95a18d4f8e8", "w32.win32memory": "72e2d5ccb7cedcf1", "win32memory": "72e2d5ccb7cedcf1", "w32.win32process": "067c78e9f121dce3", "win32process": "067c78e9f121dce3", "w32.win32sync": "06f53cc594b4ac6c", "win32sync": "06f53cc594b4ac6c", "w32.winsock2": "6446627d4f07a1b5", "winsock2": "6446627d4f07a1b5"}
|
||||
{"atom": "271ea3decb810db2", "viperstring": "3624cfde3c5cb6cb", "hello": "6166aecc7fa7ad65", "stdio": "6f62fe05c5ea1ceb", "w32.win32base": "7e529fe7a078cfef", "win32base": "7e529fe7a078cfef", "benchmark_main": "8c37156d7b67c1f5", "stdlib": "90c53dd6db8d41cf", "string": "9474791561654346", "this": "a7bc8c01684c0001", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "viperio": "c9f4be41ca1cc2b4", "memhub": "f3560b99de458aec", "stdint": "f5522571bcce7bcb", "w32.win32file": "f6b51804a0ba8ff0", "win32file": "f6b51804a0ba8ff0", "w32.fileio": "0035c95a18d4f8e8", "fileio": "0035c95a18d4f8e8", "w32.win32memory": "72e2d5ccb7cedcf1", "win32memory": "72e2d5ccb7cedcf1", "w32.win32process": "067c78e9f121dce3", "win32process": "067c78e9f121dce3", "w32.win32sync": "06f53cc594b4ac6c", "win32sync": "06f53cc594b4ac6c", "w32.winsock2": "6446627d4f07a1b5", "winsock2": "6446627d4f07a1b5"}
|
||||
@@ -1 +0,0 @@
|
||||
{"w32.win32base": "7e529fe7a078cfef", "win32base": "7e529fe7a078cfef", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "stdint": "f5522571bcce7bcb", "benchmark_main": "f71cf01f35e2325a", "w32.win32file": "f6b51804a0ba8ff0", "win32file": "f6b51804a0ba8ff0", "w32.fileio": "203a3999d5300163", "fileio": "203a3999d5300163", "w32.win32memory": "72e2d5ccb7cedcf1", "win32memory": "72e2d5ccb7cedcf1", "w32.win32process": "067c78e9f121dce3", "win32process": "067c78e9f121dce3", "w32.win32sync": "06f53cc594b4ac6c", "win32sync": "06f53cc594b4ac6c"}
|
||||
@@ -1 +0,0 @@
|
||||
{"stdio": "6f62fe05c5ea1ceb", "w32.win32base": "7e529fe7a078cfef", "win32base": "7e529fe7a078cfef", "this": "a7bc8c01684c0001", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "stdint": "f5522571bcce7bcb"}
|
||||
@@ -1 +0,0 @@
|
||||
{"w32.win32base": "7e529fe7a078cfef", "win32base": "7e529fe7a078cfef", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "stdint": "f5522571bcce7bcb", "benchmark_main": "f71cf01f35e2325a", "w32.win32file": "f6b51804a0ba8ff0", "win32file": "f6b51804a0ba8ff0", "w32.fileio": "203a3999d5300163", "fileio": "203a3999d5300163", "w32.win32memory": "72e2d5ccb7cedcf1", "win32memory": "72e2d5ccb7cedcf1", "w32.win32process": "067c78e9f121dce3", "win32process": "067c78e9f121dce3", "w32.win32sync": "06f53cc594b4ac6c", "win32sync": "06f53cc594b4ac6c"}
|
||||
@@ -1,11 +0,0 @@
|
||||
"""
|
||||
Auto-generated Python stub file from this.py
|
||||
Module: this
|
||||
"""
|
||||
|
||||
|
||||
import stdio, t, c
|
||||
|
||||
s: t.CExtern | str
|
||||
|
||||
def this() -> t.CInt: pass
|
||||
@@ -1,80 +0,0 @@
|
||||
"""
|
||||
Auto-generated Python stub file from w32.fileio.py
|
||||
Module: w32.fileio
|
||||
"""
|
||||
|
||||
|
||||
import t, c
|
||||
from stdint import *
|
||||
import w32.win32base
|
||||
import w32.win32file
|
||||
|
||||
class MODE(t.CEnum):
|
||||
R = 0
|
||||
W = 1
|
||||
A = 2
|
||||
RP = 3
|
||||
WP = 4
|
||||
AP = 5
|
||||
X = 6
|
||||
XP = 7
|
||||
class FRESULT(t.CEnum):
|
||||
OK = 0
|
||||
ERR = -1
|
||||
ERR_CLOSED = -2
|
||||
ERR_PERM = -3
|
||||
ERR_IO = -4
|
||||
ERR_NOTFOUND = -5
|
||||
|
||||
SEEK_SET: t.CDefine = 0
|
||||
SEEK_CUR: t.CDefine = 1
|
||||
SEEK_END: t.CDefine = 2
|
||||
INVALID_SET_FILE_POINTER: t.CDefine = -1
|
||||
SHARE_READ: t.CDefine = 0x00000001
|
||||
SHARE_WRITE: t.CDefine = 0x00000002
|
||||
SHARE_DELETE: t.CDefine = 0x00000004
|
||||
|
||||
class File:
|
||||
handle: w32.win32base.HANDLE
|
||||
closed: bool
|
||||
can_read: bool
|
||||
can_write: bool
|
||||
is_append: bool
|
||||
_share_mode: ULONG
|
||||
def __init__(self: File, filename: str, mode: ULONG, share: ULONG) -> t.CInt: pass
|
||||
def __enter__(self: File) -> 'File' | t.CPtr: pass
|
||||
def __exit__(self: File) -> t.CInt: pass
|
||||
def read(self: File, buf: bytes, count: ULONG) -> LONG: pass
|
||||
def write(self: File, buf: bytes, count: ULONG) -> LONG: pass
|
||||
def write_str(self: File, s: str) -> LONG: pass
|
||||
def seek(self: File, offset: LONG, origin: ULONG) -> LONG: pass
|
||||
def tell(self: File) -> LONG: pass
|
||||
def close(self: File) -> LONG: pass
|
||||
def flush(self: File) -> LONG: pass
|
||||
def size(self: File) -> LONGLONG: pass
|
||||
def readline(self: File, buf: bytes, max_count: ULONG) -> LONG: pass
|
||||
def read_all(self: File, buf: bytes, max_count: ULONG) -> LONG: pass
|
||||
class FileW:
|
||||
handle: w32.win32base.HANDLE
|
||||
closed: bool
|
||||
can_read: bool
|
||||
can_write: bool
|
||||
is_append: bool
|
||||
_share_mode: ULONG
|
||||
def __init__(self: FileW, filename: w32.win32base.LPCWSTR, mode: ULONG, share: ULONG) -> t.CInt: pass
|
||||
def __enter__(self: FileW) -> 'FileW' | t.CPtr: pass
|
||||
def __exit__(self: FileW) -> t.CInt: pass
|
||||
def read(self: FileW, buf: bytes, count: ULONG) -> LONG: pass
|
||||
def write(self: FileW, buf: bytes, count: ULONG) -> LONG: pass
|
||||
def write_str(self: FileW, s: str) -> LONG: pass
|
||||
def seek(self: FileW, offset: LONG, origin: ULONG) -> LONG: pass
|
||||
def tell(self: FileW) -> LONG: pass
|
||||
def close(self: FileW) -> LONG: pass
|
||||
def flush(self: FileW) -> LONG: pass
|
||||
def size(self: FileW) -> LONGLONG: pass
|
||||
def readline(self: FileW, buf: bytes, max_count: ULONG) -> LONG: pass
|
||||
def read_all(self: FileW, buf: bytes, max_count: ULONG) -> LONG: pass
|
||||
|
||||
def open(filename: str, mode: ULONG, share: ULONG) -> File | t.CPtr: pass
|
||||
|
||||
def openw(filename: LPCWSTR, mode: ULONG, share: ULONG) -> FileW | t.CPtr: pass
|
||||
26
thistest/temp/271ea3decb810db2.pyi
Normal file
26
thistest/temp/271ea3decb810db2.pyi
Normal file
@@ -0,0 +1,26 @@
|
||||
"""
|
||||
Auto-generated Python stub file from atom.py
|
||||
Module: atom
|
||||
"""
|
||||
|
||||
|
||||
import t, c
|
||||
|
||||
ATOMIC_RELAXED: t.CDefine = 0
|
||||
ATOMIC_CONSUME: t.CDefine = 1
|
||||
ATOMIC_ACQUIRE: t.CDefine = 2
|
||||
ATOMIC_RELEASE: t.CDefine = 3
|
||||
ATOMIC_ACQ_REL: t.CDefine = 4
|
||||
ATOMIC_SEQ_CST: t.CDefine = 5
|
||||
|
||||
def __atomic_test_and_set(ptr: t.CUInt64T | t.CPtr, order: t.CInt) -> t.CBool: pass
|
||||
|
||||
def __atomic_clear(ptr: t.CUInt64T | t.CPtr, order: t.CInt) -> t.CVoid: pass
|
||||
|
||||
def __atomic_thread_fence(order: t.CInt) -> t.CVoid: pass
|
||||
|
||||
def __atomic_signal_fence(order: t.CInt) -> t.CVoid: pass
|
||||
|
||||
def __atomic_always_lock_free(size: t.CSizeT, ptr: t.CVoid | t.CPtr) -> t.CBool: pass
|
||||
|
||||
def __atomic_is_lock_free(size: t.CSizeT, ptr: t.CVoid | t.CPtr) -> t.CBool: pass
|
||||
@@ -1,11 +0,0 @@
|
||||
"""
|
||||
Auto-generated Python stub file from this.py
|
||||
Module: this
|
||||
"""
|
||||
|
||||
|
||||
import stdio, t, c
|
||||
|
||||
s: t.CExtern | str
|
||||
|
||||
def this() -> t.CInt: pass
|
||||
@@ -1,9 +0,0 @@
|
||||
"""
|
||||
Auto-generated Python stub file from this.py
|
||||
Module: this
|
||||
"""
|
||||
|
||||
|
||||
import stdio, t, c
|
||||
|
||||
def this() -> t.CInt: pass
|
||||
@@ -1,11 +0,0 @@
|
||||
"""
|
||||
Auto-generated Python stub file from this.py
|
||||
Module: this
|
||||
"""
|
||||
|
||||
|
||||
import stdio, t, c
|
||||
|
||||
s: t.CExtern | str
|
||||
|
||||
def this() -> t.CInt: pass
|
||||
10
thistest/temp/3624cfde3c5cb6cb.pyi
Normal file
10
thistest/temp/3624cfde3c5cb6cb.pyi
Normal file
@@ -0,0 +1,10 @@
|
||||
"""
|
||||
Auto-generated Python stub file from viperstring.py
|
||||
Module: viperstring
|
||||
"""
|
||||
|
||||
import t
|
||||
import c
|
||||
|
||||
|
||||
from .string import *
|
||||
12
thistest/temp/6166aecc7fa7ad65.pyi
Normal file
12
thistest/temp/6166aecc7fa7ad65.pyi
Normal file
@@ -0,0 +1,12 @@
|
||||
"""
|
||||
Auto-generated Python stub file from hello.py
|
||||
Module: hello
|
||||
"""
|
||||
|
||||
import t
|
||||
import c
|
||||
|
||||
|
||||
import stdio
|
||||
|
||||
def helloworld() -> t.CInt: pass
|
||||
@@ -1,11 +0,0 @@
|
||||
"""
|
||||
Auto-generated Python stub file from this.py
|
||||
Module: this
|
||||
"""
|
||||
|
||||
|
||||
import stdio, t, c
|
||||
|
||||
s: t.CExtern | str
|
||||
|
||||
def this() -> t.CInt: pass
|
||||
@@ -1,11 +0,0 @@
|
||||
"""
|
||||
Auto-generated Python stub file from this.py
|
||||
Module: this
|
||||
"""
|
||||
|
||||
|
||||
import stdio, t, c
|
||||
|
||||
s: t.CExtern | str
|
||||
|
||||
def this() -> t.CInt: pass
|
||||
@@ -1,11 +0,0 @@
|
||||
"""
|
||||
Auto-generated Python stub file from this.py
|
||||
Module: this
|
||||
"""
|
||||
|
||||
|
||||
import stdio, t, c
|
||||
|
||||
s: t.CExtern | str
|
||||
|
||||
def this() -> t.CInt: pass
|
||||
@@ -5,10 +5,19 @@ Module: benchmark_main
|
||||
|
||||
|
||||
import w32.win32console as w32cmd
|
||||
import viperstring as string
|
||||
import memhub
|
||||
import stdlib
|
||||
import stdio
|
||||
import hello
|
||||
import this
|
||||
import t, c
|
||||
|
||||
pagecode: t.CDefine = 65001
|
||||
|
||||
def add(x: int, y: int) -> t.CInt: pass
|
||||
|
||||
def minus(x: int, y: int) -> t.CInt: pass
|
||||
|
||||
@t.CExport
|
||||
def main() -> int: pass
|
||||
20
thistest/temp/90c53dd6db8d41cf.pyi
Normal file
20
thistest/temp/90c53dd6db8d41cf.pyi
Normal file
@@ -0,0 +1,20 @@
|
||||
"""
|
||||
Auto-generated Python stub file from stdlib.py
|
||||
Module: stdlib
|
||||
"""
|
||||
|
||||
import c
|
||||
|
||||
|
||||
from stdint import *
|
||||
import t
|
||||
|
||||
def malloc(size: t.CSizeT) -> t.CVoid | t.CPtr | t.State: pass
|
||||
|
||||
def calloc(nmemb: t.CSizeT, size: t.CSizeT) -> t.CVoid | t.CPtr | t.State: pass
|
||||
|
||||
def realloc(p: t.CVoid | t.CPtr, size: t.CSizeT) -> t.CVoid | t.CPtr | t.State: pass
|
||||
|
||||
def free(p: t.CVoid | t.CPtr) -> t.State: pass
|
||||
|
||||
def system(cmd: t.CConst | t.CChar | t.CPtr) -> INT | t.State: pass
|
||||
59
thistest/temp/9474791561654346.pyi
Normal file
59
thistest/temp/9474791561654346.pyi
Normal file
@@ -0,0 +1,59 @@
|
||||
"""
|
||||
Auto-generated Python stub file from string.py
|
||||
Module: string
|
||||
"""
|
||||
|
||||
|
||||
from stdint import *
|
||||
import t, c
|
||||
|
||||
def strcpy(dest: str, src: str) -> str: pass
|
||||
|
||||
def strcat(dest: str, src: str) -> str: pass
|
||||
|
||||
def strncpy(dest: str, src: str, n: t.CSizeT) -> str: pass
|
||||
|
||||
def strlen(src: str) -> t.CSizeT | t.CExport: pass
|
||||
|
||||
def strcmp(str1: str, str2: str) -> t.CInt: pass
|
||||
|
||||
def samestr(str1: str, str2: str) -> bool: pass
|
||||
|
||||
def strncmp(str1: str, str2: str, n: t.CSizeT) -> t.CInt: pass
|
||||
|
||||
def memcmp(ptr1: t.CVoid | t.CPtr, ptr2: t.CVoid | t.CPtr, n: t.CSizeT) -> t.CInt: pass
|
||||
|
||||
def strchr(s: str, cr: t.CInt) -> str: pass
|
||||
|
||||
def strrchr(s: str, cr: t.CInt) -> str: pass
|
||||
|
||||
def strstr(s: str, needle: str) -> str: pass
|
||||
|
||||
def strspn(s: str, skip: str) -> int: pass
|
||||
|
||||
def memset(ptr: t.CVoid | t.CPtr, value: t.CInt, num: t.CSizeT) -> t.CVoid | t.CPtr | t.CExport: pass
|
||||
|
||||
def memset32(ptr: t.CVoid | t.CPtr, value: t.CUInt32T, count: t.CSizeT) -> t.CVoid | t.CPtr: pass
|
||||
|
||||
def memcpy(dest: t.CVoid | t.CPtr, src: t.CVoid | t.CPtr, num: t.CSizeT) -> t.CVoid | t.CPtr | t.CExport: pass
|
||||
|
||||
def memmove(dest: t.CVoid | t.CPtr, src: t.CVoid | t.CPtr, num: t.CSizeT) -> t.CVoid | t.CPtr: pass
|
||||
|
||||
def atoi(src: str) -> t.CInt: pass
|
||||
|
||||
def atoll(src: str) -> t.CInt64T: pass
|
||||
|
||||
def atof(src: str) -> t.CDouble: pass
|
||||
|
||||
def split(s: str, delim: str, result: t.CArray[str]) -> int: pass
|
||||
|
||||
|
||||
ascii_lowercase: t.CExtern | str
|
||||
ascii_uppercase: t.CExtern | str
|
||||
ascii_letters: t.CExtern | str
|
||||
digits: t.CExtern | str
|
||||
hexdigits: t.CExtern | str
|
||||
octdigits: t.CExtern | str
|
||||
punctuation: t.CExtern | str
|
||||
whitespace: t.CExtern | str
|
||||
printable: t.CExtern | str
|
||||
@@ -1,11 +0,0 @@
|
||||
"""
|
||||
Auto-generated Python stub file from this.py
|
||||
Module: this
|
||||
"""
|
||||
|
||||
|
||||
import stdio, t, c
|
||||
|
||||
s: t.CExtern | str
|
||||
|
||||
def this() -> t.CInt: pass
|
||||
@@ -1,11 +0,0 @@
|
||||
"""
|
||||
Auto-generated Python stub file from this.py
|
||||
Module: this
|
||||
"""
|
||||
|
||||
|
||||
import stdio, t, c
|
||||
|
||||
s: t.CExtern | str
|
||||
|
||||
def this() -> t.CInt: pass
|
||||
@@ -1,11 +0,0 @@
|
||||
"""
|
||||
Auto-generated Python stub file from this.py
|
||||
Module: this
|
||||
"""
|
||||
|
||||
|
||||
import stdio, t, c
|
||||
|
||||
s: t.CExtern | str
|
||||
|
||||
def this() -> t.CInt: pass
|
||||
@@ -1 +1 @@
|
||||
{"D:\\Users\\TermiNexus\\Desktop\\TransPyC\\BenchmarkProject\\App\\benchmark_main.py": {"sha1": "f71cf01f35e2325a", "mtime": 1782991404.519475, "size": 233}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\stdint.py": {"sha1": "f5522571bcce7bcb", "mtime": 1782383975.8824987, "size": 4356}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\w32\\win32base.py": {"sha1": "7e529fe7a078cfef", "mtime": 1782488356.7736557, "size": 2662}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\w32\\win32console.py": {"sha1": "bbdf3bbd4c3bc28c", "mtime": 1781200703.5338137, "size": 5604}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\thistest\\App\\benchmark_main.py": {"sha1": "c1371d3dc6b676c2", "mtime": 1784107847.4885626, "size": 263}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\stdint.py": {"sha1": "f5522571bcce7bcb", "mtime": 1782383975.8824987, "size": 4356}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\w32\\win32base.py": {"sha1": "7e529fe7a078cfef", "mtime": 1782488356.7736557, "size": 2662}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\w32\\win32console.py": {"sha1": "bbdf3bbd4c3bc28c", "mtime": 1781200703.5338137, "size": 5604}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\stdio.py": {"sha1": "6f62fe05c5ea1ceb", "mtime": 1783239556.0959673, "size": 714}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\this.py": {"sha1": "a7bc8c01684c0001", "mtime": 1784109007.4091208, "size": 1345}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\thistest\\App\\benchmark_main.py": {"sha1": "c1371d3dc6b676c2", "mtime": 1784107847.4885626, "size": 263}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\stdio.py": {"sha1": "6f62fe05c5ea1ceb", "mtime": 1783239556.0959673, "size": 714}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\this.py": {"sha1": "a7bc8c01684c0001", "mtime": 1784109007.4091208, "size": 1345}}
|
||||
{"D:\\Users\\TermiNexus\\Desktop\\TransPyC\\thistest\\App\\benchmark_main.py": {"sha1": "8c37156d7b67c1f5", "mtime": 1784430860.3193777, "size": 1144}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\atom.py": {"sha1": "271ea3decb810db2", "mtime": 1782226548.693161, "size": 1290}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\hello.py": {"sha1": "6166aecc7fa7ad65", "mtime": 1784387694.4150121, "size": 72}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\memhub.py": {"sha1": "f3560b99de458aec", "mtime": 1784375410.1873891, "size": 19458}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\stdint.py": {"sha1": "f5522571bcce7bcb", "mtime": 1782383975.8824987, "size": 4356}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\stdio.py": {"sha1": "6f62fe05c5ea1ceb", "mtime": 1783239556.0959673, "size": 714}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\stdlib.py": {"sha1": "90c53dd6db8d41cf", "mtime": 1783874975.3597875, "size": 375}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\string.py": {"sha1": "9474791561654346", "mtime": 1784387475.6951904, "size": 10395}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\this.py": {"sha1": "a7bc8c01684c0001", "mtime": 1784109007.4091208, "size": 1345}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\viperio.py": {"sha1": "c9f4be41ca1cc2b4", "mtime": 1782812279.506002, "size": 1556}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\viperstring.py": {"sha1": "3624cfde3c5cb6cb", "mtime": 1778930749.052393, "size": 23}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\w32\\win32base.py": {"sha1": "7e529fe7a078cfef", "mtime": 1782488356.7736557, "size": 2662}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\w32\\win32console.py": {"sha1": "bbdf3bbd4c3bc28c", "mtime": 1781200703.5338137, "size": 5604}}
|
||||
@@ -1,6 +1,13 @@
|
||||
271ea3decb810db2:includes/atom.py
|
||||
3624cfde3c5cb6cb:includes/viperstring.py
|
||||
6166aecc7fa7ad65:includes/hello.py
|
||||
6f62fe05c5ea1ceb:includes/stdio.py
|
||||
7e529fe7a078cfef:includes/w32\win32base.py
|
||||
8c37156d7b67c1f5:benchmark_main.py
|
||||
90c53dd6db8d41cf:includes/stdlib.py
|
||||
9474791561654346:includes/string.py
|
||||
a7bc8c01684c0001:includes/this.py
|
||||
bbdf3bbd4c3bc28c:includes/w32\win32console.py
|
||||
c1371d3dc6b676c2:benchmark_main.py
|
||||
c9f4be41ca1cc2b4:includes/viperio.py
|
||||
f3560b99de458aec:includes/memhub.py
|
||||
f5522571bcce7bcb:includes/stdint.py
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
"""
|
||||
Auto-generated Python stub file from this.py
|
||||
Module: this
|
||||
"""
|
||||
|
||||
|
||||
import stdio, t, c
|
||||
|
||||
s: t.CExtern | str
|
||||
|
||||
def this() -> t.CInt: pass
|
||||
@@ -1,11 +0,0 @@
|
||||
"""
|
||||
Auto-generated Python stub file from this.py
|
||||
Module: this
|
||||
"""
|
||||
|
||||
|
||||
import stdio, t, c
|
||||
|
||||
s: t.CExtern | str
|
||||
|
||||
def this() -> t.CInt: pass
|
||||
@@ -1,11 +0,0 @@
|
||||
"""
|
||||
Auto-generated Python stub file from this.py
|
||||
Module: this
|
||||
"""
|
||||
|
||||
|
||||
import stdio, t, c
|
||||
|
||||
s: t.CExtern | str
|
||||
|
||||
def this() -> t.CInt: pass
|
||||
@@ -1 +0,0 @@
|
||||
{}
|
||||
@@ -1,14 +0,0 @@
|
||||
"""
|
||||
Auto-generated Python stub file from benchmark_main.py
|
||||
Module: benchmark_main
|
||||
"""
|
||||
|
||||
|
||||
import w32.win32console as w32cmd
|
||||
import this
|
||||
import t, c
|
||||
|
||||
pagecode: t.CDefine = 65001
|
||||
|
||||
@t.CExport
|
||||
def main() -> int: pass
|
||||
@@ -1,11 +0,0 @@
|
||||
"""
|
||||
Auto-generated Python stub file from this.py
|
||||
Module: this
|
||||
"""
|
||||
|
||||
|
||||
import stdio, t, c
|
||||
|
||||
s: t.CExtern | str
|
||||
|
||||
def this() -> t.CInt: pass
|
||||
22
thistest/temp/c9f4be41ca1cc2b4.pyi
Normal file
22
thistest/temp/c9f4be41ca1cc2b4.pyi
Normal file
@@ -0,0 +1,22 @@
|
||||
"""
|
||||
Auto-generated Python stub file from viperio.py
|
||||
Module: viperio
|
||||
"""
|
||||
|
||||
|
||||
import t, c
|
||||
from stdint import *
|
||||
|
||||
class Buf:
|
||||
data: t.CChar | t.CPtr
|
||||
length: t.CSizeT
|
||||
capacity: t.CSizeT
|
||||
owned: bool
|
||||
def __init__(self: Buf, data: t.CChar | t.CPtr, capacity: t.CSizeT, length: t.CSizeT, owned: bool) -> t.CInt: pass
|
||||
def clear(self: Buf) -> t.CInt: pass
|
||||
def write(self: Buf, src: t.CChar | t.CPtr, count: t.CSizeT) -> t.CSizeT: pass
|
||||
def cstr(self: Buf) -> t.CChar | t.CPtr: pass
|
||||
def reset(self: Buf) -> t.CInt: pass
|
||||
def __enter__(self: Buf) -> 'Buf' | t.CPtr: pass
|
||||
def __exit__(self: Buf) -> t.CInt: pass
|
||||
def free(self: Buf) -> t.CInt: pass
|
||||
@@ -1,11 +0,0 @@
|
||||
"""
|
||||
Auto-generated Python stub file from this.py
|
||||
Module: this
|
||||
"""
|
||||
|
||||
|
||||
import stdio, t, c
|
||||
|
||||
s: t.CExtern | str
|
||||
|
||||
def this() -> t.CInt: pass
|
||||
86
thistest/temp/f3560b99de458aec.pyi
Normal file
86
thistest/temp/f3560b99de458aec.pyi
Normal file
@@ -0,0 +1,86 @@
|
||||
"""
|
||||
Auto-generated Python stub file from memhub.py
|
||||
Module: memhub
|
||||
"""
|
||||
|
||||
|
||||
import t, c
|
||||
from stdint import *
|
||||
import string
|
||||
import atom
|
||||
import viperio
|
||||
|
||||
MEMHUB_ALIGN: t.CDefine = 8
|
||||
MEMSLAB_MIN_BLOCK: t.CDefine = 16
|
||||
MEMSLAB_BITMAP_BYTES: t.CDefine = 256
|
||||
MEMBUDDY_MIN_BLOCK: t.CDefine = 32
|
||||
MEMBUDDY_MAX_ORDERS: t.CDefine = 32
|
||||
MEMBUDDY_HEADER_SIZE: t.CDefine = 8
|
||||
|
||||
def _align_up(val: t.CSizeT, align: t.CSizeT) -> t.CSizeT: pass
|
||||
|
||||
def _largest_pow2_le(val: t.CSizeT) -> t.CSizeT: pass
|
||||
|
||||
def _block_size_at_order(order: t.CInt) -> t.CSizeT: pass
|
||||
|
||||
|
||||
@t.CVTable
|
||||
class MemManager:
|
||||
__provides__: list[str] = ['__memmgr__']
|
||||
base: t.CVoid | t.CPtr
|
||||
size: t.CSizeT
|
||||
def __init__(self: MemManager, base: t.CVoid | t.CPtr, size: t.CSizeT) -> t.CInt: pass
|
||||
def alloc(self: MemManager, size: t.CSizeT) -> t.CVoid | t.CPtr: pass
|
||||
def free(self: MemManager, ptr: t.CVoid | t.CPtr) -> t.CInt: pass
|
||||
def reset(self: MemManager) -> t.CInt: pass
|
||||
def calloc(self: MemManager, count: t.CSizeT, size: t.CSizeT) -> t.CVoid | t.CPtr: pass
|
||||
def realloc(self: MemManager, ptr: t.CVoid | t.CPtr, new_size: t.CSizeT) -> t.CVoid | t.CPtr: pass
|
||||
def __enter__(self: MemManager) -> 'MemManager' | t.CPtr: pass
|
||||
def __exit__(self: MemManager) -> t.CInt: pass
|
||||
def alloc_buf(self: MemManager, capacity: t.CSizeT) -> viperio.Buf | t.CPtr: pass
|
||||
class MemPool(MemManager):
|
||||
offset: t.CSizeT
|
||||
high_water: t.CSizeT
|
||||
def __init__(self: MemPool, base: t.CVoid | t.CPtr, size: t.CSizeT) -> t.CInt: pass
|
||||
def alloc(self: MemPool, size: t.CSizeT) -> t.CVoid | t.CPtr: pass
|
||||
def free(self: MemPool, ptr: t.CVoid | t.CPtr) -> t.CInt: pass
|
||||
def reset(self: MemPool) -> t.CInt: pass
|
||||
class MemSlab(MemManager):
|
||||
block_size: t.CSizeT
|
||||
block_count: t.CSizeT
|
||||
used_count: t.CSizeT
|
||||
free_list: t.CVoid | t.CPtr
|
||||
alloc_map: t.CUInt8T | t.CPtr
|
||||
alloc_map_size: t.CSizeT
|
||||
usable: t.CVoid | t.CPtr
|
||||
usable_size: t.CSizeT
|
||||
def __init__(self: MemSlab, base: t.CVoid | t.CPtr, size: t.CSizeT, block_size: t.CSizeT) -> t.CInt: pass
|
||||
def alloc(self: MemSlab, size: t.CSizeT) -> t.CVoid | t.CPtr: pass
|
||||
def free(self: MemSlab, ptr: t.CVoid | t.CPtr) -> t.CInt: pass
|
||||
def reset(self: MemSlab) -> t.CInt: pass
|
||||
class MemBuddy(MemManager):
|
||||
max_order: t.CInt
|
||||
free_lists: t.CUInt64T | t.CPtr
|
||||
lock_val: t.CVolatile | t.CInt
|
||||
usable: t.CVoid | t.CPtr
|
||||
usable_size: t.CSizeT
|
||||
def __init__(self: MemBuddy, base: t.CVoid | t.CPtr, size: t.CSizeT) -> t.CInt: pass
|
||||
def _fl_push(self: MemBuddy, order: t.CInt, block: t.CVoid | t.CPtr) -> t.CInt: pass
|
||||
def _fl_pop(self: MemBuddy, order: t.CInt) -> t.CVoid | t.CPtr: pass
|
||||
def _fl_find_and_remove(self: MemBuddy, order: t.CInt, target: t.CVoid | t.CPtr) -> t.CInt: pass
|
||||
def _buddy_of(self: MemBuddy, block: t.CVoid | t.CPtr, order: t.CInt) -> t.CVoid | t.CPtr: pass
|
||||
def _order_for_size(self: MemBuddy, size: t.CSizeT) -> t.CInt: pass
|
||||
def _split_to_order(self: MemBuddy, to_order: t.CInt) -> t.CVoid | t.CPtr: pass
|
||||
def _coalesce(self: MemBuddy, block: t.CVoid | t.CPtr, order: t.CInt) -> t.CInt: pass
|
||||
def _is_valid_ptr(self: MemBuddy, ptr: t.CVoid | t.CPtr) -> t.CInt: pass
|
||||
def _lock(self: MemBuddy) -> t.CInt: pass
|
||||
def _unlock(self: MemBuddy) -> t.CInt: pass
|
||||
def alloc(self: MemBuddy, size: t.CSizeT) -> t.CVoid | t.CPtr: pass
|
||||
def free(self: MemBuddy, ptr: t.CVoid | t.CPtr) -> t.CInt: pass
|
||||
def reset(self: MemBuddy) -> t.CInt: pass
|
||||
def realloc(self: MemBuddy, ptr: t.CVoid | t.CPtr, new_size: t.CSizeT) -> t.CVoid | t.CPtr: pass
|
||||
@property
|
||||
def mem_size(self: MemBuddy) -> t.CSizeT: pass
|
||||
def stats(self: MemBuddy) -> t.CSizeT: pass
|
||||
def free_count(self: MemBuddy) -> t.CSizeT: pass
|
||||
def self_check(self: MemBuddy) -> t.CInt: pass
|
||||
@@ -1,11 +0,0 @@
|
||||
"""
|
||||
Auto-generated Python stub file from this.py
|
||||
Module: this
|
||||
"""
|
||||
|
||||
|
||||
import stdio, t, c
|
||||
|
||||
s: t.CExtern | str
|
||||
|
||||
def this() -> t.CInt: pass
|
||||
@@ -1,11 +0,0 @@
|
||||
"""
|
||||
Auto-generated Python stub file from this.py
|
||||
Module: this
|
||||
"""
|
||||
|
||||
|
||||
import stdio, t, c
|
||||
|
||||
s: t.CExtern | str
|
||||
|
||||
def this() -> t.CInt: pass
|
||||
@@ -1 +0,0 @@
|
||||
{}
|
||||
@@ -1,13 +0,0 @@
|
||||
"""
|
||||
Auto-generated Python stub file from benchmark_main.py
|
||||
Module: benchmark_main
|
||||
"""
|
||||
|
||||
|
||||
import w32.win32console as w32cmd
|
||||
import t, c
|
||||
|
||||
pagecode: t.CDefine = 65001
|
||||
|
||||
@t.CExport
|
||||
def main() -> int: pass
|
||||
Reference in New Issue
Block a user