修复了关于 snprintf 的错误(不支持长度推导)
This commit is contained in:
1 parent
377b60fd67
commit
fcd4d8a438
10 files changed
+186
-308
No files matched your search
@@ -1,86 +0,0 @@
|
||||
"""
|
||||
Auto-generated Python stub file from w32.winsock2.vp
|
||||
Module: w32.winsock2
|
||||
"""
|
||||
|
||||
|
||||
import t, c
|
||||
from stdint import *
|
||||
from w32.win32base import *
|
||||
|
||||
WINSOCK_VERSION: t.CDefine = 0x0202 # 2.2
|
||||
AF_INET: t.CDefine = 2
|
||||
AF_INET6: t.CDefine = 23
|
||||
SOCK_STREAM: t.CDefine = 1 # TCP
|
||||
SOCK_DGRAM: t.CDefine = 2 # UDP
|
||||
SOCK_RAW: t.CDefine = 3 # 原始套接字
|
||||
IPPROTO_TCP: t.CDefine = 6
|
||||
IPPROTO_UDP: t.CDefine = 17
|
||||
SOL_SOCKET: t.CDefine = 0xFFFF # WinSock2 值
|
||||
SO_RCVTIMEO: t.CDefine = 0x1006 # WinSock2 值
|
||||
SO_SNDTIMEO: t.CDefine = 0x1005 # WinSock2 值
|
||||
SO_REUSEADDR: t.CDefine = 0x0004 # WinSock2 值
|
||||
INADDR_ANY: t.CDefine = 0
|
||||
SOCKET_ERROR: t.CDefine = -1
|
||||
INVALID_SOCKET: t.CDefine = 0xFFFFFFFF # WinSock2: ~0
|
||||
MSG_NOSIGNAL: t.CDefine = 0 # Windows 不支持,设为 0
|
||||
SD_SEND: t.CDefine = 1
|
||||
SD_RECV: t.CDefine = 0
|
||||
SD_BOTH: t.CDefine = 2
|
||||
|
||||
class WSASocketAddr:
|
||||
family: u16
|
||||
port: u16
|
||||
addr: u32
|
||||
zero: u64
|
||||
class WSAData:
|
||||
wVersion: WORD
|
||||
wHighVersion: WORD
|
||||
szDescription: BYTE
|
||||
szSystemStatus: BYTE
|
||||
iMaxSockets: u16
|
||||
iMaxUdpDg: u16
|
||||
lpVendorInfo: CHARPTR
|
||||
class WSAHostEnt:
|
||||
h_name: CHARPTR
|
||||
h_aliases: CHARPTR
|
||||
h_addrtype: SHORT
|
||||
h_length: SHORT
|
||||
h_addr_list: CHARPTR
|
||||
class WinTimeVal:
|
||||
tv_sec: LONG
|
||||
tv_usec: LONG
|
||||
|
||||
def WSAStartup(wVersionRequested: WORD, lpWSAData: WSAData | t.CPtr) -> INT | t.State: pass
|
||||
|
||||
def WSACleanup() -> INT | t.State: pass
|
||||
|
||||
def WSAGetLastError() -> INT | t.State: pass
|
||||
|
||||
def socket(family: INT, type: INT, protocol: INT) -> u64 | t.State: pass
|
||||
|
||||
def closesocket(s: u64) -> INT | t.State: pass
|
||||
|
||||
def connect(s: u64, name: WSASocketAddr | t.CPtr, namelen: INT) -> INT | t.State: pass
|
||||
|
||||
def send(s: u64, buf: t.CVoid | t.CPtr, len: INT, flags: INT) -> INT | t.State: pass
|
||||
|
||||
def recv(s: u64, buf: t.CVoid | t.CPtr, len: INT, flags: INT) -> INT | t.State: pass
|
||||
|
||||
def bind(s: u64, name: WSASocketAddr | t.CPtr, namelen: INT) -> INT | t.State: pass
|
||||
|
||||
def listen(s: u64, backlog: INT) -> INT | t.State: pass
|
||||
|
||||
def accept(s: u64, addr: WSASocketAddr | t.CPtr, addrlen: INT | t.CPtr) -> u64 | t.State: pass
|
||||
|
||||
def setsockopt(s: u64, level: INT, optname: INT, optval: t.CVoid | t.CPtr, optlen: INT) -> INT | t.State: pass
|
||||
|
||||
def shutdown(s: u64, how: INT) -> INT | t.State: pass
|
||||
|
||||
def gethostbyname(name: t.CChar | t.CConst | t.CPtr) -> WSAHostEnt | t.CPtr | t.State: pass
|
||||
|
||||
def ntohs(netshort: u16) -> u16 | t.State: pass
|
||||
|
||||
def htons(hostshort: u16) -> u16 | t.State: pass
|
||||
|
||||
def inet_addr(cp: t.CChar | t.CConst | t.CPtr) -> u32 | t.State: pass
|
||||
@@ -1,91 +0,0 @@
|
||||
"""
|
||||
Auto-generated Python stub file from w32.win32memory.vp
|
||||
Module: w32.win32memory
|
||||
"""
|
||||
|
||||
import c
|
||||
|
||||
|
||||
import t
|
||||
from stdint import *
|
||||
from w32.win32base import *
|
||||
|
||||
MEM_COMMIT: t.CDefine = 0x00001000
|
||||
MEM_RESERVE: t.CDefine = 0x00002000
|
||||
MEM_DECOMMIT: t.CDefine = 0x00004000
|
||||
MEM_RELEASE: t.CDefine = 0x00008000
|
||||
MEM_FREE: t.CDefine = 0x00010000
|
||||
MEM_RESET: t.CDefine = 0x00080000
|
||||
MEM_TOP_DOWN: t.CDefine = 0x00100000
|
||||
MEM_WRITE_WATCH: t.CDefine = 0x00200000
|
||||
MEM_PHYSICAL: t.CDefine = 0x00400000
|
||||
MEM_LARGE_PAGES: t.CDefine = 0x20000000
|
||||
PAGE_NOACCESS: t.CDefine = 0x01
|
||||
PAGE_READONLY: t.CDefine = 0x02
|
||||
PAGE_READWRITE: t.CDefine = 0x04
|
||||
PAGE_WRITECOPY: t.CDefine = 0x08
|
||||
PAGE_EXECUTE: t.CDefine = 0x10
|
||||
PAGE_EXECUTE_READ: t.CDefine = 0x20
|
||||
PAGE_EXECUTE_READWRITE: t.CDefine = 0x40
|
||||
PAGE_EXECUTE_WRITECOPY: t.CDefine = 0x80
|
||||
PAGE_GUARD: t.CDefine = 0x100
|
||||
PAGE_NOCACHE: t.CDefine = 0x200
|
||||
PAGE_WRITECOMBINE: t.CDefine = 0x400
|
||||
HEAP_NO_SERIALIZE: t.CDefine = 0x00000001
|
||||
HEAP_GROWABLE: t.CDefine = 0x00000002
|
||||
HEAP_GENERATE_EXCEPTIONS: t.CDefine = 0x00000004
|
||||
HEAP_ZERO_MEMORY: t.CDefine = 0x00000008
|
||||
HEAP_REALLOC_IN_PLACE_ONLY: t.CDefine = 0x00000010
|
||||
|
||||
class MEMORY_BASIC_INFORMATION:
|
||||
BaseAddress: VOIDPTR
|
||||
AllocationBase: VOIDPTR
|
||||
AllocationProtect: ULONG
|
||||
RegionSize: t.CSizeT
|
||||
State: ULONG
|
||||
Protect: ULONG
|
||||
Type: ULONG
|
||||
|
||||
def VirtualAlloc(lpAddress: VOIDPTR, dwSize: t.CSizeT, flAllocationType: ULONG, flProtect: ULONG) -> VOIDPTR | t.State: pass
|
||||
|
||||
def VirtualFree(lpAddress: VOIDPTR, dwSize: t.CSizeT, dwFreeType: ULONG) -> BOOL | t.State: pass
|
||||
|
||||
def VirtualProtect(lpAddress: VOIDPTR, dwSize: t.CSizeT, flNewProtect: ULONG, lpflOldProtect: ULONG | t.CPtr) -> BOOL | t.State: pass
|
||||
|
||||
def VirtualQuery(lpAddress: t.CConst | VOIDPTR, lpBuffer: MEMORY_BASIC_INFORMATION | t.CPtr, dwLength: t.CSizeT) -> t.CSizeT | t.State: pass
|
||||
|
||||
def VirtualLock(lpAddress: VOIDPTR, dwSize: t.CSizeT) -> BOOL | t.State: pass
|
||||
|
||||
def VirtualUnlock(lpAddress: VOIDPTR, dwSize: t.CSizeT) -> BOOL | t.State: pass
|
||||
|
||||
def GetProcessHeap() -> HANDLE | t.State: pass
|
||||
|
||||
def HeapCreate(flOptions: ULONG, dwInitialSize: t.CSizeT, dwMaximumSize: t.CSizeT) -> HANDLE | t.State: pass
|
||||
|
||||
def HeapDestroy(hHeap: HANDLE) -> BOOL | t.State: pass
|
||||
|
||||
def HeapAlloc(hHeap: HANDLE, dwFlags: ULONG, dwBytes: t.CSizeT) -> VOIDPTR | t.State: pass
|
||||
|
||||
def HeapReAlloc(hHeap: HANDLE, dwFlags: ULONG, lpMem: VOIDPTR, dwBytes: t.CSizeT) -> VOIDPTR | t.State: pass
|
||||
|
||||
def HeapFree(hHeap: HANDLE, dwFlags: ULONG, lpMem: VOIDPTR) -> BOOL | t.State: pass
|
||||
|
||||
def HeapSize(hHeap: HANDLE, dwFlags: ULONG, lpMem: t.CConst | VOIDPTR) -> t.CSizeT | t.State: pass
|
||||
|
||||
def HeapValidate(hHeap: HANDLE, dwFlags: ULONG, lpMem: t.CConst | VOIDPTR) -> BOOL | t.State: pass
|
||||
|
||||
def HeapCompact(hHeap: HANDLE, dwFlags: ULONG) -> t.CSizeT | t.State: pass
|
||||
|
||||
def GlobalAlloc(uFlags: UINT, dwBytes: t.CSizeT) -> VOIDPTR | t.State: pass
|
||||
|
||||
def GlobalFree(hMem: VOIDPTR) -> VOIDPTR | t.State: pass
|
||||
|
||||
def GlobalLock(hMem: VOIDPTR) -> VOIDPTR | t.State: pass
|
||||
|
||||
def GlobalUnlock(hMem: VOIDPTR) -> BOOL | t.State: pass
|
||||
|
||||
def GlobalSize(hMem: VOIDPTR) -> t.CSizeT | t.State: pass
|
||||
|
||||
def LocalAlloc(uFlags: UINT, dwBytes: t.CSizeT) -> VOIDPTR | t.State: pass
|
||||
|
||||
def LocalFree(hMem: VOIDPTR) -> VOIDPTR | t.State: pass
|
||||
@@ -1 +1 @@
|
||||
{"w32.win32process": "067c78e9f121dce3", "win32process": "067c78e9f121dce3", "w32.win32sync": "06f53cc594b4ac6c", "win32sync": "06f53cc594b4ac6c", "sys": "0c67644125bea0fd", "lib.core.Handles.HandlesImports": "0ccfde54972334b1", "HandlesImports": "0ccfde54972334b1", "hashlib.__sha1": "0df65b8ed15664b0", "__sha1": "0df65b8ed15664b0", "hashlib.__md5": "19f8024d10c828e8", "__md5": "19f8024d10c828e8", "llvmlite.__init__": "1d74d1d3a174c684", "__init__": "f3444ec56937284f", "llvmlite": "1d74d1d3a174c684", "json.__writer": "20cd49775c100a38", "__writer": "20cd49775c100a38", "ast.base": "22bc0df83b3f0e62", "base": "22bc0df83b3f0e62", "json.__parser": "240a9a4157959a9f", "__parser": "240a9a4157959a9f", "stdio": "285b6aa29a34754d", "posix": "28de517e3820658a", "lib.core.Handles.HandlesType": "2b30cc2ce96fa464", "HandlesType": "2b30cc2ce96fa464", "lib.core.Handles.HandlesAssign": "2b59175b77f1304e", "HandlesAssign": "2b59175b77f1304e", "hashtable": "2b77d783c41d21d1", "llvmlite.__types": "2d8debefda779c40", "__types": "2d8debefda779c40", "lib.core.Handles.HandlesAugAssign": "31e49accebfc8aac", "HandlesAugAssign": "31e49accebfc8aac", "lib.core.Handles.HandlesStruct": "371fa89e15d8c015", "HandlesStruct": "371fa89e15d8c015", "stdlib": "3aa6057398be5673", "ast.astaux": "4337fb260448bbe2", "astaux": "4337fb260448bbe2", "lib.core.Handles.HandlesFor": "456fb516ba3c5002", "HandlesFor": "456fb516ba3c5002", "lib.Projectrans.Utils": "4650533467115342", "Utils": "4650533467115342", "lib.core.Handles.HandlesMain": "4a7b57e6bd18f65e", "HandlesMain": "4a7b57e6bd18f65e", "lib.core.Handles.HandlesReturn": "4c644ade1f0d6d02", "HandlesReturn": "4c644ade1f0d6d02", "string": "4daf5ed3f8e421a1", "ast.match": "4dd6b3f1427d1cc5", "match": "4dd6b3f1427d1cc5", "lib.core.IncludesScanner": "4e052c29b4fe769c", "IncludesScanner": "4e052c29b4fe769c", "lib.core.Handles.HandlesAnnAssign": "53812752bc672fdb", "HandlesAnnAssign": "53812752bc672fdb", "lib.core.Phase1": "553972e4135f827e", "Phase1": "553972e4135f827e", "llvmlite.__builder": "5a1d8c48f1243746", "__builder": "5a1d8c48f1243746", "lib.core.Handles.HandlesTranslator": "62805d8ad3e9b5ba", "HandlesTranslator": "62805d8ad3e9b5ba", "lib.core.Handles.HandlesBase": "63a3d17e96a083ac", "HandlesBase": "63a3d17e96a083ac", "ast.stmts": "657e182b27c2a022", "stmts": "657e182b27c2a022", "llvmlite.__module": "692919c5a194ac8d", "__module": "692919c5a194ac8d", "llvmlite.__verify": "6b3bc463fd044545", "__verify": "6b3bc463fd044545", "json.__init__": "6ddf430432a0e373", "json": "6ddf430432a0e373", "hashlib.__sha512": "6ff26590374ae6fc", "__sha512": "6ff26590374ae6fc", "stdarg": "71e0a3ffcb3ebfad", "w32.fileio": "72dbbb563aa943b0", "fileio": "72dbbb563aa943b0", "lib.core.Handles.HandlesExpr": "787e3cfd2e1cf583", "HandlesExpr": "787e3cfd2e1cf583", "_list": "7cadfe07e983fd90", "lib.core.Handles.HandlesExprCall": "82ee4327adfe0c18", "HandlesExprCall": "82ee4327adfe0c18", "llvmlite.__function": "874bac141c97bae9", "__function": "874bac141c97bae9", "lib.core.Handles.HandlesWhile": "8dc65d4c71e2936a", "HandlesWhile": "8dc65d4c71e2936a", "hashlib.__init__": "96837bcc64032444", "hashlib": "96837bcc64032444", "lib.core.StubMerger": "a26c73d7332b54b4", "StubMerger": "a26c73d7332b54b4", "subprocess": "a335eb99f2e34479", "lib.core.BuildPipeline": "a38b726f4a82545f", "BuildPipeline": "a38b726f4a82545f", "linkedlist": "a5e9a83e9db303ad", "atom": "aa246c6e6aa30484", "lib.core.Phase2": "aa34a7a33a3afab0", "Phase2": "aa34a7a33a3afab0", "lib.core.Handles.HandlesClassDef": "aa45364399b86a03", "HandlesClassDef": "aa45364399b86a03", "lib.core.Handles.HandlesNonlocal": "af9484a65085bf4b", "HandlesNonlocal": "af9484a65085bf4b", "argparse": "b370d93b74bf55cc", "ast.exprs": "b543bc1dfb592119", "exprs": "b543bc1dfb592119", "ast.tokens": "b547ac4f380bddb6", "tokens": "b547ac4f380bddb6", "platmacro": "b57252077e6b596b", "lib.core.Handles.HandlesFunctions": "b8a6e05318020e54", "HandlesFunctions": "b8a6e05318020e54", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "lib.core.VLogger": "bdf5730851fb95f2", "VLogger": "bdf5730851fb95f2", "lib.core.Handles.HandlesExprOps": "be8c2d7b882881c8", "HandlesExprOps": "be8c2d7b882881c8", "lib.Projectrans.Config": "c0042adc0b7ec5df", "Config": "c0042adc0b7ec5df", "lib.__init__": "c2a4277744568003", "lib": "c2a4277744568003", "hashlib.__sha256": "c9d54a4158f7f5a8", "__sha256": "c9d54a4158f7f5a8", "viperio": "c9f4be41ca1cc2b4", "memhub": "ca40915f11b8b6ad", "lib.core.Handles.HandlesVar": "cb1aa3a78af6f362", "HandlesVar": "cb1aa3a78af6f362", "lib.StubGen.Converter": "cba5876ccb277f42", "Converter": "cba5876ccb277f42", "ast.lexer": "e217def267d3d4a8", "lexer": "e217def267d3d4a8", "viperlib": "e307a2d809cef071", "lib.core.Handles.HandlesEnum": "f05b14a2ad5767a7", "HandlesEnum": "f05b14a2ad5767a7", "main": "f30a3b2d5f6bf092", "ast.__init__": "f3444ec56937284f", "ast": "f3444ec56937284f", "lib.core.Handles.HandlesIf": "f4cdbca2f8802c12", "HandlesIf": "f4cdbca2f8802c12", "stdint": Line truncated
|
||||
{"w32.win32process": "067c78e9f121dce3", "win32process": "067c78e9f121dce3", "w32.win32sync": "06f53cc594b4ac6c", "win32sync": "06f53cc594b4ac6c", "sys": "0c67644125bea0fd", "lib.core.Handles.HandlesAnnAssign": "0cc3dc5a1bb0c805", "HandlesAnnAssign": "0cc3dc5a1bb0c805", "hashlib.__sha1": "0df65b8ed15664b0", "__sha1": "0df65b8ed15664b0", "hashlib.__md5": "19f8024d10c828e8", "__md5": "19f8024d10c828e8", "llvmlite.__init__": "1d74d1d3a174c684", "__init__": "f3444ec56937284f", "llvmlite": "1d74d1d3a174c684", "json.__writer": "20cd49775c100a38", "__writer": "20cd49775c100a38", "ast.base": "22bc0df83b3f0e62", "base": "22bc0df83b3f0e62", "json.__parser": "240a9a4157959a9f", "__parser": "240a9a4157959a9f", "stdio": "285b6aa29a34754d", "posix": "28de517e3820658a", "hashtable": "2b77d783c41d21d1", "llvmlite.__types": "2d8debefda779c40", "__types": "2d8debefda779c40", "lib.core.BuildPipeline": "343b406cabc82fe9", "BuildPipeline": "343b406cabc82fe9", "stdlib": "3aa6057398be5673", "viperlib": "3ed8c578036234a7", "ast.astaux": "4337fb260448bbe2", "astaux": "4337fb260448bbe2", "lib.core.Handles.HandlesFor": "456fb516ba3c5002", "HandlesFor": "456fb516ba3c5002", "lib.Projectrans.Utils": "4650533467115342", "Utils": "4650533467115342", "lib.core.Handles.HandlesMain": "4a7b57e6bd18f65e", "HandlesMain": "4a7b57e6bd18f65e", "lib.core.Handles.HandlesReturn": "4c644ade1f0d6d02", "HandlesReturn": "4c644ade1f0d6d02", "ast.match": "4dd6b3f1427d1cc5", "match": "4dd6b3f1427d1cc5", "lib.core.IncludesScanner": "55be14b41dd7ca15", "IncludesScanner": "55be14b41dd7ca15", "llvmlite.__builder": "5a1d8c48f1243746", "__builder": "5a1d8c48f1243746", "lib.core.Handles.HandlesAssign": "611a2ade7450d2ea", "HandlesAssign": "611a2ade7450d2ea", "lib.core.Handles.HandlesTranslator": "62805d8ad3e9b5ba", "HandlesTranslator": "62805d8ad3e9b5ba", "lib.core.Handles.HandlesBase": "63a3d17e96a083ac", "HandlesBase": "63a3d17e96a083ac", "ast.stmts": "657e182b27c2a022", "stmts": "657e182b27c2a022", "llvmlite.__module": "692919c5a194ac8d", "__module": "692919c5a194ac8d", "llvmlite.__verify": "6b3bc463fd044545", "__verify": "6b3bc463fd044545", "json.__init__": "6ddf430432a0e373", "json": "6ddf430432a0e373", "hashlib.__sha512": "6ff26590374ae6fc", "__sha512": "6ff26590374ae6fc", "stdarg": "71e0a3ffcb3ebfad", "w32.fileio": "72dbbb563aa943b0", "fileio": "72dbbb563aa943b0", "_list": "7cadfe07e983fd90", "lib.core.Handles.HandlesClassDef": "7cb3f5b12941ce89", "HandlesClassDef": "7cb3f5b12941ce89", "lib.core.Phase1": "7feaa478b74c4e3e", "Phase1": "7feaa478b74c4e3e", "llvmlite.__function": "874bac141c97bae9", "__function": "874bac141c97bae9", "lib.core.Handles.HandlesWhile": "8dc65d4c71e2936a", "HandlesWhile": "8dc65d4c71e2936a", "lib.core.Phase2": "8de6943bee5d0f32", "Phase2": "8de6943bee5d0f32", "hashlib.__init__": "96837bcc64032444", "hashlib": "96837bcc64032444", "lib.core.Handles.HandlesExpr": "9b1f7f05ff99d863", "HandlesExpr": "9b1f7f05ff99d863", "subprocess": "a335eb99f2e34479", "linkedlist": "a5e9a83e9db303ad", "lib.core.Handles.HandlesType": "a6e43e1ab6aa79b7", "HandlesType": "a6e43e1ab6aa79b7", "atom": "aa246c6e6aa30484", "lib.core.Handles.HandlesNonlocal": "af9484a65085bf4b", "HandlesNonlocal": "af9484a65085bf4b", "argparse": "b370d93b74bf55cc", "ast.exprs": "b543bc1dfb592119", "exprs": "b543bc1dfb592119", "ast.tokens": "b547ac4f380bddb6", "tokens": "b547ac4f380bddb6", "platmacro": "b57252077e6b596b", "lib.core.Handles.HandlesFunctions": "b8a6e05318020e54", "HandlesFunctions": "b8a6e05318020e54", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "lib.core.VLogger": "bdf5730851fb95f2", "VLogger": "bdf5730851fb95f2", "lib.core.Handles.HandlesExprOps": "be8c2d7b882881c8", "HandlesExprOps": "be8c2d7b882881c8", "lib.Projectrans.Config": "c0042adc0b7ec5df", "Config": "c0042adc0b7ec5df", "lib.__init__": "c2a4277744568003", "lib": "c2a4277744568003", "lib.core.Handles.HandlesImports": "c34e22cc668c6a6e", "HandlesImports": "c34e22cc668c6a6e", "hashlib.__sha256": "c9d54a4158f7f5a8", "__sha256": "c9d54a4158f7f5a8", "viperio": "c9f4be41ca1cc2b4", "memhub": "ca40915f11b8b6ad", "lib.core.Handles.HandlesVar": "cb1aa3a78af6f362", "HandlesVar": "cb1aa3a78af6f362", "lib.StubGen.Converter": "cba5876ccb277f42", "Converter": "cba5876ccb277f42", "lib.core.Handles.HandlesExprCall": "cf3556225b0a3c8c", "HandlesExprCall": "cf3556225b0a3c8c", "lib.core.Handles.HandlesAugAssign": "d9dd5fce03a20af1", "HandlesAugAssign": "d9dd5fce03a20af1", "ast.lexer": "e217def267d3d4a8", "lexer": "e217def267d3d4a8", "lib.core.StubMerger": "ead693cb29a9c343", "StubMerger": "ead693cb29a9c343", "lib.core.Handles.HandlesEnum": "f05b14a2ad5767a7", "HandlesEnum": "f05b14a2ad5767a7", "lib.core.Handles.HandlesStruct": "f09b2f4a0f9d053e", "HandlesStruct": "f09b2f4a0f9d053e", "main": "f30a3b2d5f6bf092", "ast.__init__": "f3444ec56937284f", "ast": "f3444ec56937284f", "lib.core.Handles.HandlesIf": "f4cdbca2f8802c12", "HandlesIf": "f4cdbca2f8802c12", "stdint": "f5522571bcce7bcb", "w32.win32Line truncated
|
||||
@@ -1 +1 @@
|
||||
{"w32.win32process": "067c78e9f121dce3", "win32process": "067c78e9f121dce3", "w32.win32sync": "06f53cc594b4ac6c", "win32sync": "06f53cc594b4ac6c", "sys": "0c67644125bea0fd", "lib.core.Handles.HandlesImports": "0ccfde54972334b1", "HandlesImports": "0ccfde54972334b1", "hashlib.__sha1": "0df65b8ed15664b0", "__sha1": "0df65b8ed15664b0", "hashlib.__md5": "19f8024d10c828e8", "__md5": "19f8024d10c828e8", "llvmlite.__init__": "1d74d1d3a174c684", "__init__": "f3444ec56937284f", "llvmlite": "1d74d1d3a174c684", "json.__writer": "20cd49775c100a38", "__writer": "20cd49775c100a38", "ast.base": "22bc0df83b3f0e62", "base": "22bc0df83b3f0e62", "json.__parser": "240a9a4157959a9f", "__parser": "240a9a4157959a9f", "stdio": "285b6aa29a34754d", "posix": "28de517e3820658a", "lib.core.Handles.HandlesType": "2b30cc2ce96fa464", "HandlesType": "2b30cc2ce96fa464", "lib.core.Handles.HandlesAssign": "2b59175b77f1304e", "HandlesAssign": "2b59175b77f1304e", "hashtable": "2b77d783c41d21d1", "llvmlite.__types": "2d8debefda779c40", "__types": "2d8debefda779c40", "lib.core.Handles.HandlesAugAssign": "31e49accebfc8aac", "HandlesAugAssign": "31e49accebfc8aac", "lib.core.Handles.HandlesStruct": "371fa89e15d8c015", "HandlesStruct": "371fa89e15d8c015", "stdlib": "3aa6057398be5673", "ast.astaux": "4337fb260448bbe2", "astaux": "4337fb260448bbe2", "lib.core.Handles.HandlesFor": "456fb516ba3c5002", "HandlesFor": "456fb516ba3c5002", "lib.Projectrans.Utils": "4650533467115342", "Utils": "4650533467115342", "lib.core.Handles.HandlesMain": "4a7b57e6bd18f65e", "HandlesMain": "4a7b57e6bd18f65e", "lib.core.Handles.HandlesReturn": "4c644ade1f0d6d02", "HandlesReturn": "4c644ade1f0d6d02", "string": "4daf5ed3f8e421a1", "ast.match": "4dd6b3f1427d1cc5", "match": "4dd6b3f1427d1cc5", "lib.core.IncludesScanner": "4e052c29b4fe769c", "IncludesScanner": "4e052c29b4fe769c", "lib.core.Handles.HandlesAnnAssign": "53812752bc672fdb", "HandlesAnnAssign": "53812752bc672fdb", "lib.core.Phase1": "553972e4135f827e", "Phase1": "553972e4135f827e", "llvmlite.__builder": "5a1d8c48f1243746", "__builder": "5a1d8c48f1243746", "lib.core.Handles.HandlesTranslator": "62805d8ad3e9b5ba", "HandlesTranslator": "62805d8ad3e9b5ba", "lib.core.Handles.HandlesBase": "63a3d17e96a083ac", "HandlesBase": "63a3d17e96a083ac", "ast.stmts": "657e182b27c2a022", "stmts": "657e182b27c2a022", "llvmlite.__module": "692919c5a194ac8d", "__module": "692919c5a194ac8d", "llvmlite.__verify": "6b3bc463fd044545", "__verify": "6b3bc463fd044545", "json.__init__": "6ddf430432a0e373", "json": "6ddf430432a0e373", "hashlib.__sha512": "6ff26590374ae6fc", "__sha512": "6ff26590374ae6fc", "stdarg": "71e0a3ffcb3ebfad", "w32.fileio": "72dbbb563aa943b0", "fileio": "72dbbb563aa943b0", "lib.core.Handles.HandlesExpr": "787e3cfd2e1cf583", "HandlesExpr": "787e3cfd2e1cf583", "_list": "7cadfe07e983fd90", "lib.core.Handles.HandlesBody": "81eb28ba912467a6", "HandlesBody": "81eb28ba912467a6", "lib.core.Handles.HandlesExprCall": "82ee4327adfe0c18", "HandlesExprCall": "82ee4327adfe0c18", "llvmlite.__function": "874bac141c97bae9", "__function": "874bac141c97bae9", "lib.core.Handles.HandlesWhile": "8dc65d4c71e2936a", "HandlesWhile": "8dc65d4c71e2936a", "hashlib.__init__": "96837bcc64032444", "hashlib": "96837bcc64032444", "lib.core.StubMerger": "a26c73d7332b54b4", "StubMerger": "a26c73d7332b54b4", "subprocess": "a335eb99f2e34479", "lib.core.BuildPipeline": "a38b726f4a82545f", "BuildPipeline": "a38b726f4a82545f", "linkedlist": "a5e9a83e9db303ad", "atom": "aa246c6e6aa30484", "lib.core.Phase2": "aa34a7a33a3afab0", "Phase2": "aa34a7a33a3afab0", "lib.core.Handles.HandlesClassDef": "aa45364399b86a03", "HandlesClassDef": "aa45364399b86a03", "argparse": "b370d93b74bf55cc", "ast.exprs": "b543bc1dfb592119", "exprs": "b543bc1dfb592119", "ast.tokens": "b547ac4f380bddb6", "tokens": "b547ac4f380bddb6", "platmacro": "b57252077e6b596b", "lib.core.Handles.HandlesFunctions": "b8a6e05318020e54", "HandlesFunctions": "b8a6e05318020e54", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "lib.core.VLogger": "bdf5730851fb95f2", "VLogger": "bdf5730851fb95f2", "lib.core.Handles.HandlesExprOps": "be8c2d7b882881c8", "HandlesExprOps": "be8c2d7b882881c8", "lib.Projectrans.Config": "c0042adc0b7ec5df", "Config": "c0042adc0b7ec5df", "lib.__init__": "c2a4277744568003", "lib": "c2a4277744568003", "hashlib.__sha256": "c9d54a4158f7f5a8", "__sha256": "c9d54a4158f7f5a8", "viperio": "c9f4be41ca1cc2b4", "memhub": "ca40915f11b8b6ad", "lib.core.Handles.HandlesVar": "cb1aa3a78af6f362", "HandlesVar": "cb1aa3a78af6f362", "lib.StubGen.Converter": "cba5876ccb277f42", "Converter": "cba5876ccb277f42", "ast.lexer": "e217def267d3d4a8", "lexer": "e217def267d3d4a8", "viperlib": "e307a2d809cef071", "lib.core.Handles.HandlesEnum": "f05b14a2ad5767a7", "HandlesEnum": "f05b14a2ad5767a7", "main": "f30a3b2d5f6bf092", "ast.__init__": "f3444ec56937284f", "ast": "f3444ec56937284f", "lib.core.Handles.HandlesIf": "f4cdbca2f8802c12", "HandlesIf": "f4cdbca2f8802c12", "stdint": "f552257Line truncated
|
||||
{"w32.win32process": "067c78e9f121dce3", "win32process": "067c78e9f121dce3", "w32.win32sync": "06f53cc594b4ac6c", "win32sync": "06f53cc594b4ac6c", "sys": "0c67644125bea0fd", "lib.core.Handles.HandlesAnnAssign": "0cc3dc5a1bb0c805", "HandlesAnnAssign": "0cc3dc5a1bb0c805", "hashlib.__sha1": "0df65b8ed15664b0", "__sha1": "0df65b8ed15664b0", "hashlib.__md5": "19f8024d10c828e8", "__md5": "19f8024d10c828e8", "llvmlite.__init__": "1d74d1d3a174c684", "__init__": "f3444ec56937284f", "llvmlite": "1d74d1d3a174c684", "json.__writer": "20cd49775c100a38", "__writer": "20cd49775c100a38", "ast.base": "22bc0df83b3f0e62", "base": "22bc0df83b3f0e62", "json.__parser": "240a9a4157959a9f", "__parser": "240a9a4157959a9f", "stdio": "285b6aa29a34754d", "posix": "28de517e3820658a", "hashtable": "2b77d783c41d21d1", "llvmlite.__types": "2d8debefda779c40", "__types": "2d8debefda779c40", "lib.core.BuildPipeline": "343b406cabc82fe9", "BuildPipeline": "343b406cabc82fe9", "stdlib": "3aa6057398be5673", "viperlib": "3ed8c578036234a7", "ast.astaux": "4337fb260448bbe2", "astaux": "4337fb260448bbe2", "lib.core.Handles.HandlesFor": "456fb516ba3c5002", "HandlesFor": "456fb516ba3c5002", "lib.Projectrans.Utils": "4650533467115342", "Utils": "4650533467115342", "lib.core.Handles.HandlesMain": "4a7b57e6bd18f65e", "HandlesMain": "4a7b57e6bd18f65e", "lib.core.Handles.HandlesReturn": "4c644ade1f0d6d02", "HandlesReturn": "4c644ade1f0d6d02", "ast.match": "4dd6b3f1427d1cc5", "match": "4dd6b3f1427d1cc5", "lib.core.IncludesScanner": "55be14b41dd7ca15", "IncludesScanner": "55be14b41dd7ca15", "llvmlite.__builder": "5a1d8c48f1243746", "__builder": "5a1d8c48f1243746", "lib.core.Handles.HandlesAssign": "611a2ade7450d2ea", "HandlesAssign": "611a2ade7450d2ea", "lib.core.Handles.HandlesTranslator": "62805d8ad3e9b5ba", "HandlesTranslator": "62805d8ad3e9b5ba", "lib.core.Handles.HandlesBase": "63a3d17e96a083ac", "HandlesBase": "63a3d17e96a083ac", "ast.stmts": "657e182b27c2a022", "stmts": "657e182b27c2a022", "llvmlite.__module": "692919c5a194ac8d", "__module": "692919c5a194ac8d", "llvmlite.__verify": "6b3bc463fd044545", "__verify": "6b3bc463fd044545", "json.__init__": "6ddf430432a0e373", "json": "6ddf430432a0e373", "hashlib.__sha512": "6ff26590374ae6fc", "__sha512": "6ff26590374ae6fc", "stdarg": "71e0a3ffcb3ebfad", "w32.fileio": "72dbbb563aa943b0", "fileio": "72dbbb563aa943b0", "_list": "7cadfe07e983fd90", "lib.core.Handles.HandlesClassDef": "7cb3f5b12941ce89", "HandlesClassDef": "7cb3f5b12941ce89", "lib.core.Phase1": "7feaa478b74c4e3e", "Phase1": "7feaa478b74c4e3e", "lib.core.Handles.HandlesBody": "81eb28ba912467a6", "HandlesBody": "81eb28ba912467a6", "llvmlite.__function": "874bac141c97bae9", "__function": "874bac141c97bae9", "lib.core.Handles.HandlesWhile": "8dc65d4c71e2936a", "HandlesWhile": "8dc65d4c71e2936a", "lib.core.Phase2": "8de6943bee5d0f32", "Phase2": "8de6943bee5d0f32", "hashlib.__init__": "96837bcc64032444", "hashlib": "96837bcc64032444", "lib.core.Handles.HandlesExpr": "9b1f7f05ff99d863", "HandlesExpr": "9b1f7f05ff99d863", "subprocess": "a335eb99f2e34479", "linkedlist": "a5e9a83e9db303ad", "lib.core.Handles.HandlesType": "a6e43e1ab6aa79b7", "HandlesType": "a6e43e1ab6aa79b7", "atom": "aa246c6e6aa30484", "argparse": "b370d93b74bf55cc", "ast.exprs": "b543bc1dfb592119", "exprs": "b543bc1dfb592119", "ast.tokens": "b547ac4f380bddb6", "tokens": "b547ac4f380bddb6", "platmacro": "b57252077e6b596b", "lib.core.Handles.HandlesFunctions": "b8a6e05318020e54", "HandlesFunctions": "b8a6e05318020e54", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "lib.core.VLogger": "bdf5730851fb95f2", "VLogger": "bdf5730851fb95f2", "lib.core.Handles.HandlesExprOps": "be8c2d7b882881c8", "HandlesExprOps": "be8c2d7b882881c8", "lib.Projectrans.Config": "c0042adc0b7ec5df", "Config": "c0042adc0b7ec5df", "lib.__init__": "c2a4277744568003", "lib": "c2a4277744568003", "lib.core.Handles.HandlesImports": "c34e22cc668c6a6e", "HandlesImports": "c34e22cc668c6a6e", "hashlib.__sha256": "c9d54a4158f7f5a8", "__sha256": "c9d54a4158f7f5a8", "viperio": "c9f4be41ca1cc2b4", "memhub": "ca40915f11b8b6ad", "lib.core.Handles.HandlesVar": "cb1aa3a78af6f362", "HandlesVar": "cb1aa3a78af6f362", "lib.StubGen.Converter": "cba5876ccb277f42", "Converter": "cba5876ccb277f42", "lib.core.Handles.HandlesExprCall": "cf3556225b0a3c8c", "HandlesExprCall": "cf3556225b0a3c8c", "lib.core.Handles.HandlesAugAssign": "d9dd5fce03a20af1", "HandlesAugAssign": "d9dd5fce03a20af1", "ast.lexer": "e217def267d3d4a8", "lexer": "e217def267d3d4a8", "lib.core.StubMerger": "ead693cb29a9c343", "StubMerger": "ead693cb29a9c343", "lib.core.Handles.HandlesEnum": "f05b14a2ad5767a7", "HandlesEnum": "f05b14a2ad5767a7", "lib.core.Handles.HandlesStruct": "f09b2f4a0f9d053e", "HandlesStruct": "f09b2f4a0f9d053e", "main": "f30a3b2d5f6bf092", "ast.__init__": "f3444ec56937284f", "ast": "f3444ec56937284f", "lib.core.Handles.HandlesIf": "f4cdbca2f8802c12", "HandlesIf": "f4cdbca2f8802c12", "stdint": "f5522571bcce7bcb", "w32.win32file": "Line truncated
|
||||
@@ -1 +1 @@
|
||||
{"D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\Projectrans\\Config.vp": {"sha1": "c0042adc0b7ec5df", "mtime": 1785332415.2264168, "size": 14060}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\Projectrans\\Utils.vp": {"sha1": "4650533467115342", "mtime": 1785332415.2054548, "size": 4900}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\StubGen\\Converter.vp": {"sha1": "cba5876ccb277f42", "mtime": 1785403633.0886283, "size": 35262}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\__init__.vp": {"sha1": "c2a4277744568003", "mtime": 1785403660.4383688, "size": 820}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\BuildPipeline.vp": {"sha1": "a38b726f4a82545f", "mtime": 1785397411.8500457, "size": 23570}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\Handles\\HandlesAnnAssign.vp": {"sha1": "53812752bc672fdb", "mtime": 1785404927.245082, "size": 22880}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\Handles\\HandlesAssign.vp": {"sha1": "2b59175b77f1304e", "mtime": 1785343736.8740923, "size": 24369}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\Handles\\HandlesAugAssign.vp": {"sha1": "31e49accebfc8aac", "mtime": 1784751046.0461829, "size": 12874}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\Handles\\HandlesBase.vp": {"sha1": "63a3d17e96a083ac", "mtime": 1785332415.2080498, "size": 8740}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\Handles\\HandlesBody.vp": {"sha1": "81eb28ba912467a6", "mtime": 1784566611.8626723, "size": 8538}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\Handles\\HandlesClassDef.vp": {"sha1": "aa45364399b86a03", "mtime": 1785345709.6485052, "size": 142863}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\Handles\\HandlesEnum.vp": {"sha1": "f05b14a2ad5767a7", "mtime": 1784741624.7278736, "size": 8520}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\Handles\\HandlesExpr.vp": {"sha1": "787e3cfd2e1cf583", "mtime": 1785405514.8234684, "size": 148987}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\Handles\\HandlesExprCall.vp": {"sha1": "82ee4327adfe0c18", "mtime": 1785407383.1033268, "size": 264383}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\Handles\\HandlesExprOps.vp": {"sha1": "be8c2d7b882881c8", "mtime": 1784791452.111348, "size": 12796}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\Handles\\HandlesFor.vp": {"sha1": "456fb516ba3c5002", "mtime": 1785332415.1896677, "size": 17319}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\Handles\\HandlesFunctions.vp": {"sha1": "b8a6e05318020e54", "mtime": 1785407412.993293, "size": 45475}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\Handles\\HandlesIf.vp": {"sha1": "f4cdbca2f8802c12", "mtime": 1785390159.3673935, "size": 5626}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\Handles\\HandlesImports.vp": {"sha1": "0ccfde54972334b1", "mtime": 1785404358.8328092, "size": 25274}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\Handles\\HandlesMain.vp": {"sha1": "4a7b57e6bd18f65e", "mtime": 1785332415.1935978, "size": 21362}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\Handles\\HandlesNonlocal.vp": {"sha1": "af9484a65085bf4b", "mtime": 1784540868.0555332, "size": 5336}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\Handles\\HandlesReturn.vp": {"sha1": "4c644ade1f0d6d02", "mtime": 1785394149.332443, "size": 6334}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\Handles\\HandlesStruct.vp": {"sha1": "371fa89e15d8c015", "mtime": 1785352932.9305031, "size": 48672}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\Handles\\HandlesTranslator.vp": {"sha1": "62805d8ad3e9b5ba", "mtime": 1785332415.2370398, "size": 18196}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\Handles\\HandlesType.vp": {"sha1": "2b30cc2ce96fa464", "mtime": 1785407406.1083772, "size": 60347}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\Handles\\HandlesVar.vp": {"sha1": "cb1aa3a78af6f362", "mtime": 1785332415.2565334, "size": 15697}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\Handles\\HandlesWhile.vp": {"sha1": "8dc65d4c71e2936a", "mtime": 1785390170.5239043, "size": 5202}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\IncludesScanner.vp": {"sha1": "4e052c29b4fe769c", "mtime": 1785404099.6734524, "size": 13049}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\Phase1.vp": {"sha1": "553972e4135f827e", "mtime": 1785403724.71735, "size": 51453}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\Phase2.vp": {"sha1": "aa34a7a33a3afab0", "mtime": 1785404255.07761Line truncated
|
||||
{"D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\Projectrans\\Config.vp": {"sha1": "c0042adc0b7ec5df", "mtime": 1785332415.2264168, "size": 14060}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\Projectrans\\Utils.vp": {"sha1": "4650533467115342", "mtime": 1785332415.2054548, "size": 4900}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\StubGen\\Converter.vp": {"sha1": "cba5876ccb277f42", "mtime": 1785424554.7179716, "size": 35262}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\__init__.vp": {"sha1": "c2a4277744568003", "mtime": 1785424554.7031634, "size": 820}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\BuildPipeline.vp": {"sha1": "343b406cabc82fe9", "mtime": 1785440580.5088792, "size": 23661}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\Handles\\HandlesAnnAssign.vp": {"sha1": "0cc3dc5a1bb0c805", "mtime": 1785428023.816983, "size": 24643}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\Handles\\HandlesAssign.vp": {"sha1": "611a2ade7450d2ea", "mtime": 1785427819.8937466, "size": 25063}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\Handles\\HandlesAugAssign.vp": {"sha1": "d9dd5fce03a20af1", "mtime": 1785424554.716454, "size": 14303}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\Handles\\HandlesBase.vp": {"sha1": "63a3d17e96a083ac", "mtime": 1785332415.2080498, "size": 8740}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\Handles\\HandlesBody.vp": {"sha1": "81eb28ba912467a6", "mtime": 1784566611.8626723, "size": 8538}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\Handles\\HandlesClassDef.vp": {"sha1": "7cb3f5b12941ce89", "mtime": 1785441874.507578, "size": 145069}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\Handles\\HandlesEnum.vp": {"sha1": "f05b14a2ad5767a7", "mtime": 1784741624.7278736, "size": 8520}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\Handles\\HandlesExpr.vp": {"sha1": "9b1f7f05ff99d863", "mtime": 1785428023.8272786, "size": 153922}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\Handles\\HandlesExprCall.vp": {"sha1": "cf3556225b0a3c8c", "mtime": 1785441909.8620112, "size": 265440}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\Handles\\HandlesExprOps.vp": {"sha1": "be8c2d7b882881c8", "mtime": 1784791452.111348, "size": 12796}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\Handles\\HandlesFor.vp": {"sha1": "456fb516ba3c5002", "mtime": 1785332415.1896677, "size": 17319}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\Handles\\HandlesFunctions.vp": {"sha1": "b8a6e05318020e54", "mtime": 1785424554.702158, "size": 45475}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\Handles\\HandlesIf.vp": {"sha1": "f4cdbca2f8802c12", "mtime": 1785390159.3673935, "size": 5626}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\Handles\\HandlesImports.vp": {"sha1": "c34e22cc668c6a6e", "mtime": 1785424554.7057025, "size": 25292}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\Handles\\HandlesMain.vp": {"sha1": "4a7b57e6bd18f65e", "mtime": 1785332415.1935978, "size": 21362}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\Handles\\HandlesNonlocal.vp": {"sha1": "af9484a65085bf4b", "mtime": 1784540868.0555332, "size": 5336}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\Handles\\HandlesReturn.vp": {"sha1": "4c644ade1f0d6d02", "mtime": 1785394149.332443, "size": 6334}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\Handles\\HandlesStruct.vp": {"sha1": "f09b2f4a0f9d053e", "mtime": 1785426809.706652, "size": 47907}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\Handles\\HandlesTranslator.vp": {"sha1": "62805d8ad3e9b5ba", "mtime": 1785332415.2370398, "size": 18196}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\Handles\\HandlesType.vp": {"sha1": "a6e43e1ab6aa79b7", "mtime": 1785441893.1464703, "size": 71572}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\Handles\\HandlesVar.vp": {"sha1": "cb1aa3a78af6f362", "mtime": 1785332415.2565334, "size": 15697}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\Handles\\HandlesWhile.vp": {"sha1": "8dc65d4c71e2936a", "mtime": 1785390170.5239043, "size": 5202}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\IncludesScanner.vp": {"sha1": "55be14b41dd7ca15", "mtime": 1785424554.7031634, "size": 13067}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\Phase1.vp": {"sha1": "7feaa478b74c4e3e", "mtime": 1785424554.7122867, "size": 51107}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\TransPyV\\App\\lib\\core\\Phase2.vp": {"sha1": "8de6943bee5d0f32", "mtime": 1785424554.713286Line truncated
|
||||
+16
-16
@@ -1,7 +1,7 @@
|
||||
067c78e9f121dce3:includes/w32\win32process.vp
|
||||
06f53cc594b4ac6c:includes/w32\win32sync.vp
|
||||
0c67644125bea0fd:includes/sys.vp
|
||||
0ccfde54972334b1:lib/core/Handles/HandlesImports.vp
|
||||
0cc3dc5a1bb0c805:lib/core/Handles/HandlesAnnAssign.vp
|
||||
0df65b8ed15664b0:includes/hashlib\__sha1.vp
|
||||
19f8024d10c828e8:includes/hashlib\__md5.vp
|
||||
1d74d1d3a174c684:includes/llvmlite\__init__.vp
|
||||
@@ -10,24 +10,20 @@
|
||||
240a9a4157959a9f:includes/json\__parser.vp
|
||||
285b6aa29a34754d:includes/stdio.vp
|
||||
28de517e3820658a:includes/posix.vp
|
||||
2b30cc2ce96fa464:lib/core/Handles/HandlesType.vp
|
||||
2b59175b77f1304e:lib/core/Handles/HandlesAssign.vp
|
||||
2b77d783c41d21d1:includes/hashtable.vp
|
||||
2d8debefda779c40:includes/llvmlite\__types.vp
|
||||
31e49accebfc8aac:lib/core/Handles/HandlesAugAssign.vp
|
||||
371fa89e15d8c015:lib/core/Handles/HandlesStruct.vp
|
||||
343b406cabc82fe9:lib/core/BuildPipeline.vp
|
||||
3aa6057398be5673:includes/stdlib.vp
|
||||
3ed8c578036234a7:includes/viperlib.vp
|
||||
4337fb260448bbe2:includes/ast\astaux.vp
|
||||
456fb516ba3c5002:lib/core/Handles/HandlesFor.vp
|
||||
4650533467115342:lib/Projectrans/Utils.vp
|
||||
4a7b57e6bd18f65e:lib/core/Handles/HandlesMain.vp
|
||||
4c644ade1f0d6d02:lib/core/Handles/HandlesReturn.vp
|
||||
4daf5ed3f8e421a1:includes/string.vp
|
||||
4dd6b3f1427d1cc5:includes/ast\match.vp
|
||||
4e052c29b4fe769c:lib/core/IncludesScanner.vp
|
||||
53812752bc672fdb:lib/core/Handles/HandlesAnnAssign.vp
|
||||
553972e4135f827e:lib/core/Phase1.vp
|
||||
55be14b41dd7ca15:lib/core/IncludesScanner.vp
|
||||
5a1d8c48f1243746:includes/llvmlite\__builder.vp
|
||||
611a2ade7450d2ea:lib/core/Handles/HandlesAssign.vp
|
||||
62805d8ad3e9b5ba:lib/core/Handles/HandlesTranslator.vp
|
||||
63a3d17e96a083ac:lib/core/Handles/HandlesBase.vp
|
||||
657e182b27c2a022:includes/ast\stmts.vp
|
||||
@@ -37,20 +33,19 @@
|
||||
6ff26590374ae6fc:includes/hashlib\__sha512.vp
|
||||
71e0a3ffcb3ebfad:includes/stdarg.vp
|
||||
72dbbb563aa943b0:includes/w32\fileio.vp
|
||||
787e3cfd2e1cf583:lib/core/Handles/HandlesExpr.vp
|
||||
7cadfe07e983fd90:includes/_list.vp
|
||||
7cb3f5b12941ce89:lib/core/Handles/HandlesClassDef.vp
|
||||
7feaa478b74c4e3e:lib/core/Phase1.vp
|
||||
81eb28ba912467a6:lib/core/Handles/HandlesBody.vp
|
||||
82ee4327adfe0c18:lib/core/Handles/HandlesExprCall.vp
|
||||
874bac141c97bae9:includes/llvmlite\__function.vp
|
||||
8dc65d4c71e2936a:lib/core/Handles/HandlesWhile.vp
|
||||
8de6943bee5d0f32:lib/core/Phase2.vp
|
||||
96837bcc64032444:includes/hashlib\__init__.vp
|
||||
a26c73d7332b54b4:lib/core/StubMerger.vp
|
||||
9b1f7f05ff99d863:lib/core/Handles/HandlesExpr.vp
|
||||
a335eb99f2e34479:includes/subprocess.vp
|
||||
a38b726f4a82545f:lib/core/BuildPipeline.vp
|
||||
a5e9a83e9db303ad:includes/linkedlist.vp
|
||||
a6e43e1ab6aa79b7:lib/core/Handles/HandlesType.vp
|
||||
aa246c6e6aa30484:includes/atom.vp
|
||||
aa34a7a33a3afab0:lib/core/Phase2.vp
|
||||
aa45364399b86a03:lib/core/Handles/HandlesClassDef.vp
|
||||
af9484a65085bf4b:lib/core/Handles/HandlesNonlocal.vp
|
||||
b370d93b74bf55cc:includes/argparse.vp
|
||||
b543bc1dfb592119:includes/ast\exprs.vp
|
||||
@@ -62,14 +57,18 @@ bdf5730851fb95f2:lib/core/VLogger.vp
|
||||
be8c2d7b882881c8:lib/core/Handles/HandlesExprOps.vp
|
||||
c0042adc0b7ec5df:lib/Projectrans/Config.vp
|
||||
c2a4277744568003:lib/__init__.vp
|
||||
c34e22cc668c6a6e:lib/core/Handles/HandlesImports.vp
|
||||
c9d54a4158f7f5a8:includes/hashlib\__sha256.vp
|
||||
c9f4be41ca1cc2b4:includes/viperio.vp
|
||||
ca40915f11b8b6ad:includes/memhub.vp
|
||||
cb1aa3a78af6f362:lib/core/Handles/HandlesVar.vp
|
||||
cba5876ccb277f42:lib/StubGen/Converter.vp
|
||||
cf3556225b0a3c8c:lib/core/Handles/HandlesExprCall.vp
|
||||
d9dd5fce03a20af1:lib/core/Handles/HandlesAugAssign.vp
|
||||
e217def267d3d4a8:includes/ast\lexer.vp
|
||||
e307a2d809cef071:includes/viperlib.vp
|
||||
ead693cb29a9c343:lib/core/StubMerger.vp
|
||||
f05b14a2ad5767a7:lib/core/Handles/HandlesEnum.vp
|
||||
f09b2f4a0f9d053e:lib/core/Handles/HandlesStruct.vp
|
||||
f30a3b2d5f6bf092:main.vp
|
||||
f3444ec56937284f:includes/ast\__init__.vp
|
||||
f4cdbca2f8802c12:lib/core/Handles/HandlesIf.vp
|
||||
@@ -78,3 +77,4 @@ f6b51804a0ba8ff0:includes/w32\win32file.vp
|
||||
f9e36e2cd6fa659f:includes/llvmlite\__values.vp
|
||||
fc980acec33d69a7:includes/w32\win32base.vp
|
||||
fde6db0747bdd959:includes/ast\parser.vp
|
||||
ffaf70367668b227:includes/string.vp
|
||||
Binary file not shown.
+124
-112
@@ -21,7 +21,9 @@ def vsprintf(buf: t.CChar | t.CPtr, rule: str, *args) -> t.CInt:
|
||||
return vsnprintf(buf, 0x7FFFFFFF, rule, args)
|
||||
|
||||
def snprintf(buf: t.CChar | t.CPtr, size: t.CSizeT, fmt: str, *args) -> t.CInt | t.CExport:
|
||||
if buf is None or fmt is None or size == 0: return 0
|
||||
if fmt is None: return 0
|
||||
if buf is None or size == 0:
|
||||
return vsnprintf(None, 0, fmt, args)
|
||||
return vsnprintf(buf, size, fmt, args)
|
||||
|
||||
# Check floating-point special values (IEEE 754)
|
||||
@@ -39,7 +41,17 @@ def _check_special_float(fv: t.CDouble) -> t.CInt:
|
||||
return 3
|
||||
|
||||
def vsnprintf(buf: t.CChar | t.CPtr, size: t.CSizeT, fmt: str, ap: t.CChar | t.CPtr) -> t.CInt | t.CExport:
|
||||
if buf is None or fmt is None or size == 0: return 0
|
||||
if fmt is None: return 0
|
||||
# 长度探测模式:buf is None 时只计算格式化后长度,不实际写入
|
||||
# _step=0 使 ptr 不前进,反复写入同一个 dummy 字节(无害),write_count 正确累加
|
||||
count_mode: t.CInt = 0
|
||||
_step: t.CInt = 1
|
||||
_dummy: t.CChar = '\0'
|
||||
if buf is None or size == 0:
|
||||
count_mode = 1
|
||||
_step = 0
|
||||
buf = c.Addr(_dummy)
|
||||
size = 0x7FFFFFFF
|
||||
ptr: t.CChar | t.CPtr = buf
|
||||
write_count: t.CInt = 0
|
||||
temp: t.CArray[t.CChar, 68]
|
||||
@@ -48,7 +60,7 @@ def vsnprintf(buf: t.CChar | t.CPtr, size: t.CSizeT, fmt: str, ap: t.CChar | t.C
|
||||
if c.Deref(fmt) != 37:
|
||||
ptr[0] = c.Deref(fmt)
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
fmt += 1
|
||||
else:
|
||||
fmt += 1
|
||||
@@ -121,7 +133,7 @@ def vsnprintf(buf: t.CChar | t.CPtr, size: t.CSizeT, fmt: str, ap: t.CChar | t.C
|
||||
ptr_i: t.CInt = va_arg(ap)
|
||||
ptr[0] = t.CChar(ptr_i)
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
else:
|
||||
ptr_i: t.CInt = va_arg(ap)
|
||||
elif c.Deref(fmt) == 115:
|
||||
@@ -137,19 +149,19 @@ def vsnprintf(buf: t.CChar | t.CPtr, size: t.CSizeT, fmt: str, ap: t.CChar | t.C
|
||||
while pad_count > 0 and write_count < size - 1:
|
||||
ptr[0] = 32
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
pad_count -= 1
|
||||
while c.Deref(s) != 0 and write_count < size - 1:
|
||||
ptr[0] = c.Deref(s)
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
s += 1
|
||||
if left_align and width > slen:
|
||||
pad_count = width - slen
|
||||
while pad_count > 0 and write_count < size - 1:
|
||||
ptr[0] = 32
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
pad_count -= 1
|
||||
elif c.Deref(fmt) == 100 or c.Deref(fmt) == 105:
|
||||
if is_long_long or is_size or is_long:
|
||||
@@ -192,26 +204,26 @@ def vsnprintf(buf: t.CChar | t.CPtr, size: t.CSizeT, fmt: str, ap: t.CChar | t.C
|
||||
while pad_count > 0 and write_count < size - 1:
|
||||
ptr[0] = 32
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
pad_count -= 1
|
||||
if pad_zero and width > i:
|
||||
pad_count = width - i
|
||||
while pad_count > 0 and write_count < size - 1:
|
||||
ptr[0] = 48
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
pad_count -= 1
|
||||
while i > 0 and write_count < size - 1:
|
||||
i -= 1
|
||||
ptr[0] = temp[i]
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
if left_align and width > i:
|
||||
pad_count = width - i
|
||||
while pad_count > 0 and write_count < size - 1:
|
||||
ptr[0] = 32
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
pad_count -= 1
|
||||
elif c.Deref(fmt) == 117:
|
||||
if is_long or is_long_long or is_size:
|
||||
@@ -230,26 +242,26 @@ def vsnprintf(buf: t.CChar | t.CPtr, size: t.CSizeT, fmt: str, ap: t.CChar | t.C
|
||||
while pad_count > 0 and write_count < size - 1:
|
||||
ptr[0] = 32
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
pad_count -= 1
|
||||
if pad_zero and width > i:
|
||||
pad_count = width - i
|
||||
while pad_count > 0 and write_count < size - 1:
|
||||
ptr[0] = 48
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
pad_count -= 1
|
||||
while i > 0 and write_count < size - 1:
|
||||
i -= 1
|
||||
ptr[0] = temp[i]
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
if left_align and width > i:
|
||||
pad_count = width - i
|
||||
while pad_count > 0 and write_count < size - 1:
|
||||
ptr[0] = 32
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
pad_count -= 1
|
||||
elif c.Deref(fmt) == 120:
|
||||
if is_long or is_long_long or is_size:
|
||||
@@ -280,35 +292,35 @@ def vsnprintf(buf: t.CChar | t.CPtr, size: t.CSizeT, fmt: str, ap: t.CChar | t.C
|
||||
while pad_count > 0 and write_count < size - 1:
|
||||
ptr[0] = 32
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
pad_count -= 1
|
||||
if prefix_len > 0:
|
||||
if write_count < size - 1:
|
||||
ptr[0] = 48
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
if write_count < size - 1:
|
||||
ptr[0] = 120
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
if pad_zero and width > effective_len:
|
||||
pad_count = width - effective_len
|
||||
while pad_count > 0 and write_count < size - 1:
|
||||
ptr[0] = 48
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
pad_count -= 1
|
||||
while i > 0 and write_count < size - 1:
|
||||
i -= 1
|
||||
ptr[0] = temp[i]
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
if left_align and width > effective_len:
|
||||
pad_count = width - effective_len
|
||||
while pad_count > 0 and write_count < size - 1:
|
||||
ptr[0] = 32
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
pad_count -= 1
|
||||
elif c.Deref(fmt) == 88:
|
||||
if is_long or is_long_long or is_size:
|
||||
@@ -339,35 +351,35 @@ def vsnprintf(buf: t.CChar | t.CPtr, size: t.CSizeT, fmt: str, ap: t.CChar | t.C
|
||||
while pad_count > 0 and write_count < size - 1:
|
||||
ptr[0] = 32
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
pad_count -= 1
|
||||
if prefix_len > 0:
|
||||
if write_count < size - 1:
|
||||
ptr[0] = 48
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
if write_count < size - 1:
|
||||
ptr[0] = 88
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
if pad_zero and width > effective_len:
|
||||
pad_count = width - effective_len
|
||||
while pad_count > 0 and write_count < size - 1:
|
||||
ptr[0] = 48
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
pad_count -= 1
|
||||
while i > 0 and write_count < size - 1:
|
||||
i -= 1
|
||||
ptr[0] = temp[i]
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
if left_align and width > effective_len:
|
||||
pad_count = width - effective_len
|
||||
while pad_count > 0 and write_count < size - 1:
|
||||
ptr[0] = 32
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
pad_count -= 1
|
||||
elif c.Deref(fmt) == 111:
|
||||
if is_long or is_long_long or is_size:
|
||||
@@ -397,26 +409,26 @@ def vsnprintf(buf: t.CChar | t.CPtr, size: t.CSizeT, fmt: str, ap: t.CChar | t.C
|
||||
while pad_count > 0 and write_count < size - 1:
|
||||
ptr[0] = 32
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
pad_count -= 1
|
||||
if pad_zero and width > i:
|
||||
pad_count = width - i
|
||||
while pad_count > 0 and write_count < size - 1:
|
||||
ptr[0] = 48
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
pad_count -= 1
|
||||
while i > 0 and write_count < size - 1:
|
||||
i -= 1
|
||||
ptr[0] = temp[i]
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
if left_align and width > i:
|
||||
pad_count = width - i
|
||||
while pad_count > 0 and write_count < size - 1:
|
||||
ptr[0] = 32
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
pad_count -= 1
|
||||
elif c.Deref(fmt) == 98:
|
||||
if is_long or is_long_long or is_size:
|
||||
@@ -446,26 +458,26 @@ def vsnprintf(buf: t.CChar | t.CPtr, size: t.CSizeT, fmt: str, ap: t.CChar | t.C
|
||||
while pad_count > 0 and write_count < size - 1:
|
||||
ptr[0] = 32
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
pad_count -= 1
|
||||
if pad_zero and width > i:
|
||||
pad_count = width - i
|
||||
while pad_count > 0 and write_count < size - 1:
|
||||
ptr[0] = 48
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
pad_count -= 1
|
||||
while i > 0 and write_count < size - 1:
|
||||
i -= 1
|
||||
ptr[0] = temp[i]
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
if left_align and width > i:
|
||||
pad_count = width - i
|
||||
while pad_count > 0 and write_count < size - 1:
|
||||
ptr[0] = 32
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
pad_count -= 1
|
||||
elif c.Deref(fmt) == 112:
|
||||
ptr_val: t.CUInt64T = t.CUInt64T(va_arg(ap, t.CPtr))
|
||||
@@ -500,26 +512,26 @@ def vsnprintf(buf: t.CChar | t.CPtr, size: t.CSizeT, fmt: str, ap: t.CChar | t.C
|
||||
while pad_count > 0 and write_count < size - 1:
|
||||
ptr[0] = 32
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
pad_count -= 1
|
||||
if pad_zero and width > i:
|
||||
pad_count = width - i
|
||||
while pad_count > 0 and write_count < size - 1:
|
||||
ptr[0] = 48
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
pad_count -= 1
|
||||
while i > 0 and write_count < size - 1:
|
||||
i -= 1
|
||||
ptr[0] = temp[i]
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
if left_align and width > i:
|
||||
pad_count = width - i
|
||||
while pad_count > 0 and write_count < size - 1:
|
||||
ptr[0] = 32
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
pad_count -= 1
|
||||
elif c.Deref(fmt) == 102 or c.Deref(fmt) == 70:
|
||||
f_upper: t.CInt = 1 if c.Deref(fmt) == 70 else 0
|
||||
@@ -540,23 +552,23 @@ def vsnprintf(buf: t.CChar | t.CPtr, size: t.CSizeT, fmt: str, ap: t.CChar | t.C
|
||||
while f_pad > 0 and write_count < size - 1:
|
||||
ptr[0] = 32
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
f_pad -= 1
|
||||
if f_sp == 2:
|
||||
if write_count < size - 1:
|
||||
ptr[0] = 45
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
elif f_sp == 1 and show_sign:
|
||||
if write_count < size - 1:
|
||||
ptr[0] = 43
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
elif f_sp == 1 and space_sign:
|
||||
if write_count < size - 1:
|
||||
ptr[0] = 32
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
fi_c: t.CInt = 0
|
||||
while fi_c < 3 and write_count < size - 1:
|
||||
fc: t.CInt = 0
|
||||
@@ -580,14 +592,14 @@ def vsnprintf(buf: t.CChar | t.CPtr, size: t.CSizeT, fmt: str, ap: t.CChar | t.C
|
||||
fc -= 32
|
||||
ptr[0] = t.CChar(fc)
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
fi_c += 1
|
||||
if left_align and width > f_total_len:
|
||||
f_pad = width - f_total_len
|
||||
while f_pad > 0 and write_count < size - 1:
|
||||
ptr[0] = 32
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
f_pad -= 1
|
||||
fmt += 1
|
||||
continue
|
||||
@@ -595,18 +607,18 @@ def vsnprintf(buf: t.CChar | t.CPtr, size: t.CSizeT, fmt: str, ap: t.CChar | t.C
|
||||
if write_count < size - 1:
|
||||
ptr[0] = 45
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
fv = 0.0 - fv
|
||||
elif show_sign:
|
||||
if write_count < size - 1:
|
||||
ptr[0] = 43
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
elif space_sign:
|
||||
if write_count < size - 1:
|
||||
ptr[0] = 32
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
di: t.CInt = 0
|
||||
work: t.CDouble = fv
|
||||
if work < 1.0:
|
||||
@@ -635,25 +647,25 @@ def vsnprintf(buf: t.CChar | t.CPtr, size: t.CSizeT, fmt: str, ap: t.CChar | t.C
|
||||
while pad_count > 0 and write_count < size - 1:
|
||||
ptr[0] = 32
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
pad_count -= 1
|
||||
if pad_zero and width > f_total:
|
||||
pad_count = width - f_total
|
||||
while pad_count > 0 and write_count < size - 1:
|
||||
ptr[0] = 48
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
pad_count -= 1
|
||||
while di > 0 and write_count < size - 1:
|
||||
di -= 1
|
||||
ptr[0] = temp[di]
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
if precision > 0:
|
||||
if write_count < size - 1:
|
||||
ptr[0] = 46
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
fi: t.CInt = 0
|
||||
while fi < precision and fi < TEMP_BUF_SIZE - 1:
|
||||
temp[fi] = t.CChar(frac_part % 10 + 48)
|
||||
@@ -666,18 +678,18 @@ def vsnprintf(buf: t.CChar | t.CPtr, size: t.CSizeT, fmt: str, ap: t.CChar | t.C
|
||||
fi -= 1
|
||||
ptr[0] = temp[fi]
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
elif alt_form:
|
||||
if write_count < size - 1:
|
||||
ptr[0] = 46
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
if left_align and width > f_total:
|
||||
pad_count = width - f_total
|
||||
while pad_count > 0 and write_count < size - 1:
|
||||
ptr[0] = 32
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
pad_count -= 1
|
||||
elif c.Deref(fmt) == 101 or c.Deref(fmt) == 69:
|
||||
if precision < 0: precision = 6
|
||||
@@ -698,23 +710,23 @@ def vsnprintf(buf: t.CChar | t.CPtr, size: t.CSizeT, fmt: str, ap: t.CChar | t.C
|
||||
while e_pad > 0 and write_count < size - 1:
|
||||
ptr[0] = 32
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
e_pad -= 1
|
||||
if e_sp == 2:
|
||||
if write_count < size - 1:
|
||||
ptr[0] = 45
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
elif e_sp == 1 and show_sign:
|
||||
if write_count < size - 1:
|
||||
ptr[0] = 43
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
elif e_sp == 1 and space_sign:
|
||||
if write_count < size - 1:
|
||||
ptr[0] = 32
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
ei_c: t.CInt = 0
|
||||
while ei_c < 3 and write_count < size - 1:
|
||||
ec: t.CInt = 0
|
||||
@@ -738,14 +750,14 @@ def vsnprintf(buf: t.CChar | t.CPtr, size: t.CSizeT, fmt: str, ap: t.CChar | t.C
|
||||
ec -= 32
|
||||
ptr[0] = t.CChar(ec)
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
ei_c += 1
|
||||
if left_align and width > e_total_len:
|
||||
e_pad = width - e_total_len
|
||||
while e_pad > 0 and write_count < size - 1:
|
||||
ptr[0] = 32
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
e_pad -= 1
|
||||
fmt += 1
|
||||
continue
|
||||
@@ -753,18 +765,18 @@ def vsnprintf(buf: t.CChar | t.CPtr, size: t.CSizeT, fmt: str, ap: t.CChar | t.C
|
||||
if write_count < size - 1:
|
||||
ptr[0] = 45
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
fv = 0.0 - fv
|
||||
elif show_sign:
|
||||
if write_count < size - 1:
|
||||
ptr[0] = 43
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
elif space_sign:
|
||||
if write_count < size - 1:
|
||||
ptr[0] = 32
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
exp10: t.CInt = 0
|
||||
if fv != 0.0:
|
||||
while fv >= 10.0:
|
||||
@@ -799,24 +811,24 @@ def vsnprintf(buf: t.CChar | t.CPtr, size: t.CSizeT, fmt: str, ap: t.CChar | t.C
|
||||
while pad_count > 0 and write_count < size - 1:
|
||||
ptr[0] = 32
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
pad_count -= 1
|
||||
if pad_zero and width > e_total:
|
||||
pad_count = width - e_total
|
||||
while pad_count > 0 and write_count < size - 1:
|
||||
ptr[0] = 48
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
pad_count -= 1
|
||||
if write_count < size - 1:
|
||||
ptr[0] = t.CChar(int_digit + 48)
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
if precision > 0:
|
||||
if write_count < size - 1:
|
||||
ptr[0] = 46
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
fi: t.CInt = 0
|
||||
while fi < precision and fi < TEMP_BUF_SIZE - 1:
|
||||
temp[fi] = t.CChar(frac_p % 10 + 48)
|
||||
@@ -829,20 +841,20 @@ def vsnprintf(buf: t.CChar | t.CPtr, size: t.CSizeT, fmt: str, ap: t.CChar | t.C
|
||||
fi -= 1
|
||||
ptr[0] = temp[fi]
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
elif alt_form:
|
||||
if write_count < size - 1:
|
||||
ptr[0] = 46
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
if write_count < size - 1:
|
||||
ptr[0] = 101 if e_upper == 0 else 69
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
if write_count < size - 1:
|
||||
ptr[0] = 45 if exp10 < 0 else 43
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
exp_abs: t.CUInt64T = t.CUInt64T(exp10) if exp10 >= 0 else t.CUInt64T(0 - exp10)
|
||||
ei: t.CInt = 0
|
||||
if exp_abs == 0:
|
||||
@@ -861,13 +873,13 @@ def vsnprintf(buf: t.CChar | t.CPtr, size: t.CSizeT, fmt: str, ap: t.CChar | t.C
|
||||
ei -= 1
|
||||
ptr[0] = temp[ei]
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
if left_align and width > e_total:
|
||||
pad_count = width - e_total
|
||||
while pad_count > 0 and write_count < size - 1:
|
||||
ptr[0] = 32
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
pad_count -= 1
|
||||
elif c.Deref(fmt) == 103 or c.Deref(fmt) == 71:
|
||||
if precision < 0: precision = 6
|
||||
@@ -889,23 +901,23 @@ def vsnprintf(buf: t.CChar | t.CPtr, size: t.CSizeT, fmt: str, ap: t.CChar | t.C
|
||||
while g_pad > 0 and write_count < size - 1:
|
||||
ptr[0] = 32
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
g_pad -= 1
|
||||
if g_sp == 2:
|
||||
if write_count < size - 1:
|
||||
ptr[0] = 45
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
elif g_sp == 1 and show_sign:
|
||||
if write_count < size - 1:
|
||||
ptr[0] = 43
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
elif g_sp == 1 and space_sign:
|
||||
if write_count < size - 1:
|
||||
ptr[0] = 32
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
gi_c: t.CInt = 0
|
||||
while gi_c < 3 and write_count < size - 1:
|
||||
gc: t.CInt = 0
|
||||
@@ -929,14 +941,14 @@ def vsnprintf(buf: t.CChar | t.CPtr, size: t.CSizeT, fmt: str, ap: t.CChar | t.C
|
||||
gc -= 32
|
||||
ptr[0] = t.CChar(gc)
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
gi_c += 1
|
||||
if left_align and width > g_total_len:
|
||||
g_pad = width - g_total_len
|
||||
while g_pad > 0 and write_count < size - 1:
|
||||
ptr[0] = 32
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
g_pad -= 1
|
||||
fmt += 1
|
||||
continue
|
||||
@@ -944,18 +956,18 @@ def vsnprintf(buf: t.CChar | t.CPtr, size: t.CSizeT, fmt: str, ap: t.CChar | t.C
|
||||
if write_count < size - 1:
|
||||
ptr[0] = 45
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
fv = 0.0 - fv
|
||||
elif show_sign:
|
||||
if write_count < size - 1:
|
||||
ptr[0] = 43
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
elif space_sign:
|
||||
if write_count < size - 1:
|
||||
ptr[0] = 32
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
fv_orig: t.CDouble = fv
|
||||
exp10: t.CInt = 0
|
||||
if fv != 0.0:
|
||||
@@ -1064,30 +1076,30 @@ def vsnprintf(buf: t.CChar | t.CPtr, size: t.CSizeT, fmt: str, ap: t.CChar | t.C
|
||||
while pad_count > 0 and write_count < size - 1:
|
||||
ptr[0] = 32
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
pad_count -= 1
|
||||
if pad_zero and width > g_total:
|
||||
pad_count = width - g_total
|
||||
while pad_count > 0 and write_count < size - 1:
|
||||
ptr[0] = 48
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
pad_count -= 1
|
||||
gi: t.CInt = 0
|
||||
while gi < g_len and write_count < size - 1:
|
||||
ptr[0] = temp[gi]
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
gi += 1
|
||||
if g_use_e:
|
||||
if write_count < size - 1:
|
||||
ptr[0] = 101 if g_upper == 0 else 69
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
if write_count < size - 1:
|
||||
ptr[0] = 45 if exp10 < 0 else 43
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
exp_abs: t.CUInt64T = t.CUInt64T(exp10) if exp10 >= 0 else t.CUInt64T(0 - exp10)
|
||||
ei: t.CInt = 0
|
||||
if exp_abs == 0:
|
||||
@@ -1106,13 +1118,13 @@ def vsnprintf(buf: t.CChar | t.CPtr, size: t.CSizeT, fmt: str, ap: t.CChar | t.C
|
||||
ei -= 1
|
||||
ptr[0] = temp[ei]
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
if left_align and width > g_total:
|
||||
pad_count = width - g_total
|
||||
while pad_count > 0 and write_count < size - 1:
|
||||
ptr[0] = 32
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
pad_count -= 1
|
||||
elif c.Deref(fmt) == 97 or c.Deref(fmt) == 65:
|
||||
a_upper: t.CInt = 1 if c.Deref(fmt) == 65 else 0
|
||||
@@ -1132,23 +1144,23 @@ def vsnprintf(buf: t.CChar | t.CPtr, size: t.CSizeT, fmt: str, ap: t.CChar | t.C
|
||||
while a_pad > 0 and write_count < size - 1:
|
||||
ptr[0] = 32
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
a_pad -= 1
|
||||
if a_sp == 2:
|
||||
if write_count < size - 1:
|
||||
ptr[0] = 45
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
elif a_sp == 1 and show_sign:
|
||||
if write_count < size - 1:
|
||||
ptr[0] = 43
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
elif a_sp == 1 and space_sign:
|
||||
if write_count < size - 1:
|
||||
ptr[0] = 32
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
ai_c: t.CInt = 0
|
||||
while ai_c < 3 and write_count < size - 1:
|
||||
ac: t.CInt = 0
|
||||
@@ -1172,14 +1184,14 @@ def vsnprintf(buf: t.CChar | t.CPtr, size: t.CSizeT, fmt: str, ap: t.CChar | t.C
|
||||
ac -= 32
|
||||
ptr[0] = t.CChar(ac)
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
ai_c += 1
|
||||
if left_align and width > a_total_len:
|
||||
a_pad = width - a_total_len
|
||||
while a_pad > 0 and write_count < size - 1:
|
||||
ptr[0] = 32
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
a_pad -= 1
|
||||
fmt += 1
|
||||
continue
|
||||
@@ -1255,55 +1267,55 @@ def vsnprintf(buf: t.CChar | t.CPtr, size: t.CSizeT, fmt: str, ap: t.CChar | t.C
|
||||
while a_pad > 0 and write_count < size - 1:
|
||||
ptr[0] = 32
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
a_pad -= 1
|
||||
if a_neg:
|
||||
if write_count < size - 1:
|
||||
ptr[0] = 45
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
elif show_sign:
|
||||
if write_count < size - 1:
|
||||
ptr[0] = 43
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
elif space_sign:
|
||||
if write_count < size - 1:
|
||||
ptr[0] = 32
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
if pad_zero and width > a_content_len:
|
||||
a_pad = width - a_content_len
|
||||
while a_pad > 0 and write_count < size - 1:
|
||||
ptr[0] = 48
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
a_pad -= 1
|
||||
if write_count < size - 1:
|
||||
ptr[0] = 48
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
if write_count < size - 1:
|
||||
if a_upper:
|
||||
ptr[0] = 88
|
||||
else:
|
||||
ptr[0] = 120
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
if write_count < size - 1:
|
||||
ptr[0] = t.CChar(a_leading + 48)
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
if a_has_dot:
|
||||
if write_count < size - 1:
|
||||
ptr[0] = 46
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
a_hj: t.CInt = 0
|
||||
while a_hj < a_hd_count and write_count < size - 1:
|
||||
ptr[0] = temp[a_hj]
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
a_hj += 1
|
||||
if write_count < size - 1:
|
||||
if a_upper:
|
||||
@@ -1311,26 +1323,26 @@ def vsnprintf(buf: t.CChar | t.CPtr, size: t.CSizeT, fmt: str, ap: t.CChar | t.C
|
||||
else:
|
||||
ptr[0] = 112
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
if write_count < size - 1:
|
||||
if a_esign:
|
||||
ptr[0] = 45
|
||||
else:
|
||||
ptr[0] = 43
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
a_ek: t.CInt = a_ecount
|
||||
while a_ek > 0 and write_count < size - 1:
|
||||
a_ek -= 1
|
||||
ptr[0] = temp[60 + a_ek]
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
if left_align and width > a_content_len:
|
||||
a_pad = width - a_content_len
|
||||
while a_pad > 0 and write_count < size - 1:
|
||||
ptr[0] = 32
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
a_pad -= 1
|
||||
elif c.Deref(fmt) == 110:
|
||||
if is_long_long or is_long:
|
||||
@@ -1353,12 +1365,12 @@ def vsnprintf(buf: t.CChar | t.CPtr, size: t.CSizeT, fmt: str, ap: t.CChar | t.C
|
||||
if write_count < size - 1:
|
||||
ptr[0] = 37
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
else:
|
||||
if write_count < size - 1:
|
||||
ptr[0] = c.Deref(fmt)
|
||||
write_count += 1
|
||||
ptr += 1
|
||||
ptr += _step
|
||||
fmt += 1
|
||||
ptr[0] = 0
|
||||
return write_count
|
||||
@@ -1195,6 +1195,11 @@ class ClassHandle(BaseHandle):
|
||||
MemberNode.Lineno = lineno
|
||||
MemberNode.IsEnumMember = True
|
||||
self.Trans.SymbolTable.insert(VariantName, MemberNode)
|
||||
# 同模块 REnum 变体也注册限定名和下划线名,
|
||||
# 对齐跨模块导入(HandlesImports.py)的注册逻辑。
|
||||
# 避免裸名被同名的工厂函数覆盖后,路径 2 的限定名查找失败。
|
||||
self.Trans.SymbolTable.insert(f"{ClassName}.{VariantName}", MemberNode)
|
||||
self.Trans.SymbolTable.insert(f"{ClassName}_{VariantName}", MemberNode)
|
||||
# 更新预注册的 REnum 类型信息(填充变体列表)
|
||||
PreTypeInfo.RenumVariants = variant_names
|
||||
|
||||
|
||||
@@ -129,6 +129,34 @@ class MatchHandle(BaseHandle):
|
||||
elif isinstance(pattern, ast.MatchSequence):
|
||||
HasDefault = True
|
||||
CaseBBs.append(DefaultBB)
|
||||
elif isinstance(pattern, ast.MatchClass):
|
||||
# 兜底处理:REnum 检测失败但 case 是 MatchClass(REnum 变体模式)
|
||||
# 尝试从变体名查找 tag 值,按整数值处理
|
||||
cls_node_mc: ast.expr = pattern.cls
|
||||
VariantName_mc: str | None = None
|
||||
QualifiedName_mc: str | None = None
|
||||
if isinstance(cls_node_mc, ast.Name):
|
||||
VariantName_mc = cls_node_mc.id
|
||||
elif isinstance(cls_node_mc, ast.Attribute):
|
||||
VariantName_mc = cls_node_mc.attr
|
||||
if isinstance(cls_node_mc.value, ast.Attribute):
|
||||
QualifiedName_mc = f"{cls_node_mc.value.attr}.{VariantName_mc}"
|
||||
elif isinstance(cls_node_mc.value, ast.Name):
|
||||
QualifiedName_mc = f"{cls_node_mc.value.id}.{VariantName_mc}"
|
||||
TagValue_mc: int | None = None
|
||||
SymInfo_mc: "SymbolTable.SymbolInfo" = None
|
||||
if QualifiedName_mc:
|
||||
SymInfo_mc = self.Trans.SymbolTable.lookup(QualifiedName_mc)
|
||||
if not (SymInfo_mc and SymInfo_mc.IsEnumMember):
|
||||
SymInfo_mc = self.Trans.SymbolTable.lookup(VariantName_mc)
|
||||
if SymInfo_mc and SymInfo_mc.IsEnumMember:
|
||||
TagValue_mc = SymInfo_mc.value
|
||||
if TagValue_mc is not None:
|
||||
CaseValues.append(ir.Constant(SwitchIntType, TagValue_mc))
|
||||
CaseBBs.append(Gen.func.append_basic_block(name=f"match.case_{VariantName_mc}"))
|
||||
else:
|
||||
# 变体名未找到,跳过此 case(fast-fail 已在外层处理)
|
||||
pass
|
||||
def _HasNoBreak(stmts: list[ast.stmt]) -> bool:
|
||||
for stmt in stmts:
|
||||
if isinstance(stmt, ast.Expr) and isinstance(stmt.value, ast.Call):
|
||||
@@ -187,6 +215,16 @@ class MatchHandle(BaseHandle):
|
||||
if not HasNoBreak[i]:
|
||||
Gen.builder.branch(AfterBB)
|
||||
CaseIdx += 1
|
||||
elif isinstance(pattern, ast.MatchClass):
|
||||
# 兜底处理:MatchClass 在非 REnum 路径的 case body 生成
|
||||
# case 收集阶段已创建 CaseBB,此处生成 body
|
||||
if CaseIdx < len(CaseBBs) and CaseBBs[CaseIdx] != DefaultBB:
|
||||
Gen.builder.position_at_start(CaseBBs[CaseIdx])
|
||||
self.HandleBodyLlvm(case.body)
|
||||
if not Gen.builder.block.is_terminated:
|
||||
if not HasNoBreak[i]:
|
||||
Gen.builder.branch(AfterBB)
|
||||
CaseIdx += 1
|
||||
if not HasDefault:
|
||||
Gen.builder.position_at_start(DefaultBB)
|
||||
Gen.builder.branch(AfterBB)
|
||||
|
||||
Reference in new issue
Block a user