diff --git a/.gitignore b/.gitignore index 0c818bf..f292a10 100644 --- a/.gitignore +++ b/.gitignore @@ -92,3 +92,7 @@ Undo/vmware/ /TPVAppBK/ /TPVAppBK2/ +# 性能分析产物 +PROF/ +*.prof + diff --git a/PROF/main_prof_60304.prof b/PROF/main_prof_60304.prof deleted file mode 100644 index b979f43..0000000 Binary files a/PROF/main_prof_60304.prof and /dev/null differ diff --git a/PROF/main_time.txt b/PROF/main_time.txt deleted file mode 100644 index e60e879..0000000 --- a/PROF/main_time.txt +++ /dev/null @@ -1 +0,0 @@ -成功 120.25 diff --git a/TODO b/TODO index 1dceabe..9ce654d 100644 --- a/TODO +++ b/TODO @@ -54,6 +54,12 @@ TPV 虚类判断问题,参见 ast/parser.vp:2037行 元对象协议 MOP 的编译期版本 多分派实验 Mixin 方法直接调用的合法性静态检查:MixinC2.outer2(c) 用非组合类实例直接调用,编译通过(兜底 this_adjust 前移)但运行期越界——Mixin 方法必须经组合类实例调用。日后"编译器提前报错预警"功能需在调用处验证 self 类型的组合完整性(NoVTableCrossMixinTest Test 2/3 边界) +if not c.CIf(T.__lt__): + c.CError("...") + c.CError(f"File {T.__T_file__},{T.__T_line__}.....") +def a(b: str, *args: rawptr[list], **kwargs: rawptr[dict]): + # args和kwargs是栈上分配的list/dict + # ========== 去除 Handles 层(计划 2026-08-21,StringTest Phase A 字段分裂已修复) ========== # 目标:删除 lib/core/Handles/(32 文件 469 模块函数 98.9% 纯 _g_gen 委托壳),逻辑并入 Gen diff --git a/Test/AstTest/.tpv_build/temp/_sha1_map.txt b/Test/AstTest/.tpv_build/temp/_sha1_map.txt deleted file mode 100644 index 121e361..0000000 --- a/Test/AstTest/.tpv_build/temp/_sha1_map.txt +++ /dev/null @@ -1,27 +0,0 @@ -f5522571bcce7bcb:includes/stdint.vp -09c0472e6fd0d088:includes/stdio.vp -7e4672b992208969:includes/memhub.vp -989dba6e92235032:includes/stdlib.vp -93ab1a1df8ba3422:includes/sys.vp -b8970f3b6886efa6:includes/string.vp -6394599d6a61cabf:includes/ast/__init__.vp -db613a1bd6a3ca26:includes/w32/win32console.vp -001947a1f780bd5f:includes/builtins.vp -aa246c6e6aa30484:includes/atom.vp -2c175afd85852faf:includes/viperio.vp -e94ef9e139461915:includes/_list.vp -b57252077e6b596b:includes/platmacro.vp -e710417730391023:includes/w32/win32base.vp -652aff7c2e85125c:includes/w32/win32process.vp -22fa78c72db5c469:includes/posix.vp -eb09ac7f10988a63:includes/ast/tokens.vp -e9dfb296a8674aee:includes/ast/base.vp -4618d74293c6746a:includes/ast/stmts.vp -c0def010dcebadb1:includes/ast/exprs.vp -34dc6a647fa19b7b:includes/ast/astaux.vp -3b2a307c9c7d0129:includes/ast/match.vp -43ee0269efffadc3:includes/ast/lexer.vp -df83e214ee82d0f3:includes/ast/parser.vp -95a546a38b5b6316:includes/viperlib.vp -cf900a640e6eeff3:includes/stdarg.vp -662151088eb5374c:main.vp diff --git a/Test/AstTest/output/067c78e9f121dce3.deps.json b/Test/AstTest/output/067c78e9f121dce3.deps.json deleted file mode 100644 index 1570839..0000000 --- a/Test/AstTest/output/067c78e9f121dce3.deps.json +++ /dev/null @@ -1 +0,0 @@ -{"w32.win32process": "067c78e9f121dce3", "win32process": "067c78e9f121dce3", "sys": "0c67644125bea0fd", "memhub": "2408ce147bac090b", "stdio": "285b6aa29a34754d", "posix": "28de517e3820658a", "viperio": "2c175afd85852faf", "ast.astaux": "34dc6a647fa19b7b", "astaux": "34dc6a647fa19b7b", "ast.match": "3b2a307c9c7d0129", "match": "3b2a307c9c7d0129", "ast.exprs": "43ec967d0517abc1", "exprs": "43ec967d0517abc1", "ast.stmts": "46ea1349c980c7f4", "stmts": "46ea1349c980c7f4", "string": "4c39369ffedaddac", "ast.parser": "6b2a008dbdcddb7f", "parser": "6b2a008dbdcddb7f", "stdlib": "6c658cc728d0bbf4", "main": "6eed58d6587aba87", "ast.base": "71b20381eda0450a", "base": "71b20381eda0450a", "stdarg": "71e0a3ffcb3ebfad", "_list": "7cadfe07e983fd90", "ast.__init__": "876e256c06636777", "__init__": "876e256c06636777", "ast": "876e256c06636777", "atom": "aa246c6e6aa30484", "platmacro": "b57252077e6b596b", "viperlib": "bba983c61a970f7c", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "ast.tokens": "cea844466f10ac61", "tokens": "cea844466f10ac61", "ast.lexer": "d0072d5282b9b65f", "lexer": "d0072d5282b9b65f", "stdint": "f5522571bcce7bcb", "w32.win32base": "fc980acec33d69a7", "win32base": "fc980acec33d69a7", "w32.win32file": "f6b51804a0ba8ff0", "win32file": "f6b51804a0ba8ff0", "w32.fileio": "d137b1f3311f3a7f", "fileio": "d137b1f3311f3a7f", "w32.win32memory": "72e2d5ccb7cedcf1", "win32memory": "72e2d5ccb7cedcf1", "w32.win32sync": "06f53cc594b4ac6c", "win32sync": "06f53cc594b4ac6c", "w32.winsock2": "6446627d4f07a1b5", "winsock2": "6446627d4f07a1b5"} \ No newline at end of file diff --git a/Test/AstTest/output/06f53cc594b4ac6c.deps.json b/Test/AstTest/output/06f53cc594b4ac6c.deps.json deleted file mode 100644 index 1570839..0000000 --- a/Test/AstTest/output/06f53cc594b4ac6c.deps.json +++ /dev/null @@ -1 +0,0 @@ -{"w32.win32process": "067c78e9f121dce3", "win32process": "067c78e9f121dce3", "sys": "0c67644125bea0fd", "memhub": "2408ce147bac090b", "stdio": "285b6aa29a34754d", "posix": "28de517e3820658a", "viperio": "2c175afd85852faf", "ast.astaux": "34dc6a647fa19b7b", "astaux": "34dc6a647fa19b7b", "ast.match": "3b2a307c9c7d0129", "match": "3b2a307c9c7d0129", "ast.exprs": "43ec967d0517abc1", "exprs": "43ec967d0517abc1", "ast.stmts": "46ea1349c980c7f4", "stmts": "46ea1349c980c7f4", "string": "4c39369ffedaddac", "ast.parser": "6b2a008dbdcddb7f", "parser": "6b2a008dbdcddb7f", "stdlib": "6c658cc728d0bbf4", "main": "6eed58d6587aba87", "ast.base": "71b20381eda0450a", "base": "71b20381eda0450a", "stdarg": "71e0a3ffcb3ebfad", "_list": "7cadfe07e983fd90", "ast.__init__": "876e256c06636777", "__init__": "876e256c06636777", "ast": "876e256c06636777", "atom": "aa246c6e6aa30484", "platmacro": "b57252077e6b596b", "viperlib": "bba983c61a970f7c", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "ast.tokens": "cea844466f10ac61", "tokens": "cea844466f10ac61", "ast.lexer": "d0072d5282b9b65f", "lexer": "d0072d5282b9b65f", "stdint": "f5522571bcce7bcb", "w32.win32base": "fc980acec33d69a7", "win32base": "fc980acec33d69a7", "w32.win32file": "f6b51804a0ba8ff0", "win32file": "f6b51804a0ba8ff0", "w32.fileio": "d137b1f3311f3a7f", "fileio": "d137b1f3311f3a7f", "w32.win32memory": "72e2d5ccb7cedcf1", "win32memory": "72e2d5ccb7cedcf1", "w32.win32sync": "06f53cc594b4ac6c", "win32sync": "06f53cc594b4ac6c", "w32.winsock2": "6446627d4f07a1b5", "winsock2": "6446627d4f07a1b5"} \ No newline at end of file diff --git a/Test/AstTest/output/0c67644125bea0fd.deps.json b/Test/AstTest/output/0c67644125bea0fd.deps.json deleted file mode 100644 index 1570839..0000000 --- a/Test/AstTest/output/0c67644125bea0fd.deps.json +++ /dev/null @@ -1 +0,0 @@ -{"w32.win32process": "067c78e9f121dce3", "win32process": "067c78e9f121dce3", "sys": "0c67644125bea0fd", "memhub": "2408ce147bac090b", "stdio": "285b6aa29a34754d", "posix": "28de517e3820658a", "viperio": "2c175afd85852faf", "ast.astaux": "34dc6a647fa19b7b", "astaux": "34dc6a647fa19b7b", "ast.match": "3b2a307c9c7d0129", "match": "3b2a307c9c7d0129", "ast.exprs": "43ec967d0517abc1", "exprs": "43ec967d0517abc1", "ast.stmts": "46ea1349c980c7f4", "stmts": "46ea1349c980c7f4", "string": "4c39369ffedaddac", "ast.parser": "6b2a008dbdcddb7f", "parser": "6b2a008dbdcddb7f", "stdlib": "6c658cc728d0bbf4", "main": "6eed58d6587aba87", "ast.base": "71b20381eda0450a", "base": "71b20381eda0450a", "stdarg": "71e0a3ffcb3ebfad", "_list": "7cadfe07e983fd90", "ast.__init__": "876e256c06636777", "__init__": "876e256c06636777", "ast": "876e256c06636777", "atom": "aa246c6e6aa30484", "platmacro": "b57252077e6b596b", "viperlib": "bba983c61a970f7c", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "ast.tokens": "cea844466f10ac61", "tokens": "cea844466f10ac61", "ast.lexer": "d0072d5282b9b65f", "lexer": "d0072d5282b9b65f", "stdint": "f5522571bcce7bcb", "w32.win32base": "fc980acec33d69a7", "win32base": "fc980acec33d69a7", "w32.win32file": "f6b51804a0ba8ff0", "win32file": "f6b51804a0ba8ff0", "w32.fileio": "d137b1f3311f3a7f", "fileio": "d137b1f3311f3a7f", "w32.win32memory": "72e2d5ccb7cedcf1", "win32memory": "72e2d5ccb7cedcf1", "w32.win32sync": "06f53cc594b4ac6c", "win32sync": "06f53cc594b4ac6c", "w32.winsock2": "6446627d4f07a1b5", "winsock2": "6446627d4f07a1b5"} \ No newline at end of file diff --git a/Test/AstTest/output/28de517e3820658a.deps.json b/Test/AstTest/output/28de517e3820658a.deps.json deleted file mode 100644 index 1570839..0000000 --- a/Test/AstTest/output/28de517e3820658a.deps.json +++ /dev/null @@ -1 +0,0 @@ -{"w32.win32process": "067c78e9f121dce3", "win32process": "067c78e9f121dce3", "sys": "0c67644125bea0fd", "memhub": "2408ce147bac090b", "stdio": "285b6aa29a34754d", "posix": "28de517e3820658a", "viperio": "2c175afd85852faf", "ast.astaux": "34dc6a647fa19b7b", "astaux": "34dc6a647fa19b7b", "ast.match": "3b2a307c9c7d0129", "match": "3b2a307c9c7d0129", "ast.exprs": "43ec967d0517abc1", "exprs": "43ec967d0517abc1", "ast.stmts": "46ea1349c980c7f4", "stmts": "46ea1349c980c7f4", "string": "4c39369ffedaddac", "ast.parser": "6b2a008dbdcddb7f", "parser": "6b2a008dbdcddb7f", "stdlib": "6c658cc728d0bbf4", "main": "6eed58d6587aba87", "ast.base": "71b20381eda0450a", "base": "71b20381eda0450a", "stdarg": "71e0a3ffcb3ebfad", "_list": "7cadfe07e983fd90", "ast.__init__": "876e256c06636777", "__init__": "876e256c06636777", "ast": "876e256c06636777", "atom": "aa246c6e6aa30484", "platmacro": "b57252077e6b596b", "viperlib": "bba983c61a970f7c", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "ast.tokens": "cea844466f10ac61", "tokens": "cea844466f10ac61", "ast.lexer": "d0072d5282b9b65f", "lexer": "d0072d5282b9b65f", "stdint": "f5522571bcce7bcb", "w32.win32base": "fc980acec33d69a7", "win32base": "fc980acec33d69a7", "w32.win32file": "f6b51804a0ba8ff0", "win32file": "f6b51804a0ba8ff0", "w32.fileio": "d137b1f3311f3a7f", "fileio": "d137b1f3311f3a7f", "w32.win32memory": "72e2d5ccb7cedcf1", "win32memory": "72e2d5ccb7cedcf1", "w32.win32sync": "06f53cc594b4ac6c", "win32sync": "06f53cc594b4ac6c", "w32.winsock2": "6446627d4f07a1b5", "winsock2": "6446627d4f07a1b5"} \ No newline at end of file diff --git a/Test/AstTest/output/6446627d4f07a1b5.deps.json b/Test/AstTest/output/6446627d4f07a1b5.deps.json deleted file mode 100644 index 1570839..0000000 --- a/Test/AstTest/output/6446627d4f07a1b5.deps.json +++ /dev/null @@ -1 +0,0 @@ -{"w32.win32process": "067c78e9f121dce3", "win32process": "067c78e9f121dce3", "sys": "0c67644125bea0fd", "memhub": "2408ce147bac090b", "stdio": "285b6aa29a34754d", "posix": "28de517e3820658a", "viperio": "2c175afd85852faf", "ast.astaux": "34dc6a647fa19b7b", "astaux": "34dc6a647fa19b7b", "ast.match": "3b2a307c9c7d0129", "match": "3b2a307c9c7d0129", "ast.exprs": "43ec967d0517abc1", "exprs": "43ec967d0517abc1", "ast.stmts": "46ea1349c980c7f4", "stmts": "46ea1349c980c7f4", "string": "4c39369ffedaddac", "ast.parser": "6b2a008dbdcddb7f", "parser": "6b2a008dbdcddb7f", "stdlib": "6c658cc728d0bbf4", "main": "6eed58d6587aba87", "ast.base": "71b20381eda0450a", "base": "71b20381eda0450a", "stdarg": "71e0a3ffcb3ebfad", "_list": "7cadfe07e983fd90", "ast.__init__": "876e256c06636777", "__init__": "876e256c06636777", "ast": "876e256c06636777", "atom": "aa246c6e6aa30484", "platmacro": "b57252077e6b596b", "viperlib": "bba983c61a970f7c", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "ast.tokens": "cea844466f10ac61", "tokens": "cea844466f10ac61", "ast.lexer": "d0072d5282b9b65f", "lexer": "d0072d5282b9b65f", "stdint": "f5522571bcce7bcb", "w32.win32base": "fc980acec33d69a7", "win32base": "fc980acec33d69a7", "w32.win32file": "f6b51804a0ba8ff0", "win32file": "f6b51804a0ba8ff0", "w32.fileio": "d137b1f3311f3a7f", "fileio": "d137b1f3311f3a7f", "w32.win32memory": "72e2d5ccb7cedcf1", "win32memory": "72e2d5ccb7cedcf1", "w32.win32sync": "06f53cc594b4ac6c", "win32sync": "06f53cc594b4ac6c", "w32.winsock2": "6446627d4f07a1b5", "winsock2": "6446627d4f07a1b5"} \ No newline at end of file diff --git a/Test/AstTest/output/72e2d5ccb7cedcf1.deps.json b/Test/AstTest/output/72e2d5ccb7cedcf1.deps.json deleted file mode 100644 index 1570839..0000000 --- a/Test/AstTest/output/72e2d5ccb7cedcf1.deps.json +++ /dev/null @@ -1 +0,0 @@ -{"w32.win32process": "067c78e9f121dce3", "win32process": "067c78e9f121dce3", "sys": "0c67644125bea0fd", "memhub": "2408ce147bac090b", "stdio": "285b6aa29a34754d", "posix": "28de517e3820658a", "viperio": "2c175afd85852faf", "ast.astaux": "34dc6a647fa19b7b", "astaux": "34dc6a647fa19b7b", "ast.match": "3b2a307c9c7d0129", "match": "3b2a307c9c7d0129", "ast.exprs": "43ec967d0517abc1", "exprs": "43ec967d0517abc1", "ast.stmts": "46ea1349c980c7f4", "stmts": "46ea1349c980c7f4", "string": "4c39369ffedaddac", "ast.parser": "6b2a008dbdcddb7f", "parser": "6b2a008dbdcddb7f", "stdlib": "6c658cc728d0bbf4", "main": "6eed58d6587aba87", "ast.base": "71b20381eda0450a", "base": "71b20381eda0450a", "stdarg": "71e0a3ffcb3ebfad", "_list": "7cadfe07e983fd90", "ast.__init__": "876e256c06636777", "__init__": "876e256c06636777", "ast": "876e256c06636777", "atom": "aa246c6e6aa30484", "platmacro": "b57252077e6b596b", "viperlib": "bba983c61a970f7c", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "ast.tokens": "cea844466f10ac61", "tokens": "cea844466f10ac61", "ast.lexer": "d0072d5282b9b65f", "lexer": "d0072d5282b9b65f", "stdint": "f5522571bcce7bcb", "w32.win32base": "fc980acec33d69a7", "win32base": "fc980acec33d69a7", "w32.win32file": "f6b51804a0ba8ff0", "win32file": "f6b51804a0ba8ff0", "w32.fileio": "d137b1f3311f3a7f", "fileio": "d137b1f3311f3a7f", "w32.win32memory": "72e2d5ccb7cedcf1", "win32memory": "72e2d5ccb7cedcf1", "w32.win32sync": "06f53cc594b4ac6c", "win32sync": "06f53cc594b4ac6c", "w32.winsock2": "6446627d4f07a1b5", "winsock2": "6446627d4f07a1b5"} \ No newline at end of file diff --git a/Test/AstTest/output/_shared_sym_includes.pickle b/Test/AstTest/output/_shared_sym_includes.pickle deleted file mode 100644 index 739433b..0000000 Binary files a/Test/AstTest/output/_shared_sym_includes.pickle and /dev/null differ diff --git a/Test/AstTest/output/d137b1f3311f3a7f.deps.json b/Test/AstTest/output/d137b1f3311f3a7f.deps.json deleted file mode 100644 index 1570839..0000000 --- a/Test/AstTest/output/d137b1f3311f3a7f.deps.json +++ /dev/null @@ -1 +0,0 @@ -{"w32.win32process": "067c78e9f121dce3", "win32process": "067c78e9f121dce3", "sys": "0c67644125bea0fd", "memhub": "2408ce147bac090b", "stdio": "285b6aa29a34754d", "posix": "28de517e3820658a", "viperio": "2c175afd85852faf", "ast.astaux": "34dc6a647fa19b7b", "astaux": "34dc6a647fa19b7b", "ast.match": "3b2a307c9c7d0129", "match": "3b2a307c9c7d0129", "ast.exprs": "43ec967d0517abc1", "exprs": "43ec967d0517abc1", "ast.stmts": "46ea1349c980c7f4", "stmts": "46ea1349c980c7f4", "string": "4c39369ffedaddac", "ast.parser": "6b2a008dbdcddb7f", "parser": "6b2a008dbdcddb7f", "stdlib": "6c658cc728d0bbf4", "main": "6eed58d6587aba87", "ast.base": "71b20381eda0450a", "base": "71b20381eda0450a", "stdarg": "71e0a3ffcb3ebfad", "_list": "7cadfe07e983fd90", "ast.__init__": "876e256c06636777", "__init__": "876e256c06636777", "ast": "876e256c06636777", "atom": "aa246c6e6aa30484", "platmacro": "b57252077e6b596b", "viperlib": "bba983c61a970f7c", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "ast.tokens": "cea844466f10ac61", "tokens": "cea844466f10ac61", "ast.lexer": "d0072d5282b9b65f", "lexer": "d0072d5282b9b65f", "stdint": "f5522571bcce7bcb", "w32.win32base": "fc980acec33d69a7", "win32base": "fc980acec33d69a7", "w32.win32file": "f6b51804a0ba8ff0", "win32file": "f6b51804a0ba8ff0", "w32.fileio": "d137b1f3311f3a7f", "fileio": "d137b1f3311f3a7f", "w32.win32memory": "72e2d5ccb7cedcf1", "win32memory": "72e2d5ccb7cedcf1", "w32.win32sync": "06f53cc594b4ac6c", "win32sync": "06f53cc594b4ac6c", "w32.winsock2": "6446627d4f07a1b5", "winsock2": "6446627d4f07a1b5"} \ No newline at end of file diff --git a/Test/AstTest/output/f6b51804a0ba8ff0.deps.json b/Test/AstTest/output/f6b51804a0ba8ff0.deps.json deleted file mode 100644 index 1570839..0000000 --- a/Test/AstTest/output/f6b51804a0ba8ff0.deps.json +++ /dev/null @@ -1 +0,0 @@ -{"w32.win32process": "067c78e9f121dce3", "win32process": "067c78e9f121dce3", "sys": "0c67644125bea0fd", "memhub": "2408ce147bac090b", "stdio": "285b6aa29a34754d", "posix": "28de517e3820658a", "viperio": "2c175afd85852faf", "ast.astaux": "34dc6a647fa19b7b", "astaux": "34dc6a647fa19b7b", "ast.match": "3b2a307c9c7d0129", "match": "3b2a307c9c7d0129", "ast.exprs": "43ec967d0517abc1", "exprs": "43ec967d0517abc1", "ast.stmts": "46ea1349c980c7f4", "stmts": "46ea1349c980c7f4", "string": "4c39369ffedaddac", "ast.parser": "6b2a008dbdcddb7f", "parser": "6b2a008dbdcddb7f", "stdlib": "6c658cc728d0bbf4", "main": "6eed58d6587aba87", "ast.base": "71b20381eda0450a", "base": "71b20381eda0450a", "stdarg": "71e0a3ffcb3ebfad", "_list": "7cadfe07e983fd90", "ast.__init__": "876e256c06636777", "__init__": "876e256c06636777", "ast": "876e256c06636777", "atom": "aa246c6e6aa30484", "platmacro": "b57252077e6b596b", "viperlib": "bba983c61a970f7c", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "ast.tokens": "cea844466f10ac61", "tokens": "cea844466f10ac61", "ast.lexer": "d0072d5282b9b65f", "lexer": "d0072d5282b9b65f", "stdint": "f5522571bcce7bcb", "w32.win32base": "fc980acec33d69a7", "win32base": "fc980acec33d69a7", "w32.win32file": "f6b51804a0ba8ff0", "win32file": "f6b51804a0ba8ff0", "w32.fileio": "d137b1f3311f3a7f", "fileio": "d137b1f3311f3a7f", "w32.win32memory": "72e2d5ccb7cedcf1", "win32memory": "72e2d5ccb7cedcf1", "w32.win32sync": "06f53cc594b4ac6c", "win32sync": "06f53cc594b4ac6c", "w32.winsock2": "6446627d4f07a1b5", "winsock2": "6446627d4f07a1b5"} \ No newline at end of file diff --git a/Test/AstTest/temp/067c78e9f121dce3.stub.ll.dep b/Test/AstTest/temp/067c78e9f121dce3.stub.ll.dep deleted file mode 100644 index d4b382c..0000000 --- a/Test/AstTest/temp/067c78e9f121dce3.stub.ll.dep +++ /dev/null @@ -1 +0,0 @@ -f5522571bcce7bcb|fc980acec33d69a7 \ No newline at end of file diff --git a/Test/AstTest/temp/067c78e9f121dce3.vpi b/Test/AstTest/temp/067c78e9f121dce3.vpi deleted file mode 100644 index a606126..0000000 --- a/Test/AstTest/temp/067c78e9f121dce3.vpi +++ /dev/null @@ -1,136 +0,0 @@ -""" -Auto-generated Python stub file from w32.win32process.vp -Module: w32.win32process -""" - -import c - - -import t -from stdint import * -from w32.win32base import * - -PROCESS_TERMINATE: t.CDefine = 0x0001 -PROCESS_CREATE_THREAD: t.CDefine = 0x0002 -PROCESS_VM_OPERATION: t.CDefine = 0x0008 -PROCESS_VM_READ: t.CDefine = 0x0010 -PROCESS_VM_WRITE: t.CDefine = 0x0020 -PROCESS_QUERY_INFORMATION: t.CDefine = 0x0400 -PROCESS_ALL_ACCESS: t.CDefine = 0x001FFFFF -THREAD_TERMINATE: t.CDefine = 0x0001 -THREAD_SUSPEND_RESUME: t.CDefine = 0x0002 -THREAD_GET_CONTEXT: t.CDefine = 0x0008 -THREAD_SET_CONTEXT: t.CDefine = 0x0010 -THREAD_QUERY_INFORMATION: t.CDefine = 0x0040 -THREAD_ALL_ACCESS: t.CDefine = 0x001FFFFF -CREATE_SUSPENDED: t.CDefine = 0x00000004 -CREATE_NEW_CONSOLE: t.CDefine = 0x00000010 -CREATE_NEW_PROCESS_GROUP: t.CDefine = 0x00000200 -CREATE_NO_WINDOW: t.CDefine = 0x08000000 -DETACHED_PROCESS: t.CDefine = 0x00000008 -STARTF_USESHOWWINDOW: t.CDefine = 0x00000001 -STARTF_USESTDHANDLES: t.CDefine = 0x00000100 -SW_HIDE: t.CDefine = 0 -SW_SHOW: t.CDefine = 5 -SW_MINIMIZE: t.CDefine = 6 -NORMAL_PRIORITY_CLASS: t.CDefine = 0x00000020 -IDLE_PRIORITY_CLASS: t.CDefine = 0x00000040 -HIGH_PRIORITY_CLASS: t.CDefine = 0x00000080 -REALTIME_PRIORITY_CLASS: t.CDefine = 0x00000100 -BELOW_NORMAL_PRIORITY_CLASS: t.CDefine = 0x00004000 -ABOVE_NORMAL_PRIORITY_CLASS: t.CDefine = 0x00008000 -STILL_ACTIVE: t.CDefine = 259 - -class STARTUPINFOA: - cb: ULONG - lpReserved: CHARPTR - lpDesktop: CHARPTR - lpTitle: CHARPTR - dwX: ULONG - dwY: ULONG - dwXSize: ULONG - dwYSize: ULONG - dwXCountChars: ULONG - dwYCountChars: ULONG - dwFillAttribute: ULONG - dwFlags: ULONG - wShowWindow: WORD - cbReserved2: WORD - lpReserved2: VOIDPTR - hStdInput: HANDLE - hStdOutput: HANDLE - hStdError: HANDLE -class STARTUPINFOW: - cb: ULONG - lpReserved: WCHARPTR - lpDesktop: WCHARPTR - lpTitle: WCHARPTR - dwX: ULONG - dwY: ULONG - dwXSize: ULONG - dwYSize: ULONG - dwXCountChars: ULONG - dwYCountChars: ULONG - dwFillAttribute: ULONG - dwFlags: ULONG - wShowWindow: WORD - cbReserved2: WORD - lpReserved2: VOIDPTR - hStdInput: HANDLE - hStdOutput: HANDLE - hStdError: HANDLE -class PROCESS_INFORMATION: - hProcess: HANDLE - hThread: HANDLE - dwProcessId: ULONG - dwThreadId: ULONG - -def CreateProcessA(lpApplicationName: LPCSTR, lpCommandLine: CHARPTR, lpProcessAttributes: SECURITY_ATTRIBUTES | t.CPtr, lpThreadAttributes: SECURITY_ATTRIBUTES | t.CPtr, bInheritHandles: BOOL, dwCreationFlags: ULONG, lpEnvironment: VOIDPTR, lpCurrentDirectory: LPCSTR, lpStartupInfo: STARTUPINFOA | t.CPtr, lpProcessInformation: PROCESS_INFORMATION | t.CPtr) -> BOOL | t.State: pass - -def CreateProcessW(lpApplicationName: LPCWSTR, lpCommandLine: WCHARPTR, lpProcessAttributes: SECURITY_ATTRIBUTES | t.CPtr, lpThreadAttributes: SECURITY_ATTRIBUTES | t.CPtr, bInheritHandles: BOOL, dwCreationFlags: ULONG, lpEnvironment: VOIDPTR, lpCurrentDirectory: LPCWSTR, lpStartupInfo: STARTUPINFOW | t.CPtr, lpProcessInformation: PROCESS_INFORMATION | t.CPtr) -> BOOL | t.State: pass - -def TerminateProcess(hProcess: HANDLE, uExitCode: UINT) -> BOOL | t.State: pass - -def GetExitCodeProcess(hProcess: HANDLE, lpExitCode: ULONG | t.CPtr) -> BOOL | t.State: pass - -def GetExitCodeThread(hThread: HANDLE, lpExitCode: ULONG | t.CPtr) -> BOOL | t.State: pass - -def OpenProcess(dwDesiredAccess: ULONG, bInheritHandle: BOOL, dwProcessId: ULONG) -> HANDLE | t.State: pass - -def GetCurrentProcess() -> HANDLE | t.State: pass - -def GetCurrentProcessId() -> ULONG | t.State: pass - -def CreateThread(lpThreadAttributes: SECURITY_ATTRIBUTES | t.CPtr, dwStackSize: t.CSizeT, lpStartAddress: VOIDPTR, lpParameter: VOIDPTR, dwCreationFlags: ULONG, lpThreadId: ULONG | t.CPtr) -> HANDLE | t.State: pass - -def OpenThread(dwDesiredAccess: ULONG, bInheritHandle: BOOL, dwThreadId: ULONG) -> HANDLE | t.State: pass - -def SuspendThread(hThread: HANDLE) -> ULONG | t.State: pass - -def ResumeThread(hThread: HANDLE) -> ULONG | t.State: pass - -def TerminateThread(hThread: HANDLE, dwExitCode: ULONG) -> BOOL | t.State: pass - -def GetCurrentThread() -> HANDLE | t.State: pass - -def GetCurrentThreadId() -> ULONG | t.State: pass - -def GetThreadId(hThread: HANDLE) -> ULONG | t.State: pass - -def GetProcessId(hProcess: HANDLE) -> ULONG | t.State: pass - -def SetThreadPriority(hThread: HANDLE, nPriority: INT) -> BOOL | t.State: pass - -def GetThreadPriority(hThread: HANDLE) -> INT | t.State: pass - -def ExitProcess(uExitCode: UINT) -> VOID | t.State: pass - -def ExitThread(dwExitCode: ULONG) -> VOID | t.State: pass - -def TlsAlloc() -> ULONG | t.State: pass - -def TlsFree(dwTlsIndex: ULONG) -> BOOL | t.State: pass - -def TlsGetValue(dwTlsIndex: ULONG) -> VOIDPTR | t.State: pass - -def TlsSetValue(dwTlsIndex: ULONG, lpTlsValue: VOIDPTR) -> BOOL | t.State: pass diff --git a/Test/AstTest/temp/06f53cc594b4ac6c.vpi b/Test/AstTest/temp/06f53cc594b4ac6c.vpi deleted file mode 100644 index ac278f4..0000000 --- a/Test/AstTest/temp/06f53cc594b4ac6c.vpi +++ /dev/null @@ -1,109 +0,0 @@ -""" -Auto-generated Python stub file from w32.win32sync.vp -Module: w32.win32sync -""" - -import c - - -import t -from stdint import * -from w32.win32base import * - -class CRITICAL_SECTION: - DebugInfo: VOIDPTR - LockCount: LONG - RecursionCount: LONG - OwningThread: HANDLE - LockSemaphore: HANDLE - SpinCount: QWORD - -def InitializeCriticalSection(lpCriticalSection: CRITICAL_SECTION | t.CPtr) -> VOID | t.State: pass - -def EnterCriticalSection(lpCriticalSection: CRITICAL_SECTION | t.CPtr) -> VOID | t.State: pass - -def LeaveCriticalSection(lpCriticalSection: CRITICAL_SECTION | t.CPtr) -> VOID | t.State: pass - -def DeleteCriticalSection(lpCriticalSection: CRITICAL_SECTION | t.CPtr) -> VOID | t.State: pass - -def TryEnterCriticalSection(lpCriticalSection: CRITICAL_SECTION | t.CPtr) -> BOOL | t.State: pass - -def SetCriticalSectionSpinCount(lpCriticalSection: CRITICAL_SECTION | t.CPtr, dwSpinCount: ULONG) -> ULONG | t.State: pass - -def InitializeCriticalSectionAndSpinCount(lpCriticalSection: CRITICAL_SECTION | t.CPtr, dwSpinCount: ULONG) -> BOOL | t.State: pass - -def CreateMutexA(lpMutexAttributes: SECURITY_ATTRIBUTES | t.CPtr, bInitialOwner: BOOL, lpName: LPCSTR) -> HANDLE | t.State: pass - -def CreateMutexW(lpMutexAttributes: SECURITY_ATTRIBUTES | t.CPtr, bInitialOwner: BOOL, lpName: LPCWSTR) -> HANDLE | t.State: pass - -def OpenMutexA(dwDesiredAccess: ULONG, bInheritHandle: BOOL, lpName: LPCSTR) -> HANDLE | t.State: pass - -def OpenMutexW(dwDesiredAccess: ULONG, bInheritHandle: BOOL, lpName: LPCWSTR) -> HANDLE | t.State: pass - -def ReleaseMutex(hMutex: HANDLE) -> BOOL | t.State: pass - -def CreateEventA(lpEventAttributes: SECURITY_ATTRIBUTES | t.CPtr, bManualReset: BOOL, bInitialState: BOOL, lpName: LPCSTR) -> HANDLE | t.State: pass - -def CreateEventW(lpEventAttributes: SECURITY_ATTRIBUTES | t.CPtr, bManualReset: BOOL, bInitialState: BOOL, lpName: LPCWSTR) -> HANDLE | t.State: pass - -def OpenEventA(dwDesiredAccess: ULONG, bInheritHandle: BOOL, lpName: LPCSTR) -> HANDLE | t.State: pass - -def OpenEventW(dwDesiredAccess: ULONG, bInheritHandle: BOOL, lpName: LPCWSTR) -> HANDLE | t.State: pass - -def SetEvent(hEvent: HANDLE) -> BOOL | t.State: pass - -def ResetEvent(hEvent: HANDLE) -> BOOL | t.State: pass - -def PulseEvent(hEvent: HANDLE) -> BOOL | t.State: pass - -def CreateSemaphoreA(lpSemaphoreAttributes: SECURITY_ATTRIBUTES | t.CPtr, lInitialCount: LONG, lMaximumCount: LONG, lpName: LPCSTR) -> HANDLE | t.State: pass - -def CreateSemaphoreW(lpSemaphoreAttributes: SECURITY_ATTRIBUTES | t.CPtr, lInitialCount: LONG, lMaximumCount: LONG, lpName: LPCWSTR) -> HANDLE | t.State: pass - -def OpenSemaphoreA(dwDesiredAccess: ULONG, bInheritHandle: BOOL, lpName: LPCSTR) -> HANDLE | t.State: pass - -def OpenSemaphoreW(dwDesiredAccess: ULONG, bInheritHandle: BOOL, lpName: LPCWSTR) -> HANDLE | t.State: pass - -def ReleaseSemaphore(hSemaphore: HANDLE, lReleaseCount: LONG, lpPreviousCount: LONG | t.CPtr) -> BOOL | t.State: pass - -def WaitForSingleObject(hHandle: HANDLE, dwMilliseconds: ULONG) -> ULONG | t.State: pass - -def WaitForSingleObjectEx(hHandle: HANDLE, dwMilliseconds: ULONG, bAlertable: BOOL) -> ULONG | t.State: pass - -def WaitForMultipleObjects(nCount: ULONG, lpHandles: VOIDPTR, bWaitAll: BOOL, dwMilliseconds: ULONG) -> ULONG | t.State: pass - -def WaitForMultipleObjectsEx(nCount: ULONG, lpHandles: VOIDPTR, bWaitAll: BOOL, dwMilliseconds: ULONG, bAlertable: BOOL) -> ULONG | t.State: pass - -def InitializeSRWLock(SRWLock: VOIDPTR) -> VOID | t.State: pass - -def AcquireSRWLockExclusive(SRWLock: VOIDPTR) -> VOID | t.State: pass - -def AcquireSRWLockShared(SRWLock: VOIDPTR) -> VOID | t.State: pass - -def ReleaseSRWLockExclusive(SRWLock: VOIDPTR) -> VOID | t.State: pass - -def ReleaseSRWLockShared(SRWLock: VOIDPTR) -> VOID | t.State: pass - - -CONDITION_VARIABLE_LOCKMODE_SHARED: t.CDefine = 0x1 - -def InitializeConditionVariable(ConditionVariable: VOIDPTR) -> VOID | t.State: pass - -def SleepConditionVariableCS(ConditionVariable: VOIDPTR, CriticalSection: CRITICAL_SECTION | t.CPtr, dwMilliseconds: ULONG) -> BOOL | t.State: pass - -def SleepConditionVariableSRW(ConditionVariable: VOIDPTR, SRWLock: VOIDPTR, dwMilliseconds: ULONG, Flags: ULONG) -> BOOL | t.State: pass - -def WakeConditionVariable(ConditionVariable: VOIDPTR) -> VOID | t.State: pass - -def WakeAllConditionVariable(ConditionVariable: VOIDPTR) -> VOID | t.State: pass - - -INIT_ONCE_STATIC_INIT: t.CDefine = 0x00000001 -INIT_ONCE_CHECK_ONLY: t.CDefine = 0x00000002 -INIT_ONCE_ASYNC: t.CDefine = 0x00000004 -INIT_ONCE_INIT_FAILED: t.CDefine = 0x00000008 - -class INIT_ONCE: - Ptr: t.CPtr - -def InitOnceExecuteOnce(InitOnce: INIT_ONCE | t.CPtr, InitFn: VOIDPTR, Parameter: VOIDPTR, Context: VOIDPTR | t.CPtr) -> BOOL | t.State: pass diff --git a/Test/AstTest/temp/0c67644125bea0fd.stub.ll.dep b/Test/AstTest/temp/0c67644125bea0fd.stub.ll.dep deleted file mode 100644 index d73af0b..0000000 --- a/Test/AstTest/temp/0c67644125bea0fd.stub.ll.dep +++ /dev/null @@ -1 +0,0 @@ -067c78e9f121dce3|2408ce147bac090b|285b6aa29a34754d|28de517e3820658a|2c175afd85852faf|4c39369ffedaddac|6c658cc728d0bbf4|aa246c6e6aa30484|b57252077e6b596b|f5522571bcce7bcb|fc980acec33d69a7 \ No newline at end of file diff --git a/Test/AstTest/temp/0c67644125bea0fd.vpi b/Test/AstTest/temp/0c67644125bea0fd.vpi deleted file mode 100644 index 1e4e515..0000000 --- a/Test/AstTest/temp/0c67644125bea0fd.vpi +++ /dev/null @@ -1,44 +0,0 @@ -""" -Auto-generated Python stub file from sys.vp -Module: sys -""" - - -import t, c -from stdint import * -import platmacro -import memhub -import string -import stdio -import w32.win32base -import w32.win32process -import posix - -_mbuddy: t.CExtern | memhub.MemBuddy | t.CPtr - -def fgets(buf: bytes, size: int, stream: t.CVoid | t.CPtr) -> str | t.State: pass - -def fflush(stream: t.CVoid | t.CPtr) -> int | t.State: pass - -def exit(status: int) -> t.State: pass - - -maxsize: t.CDefine = 9223372036854775807 # 2^63 - 1 - -def platform() -> str: pass - -def get_pid() -> int: pass - - -_argc: t.CExtern | int -_argv: t.CExtern | str | t.CPtr - -def _init_argv() -> t.CInt: pass - -def _init_argv_win32() -> t.CInt: pass - -def _init_argv_posix() -> t.CInt: pass - -def argc() -> int: pass - -def argv(index: int) -> str: pass diff --git a/Test/AstTest/temp/285b6aa29a34754d.stub.ll.dep b/Test/AstTest/temp/285b6aa29a34754d.stub.ll.dep deleted file mode 100644 index e69de29..0000000 diff --git a/Test/AstTest/temp/285b6aa29a34754d.vpi b/Test/AstTest/temp/285b6aa29a34754d.vpi deleted file mode 100644 index acc57c7..0000000 --- a/Test/AstTest/temp/285b6aa29a34754d.vpi +++ /dev/null @@ -1,23 +0,0 @@ -""" -Auto-generated Python stub file from stdio.vp -Module: stdio -""" - - -import t, c - -def printf(fmt: t.CConst | str, *args) -> int | t.State: pass - -def fprintf(stream: bytes, fmt: t.CConst | str, *args) -> int | t.State: pass - -def sprintf(buf: bytes, fmt: t.CConst | str, *args) -> int | t.State: pass - -def snprintf(buf: bytes, size: t.CSizeT, fmt: t.CConst | str, *args) -> int | t.State: pass - -def puts(s: t.CConst | str) -> int | t.State: pass - -def fputs(s: t.CConst | str, stream: bytes) -> int | t.State: pass - -def fgets(buf: bytes, size: int, stream: bytes) -> bytes | t.State: pass - -def fflush(stream: bytes) -> int | t.State: pass diff --git a/Test/AstTest/temp/28de517e3820658a.stub.ll.dep b/Test/AstTest/temp/28de517e3820658a.stub.ll.dep deleted file mode 100644 index 793e7ed..0000000 --- a/Test/AstTest/temp/28de517e3820658a.stub.ll.dep +++ /dev/null @@ -1 +0,0 @@ -f5522571bcce7bcb \ No newline at end of file diff --git a/Test/AstTest/temp/28de517e3820658a.vpi b/Test/AstTest/temp/28de517e3820658a.vpi deleted file mode 100644 index d10e843..0000000 --- a/Test/AstTest/temp/28de517e3820658a.vpi +++ /dev/null @@ -1,189 +0,0 @@ -""" -Auto-generated Python stub file from posix.vp -Module: posix -""" - - -import t, c -from stdint import * - -DIR: t.CTypedef = t.CVoid | t.CPtr -mode_t: t.CTypedef = t.CUInt32T -pid_t: t.CTypedef = t.CInt32T -off_t: t.CTypedef = t.CInt64T -dev_t: t.CTypedef = t.CUInt64T -ino_t: t.CTypedef = t.CUInt64T -nlink_t: t.CTypedef = t.CUInt64T -uid_t: t.CTypedef = t.CUInt32T -gid_t: t.CTypedef = t.CUInt32T -blksize_t: t.CTypedef = t.CInt64T -blkcnt_t: t.CTypedef = t.CInt64T -time_t: t.CTypedef = t.CInt64T -O_RDONLY: t.CDefine = 0 -O_WRONLY: t.CDefine = 1 -O_RDWR: t.CDefine = 2 -O_CREAT: t.CDefine = 0o100 -O_EXCL: t.CDefine = 0o200 -O_TRUNC: t.CDefine = 0o1000 -O_APPEND: t.CDefine = 0o2000 -O_NONBLOCK: t.CDefine = 0o4000 -O_CLOEXEC: t.CDefine = 0o2000000 -F_OK: t.CDefine = 0 # File exists -R_OK: t.CDefine = 4 # Read permission -W_OK: t.CDefine = 2 # Write permission -X_OK: t.CDefine = 1 # Execute permission -S_IFMT: t.CDefine = 0o170000 # Type mask bits -S_IFSOCK: t.CDefine = 0o140000 # Socket -S_IFLNK: t.CDefine = 0o120000 # Symbolic link -S_IFREG: t.CDefine = 0o100000 # Regular file -S_IFBLK: t.CDefine = 0o060000 # Block device -S_IFDIR: t.CDefine = 0o040000 # Directory -S_IFCHR: t.CDefine = 0o020000 # Character device -S_IFIFO: t.CDefine = 0o010000 # FIFO/pipe -S_ISUID: t.CDefine = 0o4000 # Set-user-ID -S_ISGID: t.CDefine = 0o2000 # Set-group-ID -S_ISVTX: t.CDefine = 0o1000 # Sticky bit -S_IRWXU: t.CDefine = 0o700 # Read/write/execute permission -S_IRUSR: t.CDefine = 0o400 # User read permission -S_IWUSR: t.CDefine = 0o200 # User write permission -S_IXUSR: t.CDefine = 0o100 # User execute permission -S_IRWXG: t.CDefine = 0o070 # Read/write/execute permission -S_IRGRP: t.CDefine = 0o040 # Read permission -S_IWGRP: t.CDefine = 0o020 # Write -S_IXGRP: t.CDefine = 0o010 # Execute -S_IRWXO: t.CDefine = 0o007 # Read/write/execute permission -S_IROTH: t.CDefine = 0o004 # Other read permission -S_IWOTH: t.CDefine = 0o002 # Other write permission -S_IXOTH: t.CDefine = 0o001 # Other execute permission -SEEK_SET: t.CDefine = 0 -SEEK_CUR: t.CDefine = 1 -SEEK_END: t.CDefine = 2 -PATH_MAX: t.CDefine = 4096 -NAME_MAX: t.CDefine = 255 -_SC_NPROCESSORS_ONLN: t.CDefine = 84 -_SC_PAGESIZE: t.CDefine = 30 -_SC_CLK_TCK: t.CDefine = 2 -DT_UNKNOWN: t.CDefine = 0 -DT_FIFO: t.CDefine = 1 -DT_CHR: t.CDefine = 2 -DT_DIR: t.CDefine = 4 -DT_BLK: t.CDefine = 6 -DT_REG: t.CDefine = 8 -DT_LNK: t.CDefine = 10 -DT_SOCK: t.CDefine = 12 -DT_WHT: t.CDefine = 14 -WNOHANG: t.CDefine = 1 -WUNTRACED: t.CDefine = 2 -WCONTINUED: t.CDefine = 8 - -class Stat: - st_dev: dev_t - st_ino: ino_t - st_nlink: nlink_t - st_mode: mode_t - st_uid: uid_t - st_gid: gid_t - __pad0: INT - st_rdev: dev_t - st_size: off_t - st_blksize: blksize_t - st_blocks: blkcnt_t - st_atim_sec: time_t - st_atim_nsec: LONGLONG - st_mtim_sec: time_t - st_mtim_nsec: LONGLONG - st_ctim_sec: time_t - st_ctim_nsec: LONGLONG - __unused0: LONGLONG - __unused1: LONGLONG - __unused2: LONGLONG -class Dirent: - d_ino: ino_t - d_off: off_t - d_reclen: USHORT - d_type: BYTE - d_name: CHARPTR - -def open(path: t.CConst | str, oflag: INT, *args) -> INT | t.State: pass - -def close(fd: INT) -> INT | t.State: pass - -def read(fd: INT, buf: bytes, count: t.CSizeT) -> ssize_t | t.State: pass - -def write(fd: INT, buf: t.CConst | bytes, count: t.CSizeT) -> ssize_t | t.State: pass - -def lseek(fd: INT, offset: off_t, whence: INT) -> off_t | t.State: pass - -def unlink(path: t.CConst | str) -> INT | t.State: pass - -def access(path: t.CConst | str, amode: INT) -> INT | t.State: pass - -def realpath(path: t.CConst | str, resolved: CHARPTR) -> CHARPTR | t.State: pass - -def rename(oldpath: t.CConst | str, newpath: t.CConst | str) -> INT | t.State: pass - -def chmod(path: t.CConst | str, mode: mode_t) -> INT | t.State: pass - -def stat(path: t.CConst | str, buf: Stat | t.CPtr) -> INT | t.State: pass - -def fstat(fd: INT, buf: Stat | t.CPtr) -> INT | t.State: pass - -def opendir(name: t.CConst | str) -> DIR | t.CPtr | t.State: pass - -def readdir(dirp: DIR | t.CPtr) -> Dirent | t.CPtr | t.State: pass - -def closedir(dirp: DIR | t.CPtr) -> INT | t.State: pass - -def mkdir(path: t.CConst | str, mode: mode_t) -> INT | t.State: pass - -def rmdir(path: t.CConst | str) -> INT | t.State: pass - -def getcwd(buf: CHARPTR, size: t.CSizeT) -> CHARPTR | t.State: pass - -def chdir(path: t.CConst | str) -> INT | t.State: pass - -def fork() -> pid_t | t.State: pass - -def execvp(file: t.CConst | str, argv: CHARPTR | t.CPtr) -> INT | t.State: pass - -def execv(path: t.CConst | str, argv: CHARPTR | t.CPtr) -> INT | t.State: pass - -def waitpid(pid: pid_t, status: INT | t.CPtr, options: INT) -> pid_t | t.State: pass - -def pipe(fds: INT | t.CPtr) -> INT | t.State: pass - -def dup2(oldfd: INT, newfd: INT) -> INT | t.State: pass - -def _exit(status: INT) -> t.CVoid | t.State: pass - -def getpid() -> pid_t | t.State: pass - -def getenv(name: t.CConst | str) -> CHARPTR | t.State: pass - -def setenv(name: t.CConst | str, value: t.CConst | str, overwrite: INT) -> INT | t.State: pass - -def sysconf(name: INT) -> LONG | t.State: pass - -def isatty(fd: INT) -> INT | t.State: pass - -def S_ISREG(mode: mode_t) -> bool: pass - -def S_ISDIR(mode: mode_t) -> bool: pass - -def S_ISLNK(mode: mode_t) -> bool: pass - -def S_ISCHR(mode: mode_t) -> bool: pass - -def S_ISBLK(mode: mode_t) -> bool: pass - -def S_ISFIFO(mode: mode_t) -> bool: pass - -def S_ISSOCK(mode: mode_t) -> bool: pass - -def WIFEXITED(status: INT) -> bool: pass - -def WEXITSTATUS(status: INT) -> INT: pass - -def WIFSIGNALED(status: INT) -> bool: pass - -def WTERMSIG(status: INT) -> INT: pass diff --git a/Test/AstTest/temp/6446627d4f07a1b5.vpi b/Test/AstTest/temp/6446627d4f07a1b5.vpi deleted file mode 100644 index 55f6a1f..0000000 --- a/Test/AstTest/temp/6446627d4f07a1b5.vpi +++ /dev/null @@ -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 diff --git a/Test/AstTest/temp/6c658cc728d0bbf4.stub.ll.dep b/Test/AstTest/temp/6c658cc728d0bbf4.stub.ll.dep deleted file mode 100644 index 793e7ed..0000000 --- a/Test/AstTest/temp/6c658cc728d0bbf4.stub.ll.dep +++ /dev/null @@ -1 +0,0 @@ -f5522571bcce7bcb \ No newline at end of file diff --git a/Test/AstTest/temp/6c658cc728d0bbf4.vpi b/Test/AstTest/temp/6c658cc728d0bbf4.vpi deleted file mode 100644 index d7c42cf..0000000 --- a/Test/AstTest/temp/6c658cc728d0bbf4.vpi +++ /dev/null @@ -1,22 +0,0 @@ -""" -Auto-generated Python stub file from stdlib.vp -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 - -def exit(status: int) -> t.State: pass diff --git a/Test/AstTest/temp/71e0a3ffcb3ebfad.stub.ll.dep b/Test/AstTest/temp/71e0a3ffcb3ebfad.stub.ll.dep deleted file mode 100644 index e69de29..0000000 diff --git a/Test/AstTest/temp/71e0a3ffcb3ebfad.vpi b/Test/AstTest/temp/71e0a3ffcb3ebfad.vpi deleted file mode 100644 index f99012f..0000000 --- a/Test/AstTest/temp/71e0a3ffcb3ebfad.vpi +++ /dev/null @@ -1,20 +0,0 @@ -""" -Auto-generated Python stub file from stdarg.vp -Module: stdarg -""" - -import c - - -import t - -def va_start(args: t.CPtr, last_arg: t.CPtr) -> t.State: pass - -def va_arg(args: t.CPtr, type: t.CPtr) -> t.CPtr | t.State: pass - -def va_end(args: t.CPtr) -> t.State | t.State: pass - - -va_list: t.CTypedef = t.CUnsignedChar | t.CPtr - -def arg(type: t.CType) -> t.State: pass diff --git a/Test/AstTest/temp/72e2d5ccb7cedcf1.vpi b/Test/AstTest/temp/72e2d5ccb7cedcf1.vpi deleted file mode 100644 index f85ee45..0000000 --- a/Test/AstTest/temp/72e2d5ccb7cedcf1.vpi +++ /dev/null @@ -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 diff --git a/Test/AstTest/temp/_phase1_manifest.json b/Test/AstTest/temp/_phase1_manifest.json deleted file mode 100644 index 700ada0..0000000 --- a/Test/AstTest/temp/_phase1_manifest.json +++ /dev/null @@ -1 +0,0 @@ -{"d:\\Users\\TermiNexus\\Desktop\\TransPyC\\Test\\AstTest\\App\\main.vp": {"sha1": "6eed58d6587aba87", "mtime": 1786380384.1598237, "size": 9276}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\_list.vp": {"sha1": "7cadfe07e983fd90", "mtime": 1785338614.5410473, "size": 3238}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\ast\\__init__.vp": {"sha1": "876e256c06636777", "mtime": 1786370438.7959065, "size": 3919}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\ast\\astaux.vp": {"sha1": "34dc6a647fa19b7b", "mtime": 1786033586.0642571, "size": 11475}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\ast\\base.vp": {"sha1": "71b20381eda0450a", "mtime": 1786370425.011384, "size": 16357}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\ast\\exprs.vp": {"sha1": "43ec967d0517abc1", "mtime": 1786370434.0783823, "size": 40976}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\ast\\lexer.vp": {"sha1": "d0072d5282b9b65f", "mtime": 1786095601.8036606, "size": 24838}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\ast\\match.vp": {"sha1": "3b2a307c9c7d0129", "mtime": 1786095636.9718795, "size": 12297}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\ast\\parser.vp": {"sha1": "6b2a008dbdcddb7f", "mtime": 1786205592.4913094, "size": 102238}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\ast\\stmts.vp": {"sha1": "46ea1349c980c7f4", "mtime": 1786369520.4458838, "size": 38239}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\ast\\tokens.vp": {"sha1": "cea844466f10ac61", "mtime": 1786196689.3449256, "size": 14506}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\atom.vp": {"sha1": "aa246c6e6aa30484", "mtime": 1785389628.701967, "size": 1198}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\memhub.vp": {"sha1": "2408ce147bac090b", "mtime": 1786323167.9697752, "size": 33121}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\platmacro.vp": {"sha1": "b57252077e6b596b", "mtime": 1785332415.2187803, "size": 1266}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\posix.vp": {"sha1": "28de517e3820658a", "mtime": 1785335629.2014928, "size": 10586}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\stdarg.vp": {"sha1": "71e0a3ffcb3ebfad", "mtime": 1781258888.113146, "size": 277}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\stdint.vp": {"sha1": "f5522571bcce7bcb", "mtime": 1785563642.3805652, "size": 4356}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\stdio.vp": {"sha1": "285b6aa29a34754d", "mtime": 1785332415.1829746, "size": 561}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\stdlib.vp": {"sha1": "6c658cc728d0bbf4", "mtime": 1785750602.5446548, "size": 413}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\string.vp": {"sha1": "4c39369ffedaddac", "mtime": 1786188859.6154988, "size": 12277}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\sys.vp": {"sha1": "0c67644125bea0fd", "mtime": 1785325556.7317626, "size": 5606}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\viperio.vp": {"sha1": "2c175afd85852faf", "mtime": 1786320035.0415876, "size": 1685}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\viperlib.vp": {"sha1": "bba983c61a970f7c", "mtime": 1786320034.4835327, "size": 59458}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\w32\\win32base.vp": {"sha1": "fc980acec33d69a7", "mtime": 1785332415.2228394, "size": 2653}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\w32\\win32console.vp": {"sha1": "bbdf3bbd4c3bc28c", "mtime": 1781200703.5338137, "size": 5604}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\w32\\win32process.vp": {"sha1": "067c78e9f121dce3", "mtime": 1781200703.5409546, "size": 4802}} \ No newline at end of file diff --git a/Test/AstTest/temp/_sha1_map.txt b/Test/AstTest/temp/_sha1_map.txt deleted file mode 100644 index 5a22d3a..0000000 --- a/Test/AstTest/temp/_sha1_map.txt +++ /dev/null @@ -1,26 +0,0 @@ -067c78e9f121dce3:includes/w32\win32process.vp -0c67644125bea0fd:includes/sys.vp -2408ce147bac090b:includes/memhub.vp -285b6aa29a34754d:includes/stdio.vp -28de517e3820658a:includes/posix.vp -2c175afd85852faf:includes/viperio.vp -34dc6a647fa19b7b:includes/ast\astaux.vp -3b2a307c9c7d0129:includes/ast\match.vp -43ec967d0517abc1:includes/ast\exprs.vp -46ea1349c980c7f4:includes/ast\stmts.vp -4c39369ffedaddac:includes/string.vp -6b2a008dbdcddb7f:includes/ast\parser.vp -6c658cc728d0bbf4:includes/stdlib.vp -6eed58d6587aba87:main.vp -71b20381eda0450a:includes/ast\base.vp -71e0a3ffcb3ebfad:includes/stdarg.vp -7cadfe07e983fd90:includes/_list.vp -876e256c06636777:includes/ast\__init__.vp -aa246c6e6aa30484:includes/atom.vp -b57252077e6b596b:includes/platmacro.vp -bba983c61a970f7c:includes/viperlib.vp -bbdf3bbd4c3bc28c:includes/w32\win32console.vp -cea844466f10ac61:includes/ast\tokens.vp -d0072d5282b9b65f:includes/ast\lexer.vp -f5522571bcce7bcb:includes/stdint.vp -fc980acec33d69a7:includes/w32\win32base.vp diff --git a/Test/AstTest/temp/aa246c6e6aa30484.stub.ll.dep b/Test/AstTest/temp/aa246c6e6aa30484.stub.ll.dep deleted file mode 100644 index e69de29..0000000 diff --git a/Test/AstTest/temp/aa246c6e6aa30484.vpi b/Test/AstTest/temp/aa246c6e6aa30484.vpi deleted file mode 100644 index 3147b54..0000000 --- a/Test/AstTest/temp/aa246c6e6aa30484.vpi +++ /dev/null @@ -1,26 +0,0 @@ -""" -Auto-generated Python stub file from atom.vp -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 diff --git a/Test/AstTest/temp/b57252077e6b596b.stub.ll.dep b/Test/AstTest/temp/b57252077e6b596b.stub.ll.dep deleted file mode 100644 index e69de29..0000000 diff --git a/Test/AstTest/temp/b57252077e6b596b.vpi b/Test/AstTest/temp/b57252077e6b596b.vpi deleted file mode 100644 index 32c2251..0000000 --- a/Test/AstTest/temp/b57252077e6b596b.vpi +++ /dev/null @@ -1,53 +0,0 @@ -""" -Auto-generated Python stub file from platmacro.vp -Module: platmacro -""" - - -import t, c - -IS_WINDOWS: t.CDefine = 1 -IS_WIN64: t.CDefine = 1 -IS_X86_64: t.CDefine = 1 -IS_LP64: t.CDefine = 1 -IS_LITTLE_ENDIAN: t.CDefine = 1 -IS_LINUX: t.CDefine = 0 -IS_MACOS: t.CDefine = 0 -IS_ARM64: t.CDefine = 0 -IS_BIG_ENDIAN: t.CDefine = 0 -IS_ILP32: t.CDefine = 0 -PTR_SIZE: t.CDefine = 8 -INT_SIZE: t.CDefine = 4 -LONG_SIZE: t.CDefine = 4 -WORD_SIZE: t.CDefine = 8 -CACHE_LINE_SIZE: t.CDefine = 64 -PAGE_SIZE: t.CDefine = 4096 -STACK_ALIGN: t.CDefine = 16 -MAX_PATH_LEN: t.CDefine = 260 -PLATFORM_NAME: t.CDefine = 1 -ARCH_NAME: t.CDefine = 1 -WINVER: t.CDefine = 0x0A00 -_WIN32_WINNT: t.CDefine = 0x0A00 -NTDDI_VERSION: t.CDefine = 0x0A000006 -HAS_SSE2: t.CDefine = 1 -HAS_AVX: t.CDefine = 1 -HAS_AVX2: t.CDefine = 1 -HAS_FMA: t.CDefine = 1 -HAS_NEON: t.CDefine = 0 -ALIGNOF_INT: t.CDefine = 4 -ALIGNOF_LONG: t.CDefine = 4 -ALIGNOF_PTR: t.CDefine = 8 -ALIGNOF_DOUBLE: t.CDefine = 8 -ALIGNOF_LONG_DOUBLE: t.CDefine = 16 -SIZEOF_SHORT: t.CDefine = 2 -SIZEOF_INT: t.CDefine = 4 -SIZEOF_LONG: t.CDefine = 4 -SIZEOF_LONG_LONG: t.CDefine = 8 -SIZEOF_FLOAT: t.CDefine = 4 -SIZEOF_DOUBLE: t.CDefine = 8 -SIZEOF_LONG_DOUBLE: t.CDefine = 16 -SIZEOF_POINTER: t.CDefine = 8 -SIZEOF_SIZE_T: t.CDefine = 8 -SIZEOF_PTRDIFF_T: t.CDefine = 8 -BYTE_ORDER_LE: t.CDefine = 1 -BYTE_ORDER_BE: t.CDefine = 0 \ No newline at end of file diff --git a/Test/AstTest/temp/bbdf3bbd4c3bc28c.stub.ll.dep b/Test/AstTest/temp/bbdf3bbd4c3bc28c.stub.ll.dep deleted file mode 100644 index d4b382c..0000000 --- a/Test/AstTest/temp/bbdf3bbd4c3bc28c.stub.ll.dep +++ /dev/null @@ -1 +0,0 @@ -f5522571bcce7bcb|fc980acec33d69a7 \ No newline at end of file diff --git a/Test/AstTest/temp/bbdf3bbd4c3bc28c.vpi b/Test/AstTest/temp/bbdf3bbd4c3bc28c.vpi deleted file mode 100644 index 4709b3e..0000000 --- a/Test/AstTest/temp/bbdf3bbd4c3bc28c.vpi +++ /dev/null @@ -1,138 +0,0 @@ -""" -Auto-generated Python stub file from w32.win32console.vp -Module: w32.win32console -""" - -import c - - -import t -from stdint import * -from w32.win32base import * - -ENABLE_PROCESSED_INPUT: t.CDefine = 0x0001 -ENABLE_LINE_INPUT: t.CDefine = 0x0002 -ENABLE_ECHO_INPUT: t.CDefine = 0x0004 -ENABLE_WINDOW_INPUT: t.CDefine = 0x0008 -ENABLE_MOUSE_INPUT: t.CDefine = 0x0010 -ENABLE_INSERT_MODE: t.CDefine = 0x0020 -ENABLE_QUICK_EDIT_MODE: t.CDefine = 0x0040 -ENABLE_EXTENDED_FLAGS: t.CDefine = 0x0080 -ENABLE_PROCESSED_OUTPUT: t.CDefine = 0x0001 -ENABLE_WRAP_AT_EOL_OUTPUT: t.CDefine = 0x0002 -ENABLE_VIRTUAL_TERMINAL_PROCESSING: t.CDefine = 0x0004 -DISABLE_NEWLINE_AUTO_RETURN: t.CDefine = 0x0008 -ENABLE_LVB_GRID_WORLDWIDE: t.CDefine = 0x0010 -FOREGROUND_BLUE: t.CDefine = 0x0001 -FOREGROUND_GREEN: t.CDefine = 0x0002 -FOREGROUND_RED: t.CDefine = 0x0004 -FOREGROUND_INTENSITY: t.CDefine = 0x0008 -BACKGROUND_BLUE: t.CDefine = 0x0010 -BACKGROUND_GREEN: t.CDefine = 0x0020 -BACKGROUND_RED: t.CDefine = 0x0040 -BACKGROUND_INTENSITY: t.CDefine = 0x0080 -KEY_EVENT: t.CDefine = 0x0001 -MOUSE_EVENT: t.CDefine = 0x0002 -WINDOW_BUFFER_SIZE_EVENT: t.CDefine = 0x0004 -MENU_EVENT: t.CDefine = 0x0008 -FOCUS_EVENT: t.CDefine = 0x0010 - -class COORD: - X: SHORT - Y: SHORT -class SMALL_RECT: - Left: SHORT - Top: SHORT - Right: SHORT - Bottom: SHORT -class CONSOLE_SCREEN_BUFFER_INFO: - dwSize: COORD - dwCursorPosition: COORD - wAttributes: WORD - srWindow: SMALL_RECT - dwMaximumWindowSize: COORD -class CONSOLE_CURSOR_INFO: - dwSize: ULONG - bVisible: BOOL -class CHAR_INFO: - UnicodeChar: WCHAR - Attributes: WORD -class KEY_EVENT_RECORD: - bKeyDown: BOOL - wRepeatCount: WORD - wVirtualKeyCode: WORD - wVirtualScanCode: WORD - uChar: WCHAR - dwControlKeyState: ULONG -class MOUSE_EVENT_RECORD: - dwMousePosition: COORD - dwButtonState: ULONG - dwControlKeyState: ULONG - dwEventFlags: ULONG -class WINDOW_BUFFER_SIZE_RECORD: - dwSize: COORD -class INPUT_RECORD: - EventType: WORD - Event: KEY_EVENT_RECORD - -def SetConsoleOutputCP(codepage: UINT) -> BOOL | t.State: pass - -def SetConsoleCP(codepage: UINT) -> BOOL | t.State: pass - -def GetConsoleCP() -> UINT | t.State: pass - -def GetConsoleOutputCP() -> UINT | t.State: pass - -def GetConsoleScreenBufferInfo(hConsoleOutput: HANDLE, lpConsoleScreenBufferInfo: CONSOLE_SCREEN_BUFFER_INFO | t.CPtr) -> BOOL | t.State: pass - -def SetConsoleScreenBufferSize(hConsoleOutput: HANDLE, dwSize: COORD) -> BOOL | t.State: pass - -def SetConsoleCursorPosition(hConsoleOutput: HANDLE, dwCursorPosition: COORD) -> BOOL | t.State: pass - -def GetConsoleCursorInfo(hConsoleOutput: HANDLE, lpConsoleCursorInfo: CONSOLE_CURSOR_INFO | t.CPtr) -> BOOL | t.State: pass - -def SetConsoleCursorInfo(hConsoleOutput: HANDLE, lpConsoleCursorInfo: CONSOLE_CURSOR_INFO | t.CPtr) -> BOOL | t.State: pass - -def SetConsoleTextAttribute(hConsoleOutput: HANDLE, wAttributes: WORD) -> BOOL | t.State: pass - -def FillConsoleOutputCharacterA(hConsoleOutput: HANDLE, cCharacter: t.CChar, nLength: ULONG, dwWriteCoord: COORD, lpNumberOfCharsWritten: ULONG | t.CPtr) -> BOOL | t.State: pass - -def FillConsoleOutputCharacterW(hConsoleOutput: HANDLE, cCharacter: WCHAR, nLength: ULONG, dwWriteCoord: COORD, lpNumberOfCharsWritten: ULONG | t.CPtr) -> BOOL | t.State: pass - -def FillConsoleOutputAttribute(hConsoleOutput: HANDLE, wAttribute: WORD, nLength: ULONG, dwWriteCoord: COORD, lpNumberOfAttrsWritten: ULONG | t.CPtr) -> BOOL | t.State: pass - -def WriteConsoleA(hConsoleOutput: HANDLE, lpBuffer: t.CConst | VOIDPTR, nNumberOfCharsToWrite: ULONG, lpNumberOfCharsWritten: ULONG | t.CPtr, lpReserved: VOIDPTR) -> BOOL | t.State: pass - -def WriteConsoleW(hConsoleOutput: HANDLE, lpBuffer: t.CConst | VOIDPTR, nNumberOfCharsToWrite: ULONG, lpNumberOfCharsWritten: ULONG | t.CPtr, lpReserved: VOIDPTR) -> BOOL | t.State: pass - -def ReadConsoleA(hConsoleInput: HANDLE, lpBuffer: VOIDPTR, nNumberOfCharsToRead: ULONG, lpNumberOfCharsRead: ULONG | t.CPtr, pInputControl: VOIDPTR) -> BOOL | t.State: pass - -def ReadConsoleW(hConsoleInput: HANDLE, lpBuffer: VOIDPTR, nNumberOfCharsToRead: ULONG, lpNumberOfCharsRead: ULONG | t.CPtr, pInputControl: VOIDPTR) -> BOOL | t.State: pass - -def GetConsoleMode(hConsoleHandle: HANDLE, lpMode: ULONG | t.CPtr) -> BOOL | t.State: pass - -def SetConsoleMode(hConsoleHandle: HANDLE, dwMode: ULONG) -> BOOL | t.State: pass - -def ReadConsoleInputA(hConsoleInput: HANDLE, lpBuffer: INPUT_RECORD | t.CPtr, nLength: ULONG, lpNumberOfEventsRead: ULONG | t.CPtr) -> BOOL | t.State: pass - -def ReadConsoleInputW(hConsoleInput: HANDLE, lpBuffer: INPUT_RECORD | t.CPtr, nLength: ULONG, lpNumberOfEventsRead: ULONG | t.CPtr) -> BOOL | t.State: pass - -def GetNumberOfConsoleInputEvents(hConsoleInput: HANDLE, lpNumberOfEvents: ULONG | t.CPtr) -> BOOL | t.State: pass - -def FlushConsoleInputBuffer(hConsoleInput: HANDLE) -> BOOL | t.State: pass - -def SetConsoleTitleA(lpConsoleTitle: LPCSTR) -> BOOL | t.State: pass - -def SetConsoleTitleW(lpConsoleTitle: LPCWSTR) -> BOOL | t.State: pass - -def GetConsoleTitleA(lpConsoleTitle: CHARPTR, nSize: ULONG) -> ULONG | t.State: pass - -def GetConsoleTitleW(lpConsoleTitle: WCHARPTR, nSize: ULONG) -> ULONG | t.State: pass - -def AllocConsole() -> BOOL | t.State: pass - -def FreeConsole() -> BOOL | t.State: pass - -def SetConsoleWindowInfo(hConsoleOutput: HANDLE, bAbsolute: BOOL, lpConsoleWindow: SMALL_RECT | t.CPtr) -> BOOL | t.State: pass - -def ScrollConsoleScreenBufferA(hConsoleOutput: HANDLE, lpScrollRectangle: SMALL_RECT | t.CPtr, lpClipRectangle: SMALL_RECT | t.CPtr, dwDestinationOrigin: COORD, lpFill: CHAR_INFO | t.CPtr) -> BOOL | t.State: pass diff --git a/Test/AstTest/temp/d137b1f3311f3a7f.vpi b/Test/AstTest/temp/d137b1f3311f3a7f.vpi deleted file mode 100644 index a85310e..0000000 --- a/Test/AstTest/temp/d137b1f3311f3a7f.vpi +++ /dev/null @@ -1,81 +0,0 @@ -""" -Auto-generated Python stub file from w32.fileio.vp -Module: w32.fileio -""" - - -import t, c -from stdint import * -import stdio -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 = SHARE_READ) -> 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 = SHARE_READ) -> 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 = SHARE_READ) -> File | t.CPtr: pass - -def openw(filename: w32.win32base.LPCWSTR, mode: ULONG, share: ULONG = SHARE_READ) -> FileW | t.CPtr: pass diff --git a/Test/AstTest/temp/f5522571bcce7bcb.stub.ll.dep b/Test/AstTest/temp/f5522571bcce7bcb.stub.ll.dep deleted file mode 100644 index e69de29..0000000 diff --git a/Test/AstTest/temp/f5522571bcce7bcb.vpi b/Test/AstTest/temp/f5522571bcce7bcb.vpi deleted file mode 100644 index f0bc071..0000000 --- a/Test/AstTest/temp/f5522571bcce7bcb.vpi +++ /dev/null @@ -1,100 +0,0 @@ -""" -Auto-generated Python stub file from stdint.vp -Module: stdint -""" - -import c - - -import t - -INT: t.CTypedef = t.CInt -INTPTR: t.CTypedef = t.CInt | t.CPtr -BOOL: t.CTypedef = t.CInt -UINT: t.CTypedef = t.CUnsignedInt -UINTPTR: t.CTypedef = UINT | t.CPtr -BYTE: t.CTypedef = t.CUnsignedChar -BYTEPTR: t.CTypedef = BYTE | t.CPtr -WORD: t.CTypedef = t.CUInt16T -DWORD: t.CTypedef = t.CUInt32T -QWORD: t.CTypedef = t.CUInt64T -TCHAR: t.CTypedef = t.CChar -CHARLIST: t.CTypedef = str | t.CPtr -VOID: t.CTypedef = t.CVoid -SHORT: t.CTypedef = t.CShort -SHORTPTR: t.CTypedef = t.CShort | t.CPtr -USHORT: t.CTypedef = t.CUnsignedShort -USHORTPTR: t.CTypedef = t.CUnsignedShort | t.CPtr -LONGLONG: t.CTypedef = t.CLongLong -ULONGLONG: t.CTypedef = t.CUnsignedLongLong -LONG: t.CTypedef = t.CLong -ULONG: t.CTypedef = t.CUnsignedLong -WCHAR: t.CTypedef = WORD -WCHARPTR: t.CTypedef = WORD | t.CPtr -CHARPTR: t.CTypedef = t.CChar | t.CPtr -FSIZE_t: t.CTypedef = DWORD -LBA_t: t.CTypedef = DWORD -VOIDPTR: t.CTypedef = t.CVoid | t.CPtr -FLOAT: t.CTypedef = t.CFloat -DOUBLE: t.CTypedef = t.CDouble -FLOAT8: t.CTypedef = t.CFloat8T -FLOAT16: t.CTypedef = t.CFloat16T -FLOAT32: t.CTypedef = t.CFloat32T -FLOAT64: t.CTypedef = t.CFloat64T -FLOAT128: t.CTypedef = t.CFloat128T -INT8: t.CTypedef = t.CInt8T -INT16: t.CTypedef = t.CInt16T -INT32: t.CTypedef = t.CInt32T -INT64: t.CTypedef = t.CInt64T -UINT8: t.CTypedef = t.CUInt8T -UINT16: t.CTypedef = t.CUInt16T -UINT32: t.CTypedef = t.CUInt32T -UINT64: t.CTypedef = t.CUInt64T -INT8PTR: t.CTypedef = t.CInt8T | t.CPtr -INT16PTR: t.CTypedef = t.CInt16T | t.CPtr -INT32PTR: t.CTypedef = t.CInt32T | t.CPtr -INT64PTR: t.CTypedef = t.CInt64T | t.CPtr -UINT8PTR: t.CTypedef = t.CUInt8T | t.CPtr -UINT16PTR: t.CTypedef = t.CUInt16T | t.CPtr -UINT32PTR: t.CTypedef = t.CUInt32T | t.CPtr -UINT64PTR: t.CTypedef = t.CUInt64T | t.CPtr -CHAR8: t.CTypedef = t.CChar8T -CHAR16: t.CTypedef = t.CChar16T -CHAR32: t.CTypedef = t.CChar32T -CHAR8PTR: t.CTypedef = t.CChar8T | t.CPtr -CHAR16PTR: t.CTypedef = t.CChar16T | t.CPtr -CHAR32PTR: t.CTypedef = t.CChar32T | t.CPtr -i8: t.CTypedef = t.CInt8T -i16: t.CTypedef = t.CInt16T -i32: t.CTypedef = t.CInt32T -i64: t.CTypedef = t.CInt64T -u8: t.CTypedef = t.CUInt8T -u16: t.CTypedef = t.CUInt16T -u32: t.CTypedef = t.CUInt32T -u64: t.CTypedef = t.CUInt64T -SIZE_T: t.CTypedef = t.CSizeT -SSIZE_T: t.CTypedef = t.CPtrDiffT -PTRDIFF_T: t.CTypedef = t.CPtrDiffT -int8_t: t.CTypedef = t.CInt8T -int16_t: t.CTypedef = t.CInt16T -int32_t: t.CTypedef = t.CInt32T -int64_t: t.CTypedef = t.CInt64T -uint8_t: t.CTypedef = t.CUInt8T -uint16_t: t.CTypedef = t.CUInt16T -uint32_t: t.CTypedef = t.CUInt32T -uint64_t: t.CTypedef = t.CUInt64T -size_t: t.CTypedef = t.CSizeT -ssize_t: t.CTypedef = t.CPtrDiffT -ptrdiff_t: t.CTypedef = t.CPtrDiffT -intptr_t: t.CTypedef = t.CIntPtrT -uintptr_t: t.CTypedef = t.CUIntPtrT -wchar_t: t.CTypedef = t.CWCharT -char8_t: t.CTypedef = t.CChar8T -char16_t: t.CTypedef = t.CChar16T -char32_t: t.CTypedef = t.CChar32T -float8_t: t.CTypedef = t.CFloat8T -float16_t: t.CTypedef = t.CFloat16T -float32_t: t.CTypedef = t.CFloat32T -float64_t: t.CTypedef = t.CFloat64T -float128_t: t.CTypedef = t.CFloat128T -_Bool: t.CTypedef = t.CBool \ No newline at end of file diff --git a/Test/AstTest/temp/f6b51804a0ba8ff0.vpi b/Test/AstTest/temp/f6b51804a0ba8ff0.vpi deleted file mode 100644 index 6ee80a6..0000000 --- a/Test/AstTest/temp/f6b51804a0ba8ff0.vpi +++ /dev/null @@ -1,192 +0,0 @@ -""" -Auto-generated Python stub file from w32.win32file.vp -Module: w32.win32file -""" - -import c - - -import t -from stdint import * -from w32.win32base import * - -GENERIC_READ: t.CDefine = 0x80000000 -GENERIC_WRITE: t.CDefine = 0x40000000 -GENERIC_EXECUTE: t.CDefine = 0x20000000 -GENERIC_ALL: t.CDefine = 0x10000000 -FILE_SHARE_READ: t.CDefine = 0x00000001 -FILE_SHARE_WRITE: t.CDefine = 0x00000002 -FILE_SHARE_DELETE: t.CDefine = 0x00000004 -CREATE_NEW: t.CDefine = 1 -CREATE_ALWAYS: t.CDefine = 2 -OPEN_EXISTING: t.CDefine = 3 -OPEN_ALWAYS: t.CDefine = 4 -TRUNCATE_EXISTING: t.CDefine = 5 -FILE_ATTRIBUTE_READONLY: t.CDefine = 0x00000001 -FILE_ATTRIBUTE_HIDDEN: t.CDefine = 0x00000002 -FILE_ATTRIBUTE_SYSTEM: t.CDefine = 0x00000004 -FILE_ATTRIBUTE_DIRECTORY: t.CDefine = 0x00000010 -FILE_ATTRIBUTE_ARCHIVE: t.CDefine = 0x00000020 -FILE_ATTRIBUTE_NORMAL: t.CDefine = 0x00000080 -FILE_ATTRIBUTE_TEMPORARY: t.CDefine = 0x00000100 -FILE_ATTRIBUTE_COMPRESSED: t.CDefine = 0x00000800 -FILE_ATTRIBUTE_OFFLINE: t.CDefine = 0x00001000 -FILE_ATTRIBUTE_ENCRYPTED: t.CDefine = 0x00004000 -FILE_FLAG_WRITE_THROUGH: t.CDefine = 0x80000000 -FILE_FLAG_OVERLAPPED: t.CDefine = 0x40000000 -FILE_FLAG_NO_BUFFERING: t.CDefine = 0x20000000 -FILE_FLAG_RANDOM_ACCESS: t.CDefine = 0x10000000 -FILE_FLAG_SEQUENTIAL_SCAN: t.CDefine = 0x08000000 -FILE_FLAG_DELETE_ON_CLOSE: t.CDefine = 0x04000000 -FILE_FLAG_BACKUP_SEMANTICS: t.CDefine = 0x02000000 -FILE_FLAG_POSIX_SEMANTICS: t.CDefine = 0x01000000 -FILE_BEGIN: t.CDefine = 0 -FILE_CURRENT: t.CDefine = 1 -FILE_END: t.CDefine = 2 -STD_INPUT_HANDLE: t.CDefine = t.CUnsignedLong(-10) -STD_OUTPUT_HANDLE: t.CDefine = t.CUnsignedLong(-11) -STD_ERROR_HANDLE: t.CDefine = t.CUnsignedLong(-12) -MOVEFILE_REPLACE_EXISTING: t.CDefine = 0x00000001 -MOVEFILE_COPY_ALLOWED: t.CDefine = 0x00000002 -MOVEFILE_WRITE_THROUGH: t.CDefine = 0x00000008 - -class BY_HANDLE_FILE_INFORMATION: - dwFileAttributes: ULONG - ftCreationTime: FILETIME - ftLastAccessTime: FILETIME - ftLastWriteTime: FILETIME - dwVolumeSerialNumber: ULONG - nFileSizeHigh: ULONG - nFileSizeLow: ULONG - nNumberOfLinks: ULONG - nFileIndexHigh: ULONG - nFileIndexLow: ULONG -class WIN32_FIND_DATAA: - dwFileAttributes: ULONG - ftCreationTime: FILETIME - ftLastAccessTime: FILETIME - ftLastWriteTime: FILETIME - nFileSizeHigh: ULONG - nFileSizeLow: ULONG - dwReserved0: ULONG - dwReserved1: ULONG - cFileName: t.CArray[t.CChar, 260] - cAlternateFileName: t.CArray[t.CChar, 14] -class WIN32_FIND_DATAW: - dwFileAttributes: ULONG - ftCreationTime: FILETIME - ftLastAccessTime: FILETIME - ftLastWriteTime: FILETIME - nFileSizeHigh: ULONG - nFileSizeLow: ULONG - dwReserved0: ULONG - dwReserved1: ULONG - cFileName: t.CArray[t.CUInt16T, 260] - cAlternateFileName: t.CArray[t.CUInt16T, 14] - -def CreateFileA(lpFileName: LPCSTR, dwDesiredAccess: ULONG, dwShareMode: ULONG, lpSecurityAttributes: SECURITY_ATTRIBUTES | t.CPtr, dwCreationDisposition: ULONG, dwFlagsAndAttributes: ULONG, hTemplateFile: HANDLE) -> HANDLE | t.State: pass - -def CreateFileW(lpFileName: LPCWSTR, dwDesiredAccess: ULONG, dwShareMode: ULONG, lpSecurityAttributes: SECURITY_ATTRIBUTES | t.CPtr, dwCreationDisposition: ULONG, dwFlagsAndAttributes: ULONG, hTemplateFile: HANDLE) -> HANDLE | t.State: pass - -def ReadFile(hFile: HANDLE, lpBuffer: VOIDPTR, nNumberOfBytesToRead: ULONG, lpNumberOfBytesRead: ULONG | t.CPtr, lpOverlapped: OVERLAPPED | t.CPtr) -> BOOL | t.State: pass - -def WriteFile(hFile: HANDLE, lpBuffer: t.CConst | VOIDPTR, nNumberOfBytesToWrite: ULONG, lpNumberOfBytesWritten: ULONG | t.CPtr, lpOverlapped: OVERLAPPED | t.CPtr) -> BOOL | t.State: pass - -def SetFilePointer(hFile: HANDLE, lDistanceToMove: LONG, lpDistanceToMoveHigh: LONG | t.CPtr, dwMoveMethod: ULONG) -> LONG | t.State: pass - -def SetFilePointerEx(hFile: HANDLE, liDistanceToMove: LARGE_INTEGER | t.CPtr, lpNewFilePointer: LARGE_INTEGER | t.CPtr, dwMoveMethod: ULONG) -> BOOL | t.State: pass - -def GetFileSize(hFile: HANDLE, lpFileSizeHigh: ULONG | t.CPtr) -> ULONG | t.State: pass - -def GetFileSizeEx(hFile: HANDLE, lpFileSize: LARGE_INTEGER | t.CPtr) -> BOOL | t.State: pass - -def SetEndOfFile(hFile: HANDLE) -> BOOL | t.State: pass - -def FlushFileBuffers(hFile: HANDLE) -> BOOL | t.State: pass - -def GetFileType(hFile: HANDLE) -> ULONG | t.State: pass - -def GetFileAttributesA(lpFileName: LPCSTR) -> ULONG | t.State: pass - -def GetFileAttributesW(lpFileName: LPCWSTR) -> ULONG | t.State: pass - -def SetFileAttributesA(lpFileName: LPCSTR, dwFileAttributes: ULONG) -> BOOL | t.State: pass - -def SetFileAttributesW(lpFileName: LPCWSTR, dwFileAttributes: ULONG) -> BOOL | t.State: pass - -def DeleteFileA(lpFileName: LPCSTR) -> BOOL | t.State: pass - -def DeleteFileW(lpFileName: LPCWSTR) -> BOOL | t.State: pass - -def MoveFileA(lpExistingFileName: LPCSTR, lpNewFileName: LPCSTR) -> BOOL | t.State: pass - -def MoveFileW(lpExistingFileName: LPCWSTR, lpNewFileName: LPCWSTR) -> BOOL | t.State: pass - -def MoveFileExA(lpExistingFileName: LPCSTR, lpNewFileName: LPCSTR, dwFlags: ULONG) -> BOOL | t.State: pass - -def MoveFileExW(lpExistingFileName: LPCWSTR, lpNewFileName: LPCWSTR, dwFlags: ULONG) -> BOOL | t.State: pass - -def CopyFileA(lpExistingFileName: LPCSTR, lpNewFileName: LPCSTR, bFailIfExists: BOOL) -> BOOL | t.State: pass - -def CopyFileW(lpExistingFileName: LPCWSTR, lpNewFileName: LPCWSTR, bFailIfExists: BOOL) -> BOOL | t.State: pass - -def CreateDirectoryA(lpPathName: LPCSTR, lpSecurityAttributes: SECURITY_ATTRIBUTES | t.CPtr) -> BOOL | t.State: pass - -def CreateDirectoryW(lpPathName: LPCWSTR, lpSecurityAttributes: SECURITY_ATTRIBUTES | t.CPtr) -> BOOL | t.State: pass - -def RemoveDirectoryA(lpPathName: LPCSTR) -> BOOL | t.State: pass - -def RemoveDirectoryW(lpPathName: LPCWSTR) -> BOOL | t.State: pass - -def FindFirstFileA(lpFileName: LPCSTR, lpFindFileData: WIN32_FIND_DATAA | t.CPtr) -> HANDLE | t.State: pass - -def FindFirstFileW(lpFileName: LPCWSTR, lpFindFileData: WIN32_FIND_DATAW | t.CPtr) -> HANDLE | t.State: pass - -def FindNextFileA(hFindFile: HANDLE, lpFindFileData: WIN32_FIND_DATAA | t.CPtr) -> BOOL | t.State: pass - -def FindNextFileW(hFindFile: HANDLE, lpFindFileData: WIN32_FIND_DATAW | t.CPtr) -> BOOL | t.State: pass - -def FindClose(hFindFile: HANDLE) -> BOOL | t.State: pass - -def GetStdHandle(nStdHandle: ULONG) -> HANDLE | t.State: pass - -def SetStdHandle(nStdHandle: ULONG, hHandle: HANDLE) -> BOOL | t.State: pass - -def GetFileInformationByHandle(hFile: HANDLE, lpFileInformation: BY_HANDLE_FILE_INFORMATION | t.CPtr) -> BOOL | t.State: pass - -def LockFile(hFile: HANDLE, dwFileOffsetLow: ULONG, dwFileOffsetHigh: ULONG, nNumberOfBytesToLockLow: ULONG, nNumberOfBytesToLockHigh: ULONG) -> BOOL | t.State: pass - -def UnlockFile(hFile: HANDLE, dwFileOffsetLow: ULONG, dwFileOffsetHigh: ULONG, nNumberOfBytesToUnlockLow: ULONG, nNumberOfBytesToUnlockHigh: ULONG) -> BOOL | t.State: pass - -def GetTempPathA(nBufferLength: ULONG, lpBuffer: CHARPTR) -> ULONG | t.State: pass - -def GetTempPathW(nBufferLength: ULONG, lpBuffer: WCHARPTR) -> ULONG | t.State: pass - -def GetTempFileNameA(lpPathName: LPCSTR, lpPrefixString: LPCSTR, uUnique: UINT, lpTempFileName: CHARPTR) -> UINT | t.State: pass - -def GetTempFileNameW(lpPathName: LPCWSTR, lpPrefixString: LPCWSTR, uUnique: UINT, lpTempFileName: WCHARPTR) -> UINT | t.State: pass - -def GetCurrentDirectoryA(nBufferLength: ULONG, lpBuffer: CHARPTR) -> ULONG | t.State: pass - -def GetCurrentDirectoryW(nBufferLength: ULONG, lpBuffer: WCHARPTR) -> ULONG | t.State: pass - -def SetCurrentDirectoryA(lpPathName: LPCSTR) -> BOOL | t.State: pass - -def SetCurrentDirectoryW(lpPathName: LPCWSTR) -> BOOL | t.State: pass - -def GetModuleFileNameA(hModule: HANDLE, lpFilename: CHARPTR, nSize: ULONG) -> ULONG | t.State: pass - -def GetModuleFileNameW(hModule: HANDLE, lpFilename: WCHARPTR, nSize: ULONG) -> ULONG | t.State: pass - - -HANDLE_FLAG_INHERIT: t.CDefine = 0x00000001 -HANDLE_FLAG_PROTECT_FROM_CLOSE: t.CDefine = 0x00000002 - -def CreatePipe(hReadPipe: HANDLE | t.CPtr, hWritePipe: HANDLE | t.CPtr, lpPipeAttributes: SECURITY_ATTRIBUTES | t.CPtr, nSize: ULONG) -> BOOL | t.State: pass - -def SetHandleInformation(hObject: HANDLE, dwMask: ULONG, dwFlags: ULONG) -> BOOL | t.State: pass - -def DuplicateHandle(hSourceProcessHandle: HANDLE, hSourceHandle: HANDLE, hTargetProcessHandle: HANDLE, lpTargetHandle: HANDLE | t.CPtr, dwDesiredAccess: ULONG, bInheritHandle: BOOL, dwOptions: ULONG) -> BOOL | t.State: pass - - -DUPLICATE_SAME_ACCESS: t.CDefine = 0x00000002 \ No newline at end of file diff --git a/Test/AstTest/temp/fc980acec33d69a7.stub.ll.dep b/Test/AstTest/temp/fc980acec33d69a7.stub.ll.dep deleted file mode 100644 index 793e7ed..0000000 --- a/Test/AstTest/temp/fc980acec33d69a7.stub.ll.dep +++ /dev/null @@ -1 +0,0 @@ -f5522571bcce7bcb \ No newline at end of file diff --git a/Test/AstTest/temp/fc980acec33d69a7.vpi b/Test/AstTest/temp/fc980acec33d69a7.vpi deleted file mode 100644 index 3f9feff..0000000 --- a/Test/AstTest/temp/fc980acec33d69a7.vpi +++ /dev/null @@ -1,100 +0,0 @@ -""" -Auto-generated Python stub file from w32.win32base.vp -Module: w32.win32base -""" - -import c - - -import t -from stdint import * - -HANDLE: t.CTypedef = VOIDPTR -LPCSTR: t.CTypedef = t.CConst | t.CChar | t.CPtr -LPCWSTR: t.CTypedef = t.CConst | t.CUnsignedShort | t.CPtr -INVALID_HANDLE_VALUE: t.CDefine = -1 -NULL: t.CDefine = 0 -TRUE: t.CDefine = 1 -FALSE: t.CDefine = 0 -INFINITE: t.CDefine = 0xFFFFFFFF -WAIT_FAILED: t.CDefine = 0xFFFFFFFF -WAIT_OBJECT_0: t.CDefine = 0 -WAIT_TIMEOUT: t.CDefine = 258 -WAIT_ABANDONED: t.CDefine = 0x80 -MAX_PATH: t.CDefine = 260 -ERROR_SUCCESS: t.CDefine = 0 -ERROR_FILE_NOT_FOUND: t.CDefine = 2 -ERROR_ACCESS_DENIED: t.CDefine = 5 -ERROR_INSUFFICIENT_BUFFER: t.CDefine = 122 - -class SECURITY_ATTRIBUTES: - nLength: ULONG - lpSecurityDescriptor: VOIDPTR - bInheritHandle: BOOL -class OVERLAPPED: - Internal: ULONGLONG - InternalHigh: ULONGLONG - Offset: ULONG - OffsetHigh: ULONG - hEvent: HANDLE -class FILETIME: - dwLowDateTime: DWORD - dwHighDateTime: DWORD -class SYSTEMTIME: - wYear: WORD - wMonth: WORD - wDayOfWeek: WORD - wDay: WORD - wHour: WORD - wMinute: WORD - wSecond: WORD - wMilliseconds: WORD -class GUID: - Data1: DWORD - Data2: WORD - Data3: WORD - Data4: BYTEPTR -class LARGE_INTEGER: - QuadPart: LONGLONG -class ULARGE_INTEGER: - QuadPart: ULONGLONG - -def GetLastError() -> ULONG | t.State: pass - -def SetLastError(dwErrCode: ULONG) -> t.State: pass - -def CloseHandle(hObject: HANDLE) -> BOOL | t.State: pass - -def GetProcAddress(hModule: HANDLE, lpProcName: LPCSTR) -> VOIDPTR | t.State: pass - -def GetModuleHandleA(lpModuleName: LPCSTR) -> HANDLE | t.State: pass - -def GetModuleHandleW(lpModuleName: LPCWSTR) -> HANDLE | t.State: pass - -def LoadLibraryA(lpLibFileName: LPCSTR) -> HANDLE | t.State: pass - -def LoadLibraryW(lpLibFileName: LPCWSTR) -> HANDLE | t.State: pass - -def FreeLibrary(hLibModule: HANDLE) -> BOOL | t.State: pass - -def GetSystemTime(lpSystemTime: SYSTEMTIME | t.CPtr) -> t.State: pass - -def GetLocalTime(lpSystemTime: SYSTEMTIME | t.CPtr) -> t.State: pass - -def FileTimeToSystemTime(lpFileTime: FILETIME | t.CPtr, lpSystemTime: SYSTEMTIME | t.CPtr) -> BOOL | t.State: pass - -def SystemTimeToFileTime(lpSystemTime: SYSTEMTIME | t.CPtr, lpFileTime: FILETIME | t.CPtr) -> BOOL | t.State: pass - -def QueryPerformanceCounter(lpPerformanceCount: LARGE_INTEGER | t.CPtr) -> BOOL | t.State: pass - -def QueryPerformanceFrequency(lpFrequency: LARGE_INTEGER | t.CPtr) -> BOOL | t.State: pass - -def Sleep(dwMilliseconds: ULONG) -> t.State: pass - -def SleepEx(dwMilliseconds: ULONG, bAlertable: BOOL) -> ULONG | t.State: pass - -def GetTickCount() -> ULONG | t.State: pass - -def GetTickCount64() -> ULONGLONG | t.State: pass - -def GetCommandLineA() -> CHARPTR | t.State: pass diff --git a/Test/BuiltinDecoratorTest/.tpv_build/temp/74/748d0424e8976fa0.deps.txt b/Test/BuiltinDecoratorTest/.tpv_build/temp/74/748d0424e8976fa0.deps.txt deleted file mode 100644 index acdf15c..0000000 --- a/Test/BuiltinDecoratorTest/.tpv_build/temp/74/748d0424e8976fa0.deps.txt +++ /dev/null @@ -1 +0,0 @@ -t c stdio w32.win32console \ No newline at end of file diff --git a/Test/BuiltinDecoratorTest/.tpv_build/temp/74/748d0424e8976fa0.vpi b/Test/BuiltinDecoratorTest/.tpv_build/temp/74/748d0424e8976fa0.vpi deleted file mode 100644 index 4703a33..0000000 --- a/Test/BuiltinDecoratorTest/.tpv_build/temp/74/748d0424e8976fa0.vpi +++ /dev/null @@ -1,27 +0,0 @@ -"""Auto-generated Python stub file""" - - -import t, c -import stdio -from w32.win32console import SetConsoleOutputCP, SetConsoleCP -CP_UTF8: t.CDefine = 65001 -_pass_count: t.CInt = 0 -_fail_count: t.CInt = 0 -_total_pass: t.CInt = 0 -_total_fail: t.CInt = 0 -def begin(name: str): pass - -def section(name: str): pass - -def ok(msg: str): pass - -def fail(msg: str): pass - -def check(cond: t.CInt, ok_msg: str, fail_msg: str): pass - -def info(msg: str): pass - -def end() -> t.CInt: pass - -def summary() -> t.CInt: pass - diff --git a/Test/BuiltinDecoratorTest/.tpv_build/temp/_sha1_map.txt b/Test/BuiltinDecoratorTest/.tpv_build/temp/_sha1_map.txt deleted file mode 100644 index 0f02d85..0000000 --- a/Test/BuiltinDecoratorTest/.tpv_build/temp/_sha1_map.txt +++ /dev/null @@ -1,8 +0,0 @@ -f5522571bcce7bcb:includes/stdint.vp -09c0472e6fd0d088:includes/stdio.vp -989dba6e92235032:includes/stdlib.vp -748d0424e8976fa0:includes/testcheck.vp -001947a1f780bd5f:includes/builtins.vp -db613a1bd6a3ca26:includes/w32/win32console.vp -e710417730391023:includes/w32/win32base.vp -e3ac223bdaf94a0c:main.vp diff --git a/Test/BuiltinDecoratorTest/.tpv_build/temp/e3/e3ac223bdaf94a0c.vpi b/Test/BuiltinDecoratorTest/.tpv_build/temp/e3/e3ac223bdaf94a0c.vpi deleted file mode 100644 index 8b52e8e..0000000 --- a/Test/BuiltinDecoratorTest/.tpv_build/temp/e3/e3ac223bdaf94a0c.vpi +++ /dev/null @@ -1,100 +0,0 @@ -"""Auto-generated Python stub file""" - -import c - -import t -from stdint import * -from stdio import printf -from stdlib import malloc -import testcheck -class Rect: - width: t.CInt - height: t.CInt - def __new__(self, w: t.CInt, h: t.CInt) -> 'Rect' | t.CPtr: pass - def __init__(self, w: t.CInt, h: t.CInt): pass - @property - def area(self) -> t.CInt: pass - @property - def is_square(self) -> bool: pass - -def test_property_getter(): pass - -class Temperature: - _celsius: t.CDouble - def __new__(self, celsius_val: t.CDouble) -> 'Temperature' | t.CPtr: pass - def __init__(self, celsius_val: t.CDouble): pass - @property - def celsius(self) -> t.CDouble: pass - @celsius.setter - def celsius(self, val: t.CDouble): pass - @property - def fahrenheit(self) -> t.CDouble: pass - -def test_property_setter(): pass - -class Counter: - _count: t.CInt - def __new__(self) -> 'Counter' | t.CPtr: pass - def __init__(self): pass - @property - def value(self) -> t.CInt: pass - @value.setter - def value(self, v: t.CInt): pass - -def test_property_getter_redef(): pass - -class Config: - _value: t.CInt - _deleted: t.CInt - def __new__(self, v: t.CInt) -> 'Config' | t.CPtr: pass - def __init__(self, v: t.CInt): pass - @property - def value(self) -> t.CInt: pass - @value.setter - def value(self, v: t.CInt): pass - @value.deleter - def value(self): pass - def is_deleted(self) -> bool: pass - -def test_property_deleter(): pass - -class MathUtils: - @staticmethod - def add(a: t.CInt, b: t.CInt) -> t.CInt: pass - @staticmethod - def max_val(a: t.CInt, b: t.CInt) -> t.CInt: pass - -def test_staticmethod(): pass - -class Point: - x: t.CDouble - y: t.CDouble - def __new__(self, x: t.CDouble, y: t.CDouble) -> 'Point' | t.CPtr: pass - def __init__(self, x: t.CDouble, y: t.CDouble): pass - @classmethod - def origin(cls: Point) -> Point: pass - @classmethod - def from_int(cls: Point, x: t.CInt, y: t.CInt) -> Point: pass - def dist_sq(self) -> t.CDouble: pass - -def test_classmethod(): pass - -class Circle: - _radius: t.CDouble - def __new__(self, r: t.CDouble) -> 'Circle' | t.CPtr: pass - def __init__(self, r: t.CDouble): pass - @property - def radius(self) -> t.CDouble: pass - @radius.setter - def radius(self, val: t.CDouble): pass - @property - def area(self) -> t.CDouble: pass - @staticmethod - def is_unit(r: t.CDouble) -> bool: pass - @classmethod - def unit(cls: Circle) -> Circle: pass - -def test_combined(): pass - -def main() -> t.CInt | t.CExport: pass - diff --git a/Test/BuiltinDecoratorTest/.tpv_build/temp/f5/f5522571bcce7bcb.deps.txt b/Test/BuiltinDecoratorTest/.tpv_build/temp/f5/f5522571bcce7bcb.deps.txt deleted file mode 100644 index 32f64f4..0000000 --- a/Test/BuiltinDecoratorTest/.tpv_build/temp/f5/f5522571bcce7bcb.deps.txt +++ /dev/null @@ -1 +0,0 @@ -t \ No newline at end of file diff --git a/Test/BuiltinDecoratorTest/.tpv_build/temp/f5/f5522571bcce7bcb.vpi b/Test/BuiltinDecoratorTest/.tpv_build/temp/f5/f5522571bcce7bcb.vpi deleted file mode 100644 index 7871c20..0000000 --- a/Test/BuiltinDecoratorTest/.tpv_build/temp/f5/f5522571bcce7bcb.vpi +++ /dev/null @@ -1,95 +0,0 @@ -"""Auto-generated Python stub file""" - -import c - -import t -INT: t.CTypedef = t.CInt -INTPTR: t.CTypedef = t.CInt | t.CPtr -BOOL: t.CTypedef = t.CInt -UINT: t.CTypedef = t.CUnsignedInt -UINTPTR: t.CTypedef = UINT | t.CPtr -BYTE: t.CTypedef = t.CUnsignedChar -BYTEPTR: t.CTypedef = BYTE | t.CPtr -WORD: t.CTypedef = t.CUInt16T -DWORD: t.CTypedef = t.CUInt32T -QWORD: t.CTypedef = t.CUInt64T -TCHAR: t.CTypedef = t.CChar -CHARLIST: t.CTypedef = str | t.CPtr -VOID: t.CTypedef = t.CVoid -SHORT: t.CTypedef = t.CShort -SHORTPTR: t.CTypedef = t.CShort | t.CPtr -USHORT: t.CTypedef = t.CUnsignedShort -USHORTPTR: t.CTypedef = t.CUnsignedShort | t.CPtr -LONGLONG: t.CTypedef = t.CLongLong -ULONGLONG: t.CTypedef = t.CUnsignedLongLong -LONG: t.CTypedef = t.CLong -ULONG: t.CTypedef = t.CUnsignedLong -WCHAR: t.CTypedef = WORD -WCHARPTR: t.CTypedef = WORD | t.CPtr -CHARPTR: t.CTypedef = t.CChar | t.CPtr -FSIZE_t: t.CTypedef = DWORD -LBA_t: t.CTypedef = DWORD -VOIDPTR: t.CTypedef = t.CVoid | t.CPtr -FLOAT: t.CTypedef = t.CFloat -DOUBLE: t.CTypedef = t.CDouble -FLOAT8: t.CTypedef = t.CFloat8T -FLOAT16: t.CTypedef = t.CFloat16T -FLOAT32: t.CTypedef = t.CFloat32T -FLOAT64: t.CTypedef = t.CFloat64T -FLOAT128: t.CTypedef = t.CFloat128T -INT8: t.CTypedef = t.CInt8T -INT16: t.CTypedef = t.CInt16T -INT32: t.CTypedef = t.CInt32T -INT64: t.CTypedef = t.CInt64T -UINT8: t.CTypedef = t.CUInt8T -UINT16: t.CTypedef = t.CUInt16T -UINT32: t.CTypedef = t.CUInt32T -UINT64: t.CTypedef = t.CUInt64T -INT8PTR: t.CTypedef = t.CInt8T | t.CPtr -INT16PTR: t.CTypedef = t.CInt16T | t.CPtr -INT32PTR: t.CTypedef = t.CInt32T | t.CPtr -INT64PTR: t.CTypedef = t.CInt64T | t.CPtr -UINT8PTR: t.CTypedef = t.CUInt8T | t.CPtr -UINT16PTR: t.CTypedef = t.CUInt16T | t.CPtr -UINT32PTR: t.CTypedef = t.CUInt32T | t.CPtr -UINT64PTR: t.CTypedef = t.CUInt64T | t.CPtr -CHAR8: t.CTypedef = t.CChar8T -CHAR16: t.CTypedef = t.CChar16T -CHAR32: t.CTypedef = t.CChar32T -CHAR8PTR: t.CTypedef = t.CChar8T | t.CPtr -CHAR16PTR: t.CTypedef = t.CChar16T | t.CPtr -CHAR32PTR: t.CTypedef = t.CChar32T | t.CPtr -i8: t.CTypedef = t.CInt8T -i16: t.CTypedef = t.CInt16T -i32: t.CTypedef = t.CInt32T -i64: t.CTypedef = t.CInt64T -u8: t.CTypedef = t.CUInt8T -u16: t.CTypedef = t.CUInt16T -u32: t.CTypedef = t.CUInt32T -u64: t.CTypedef = t.CUInt64T -SIZE_T: t.CTypedef = t.CSizeT -SSIZE_T: t.CTypedef = t.CPtrDiffT -PTRDIFF_T: t.CTypedef = t.CPtrDiffT -int8_t: t.CTypedef = t.CInt8T -int16_t: t.CTypedef = t.CInt16T -int32_t: t.CTypedef = t.CInt32T -int64_t: t.CTypedef = t.CInt64T -uint8_t: t.CTypedef = t.CUInt8T -uint16_t: t.CTypedef = t.CUInt16T -uint32_t: t.CTypedef = t.CUInt32T -uint64_t: t.CTypedef = t.CUInt64T -size_t: t.CTypedef = t.CSizeT -ssize_t: t.CTypedef = t.CPtrDiffT -ptrdiff_t: t.CTypedef = t.CPtrDiffT -intptr_t: t.CTypedef = t.CIntPtrT -uintptr_t: t.CTypedef = t.CUIntPtrT -wchar_t: t.CTypedef = t.CWCharT -char8_t: t.CTypedef = t.CChar8T -char16_t: t.CTypedef = t.CChar16T -char32_t: t.CTypedef = t.CChar32T -float8_t: t.CTypedef = t.CFloat8T -float16_t: t.CTypedef = t.CFloat16T -float32_t: t.CTypedef = t.CFloat32T -float64_t: t.CTypedef = t.CFloat64T -float128_t: t.CTypedef = t.CFloat128T -_Bool: t.CTypedef = t.CBool diff --git a/Test/ClosureCallTest/.tpv_build/temp/5a/5a548a4b33e11918.deps.txt b/Test/ClosureCallTest/.tpv_build/temp/5a/5a548a4b33e11918.deps.txt deleted file mode 100644 index ddfe193..0000000 --- a/Test/ClosureCallTest/.tpv_build/temp/5a/5a548a4b33e11918.deps.txt +++ /dev/null @@ -1 +0,0 @@ -t stdio testcheck \ No newline at end of file diff --git a/Test/ClosureCallTest/.tpv_build/temp/5a/5a548a4b33e11918.vpi b/Test/ClosureCallTest/.tpv_build/temp/5a/5a548a4b33e11918.vpi deleted file mode 100644 index ca831c9..0000000 --- a/Test/ClosureCallTest/.tpv_build/temp/5a/5a548a4b33e11918.vpi +++ /dev/null @@ -1,13 +0,0 @@ -"""Auto-generated Python stub file""" - -import c - -import t -import stdio -import testcheck -def make_counter() -> t.CPtr: pass - -def test_closure_call(): pass - -def main() -> t.CInt: pass - diff --git a/Test/ClosureCallTest/.tpv_build/temp/74/748d0424e8976fa0.deps.txt b/Test/ClosureCallTest/.tpv_build/temp/74/748d0424e8976fa0.deps.txt deleted file mode 100644 index acdf15c..0000000 --- a/Test/ClosureCallTest/.tpv_build/temp/74/748d0424e8976fa0.deps.txt +++ /dev/null @@ -1 +0,0 @@ -t c stdio w32.win32console \ No newline at end of file diff --git a/Test/ClosureCallTest/.tpv_build/temp/74/748d0424e8976fa0.vpi b/Test/ClosureCallTest/.tpv_build/temp/74/748d0424e8976fa0.vpi deleted file mode 100644 index 4703a33..0000000 --- a/Test/ClosureCallTest/.tpv_build/temp/74/748d0424e8976fa0.vpi +++ /dev/null @@ -1,27 +0,0 @@ -"""Auto-generated Python stub file""" - - -import t, c -import stdio -from w32.win32console import SetConsoleOutputCP, SetConsoleCP -CP_UTF8: t.CDefine = 65001 -_pass_count: t.CInt = 0 -_fail_count: t.CInt = 0 -_total_pass: t.CInt = 0 -_total_fail: t.CInt = 0 -def begin(name: str): pass - -def section(name: str): pass - -def ok(msg: str): pass - -def fail(msg: str): pass - -def check(cond: t.CInt, ok_msg: str, fail_msg: str): pass - -def info(msg: str): pass - -def end() -> t.CInt: pass - -def summary() -> t.CInt: pass - diff --git a/Test/ClosureCallTest/.tpv_build/temp/_sha1_map.txt b/Test/ClosureCallTest/.tpv_build/temp/_sha1_map.txt deleted file mode 100644 index a4b9a62..0000000 --- a/Test/ClosureCallTest/.tpv_build/temp/_sha1_map.txt +++ /dev/null @@ -1,7 +0,0 @@ -09c0472e6fd0d088:includes/stdio.vp -748d0424e8976fa0:includes/testcheck.vp -001947a1f780bd5f:includes/builtins.vp -db613a1bd6a3ca26:includes/w32/win32console.vp -f5522571bcce7bcb:includes/stdint.vp -e710417730391023:includes/w32/win32base.vp -5a548a4b33e11918:main.vp diff --git a/Test/ClosureCallTest/.tpv_build/temp/f5/f5522571bcce7bcb.deps.txt b/Test/ClosureCallTest/.tpv_build/temp/f5/f5522571bcce7bcb.deps.txt deleted file mode 100644 index 32f64f4..0000000 --- a/Test/ClosureCallTest/.tpv_build/temp/f5/f5522571bcce7bcb.deps.txt +++ /dev/null @@ -1 +0,0 @@ -t \ No newline at end of file diff --git a/Test/ClosureCallTest/.tpv_build/temp/f5/f5522571bcce7bcb.vpi b/Test/ClosureCallTest/.tpv_build/temp/f5/f5522571bcce7bcb.vpi deleted file mode 100644 index 7871c20..0000000 --- a/Test/ClosureCallTest/.tpv_build/temp/f5/f5522571bcce7bcb.vpi +++ /dev/null @@ -1,95 +0,0 @@ -"""Auto-generated Python stub file""" - -import c - -import t -INT: t.CTypedef = t.CInt -INTPTR: t.CTypedef = t.CInt | t.CPtr -BOOL: t.CTypedef = t.CInt -UINT: t.CTypedef = t.CUnsignedInt -UINTPTR: t.CTypedef = UINT | t.CPtr -BYTE: t.CTypedef = t.CUnsignedChar -BYTEPTR: t.CTypedef = BYTE | t.CPtr -WORD: t.CTypedef = t.CUInt16T -DWORD: t.CTypedef = t.CUInt32T -QWORD: t.CTypedef = t.CUInt64T -TCHAR: t.CTypedef = t.CChar -CHARLIST: t.CTypedef = str | t.CPtr -VOID: t.CTypedef = t.CVoid -SHORT: t.CTypedef = t.CShort -SHORTPTR: t.CTypedef = t.CShort | t.CPtr -USHORT: t.CTypedef = t.CUnsignedShort -USHORTPTR: t.CTypedef = t.CUnsignedShort | t.CPtr -LONGLONG: t.CTypedef = t.CLongLong -ULONGLONG: t.CTypedef = t.CUnsignedLongLong -LONG: t.CTypedef = t.CLong -ULONG: t.CTypedef = t.CUnsignedLong -WCHAR: t.CTypedef = WORD -WCHARPTR: t.CTypedef = WORD | t.CPtr -CHARPTR: t.CTypedef = t.CChar | t.CPtr -FSIZE_t: t.CTypedef = DWORD -LBA_t: t.CTypedef = DWORD -VOIDPTR: t.CTypedef = t.CVoid | t.CPtr -FLOAT: t.CTypedef = t.CFloat -DOUBLE: t.CTypedef = t.CDouble -FLOAT8: t.CTypedef = t.CFloat8T -FLOAT16: t.CTypedef = t.CFloat16T -FLOAT32: t.CTypedef = t.CFloat32T -FLOAT64: t.CTypedef = t.CFloat64T -FLOAT128: t.CTypedef = t.CFloat128T -INT8: t.CTypedef = t.CInt8T -INT16: t.CTypedef = t.CInt16T -INT32: t.CTypedef = t.CInt32T -INT64: t.CTypedef = t.CInt64T -UINT8: t.CTypedef = t.CUInt8T -UINT16: t.CTypedef = t.CUInt16T -UINT32: t.CTypedef = t.CUInt32T -UINT64: t.CTypedef = t.CUInt64T -INT8PTR: t.CTypedef = t.CInt8T | t.CPtr -INT16PTR: t.CTypedef = t.CInt16T | t.CPtr -INT32PTR: t.CTypedef = t.CInt32T | t.CPtr -INT64PTR: t.CTypedef = t.CInt64T | t.CPtr -UINT8PTR: t.CTypedef = t.CUInt8T | t.CPtr -UINT16PTR: t.CTypedef = t.CUInt16T | t.CPtr -UINT32PTR: t.CTypedef = t.CUInt32T | t.CPtr -UINT64PTR: t.CTypedef = t.CUInt64T | t.CPtr -CHAR8: t.CTypedef = t.CChar8T -CHAR16: t.CTypedef = t.CChar16T -CHAR32: t.CTypedef = t.CChar32T -CHAR8PTR: t.CTypedef = t.CChar8T | t.CPtr -CHAR16PTR: t.CTypedef = t.CChar16T | t.CPtr -CHAR32PTR: t.CTypedef = t.CChar32T | t.CPtr -i8: t.CTypedef = t.CInt8T -i16: t.CTypedef = t.CInt16T -i32: t.CTypedef = t.CInt32T -i64: t.CTypedef = t.CInt64T -u8: t.CTypedef = t.CUInt8T -u16: t.CTypedef = t.CUInt16T -u32: t.CTypedef = t.CUInt32T -u64: t.CTypedef = t.CUInt64T -SIZE_T: t.CTypedef = t.CSizeT -SSIZE_T: t.CTypedef = t.CPtrDiffT -PTRDIFF_T: t.CTypedef = t.CPtrDiffT -int8_t: t.CTypedef = t.CInt8T -int16_t: t.CTypedef = t.CInt16T -int32_t: t.CTypedef = t.CInt32T -int64_t: t.CTypedef = t.CInt64T -uint8_t: t.CTypedef = t.CUInt8T -uint16_t: t.CTypedef = t.CUInt16T -uint32_t: t.CTypedef = t.CUInt32T -uint64_t: t.CTypedef = t.CUInt64T -size_t: t.CTypedef = t.CSizeT -ssize_t: t.CTypedef = t.CPtrDiffT -ptrdiff_t: t.CTypedef = t.CPtrDiffT -intptr_t: t.CTypedef = t.CIntPtrT -uintptr_t: t.CTypedef = t.CUIntPtrT -wchar_t: t.CTypedef = t.CWCharT -char8_t: t.CTypedef = t.CChar8T -char16_t: t.CTypedef = t.CChar16T -char32_t: t.CTypedef = t.CChar32T -float8_t: t.CTypedef = t.CFloat8T -float16_t: t.CTypedef = t.CFloat16T -float32_t: t.CTypedef = t.CFloat32T -float64_t: t.CTypedef = t.CFloat64T -float128_t: t.CTypedef = t.CFloat128T -_Bool: t.CTypedef = t.CBool diff --git a/Test/ClosureTest/.tpv_build/temp/52/52e6b51da061882f.vpi b/Test/ClosureTest/.tpv_build/temp/52/52e6b51da061882f.vpi deleted file mode 100644 index 12c795b..0000000 --- a/Test/ClosureTest/.tpv_build/temp/52/52e6b51da061882f.vpi +++ /dev/null @@ -1,34 +0,0 @@ -"""Auto-generated Python stub file""" - -import c - -import t -import stdio -import testcheck -g_val: t.CInt = 100 -def outer_modify_global(): pass - -def test_global_in_nested(): pass - -def test_nonlocal_multi_level(): pass - -g_mixed: t.CInt = 0 -def test_global_nonlocal_mixed(): pass - -def test_lambda_multi_capture(): pass - -def test_lambda_arg_capture(): pass - -def test_nested_return(): pass - -def test_nonlocal_loop(): pass - -g_arr: t.CArray[t.CInt, 4] -def test_global_array(): pass - -def test_nested_conditional(): pass - -def test_lambda_chain(): pass - -def main() -> t.CInt: pass - diff --git a/Test/ClosureTest/.tpv_build/temp/74/748d0424e8976fa0.deps.txt b/Test/ClosureTest/.tpv_build/temp/74/748d0424e8976fa0.deps.txt deleted file mode 100644 index acdf15c..0000000 --- a/Test/ClosureTest/.tpv_build/temp/74/748d0424e8976fa0.deps.txt +++ /dev/null @@ -1 +0,0 @@ -t c stdio w32.win32console \ No newline at end of file diff --git a/Test/ClosureTest/.tpv_build/temp/74/748d0424e8976fa0.vpi b/Test/ClosureTest/.tpv_build/temp/74/748d0424e8976fa0.vpi deleted file mode 100644 index 4703a33..0000000 --- a/Test/ClosureTest/.tpv_build/temp/74/748d0424e8976fa0.vpi +++ /dev/null @@ -1,27 +0,0 @@ -"""Auto-generated Python stub file""" - - -import t, c -import stdio -from w32.win32console import SetConsoleOutputCP, SetConsoleCP -CP_UTF8: t.CDefine = 65001 -_pass_count: t.CInt = 0 -_fail_count: t.CInt = 0 -_total_pass: t.CInt = 0 -_total_fail: t.CInt = 0 -def begin(name: str): pass - -def section(name: str): pass - -def ok(msg: str): pass - -def fail(msg: str): pass - -def check(cond: t.CInt, ok_msg: str, fail_msg: str): pass - -def info(msg: str): pass - -def end() -> t.CInt: pass - -def summary() -> t.CInt: pass - diff --git a/Test/ClosureTest/.tpv_build/temp/_sha1_map.txt b/Test/ClosureTest/.tpv_build/temp/_sha1_map.txt deleted file mode 100644 index 0ab6244..0000000 --- a/Test/ClosureTest/.tpv_build/temp/_sha1_map.txt +++ /dev/null @@ -1,7 +0,0 @@ -09c0472e6fd0d088:includes/stdio.vp -748d0424e8976fa0:includes/testcheck.vp -001947a1f780bd5f:includes/builtins.vp -db613a1bd6a3ca26:includes/w32/win32console.vp -f5522571bcce7bcb:includes/stdint.vp -e710417730391023:includes/w32/win32base.vp -52e6b51da061882f:main.vp diff --git a/Test/ClosureTest/.tpv_build/temp/f5/f5522571bcce7bcb.deps.txt b/Test/ClosureTest/.tpv_build/temp/f5/f5522571bcce7bcb.deps.txt deleted file mode 100644 index 32f64f4..0000000 --- a/Test/ClosureTest/.tpv_build/temp/f5/f5522571bcce7bcb.deps.txt +++ /dev/null @@ -1 +0,0 @@ -t \ No newline at end of file diff --git a/Test/ClosureTest/.tpv_build/temp/f5/f5522571bcce7bcb.vpi b/Test/ClosureTest/.tpv_build/temp/f5/f5522571bcce7bcb.vpi deleted file mode 100644 index 7871c20..0000000 --- a/Test/ClosureTest/.tpv_build/temp/f5/f5522571bcce7bcb.vpi +++ /dev/null @@ -1,95 +0,0 @@ -"""Auto-generated Python stub file""" - -import c - -import t -INT: t.CTypedef = t.CInt -INTPTR: t.CTypedef = t.CInt | t.CPtr -BOOL: t.CTypedef = t.CInt -UINT: t.CTypedef = t.CUnsignedInt -UINTPTR: t.CTypedef = UINT | t.CPtr -BYTE: t.CTypedef = t.CUnsignedChar -BYTEPTR: t.CTypedef = BYTE | t.CPtr -WORD: t.CTypedef = t.CUInt16T -DWORD: t.CTypedef = t.CUInt32T -QWORD: t.CTypedef = t.CUInt64T -TCHAR: t.CTypedef = t.CChar -CHARLIST: t.CTypedef = str | t.CPtr -VOID: t.CTypedef = t.CVoid -SHORT: t.CTypedef = t.CShort -SHORTPTR: t.CTypedef = t.CShort | t.CPtr -USHORT: t.CTypedef = t.CUnsignedShort -USHORTPTR: t.CTypedef = t.CUnsignedShort | t.CPtr -LONGLONG: t.CTypedef = t.CLongLong -ULONGLONG: t.CTypedef = t.CUnsignedLongLong -LONG: t.CTypedef = t.CLong -ULONG: t.CTypedef = t.CUnsignedLong -WCHAR: t.CTypedef = WORD -WCHARPTR: t.CTypedef = WORD | t.CPtr -CHARPTR: t.CTypedef = t.CChar | t.CPtr -FSIZE_t: t.CTypedef = DWORD -LBA_t: t.CTypedef = DWORD -VOIDPTR: t.CTypedef = t.CVoid | t.CPtr -FLOAT: t.CTypedef = t.CFloat -DOUBLE: t.CTypedef = t.CDouble -FLOAT8: t.CTypedef = t.CFloat8T -FLOAT16: t.CTypedef = t.CFloat16T -FLOAT32: t.CTypedef = t.CFloat32T -FLOAT64: t.CTypedef = t.CFloat64T -FLOAT128: t.CTypedef = t.CFloat128T -INT8: t.CTypedef = t.CInt8T -INT16: t.CTypedef = t.CInt16T -INT32: t.CTypedef = t.CInt32T -INT64: t.CTypedef = t.CInt64T -UINT8: t.CTypedef = t.CUInt8T -UINT16: t.CTypedef = t.CUInt16T -UINT32: t.CTypedef = t.CUInt32T -UINT64: t.CTypedef = t.CUInt64T -INT8PTR: t.CTypedef = t.CInt8T | t.CPtr -INT16PTR: t.CTypedef = t.CInt16T | t.CPtr -INT32PTR: t.CTypedef = t.CInt32T | t.CPtr -INT64PTR: t.CTypedef = t.CInt64T | t.CPtr -UINT8PTR: t.CTypedef = t.CUInt8T | t.CPtr -UINT16PTR: t.CTypedef = t.CUInt16T | t.CPtr -UINT32PTR: t.CTypedef = t.CUInt32T | t.CPtr -UINT64PTR: t.CTypedef = t.CUInt64T | t.CPtr -CHAR8: t.CTypedef = t.CChar8T -CHAR16: t.CTypedef = t.CChar16T -CHAR32: t.CTypedef = t.CChar32T -CHAR8PTR: t.CTypedef = t.CChar8T | t.CPtr -CHAR16PTR: t.CTypedef = t.CChar16T | t.CPtr -CHAR32PTR: t.CTypedef = t.CChar32T | t.CPtr -i8: t.CTypedef = t.CInt8T -i16: t.CTypedef = t.CInt16T -i32: t.CTypedef = t.CInt32T -i64: t.CTypedef = t.CInt64T -u8: t.CTypedef = t.CUInt8T -u16: t.CTypedef = t.CUInt16T -u32: t.CTypedef = t.CUInt32T -u64: t.CTypedef = t.CUInt64T -SIZE_T: t.CTypedef = t.CSizeT -SSIZE_T: t.CTypedef = t.CPtrDiffT -PTRDIFF_T: t.CTypedef = t.CPtrDiffT -int8_t: t.CTypedef = t.CInt8T -int16_t: t.CTypedef = t.CInt16T -int32_t: t.CTypedef = t.CInt32T -int64_t: t.CTypedef = t.CInt64T -uint8_t: t.CTypedef = t.CUInt8T -uint16_t: t.CTypedef = t.CUInt16T -uint32_t: t.CTypedef = t.CUInt32T -uint64_t: t.CTypedef = t.CUInt64T -size_t: t.CTypedef = t.CSizeT -ssize_t: t.CTypedef = t.CPtrDiffT -ptrdiff_t: t.CTypedef = t.CPtrDiffT -intptr_t: t.CTypedef = t.CIntPtrT -uintptr_t: t.CTypedef = t.CUIntPtrT -wchar_t: t.CTypedef = t.CWCharT -char8_t: t.CTypedef = t.CChar8T -char16_t: t.CTypedef = t.CChar16T -char32_t: t.CTypedef = t.CChar32T -float8_t: t.CTypedef = t.CFloat8T -float16_t: t.CTypedef = t.CFloat16T -float32_t: t.CTypedef = t.CFloat32T -float64_t: t.CTypedef = t.CFloat64T -float128_t: t.CTypedef = t.CFloat128T -_Bool: t.CTypedef = t.CBool diff --git a/Test/ClosureTest2/.tpv_build/temp/44/440f18f9dce85a95.vpi b/Test/ClosureTest2/.tpv_build/temp/44/440f18f9dce85a95.vpi deleted file mode 100644 index 12676ba..0000000 --- a/Test/ClosureTest2/.tpv_build/temp/44/440f18f9dce85a95.vpi +++ /dev/null @@ -1,43 +0,0 @@ -"""Auto-generated Python stub file""" - -import c - -import t -import stdio -import testcheck -def test_nonlocal_conditional(): pass - -def test_nonlocal_multi_var(): pass - -g_counter: t.CInt = 0 -def inc_global(): pass - -def add_global(n: t.CInt): pass - -def test_global_cross_functions(): pass - -def test_nested_ref_capture(): pass - -def test_lambda_capture_then_modify(): pass - -def test_nonlocal_loop_accumulate(): pass - -def test_deep_nested_vars(): pass - -g_state: t.CInt = 0 -def test_global_nonlocal_same_func(): pass - -def test_lambda_default_and_capture(): pass - -def test_nested_accumulate(): pass - -def test_nonlocal_while(): pass - -class Point: - x: t.CInt - y: t.CInt - -def test_nested_modify_struct(): pass - -def main() -> t.CInt: pass - diff --git a/Test/ClosureTest2/.tpv_build/temp/74/748d0424e8976fa0.deps.txt b/Test/ClosureTest2/.tpv_build/temp/74/748d0424e8976fa0.deps.txt deleted file mode 100644 index acdf15c..0000000 --- a/Test/ClosureTest2/.tpv_build/temp/74/748d0424e8976fa0.deps.txt +++ /dev/null @@ -1 +0,0 @@ -t c stdio w32.win32console \ No newline at end of file diff --git a/Test/ClosureTest2/.tpv_build/temp/74/748d0424e8976fa0.vpi b/Test/ClosureTest2/.tpv_build/temp/74/748d0424e8976fa0.vpi deleted file mode 100644 index 4703a33..0000000 --- a/Test/ClosureTest2/.tpv_build/temp/74/748d0424e8976fa0.vpi +++ /dev/null @@ -1,27 +0,0 @@ -"""Auto-generated Python stub file""" - - -import t, c -import stdio -from w32.win32console import SetConsoleOutputCP, SetConsoleCP -CP_UTF8: t.CDefine = 65001 -_pass_count: t.CInt = 0 -_fail_count: t.CInt = 0 -_total_pass: t.CInt = 0 -_total_fail: t.CInt = 0 -def begin(name: str): pass - -def section(name: str): pass - -def ok(msg: str): pass - -def fail(msg: str): pass - -def check(cond: t.CInt, ok_msg: str, fail_msg: str): pass - -def info(msg: str): pass - -def end() -> t.CInt: pass - -def summary() -> t.CInt: pass - diff --git a/Test/ClosureTest2/.tpv_build/temp/_sha1_map.txt b/Test/ClosureTest2/.tpv_build/temp/_sha1_map.txt deleted file mode 100644 index 6ed2aa5..0000000 --- a/Test/ClosureTest2/.tpv_build/temp/_sha1_map.txt +++ /dev/null @@ -1,7 +0,0 @@ -09c0472e6fd0d088:includes/stdio.vp -748d0424e8976fa0:includes/testcheck.vp -001947a1f780bd5f:includes/builtins.vp -db613a1bd6a3ca26:includes/w32/win32console.vp -f5522571bcce7bcb:includes/stdint.vp -e710417730391023:includes/w32/win32base.vp -440f18f9dce85a95:main.vp diff --git a/Test/ClosureTest2/.tpv_build/temp/f5/f5522571bcce7bcb.deps.txt b/Test/ClosureTest2/.tpv_build/temp/f5/f5522571bcce7bcb.deps.txt deleted file mode 100644 index 32f64f4..0000000 --- a/Test/ClosureTest2/.tpv_build/temp/f5/f5522571bcce7bcb.deps.txt +++ /dev/null @@ -1 +0,0 @@ -t \ No newline at end of file diff --git a/Test/ClosureTest2/.tpv_build/temp/f5/f5522571bcce7bcb.vpi b/Test/ClosureTest2/.tpv_build/temp/f5/f5522571bcce7bcb.vpi deleted file mode 100644 index 7871c20..0000000 --- a/Test/ClosureTest2/.tpv_build/temp/f5/f5522571bcce7bcb.vpi +++ /dev/null @@ -1,95 +0,0 @@ -"""Auto-generated Python stub file""" - -import c - -import t -INT: t.CTypedef = t.CInt -INTPTR: t.CTypedef = t.CInt | t.CPtr -BOOL: t.CTypedef = t.CInt -UINT: t.CTypedef = t.CUnsignedInt -UINTPTR: t.CTypedef = UINT | t.CPtr -BYTE: t.CTypedef = t.CUnsignedChar -BYTEPTR: t.CTypedef = BYTE | t.CPtr -WORD: t.CTypedef = t.CUInt16T -DWORD: t.CTypedef = t.CUInt32T -QWORD: t.CTypedef = t.CUInt64T -TCHAR: t.CTypedef = t.CChar -CHARLIST: t.CTypedef = str | t.CPtr -VOID: t.CTypedef = t.CVoid -SHORT: t.CTypedef = t.CShort -SHORTPTR: t.CTypedef = t.CShort | t.CPtr -USHORT: t.CTypedef = t.CUnsignedShort -USHORTPTR: t.CTypedef = t.CUnsignedShort | t.CPtr -LONGLONG: t.CTypedef = t.CLongLong -ULONGLONG: t.CTypedef = t.CUnsignedLongLong -LONG: t.CTypedef = t.CLong -ULONG: t.CTypedef = t.CUnsignedLong -WCHAR: t.CTypedef = WORD -WCHARPTR: t.CTypedef = WORD | t.CPtr -CHARPTR: t.CTypedef = t.CChar | t.CPtr -FSIZE_t: t.CTypedef = DWORD -LBA_t: t.CTypedef = DWORD -VOIDPTR: t.CTypedef = t.CVoid | t.CPtr -FLOAT: t.CTypedef = t.CFloat -DOUBLE: t.CTypedef = t.CDouble -FLOAT8: t.CTypedef = t.CFloat8T -FLOAT16: t.CTypedef = t.CFloat16T -FLOAT32: t.CTypedef = t.CFloat32T -FLOAT64: t.CTypedef = t.CFloat64T -FLOAT128: t.CTypedef = t.CFloat128T -INT8: t.CTypedef = t.CInt8T -INT16: t.CTypedef = t.CInt16T -INT32: t.CTypedef = t.CInt32T -INT64: t.CTypedef = t.CInt64T -UINT8: t.CTypedef = t.CUInt8T -UINT16: t.CTypedef = t.CUInt16T -UINT32: t.CTypedef = t.CUInt32T -UINT64: t.CTypedef = t.CUInt64T -INT8PTR: t.CTypedef = t.CInt8T | t.CPtr -INT16PTR: t.CTypedef = t.CInt16T | t.CPtr -INT32PTR: t.CTypedef = t.CInt32T | t.CPtr -INT64PTR: t.CTypedef = t.CInt64T | t.CPtr -UINT8PTR: t.CTypedef = t.CUInt8T | t.CPtr -UINT16PTR: t.CTypedef = t.CUInt16T | t.CPtr -UINT32PTR: t.CTypedef = t.CUInt32T | t.CPtr -UINT64PTR: t.CTypedef = t.CUInt64T | t.CPtr -CHAR8: t.CTypedef = t.CChar8T -CHAR16: t.CTypedef = t.CChar16T -CHAR32: t.CTypedef = t.CChar32T -CHAR8PTR: t.CTypedef = t.CChar8T | t.CPtr -CHAR16PTR: t.CTypedef = t.CChar16T | t.CPtr -CHAR32PTR: t.CTypedef = t.CChar32T | t.CPtr -i8: t.CTypedef = t.CInt8T -i16: t.CTypedef = t.CInt16T -i32: t.CTypedef = t.CInt32T -i64: t.CTypedef = t.CInt64T -u8: t.CTypedef = t.CUInt8T -u16: t.CTypedef = t.CUInt16T -u32: t.CTypedef = t.CUInt32T -u64: t.CTypedef = t.CUInt64T -SIZE_T: t.CTypedef = t.CSizeT -SSIZE_T: t.CTypedef = t.CPtrDiffT -PTRDIFF_T: t.CTypedef = t.CPtrDiffT -int8_t: t.CTypedef = t.CInt8T -int16_t: t.CTypedef = t.CInt16T -int32_t: t.CTypedef = t.CInt32T -int64_t: t.CTypedef = t.CInt64T -uint8_t: t.CTypedef = t.CUInt8T -uint16_t: t.CTypedef = t.CUInt16T -uint32_t: t.CTypedef = t.CUInt32T -uint64_t: t.CTypedef = t.CUInt64T -size_t: t.CTypedef = t.CSizeT -ssize_t: t.CTypedef = t.CPtrDiffT -ptrdiff_t: t.CTypedef = t.CPtrDiffT -intptr_t: t.CTypedef = t.CIntPtrT -uintptr_t: t.CTypedef = t.CUIntPtrT -wchar_t: t.CTypedef = t.CWCharT -char8_t: t.CTypedef = t.CChar8T -char16_t: t.CTypedef = t.CChar16T -char32_t: t.CTypedef = t.CChar32T -float8_t: t.CTypedef = t.CFloat8T -float16_t: t.CTypedef = t.CFloat16T -float32_t: t.CTypedef = t.CFloat32T -float64_t: t.CTypedef = t.CFloat64T -float128_t: t.CTypedef = t.CFloat128T -_Bool: t.CTypedef = t.CBool diff --git a/Test/DecoratorMarkerTest/.tpv_build/temp/74/748d0424e8976fa0.deps.txt b/Test/DecoratorMarkerTest/.tpv_build/temp/74/748d0424e8976fa0.deps.txt deleted file mode 100644 index acdf15c..0000000 --- a/Test/DecoratorMarkerTest/.tpv_build/temp/74/748d0424e8976fa0.deps.txt +++ /dev/null @@ -1 +0,0 @@ -t c stdio w32.win32console \ No newline at end of file diff --git a/Test/DecoratorMarkerTest/.tpv_build/temp/74/748d0424e8976fa0.vpi b/Test/DecoratorMarkerTest/.tpv_build/temp/74/748d0424e8976fa0.vpi deleted file mode 100644 index 4703a33..0000000 --- a/Test/DecoratorMarkerTest/.tpv_build/temp/74/748d0424e8976fa0.vpi +++ /dev/null @@ -1,27 +0,0 @@ -"""Auto-generated Python stub file""" - - -import t, c -import stdio -from w32.win32console import SetConsoleOutputCP, SetConsoleCP -CP_UTF8: t.CDefine = 65001 -_pass_count: t.CInt = 0 -_fail_count: t.CInt = 0 -_total_pass: t.CInt = 0 -_total_fail: t.CInt = 0 -def begin(name: str): pass - -def section(name: str): pass - -def ok(msg: str): pass - -def fail(msg: str): pass - -def check(cond: t.CInt, ok_msg: str, fail_msg: str): pass - -def info(msg: str): pass - -def end() -> t.CInt: pass - -def summary() -> t.CInt: pass - diff --git a/Test/DecoratorMarkerTest/.tpv_build/temp/_sha1_map.txt b/Test/DecoratorMarkerTest/.tpv_build/temp/_sha1_map.txt deleted file mode 100644 index 2c57d36..0000000 --- a/Test/DecoratorMarkerTest/.tpv_build/temp/_sha1_map.txt +++ /dev/null @@ -1,7 +0,0 @@ -09c0472e6fd0d088:includes/stdio.vp -748d0424e8976fa0:includes/testcheck.vp -001947a1f780bd5f:includes/builtins.vp -db613a1bd6a3ca26:includes/w32/win32console.vp -f5522571bcce7bcb:includes/stdint.vp -e710417730391023:includes/w32/win32base.vp -b1122357fee8fd68:main.vp diff --git a/Test/DecoratorMarkerTest/.tpv_build/temp/b1/b1122357fee8fd68.vpi b/Test/DecoratorMarkerTest/.tpv_build/temp/b1/b1122357fee8fd68.vpi deleted file mode 100644 index d204b5f..0000000 --- a/Test/DecoratorMarkerTest/.tpv_build/temp/b1/b1122357fee8fd68.vpi +++ /dev/null @@ -1,32 +0,0 @@ -"""Auto-generated Python stub file""" - -import c - -import t -from stdio import printf -import testcheck -@t.CStruct -class Point: - x: t.CInt - y: t.CInt - -@t.CEnum -class Color: - pass - -@t.CUnion -class Data: - i: t.CInt - f: t.CFloat - -@t.CExport -def test() -> t.CInt: pass - -@t.CStatic -def static_func() -> t.CInt: pass - -@t.CStatic -def mixed_func() -> t.CInt | t.CExport: pass - -def main() -> t.CInt: pass - diff --git a/Test/DecoratorMarkerTest/.tpv_build/temp/f5/f5522571bcce7bcb.deps.txt b/Test/DecoratorMarkerTest/.tpv_build/temp/f5/f5522571bcce7bcb.deps.txt deleted file mode 100644 index 32f64f4..0000000 --- a/Test/DecoratorMarkerTest/.tpv_build/temp/f5/f5522571bcce7bcb.deps.txt +++ /dev/null @@ -1 +0,0 @@ -t \ No newline at end of file diff --git a/Test/DecoratorMarkerTest/.tpv_build/temp/f5/f5522571bcce7bcb.vpi b/Test/DecoratorMarkerTest/.tpv_build/temp/f5/f5522571bcce7bcb.vpi deleted file mode 100644 index 7871c20..0000000 --- a/Test/DecoratorMarkerTest/.tpv_build/temp/f5/f5522571bcce7bcb.vpi +++ /dev/null @@ -1,95 +0,0 @@ -"""Auto-generated Python stub file""" - -import c - -import t -INT: t.CTypedef = t.CInt -INTPTR: t.CTypedef = t.CInt | t.CPtr -BOOL: t.CTypedef = t.CInt -UINT: t.CTypedef = t.CUnsignedInt -UINTPTR: t.CTypedef = UINT | t.CPtr -BYTE: t.CTypedef = t.CUnsignedChar -BYTEPTR: t.CTypedef = BYTE | t.CPtr -WORD: t.CTypedef = t.CUInt16T -DWORD: t.CTypedef = t.CUInt32T -QWORD: t.CTypedef = t.CUInt64T -TCHAR: t.CTypedef = t.CChar -CHARLIST: t.CTypedef = str | t.CPtr -VOID: t.CTypedef = t.CVoid -SHORT: t.CTypedef = t.CShort -SHORTPTR: t.CTypedef = t.CShort | t.CPtr -USHORT: t.CTypedef = t.CUnsignedShort -USHORTPTR: t.CTypedef = t.CUnsignedShort | t.CPtr -LONGLONG: t.CTypedef = t.CLongLong -ULONGLONG: t.CTypedef = t.CUnsignedLongLong -LONG: t.CTypedef = t.CLong -ULONG: t.CTypedef = t.CUnsignedLong -WCHAR: t.CTypedef = WORD -WCHARPTR: t.CTypedef = WORD | t.CPtr -CHARPTR: t.CTypedef = t.CChar | t.CPtr -FSIZE_t: t.CTypedef = DWORD -LBA_t: t.CTypedef = DWORD -VOIDPTR: t.CTypedef = t.CVoid | t.CPtr -FLOAT: t.CTypedef = t.CFloat -DOUBLE: t.CTypedef = t.CDouble -FLOAT8: t.CTypedef = t.CFloat8T -FLOAT16: t.CTypedef = t.CFloat16T -FLOAT32: t.CTypedef = t.CFloat32T -FLOAT64: t.CTypedef = t.CFloat64T -FLOAT128: t.CTypedef = t.CFloat128T -INT8: t.CTypedef = t.CInt8T -INT16: t.CTypedef = t.CInt16T -INT32: t.CTypedef = t.CInt32T -INT64: t.CTypedef = t.CInt64T -UINT8: t.CTypedef = t.CUInt8T -UINT16: t.CTypedef = t.CUInt16T -UINT32: t.CTypedef = t.CUInt32T -UINT64: t.CTypedef = t.CUInt64T -INT8PTR: t.CTypedef = t.CInt8T | t.CPtr -INT16PTR: t.CTypedef = t.CInt16T | t.CPtr -INT32PTR: t.CTypedef = t.CInt32T | t.CPtr -INT64PTR: t.CTypedef = t.CInt64T | t.CPtr -UINT8PTR: t.CTypedef = t.CUInt8T | t.CPtr -UINT16PTR: t.CTypedef = t.CUInt16T | t.CPtr -UINT32PTR: t.CTypedef = t.CUInt32T | t.CPtr -UINT64PTR: t.CTypedef = t.CUInt64T | t.CPtr -CHAR8: t.CTypedef = t.CChar8T -CHAR16: t.CTypedef = t.CChar16T -CHAR32: t.CTypedef = t.CChar32T -CHAR8PTR: t.CTypedef = t.CChar8T | t.CPtr -CHAR16PTR: t.CTypedef = t.CChar16T | t.CPtr -CHAR32PTR: t.CTypedef = t.CChar32T | t.CPtr -i8: t.CTypedef = t.CInt8T -i16: t.CTypedef = t.CInt16T -i32: t.CTypedef = t.CInt32T -i64: t.CTypedef = t.CInt64T -u8: t.CTypedef = t.CUInt8T -u16: t.CTypedef = t.CUInt16T -u32: t.CTypedef = t.CUInt32T -u64: t.CTypedef = t.CUInt64T -SIZE_T: t.CTypedef = t.CSizeT -SSIZE_T: t.CTypedef = t.CPtrDiffT -PTRDIFF_T: t.CTypedef = t.CPtrDiffT -int8_t: t.CTypedef = t.CInt8T -int16_t: t.CTypedef = t.CInt16T -int32_t: t.CTypedef = t.CInt32T -int64_t: t.CTypedef = t.CInt64T -uint8_t: t.CTypedef = t.CUInt8T -uint16_t: t.CTypedef = t.CUInt16T -uint32_t: t.CTypedef = t.CUInt32T -uint64_t: t.CTypedef = t.CUInt64T -size_t: t.CTypedef = t.CSizeT -ssize_t: t.CTypedef = t.CPtrDiffT -ptrdiff_t: t.CTypedef = t.CPtrDiffT -intptr_t: t.CTypedef = t.CIntPtrT -uintptr_t: t.CTypedef = t.CUIntPtrT -wchar_t: t.CTypedef = t.CWCharT -char8_t: t.CTypedef = t.CChar8T -char16_t: t.CTypedef = t.CChar16T -char32_t: t.CTypedef = t.CChar32T -float8_t: t.CTypedef = t.CFloat8T -float16_t: t.CTypedef = t.CFloat16T -float32_t: t.CTypedef = t.CFloat32T -float64_t: t.CTypedef = t.CFloat64T -float128_t: t.CTypedef = t.CFloat128T -_Bool: t.CTypedef = t.CBool diff --git a/Test/EdgeCaseTest/.tpv_build/temp/74/748d0424e8976fa0.deps.txt b/Test/EdgeCaseTest/.tpv_build/temp/74/748d0424e8976fa0.deps.txt deleted file mode 100644 index acdf15c..0000000 --- a/Test/EdgeCaseTest/.tpv_build/temp/74/748d0424e8976fa0.deps.txt +++ /dev/null @@ -1 +0,0 @@ -t c stdio w32.win32console \ No newline at end of file diff --git a/Test/EdgeCaseTest/.tpv_build/temp/74/748d0424e8976fa0.vpi b/Test/EdgeCaseTest/.tpv_build/temp/74/748d0424e8976fa0.vpi deleted file mode 100644 index 4703a33..0000000 --- a/Test/EdgeCaseTest/.tpv_build/temp/74/748d0424e8976fa0.vpi +++ /dev/null @@ -1,27 +0,0 @@ -"""Auto-generated Python stub file""" - - -import t, c -import stdio -from w32.win32console import SetConsoleOutputCP, SetConsoleCP -CP_UTF8: t.CDefine = 65001 -_pass_count: t.CInt = 0 -_fail_count: t.CInt = 0 -_total_pass: t.CInt = 0 -_total_fail: t.CInt = 0 -def begin(name: str): pass - -def section(name: str): pass - -def ok(msg: str): pass - -def fail(msg: str): pass - -def check(cond: t.CInt, ok_msg: str, fail_msg: str): pass - -def info(msg: str): pass - -def end() -> t.CInt: pass - -def summary() -> t.CInt: pass - diff --git a/Test/EdgeCaseTest/.tpv_build/temp/_sha1_map.txt b/Test/EdgeCaseTest/.tpv_build/temp/_sha1_map.txt deleted file mode 100644 index 5579fcc..0000000 --- a/Test/EdgeCaseTest/.tpv_build/temp/_sha1_map.txt +++ /dev/null @@ -1,7 +0,0 @@ -09c0472e6fd0d088:includes/stdio.vp -748d0424e8976fa0:includes/testcheck.vp -001947a1f780bd5f:includes/builtins.vp -db613a1bd6a3ca26:includes/w32/win32console.vp -f5522571bcce7bcb:includes/stdint.vp -e710417730391023:includes/w32/win32base.vp -ac0d686cb2cc783b:main.vp diff --git a/Test/EdgeCaseTest/.tpv_build/temp/ac/ac0d686cb2cc783b.vpi b/Test/EdgeCaseTest/.tpv_build/temp/ac/ac0d686cb2cc783b.vpi deleted file mode 100644 index eeadf16..0000000 --- a/Test/EdgeCaseTest/.tpv_build/temp/ac/ac0d686cb2cc783b.vpi +++ /dev/null @@ -1,78 +0,0 @@ -"""Auto-generated Python stub file""" - -import c - -import t -import t as tt -import stdio -import testcheck -from t import CEnum as en -from t import CUnion as un -from t import REnum as ren -from t import CStruct as cs -from t import CInt as myint -from t import CChar, CPtr -class Color(en): - pass - -class Status(tt.CEnum): - pass - -class Data(un): - i_val: t.CInt - f_val: t.CFloat - -class Opt(ren): - class Some: - val: myint - - -class Parent: - a: t.CInt - def get_a(self) -> t.CInt: pass - -class Child(Parent): - b: t.CInt - def get_sum(self) -> t.CInt: pass - -class Base: - x: t.CInt - def base_val(self) -> t.CInt: pass - -class Mid(Base): - y: t.CInt - def mid_val(self) -> t.CInt: pass - -class Leaf(Mid): - z: t.CInt - def leaf_val(self) -> t.CInt: pass - -val: myint = 42 -class NetHeader: - magic: t.CInt | t.BigEndian - length: t.CShort | t.BigEndian - normal: t.CInt - -class TtPoint(tt.CStruct): - x: t.CInt - y: t.CInt - -@tt.Object -class TtObject: - val: t.CInt - def get_val(self) -> t.CInt: pass - -class CsPoint(cs): - x: t.CInt - y: t.CInt - -class TtUnion(tt.CUnion): - a: t.CInt - b: t.CFloat - -@tt.Object -class TtEmptyObject: - val: t.CInt - -def main() -> t.CInt: pass - diff --git a/Test/EdgeCaseTest/.tpv_build/temp/f5/f5522571bcce7bcb.deps.txt b/Test/EdgeCaseTest/.tpv_build/temp/f5/f5522571bcce7bcb.deps.txt deleted file mode 100644 index 32f64f4..0000000 --- a/Test/EdgeCaseTest/.tpv_build/temp/f5/f5522571bcce7bcb.deps.txt +++ /dev/null @@ -1 +0,0 @@ -t \ No newline at end of file diff --git a/Test/EdgeCaseTest/.tpv_build/temp/f5/f5522571bcce7bcb.vpi b/Test/EdgeCaseTest/.tpv_build/temp/f5/f5522571bcce7bcb.vpi deleted file mode 100644 index 7871c20..0000000 --- a/Test/EdgeCaseTest/.tpv_build/temp/f5/f5522571bcce7bcb.vpi +++ /dev/null @@ -1,95 +0,0 @@ -"""Auto-generated Python stub file""" - -import c - -import t -INT: t.CTypedef = t.CInt -INTPTR: t.CTypedef = t.CInt | t.CPtr -BOOL: t.CTypedef = t.CInt -UINT: t.CTypedef = t.CUnsignedInt -UINTPTR: t.CTypedef = UINT | t.CPtr -BYTE: t.CTypedef = t.CUnsignedChar -BYTEPTR: t.CTypedef = BYTE | t.CPtr -WORD: t.CTypedef = t.CUInt16T -DWORD: t.CTypedef = t.CUInt32T -QWORD: t.CTypedef = t.CUInt64T -TCHAR: t.CTypedef = t.CChar -CHARLIST: t.CTypedef = str | t.CPtr -VOID: t.CTypedef = t.CVoid -SHORT: t.CTypedef = t.CShort -SHORTPTR: t.CTypedef = t.CShort | t.CPtr -USHORT: t.CTypedef = t.CUnsignedShort -USHORTPTR: t.CTypedef = t.CUnsignedShort | t.CPtr -LONGLONG: t.CTypedef = t.CLongLong -ULONGLONG: t.CTypedef = t.CUnsignedLongLong -LONG: t.CTypedef = t.CLong -ULONG: t.CTypedef = t.CUnsignedLong -WCHAR: t.CTypedef = WORD -WCHARPTR: t.CTypedef = WORD | t.CPtr -CHARPTR: t.CTypedef = t.CChar | t.CPtr -FSIZE_t: t.CTypedef = DWORD -LBA_t: t.CTypedef = DWORD -VOIDPTR: t.CTypedef = t.CVoid | t.CPtr -FLOAT: t.CTypedef = t.CFloat -DOUBLE: t.CTypedef = t.CDouble -FLOAT8: t.CTypedef = t.CFloat8T -FLOAT16: t.CTypedef = t.CFloat16T -FLOAT32: t.CTypedef = t.CFloat32T -FLOAT64: t.CTypedef = t.CFloat64T -FLOAT128: t.CTypedef = t.CFloat128T -INT8: t.CTypedef = t.CInt8T -INT16: t.CTypedef = t.CInt16T -INT32: t.CTypedef = t.CInt32T -INT64: t.CTypedef = t.CInt64T -UINT8: t.CTypedef = t.CUInt8T -UINT16: t.CTypedef = t.CUInt16T -UINT32: t.CTypedef = t.CUInt32T -UINT64: t.CTypedef = t.CUInt64T -INT8PTR: t.CTypedef = t.CInt8T | t.CPtr -INT16PTR: t.CTypedef = t.CInt16T | t.CPtr -INT32PTR: t.CTypedef = t.CInt32T | t.CPtr -INT64PTR: t.CTypedef = t.CInt64T | t.CPtr -UINT8PTR: t.CTypedef = t.CUInt8T | t.CPtr -UINT16PTR: t.CTypedef = t.CUInt16T | t.CPtr -UINT32PTR: t.CTypedef = t.CUInt32T | t.CPtr -UINT64PTR: t.CTypedef = t.CUInt64T | t.CPtr -CHAR8: t.CTypedef = t.CChar8T -CHAR16: t.CTypedef = t.CChar16T -CHAR32: t.CTypedef = t.CChar32T -CHAR8PTR: t.CTypedef = t.CChar8T | t.CPtr -CHAR16PTR: t.CTypedef = t.CChar16T | t.CPtr -CHAR32PTR: t.CTypedef = t.CChar32T | t.CPtr -i8: t.CTypedef = t.CInt8T -i16: t.CTypedef = t.CInt16T -i32: t.CTypedef = t.CInt32T -i64: t.CTypedef = t.CInt64T -u8: t.CTypedef = t.CUInt8T -u16: t.CTypedef = t.CUInt16T -u32: t.CTypedef = t.CUInt32T -u64: t.CTypedef = t.CUInt64T -SIZE_T: t.CTypedef = t.CSizeT -SSIZE_T: t.CTypedef = t.CPtrDiffT -PTRDIFF_T: t.CTypedef = t.CPtrDiffT -int8_t: t.CTypedef = t.CInt8T -int16_t: t.CTypedef = t.CInt16T -int32_t: t.CTypedef = t.CInt32T -int64_t: t.CTypedef = t.CInt64T -uint8_t: t.CTypedef = t.CUInt8T -uint16_t: t.CTypedef = t.CUInt16T -uint32_t: t.CTypedef = t.CUInt32T -uint64_t: t.CTypedef = t.CUInt64T -size_t: t.CTypedef = t.CSizeT -ssize_t: t.CTypedef = t.CPtrDiffT -ptrdiff_t: t.CTypedef = t.CPtrDiffT -intptr_t: t.CTypedef = t.CIntPtrT -uintptr_t: t.CTypedef = t.CUIntPtrT -wchar_t: t.CTypedef = t.CWCharT -char8_t: t.CTypedef = t.CChar8T -char16_t: t.CTypedef = t.CChar16T -char32_t: t.CTypedef = t.CChar32T -float8_t: t.CTypedef = t.CFloat8T -float16_t: t.CTypedef = t.CFloat16T -float32_t: t.CTypedef = t.CFloat32T -float64_t: t.CTypedef = t.CFloat64T -float128_t: t.CTypedef = t.CFloat128T -_Bool: t.CTypedef = t.CBool diff --git a/Test/ForAndLoopTest/.tpv_build/temp/74/748d0424e8976fa0.deps.txt b/Test/ForAndLoopTest/.tpv_build/temp/74/748d0424e8976fa0.deps.txt deleted file mode 100644 index acdf15c..0000000 --- a/Test/ForAndLoopTest/.tpv_build/temp/74/748d0424e8976fa0.deps.txt +++ /dev/null @@ -1 +0,0 @@ -t c stdio w32.win32console \ No newline at end of file diff --git a/Test/ForAndLoopTest/.tpv_build/temp/74/748d0424e8976fa0.vpi b/Test/ForAndLoopTest/.tpv_build/temp/74/748d0424e8976fa0.vpi deleted file mode 100644 index 4703a33..0000000 --- a/Test/ForAndLoopTest/.tpv_build/temp/74/748d0424e8976fa0.vpi +++ /dev/null @@ -1,27 +0,0 @@ -"""Auto-generated Python stub file""" - - -import t, c -import stdio -from w32.win32console import SetConsoleOutputCP, SetConsoleCP -CP_UTF8: t.CDefine = 65001 -_pass_count: t.CInt = 0 -_fail_count: t.CInt = 0 -_total_pass: t.CInt = 0 -_total_fail: t.CInt = 0 -def begin(name: str): pass - -def section(name: str): pass - -def ok(msg: str): pass - -def fail(msg: str): pass - -def check(cond: t.CInt, ok_msg: str, fail_msg: str): pass - -def info(msg: str): pass - -def end() -> t.CInt: pass - -def summary() -> t.CInt: pass - diff --git a/Test/ForAndLoopTest/.tpv_build/temp/_sha1_map.txt b/Test/ForAndLoopTest/.tpv_build/temp/_sha1_map.txt deleted file mode 100644 index a3bb76d..0000000 --- a/Test/ForAndLoopTest/.tpv_build/temp/_sha1_map.txt +++ /dev/null @@ -1,13 +0,0 @@ -09c0472e6fd0d088:includes/stdio.vp -989dba6e92235032:includes/stdlib.vp -b8970f3b6886efa6:includes/string.vp -7e4672b992208969:includes/memhub.vp -748d0424e8976fa0:includes/testcheck.vp -e94ef9e139461915:includes/_list.vp -001947a1f780bd5f:includes/builtins.vp -f5522571bcce7bcb:includes/stdint.vp -aa246c6e6aa30484:includes/atom.vp -2c175afd85852faf:includes/viperio.vp -db613a1bd6a3ca26:includes/w32/win32console.vp -e710417730391023:includes/w32/win32base.vp -918064226d2858b3:main.vp diff --git a/Test/ForAndLoopTest/.tpv_build/temp/aa/aa246c6e6aa30484.deps.txt b/Test/ForAndLoopTest/.tpv_build/temp/aa/aa246c6e6aa30484.deps.txt deleted file mode 100644 index b092476..0000000 --- a/Test/ForAndLoopTest/.tpv_build/temp/aa/aa246c6e6aa30484.deps.txt +++ /dev/null @@ -1 +0,0 @@ -t c \ No newline at end of file diff --git a/Test/ForAndLoopTest/.tpv_build/temp/aa/aa246c6e6aa30484.vpi b/Test/ForAndLoopTest/.tpv_build/temp/aa/aa246c6e6aa30484.vpi deleted file mode 100644 index 850204b..0000000 --- a/Test/ForAndLoopTest/.tpv_build/temp/aa/aa246c6e6aa30484.vpi +++ /dev/null @@ -1,22 +0,0 @@ -"""Auto-generated Python stub file""" - - -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 - diff --git a/Test/ForAndLoopTest/.tpv_build/temp/f5/f5522571bcce7bcb.deps.txt b/Test/ForAndLoopTest/.tpv_build/temp/f5/f5522571bcce7bcb.deps.txt deleted file mode 100644 index 32f64f4..0000000 --- a/Test/ForAndLoopTest/.tpv_build/temp/f5/f5522571bcce7bcb.deps.txt +++ /dev/null @@ -1 +0,0 @@ -t \ No newline at end of file diff --git a/Test/ForAndLoopTest/.tpv_build/temp/f5/f5522571bcce7bcb.vpi b/Test/ForAndLoopTest/.tpv_build/temp/f5/f5522571bcce7bcb.vpi deleted file mode 100644 index 7871c20..0000000 --- a/Test/ForAndLoopTest/.tpv_build/temp/f5/f5522571bcce7bcb.vpi +++ /dev/null @@ -1,95 +0,0 @@ -"""Auto-generated Python stub file""" - -import c - -import t -INT: t.CTypedef = t.CInt -INTPTR: t.CTypedef = t.CInt | t.CPtr -BOOL: t.CTypedef = t.CInt -UINT: t.CTypedef = t.CUnsignedInt -UINTPTR: t.CTypedef = UINT | t.CPtr -BYTE: t.CTypedef = t.CUnsignedChar -BYTEPTR: t.CTypedef = BYTE | t.CPtr -WORD: t.CTypedef = t.CUInt16T -DWORD: t.CTypedef = t.CUInt32T -QWORD: t.CTypedef = t.CUInt64T -TCHAR: t.CTypedef = t.CChar -CHARLIST: t.CTypedef = str | t.CPtr -VOID: t.CTypedef = t.CVoid -SHORT: t.CTypedef = t.CShort -SHORTPTR: t.CTypedef = t.CShort | t.CPtr -USHORT: t.CTypedef = t.CUnsignedShort -USHORTPTR: t.CTypedef = t.CUnsignedShort | t.CPtr -LONGLONG: t.CTypedef = t.CLongLong -ULONGLONG: t.CTypedef = t.CUnsignedLongLong -LONG: t.CTypedef = t.CLong -ULONG: t.CTypedef = t.CUnsignedLong -WCHAR: t.CTypedef = WORD -WCHARPTR: t.CTypedef = WORD | t.CPtr -CHARPTR: t.CTypedef = t.CChar | t.CPtr -FSIZE_t: t.CTypedef = DWORD -LBA_t: t.CTypedef = DWORD -VOIDPTR: t.CTypedef = t.CVoid | t.CPtr -FLOAT: t.CTypedef = t.CFloat -DOUBLE: t.CTypedef = t.CDouble -FLOAT8: t.CTypedef = t.CFloat8T -FLOAT16: t.CTypedef = t.CFloat16T -FLOAT32: t.CTypedef = t.CFloat32T -FLOAT64: t.CTypedef = t.CFloat64T -FLOAT128: t.CTypedef = t.CFloat128T -INT8: t.CTypedef = t.CInt8T -INT16: t.CTypedef = t.CInt16T -INT32: t.CTypedef = t.CInt32T -INT64: t.CTypedef = t.CInt64T -UINT8: t.CTypedef = t.CUInt8T -UINT16: t.CTypedef = t.CUInt16T -UINT32: t.CTypedef = t.CUInt32T -UINT64: t.CTypedef = t.CUInt64T -INT8PTR: t.CTypedef = t.CInt8T | t.CPtr -INT16PTR: t.CTypedef = t.CInt16T | t.CPtr -INT32PTR: t.CTypedef = t.CInt32T | t.CPtr -INT64PTR: t.CTypedef = t.CInt64T | t.CPtr -UINT8PTR: t.CTypedef = t.CUInt8T | t.CPtr -UINT16PTR: t.CTypedef = t.CUInt16T | t.CPtr -UINT32PTR: t.CTypedef = t.CUInt32T | t.CPtr -UINT64PTR: t.CTypedef = t.CUInt64T | t.CPtr -CHAR8: t.CTypedef = t.CChar8T -CHAR16: t.CTypedef = t.CChar16T -CHAR32: t.CTypedef = t.CChar32T -CHAR8PTR: t.CTypedef = t.CChar8T | t.CPtr -CHAR16PTR: t.CTypedef = t.CChar16T | t.CPtr -CHAR32PTR: t.CTypedef = t.CChar32T | t.CPtr -i8: t.CTypedef = t.CInt8T -i16: t.CTypedef = t.CInt16T -i32: t.CTypedef = t.CInt32T -i64: t.CTypedef = t.CInt64T -u8: t.CTypedef = t.CUInt8T -u16: t.CTypedef = t.CUInt16T -u32: t.CTypedef = t.CUInt32T -u64: t.CTypedef = t.CUInt64T -SIZE_T: t.CTypedef = t.CSizeT -SSIZE_T: t.CTypedef = t.CPtrDiffT -PTRDIFF_T: t.CTypedef = t.CPtrDiffT -int8_t: t.CTypedef = t.CInt8T -int16_t: t.CTypedef = t.CInt16T -int32_t: t.CTypedef = t.CInt32T -int64_t: t.CTypedef = t.CInt64T -uint8_t: t.CTypedef = t.CUInt8T -uint16_t: t.CTypedef = t.CUInt16T -uint32_t: t.CTypedef = t.CUInt32T -uint64_t: t.CTypedef = t.CUInt64T -size_t: t.CTypedef = t.CSizeT -ssize_t: t.CTypedef = t.CPtrDiffT -ptrdiff_t: t.CTypedef = t.CPtrDiffT -intptr_t: t.CTypedef = t.CIntPtrT -uintptr_t: t.CTypedef = t.CUIntPtrT -wchar_t: t.CTypedef = t.CWCharT -char8_t: t.CTypedef = t.CChar8T -char16_t: t.CTypedef = t.CChar16T -char32_t: t.CTypedef = t.CChar32T -float8_t: t.CTypedef = t.CFloat8T -float16_t: t.CTypedef = t.CFloat16T -float32_t: t.CTypedef = t.CFloat32T -float64_t: t.CTypedef = t.CFloat64T -float128_t: t.CTypedef = t.CFloat128T -_Bool: t.CTypedef = t.CBool diff --git a/Test/G4/.tpv_build/temp/74/748d0424e8976fa0.deps.txt b/Test/G4/.tpv_build/temp/74/748d0424e8976fa0.deps.txt deleted file mode 100644 index acdf15c..0000000 --- a/Test/G4/.tpv_build/temp/74/748d0424e8976fa0.deps.txt +++ /dev/null @@ -1 +0,0 @@ -t c stdio w32.win32console \ No newline at end of file diff --git a/Test/G4/.tpv_build/temp/74/748d0424e8976fa0.vpi b/Test/G4/.tpv_build/temp/74/748d0424e8976fa0.vpi deleted file mode 100644 index 4703a33..0000000 --- a/Test/G4/.tpv_build/temp/74/748d0424e8976fa0.vpi +++ /dev/null @@ -1,27 +0,0 @@ -"""Auto-generated Python stub file""" - - -import t, c -import stdio -from w32.win32console import SetConsoleOutputCP, SetConsoleCP -CP_UTF8: t.CDefine = 65001 -_pass_count: t.CInt = 0 -_fail_count: t.CInt = 0 -_total_pass: t.CInt = 0 -_total_fail: t.CInt = 0 -def begin(name: str): pass - -def section(name: str): pass - -def ok(msg: str): pass - -def fail(msg: str): pass - -def check(cond: t.CInt, ok_msg: str, fail_msg: str): pass - -def info(msg: str): pass - -def end() -> t.CInt: pass - -def summary() -> t.CInt: pass - diff --git a/Test/G4/.tpv_build/temp/_sha1_map.txt b/Test/G4/.tpv_build/temp/_sha1_map.txt index 716e3d8..99c08c4 100644 --- a/Test/G4/.tpv_build/temp/_sha1_map.txt +++ b/Test/G4/.tpv_build/temp/_sha1_map.txt @@ -1,15 +1,15 @@ 09c0472e6fd0d088:includes/stdio.vp 989dba6e92235032:includes/stdlib.vp -7e4672b992208969:includes/memhub.vp +1819d836dcee9afa:includes/memhub.vp dbd53aaa91309ba1:includes/g4node.vp -748d0424e8976fa0:includes/testcheck.vp -001947a1f780bd5f:includes/builtins.vp -f5522571bcce7bcb:includes/stdint.vp -b8970f3b6886efa6:includes/string.vp +23899f9254639ba7:includes/testcheck.vp +50b9991a98ff2dd5:includes/builtins.vp +d856ba5f6f074f04:includes/stdint.vp +4a42e6e4a0818b1e:includes/string.vp aa246c6e6aa30484:includes/atom.vp 2c175afd85852faf:includes/viperio.vp e94ef9e139461915:includes/_list.vp -a5e9a83e9db303ad:includes/linkedlist.vp +8e92345fd262a343:includes/linkedlist.vp db613a1bd6a3ca26:includes/w32/win32console.vp e710417730391023:includes/w32/win32base.vp a45655b992cc8767:caller1.vp diff --git a/Test/G4/.tpv_build/temp/a4/a45655b992cc8767.vpi b/Test/G4/.tpv_build/temp/a4/a45655b992cc8767.vpi index a8e6676..98a4219 100644 --- a/Test/G4/.tpv_build/temp/a4/a45655b992cc8767.vpi +++ b/Test/G4/.tpv_build/temp/a4/a45655b992cc8767.vpi @@ -8,6 +8,4 @@ import stdlib import memhub from g4node import G4Node, new_g4node def caller1_make_chain(pool: memhub.MemBuddy | t.CPtr) -> G4Node | t.CPtr: pass - def caller1_sum_chain(head: G4Node | t.CPtr) -> t.CInt: pass - diff --git a/Test/G4/.tpv_build/temp/a5/a5e9a83e9db303ad.deps.txt b/Test/G4/.tpv_build/temp/a5/a5e9a83e9db303ad.deps.txt deleted file mode 100644 index 103beac..0000000 --- a/Test/G4/.tpv_build/temp/a5/a5e9a83e9db303ad.deps.txt +++ /dev/null @@ -1 +0,0 @@ -t c stdint \ No newline at end of file diff --git a/Test/G4/.tpv_build/temp/aa/aa246c6e6aa30484.vpi b/Test/G4/.tpv_build/temp/aa/aa246c6e6aa30484.vpi index 850204b..be87c45 100644 --- a/Test/G4/.tpv_build/temp/aa/aa246c6e6aa30484.vpi +++ b/Test/G4/.tpv_build/temp/aa/aa246c6e6aa30484.vpi @@ -9,14 +9,8 @@ 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 - diff --git a/Test/G4/.tpv_build/temp/f5/f5522571bcce7bcb.deps.txt b/Test/G4/.tpv_build/temp/f5/f5522571bcce7bcb.deps.txt deleted file mode 100644 index 32f64f4..0000000 --- a/Test/G4/.tpv_build/temp/f5/f5522571bcce7bcb.deps.txt +++ /dev/null @@ -1 +0,0 @@ -t \ No newline at end of file diff --git a/Test/G4/.tpv_build/temp/f5/f5522571bcce7bcb.vpi b/Test/G4/.tpv_build/temp/f5/f5522571bcce7bcb.vpi deleted file mode 100644 index 7871c20..0000000 --- a/Test/G4/.tpv_build/temp/f5/f5522571bcce7bcb.vpi +++ /dev/null @@ -1,95 +0,0 @@ -"""Auto-generated Python stub file""" - -import c - -import t -INT: t.CTypedef = t.CInt -INTPTR: t.CTypedef = t.CInt | t.CPtr -BOOL: t.CTypedef = t.CInt -UINT: t.CTypedef = t.CUnsignedInt -UINTPTR: t.CTypedef = UINT | t.CPtr -BYTE: t.CTypedef = t.CUnsignedChar -BYTEPTR: t.CTypedef = BYTE | t.CPtr -WORD: t.CTypedef = t.CUInt16T -DWORD: t.CTypedef = t.CUInt32T -QWORD: t.CTypedef = t.CUInt64T -TCHAR: t.CTypedef = t.CChar -CHARLIST: t.CTypedef = str | t.CPtr -VOID: t.CTypedef = t.CVoid -SHORT: t.CTypedef = t.CShort -SHORTPTR: t.CTypedef = t.CShort | t.CPtr -USHORT: t.CTypedef = t.CUnsignedShort -USHORTPTR: t.CTypedef = t.CUnsignedShort | t.CPtr -LONGLONG: t.CTypedef = t.CLongLong -ULONGLONG: t.CTypedef = t.CUnsignedLongLong -LONG: t.CTypedef = t.CLong -ULONG: t.CTypedef = t.CUnsignedLong -WCHAR: t.CTypedef = WORD -WCHARPTR: t.CTypedef = WORD | t.CPtr -CHARPTR: t.CTypedef = t.CChar | t.CPtr -FSIZE_t: t.CTypedef = DWORD -LBA_t: t.CTypedef = DWORD -VOIDPTR: t.CTypedef = t.CVoid | t.CPtr -FLOAT: t.CTypedef = t.CFloat -DOUBLE: t.CTypedef = t.CDouble -FLOAT8: t.CTypedef = t.CFloat8T -FLOAT16: t.CTypedef = t.CFloat16T -FLOAT32: t.CTypedef = t.CFloat32T -FLOAT64: t.CTypedef = t.CFloat64T -FLOAT128: t.CTypedef = t.CFloat128T -INT8: t.CTypedef = t.CInt8T -INT16: t.CTypedef = t.CInt16T -INT32: t.CTypedef = t.CInt32T -INT64: t.CTypedef = t.CInt64T -UINT8: t.CTypedef = t.CUInt8T -UINT16: t.CTypedef = t.CUInt16T -UINT32: t.CTypedef = t.CUInt32T -UINT64: t.CTypedef = t.CUInt64T -INT8PTR: t.CTypedef = t.CInt8T | t.CPtr -INT16PTR: t.CTypedef = t.CInt16T | t.CPtr -INT32PTR: t.CTypedef = t.CInt32T | t.CPtr -INT64PTR: t.CTypedef = t.CInt64T | t.CPtr -UINT8PTR: t.CTypedef = t.CUInt8T | t.CPtr -UINT16PTR: t.CTypedef = t.CUInt16T | t.CPtr -UINT32PTR: t.CTypedef = t.CUInt32T | t.CPtr -UINT64PTR: t.CTypedef = t.CUInt64T | t.CPtr -CHAR8: t.CTypedef = t.CChar8T -CHAR16: t.CTypedef = t.CChar16T -CHAR32: t.CTypedef = t.CChar32T -CHAR8PTR: t.CTypedef = t.CChar8T | t.CPtr -CHAR16PTR: t.CTypedef = t.CChar16T | t.CPtr -CHAR32PTR: t.CTypedef = t.CChar32T | t.CPtr -i8: t.CTypedef = t.CInt8T -i16: t.CTypedef = t.CInt16T -i32: t.CTypedef = t.CInt32T -i64: t.CTypedef = t.CInt64T -u8: t.CTypedef = t.CUInt8T -u16: t.CTypedef = t.CUInt16T -u32: t.CTypedef = t.CUInt32T -u64: t.CTypedef = t.CUInt64T -SIZE_T: t.CTypedef = t.CSizeT -SSIZE_T: t.CTypedef = t.CPtrDiffT -PTRDIFF_T: t.CTypedef = t.CPtrDiffT -int8_t: t.CTypedef = t.CInt8T -int16_t: t.CTypedef = t.CInt16T -int32_t: t.CTypedef = t.CInt32T -int64_t: t.CTypedef = t.CInt64T -uint8_t: t.CTypedef = t.CUInt8T -uint16_t: t.CTypedef = t.CUInt16T -uint32_t: t.CTypedef = t.CUInt32T -uint64_t: t.CTypedef = t.CUInt64T -size_t: t.CTypedef = t.CSizeT -ssize_t: t.CTypedef = t.CPtrDiffT -ptrdiff_t: t.CTypedef = t.CPtrDiffT -intptr_t: t.CTypedef = t.CIntPtrT -uintptr_t: t.CTypedef = t.CUIntPtrT -wchar_t: t.CTypedef = t.CWCharT -char8_t: t.CTypedef = t.CChar8T -char16_t: t.CTypedef = t.CChar16T -char32_t: t.CTypedef = t.CChar32T -float8_t: t.CTypedef = t.CFloat8T -float16_t: t.CTypedef = t.CFloat16T -float32_t: t.CTypedef = t.CFloat32T -float64_t: t.CTypedef = t.CFloat64T -float128_t: t.CTypedef = t.CFloat128T -_Bool: t.CTypedef = t.CBool diff --git a/Test/G5/.tpv_build/temp/5c/5c5f2d19bc9e75ab.vpi b/Test/G5/.tpv_build/temp/5c/5c5f2d19bc9e75ab.vpi index 4bdaa0e..2517aa8 100644 --- a/Test/G5/.tpv_build/temp/5c/5c5f2d19bc9e75ab.vpi +++ b/Test/G5/.tpv_build/temp/5c/5c5f2d19bc9e75ab.vpi @@ -13,22 +13,14 @@ from linkedlist import GSListNode, GSList class G5Node(GSListNode[G5Node]): Value: t.CInt def __init__(self): pass - GSLIST_SIZE: t.CDefine = 24 @t.NoVTable class G5ListWrapper: List: GSList[G5Node] | t.CPtr def __init__(self, pool: memhub.MemBuddy | t.CPtr): pass - def test_g5node_create(): pass - def test_g5node_next(): pass - def test_gslist_create(): pass - def test_gslist_append(): pass - def test_wrapper_list_field(): pass - def main() -> t.CInt: pass - diff --git a/Test/G5/.tpv_build/temp/74/748d0424e8976fa0.deps.txt b/Test/G5/.tpv_build/temp/74/748d0424e8976fa0.deps.txt deleted file mode 100644 index acdf15c..0000000 --- a/Test/G5/.tpv_build/temp/74/748d0424e8976fa0.deps.txt +++ /dev/null @@ -1 +0,0 @@ -t c stdio w32.win32console \ No newline at end of file diff --git a/Test/G5/.tpv_build/temp/74/748d0424e8976fa0.vpi b/Test/G5/.tpv_build/temp/74/748d0424e8976fa0.vpi deleted file mode 100644 index 4703a33..0000000 --- a/Test/G5/.tpv_build/temp/74/748d0424e8976fa0.vpi +++ /dev/null @@ -1,27 +0,0 @@ -"""Auto-generated Python stub file""" - - -import t, c -import stdio -from w32.win32console import SetConsoleOutputCP, SetConsoleCP -CP_UTF8: t.CDefine = 65001 -_pass_count: t.CInt = 0 -_fail_count: t.CInt = 0 -_total_pass: t.CInt = 0 -_total_fail: t.CInt = 0 -def begin(name: str): pass - -def section(name: str): pass - -def ok(msg: str): pass - -def fail(msg: str): pass - -def check(cond: t.CInt, ok_msg: str, fail_msg: str): pass - -def info(msg: str): pass - -def end() -> t.CInt: pass - -def summary() -> t.CInt: pass - diff --git a/Test/G5/.tpv_build/temp/_sha1_map.txt b/Test/G5/.tpv_build/temp/_sha1_map.txt index 288a253..48a4344 100644 --- a/Test/G5/.tpv_build/temp/_sha1_map.txt +++ b/Test/G5/.tpv_build/temp/_sha1_map.txt @@ -1,12 +1,12 @@ 09c0472e6fd0d088:includes/stdio.vp -748d0424e8976fa0:includes/testcheck.vp +23899f9254639ba7:includes/testcheck.vp 989dba6e92235032:includes/stdlib.vp -7e4672b992208969:includes/memhub.vp -b8970f3b6886efa6:includes/string.vp -a5e9a83e9db303ad:includes/linkedlist.vp -001947a1f780bd5f:includes/builtins.vp +1819d836dcee9afa:includes/memhub.vp +4a42e6e4a0818b1e:includes/string.vp +8e92345fd262a343:includes/linkedlist.vp +50b9991a98ff2dd5:includes/builtins.vp db613a1bd6a3ca26:includes/w32/win32console.vp -f5522571bcce7bcb:includes/stdint.vp +d856ba5f6f074f04:includes/stdint.vp aa246c6e6aa30484:includes/atom.vp 2c175afd85852faf:includes/viperio.vp e94ef9e139461915:includes/_list.vp diff --git a/Test/G5/.tpv_build/temp/a5/a5e9a83e9db303ad.deps.txt b/Test/G5/.tpv_build/temp/a5/a5e9a83e9db303ad.deps.txt deleted file mode 100644 index 103beac..0000000 --- a/Test/G5/.tpv_build/temp/a5/a5e9a83e9db303ad.deps.txt +++ /dev/null @@ -1 +0,0 @@ -t c stdint \ No newline at end of file diff --git a/Test/G5/.tpv_build/temp/a5/a5e9a83e9db303ad.vpi b/Test/G5/.tpv_build/temp/a5/a5e9a83e9db303ad.vpi deleted file mode 100644 index 4031ba3..0000000 --- a/Test/G5/.tpv_build/temp/a5/a5e9a83e9db303ad.vpi +++ /dev/null @@ -1,64 +0,0 @@ -"""Auto-generated Python stub file""" - - -import t, c -from stdint import * -@t.NoVTable -class LinkedNode: - next: 'LinkedNode' | t.CPtr - prev: 'LinkedNode' | t.CPtr - child: 'LinkedNode' | t.CPtr - last_child: 'LinkedNode' | t.CPtr - parent: 'LinkedNode' | t.CPtr - child_count: t.CSizeT - def append(self, node: 'LinkedNode' | t.CPtr): pass - def prepend(self, node: 'LinkedNode' | t.CPtr): pass - def insert_before(self, node: 'LinkedNode' | t.CPtr, new_node: 'LinkedNode' | t.CPtr): pass - def insert_after(self, node: 'LinkedNode' | t.CPtr, new_node: 'LinkedNode' | t.CPtr): pass - def remove_child(self, node: 'LinkedNode' | t.CPtr): pass - def detach(self): pass - def unlink(self): pass - def has_children(self) -> t.CInt: pass - def child_at(self, index: t.CSizeT) -> 'LinkedNode' | t.CPtr: pass - def count_children(self) -> t.CSizeT: pass - def first_sibling(self) -> 'LinkedNode' | t.CPtr: pass - def last_sibling(self) -> 'LinkedNode' | t.CPtr: pass - -@t.NoVTable -class SListNode: - Next: 'SListNode' | t.CPtr - def append(self, node: 'SListNode' | t.CPtr) -> 'SListNode' | t.CPtr: pass - def append_after(self, node: 'SListNode' | t.CPtr) -> 'SListNode' | t.CPtr: pass - def count(self) -> t.CSizeT: pass - def at(self, index: t.CSizeT) -> 'SListNode' | t.CPtr: pass - def remove(self, node: 'SListNode' | t.CPtr) -> 'SListNode' | t.CPtr: pass - -@t.NoVTable -class GSListNode[T]: - Next: T | t.CPtr - -@t.NoVTable -class GSList[T]: - Head: T | t.CPtr - Tail: T | t.CPtr - Count: t.CSizeT - def __init__(self): pass - def append(self, node: T): pass - def count(self) -> t.CSizeT: pass - def at(self, index: t.CSizeT) -> T | t.CPtr: pass - -@t.NoVTable -class GTreeNode[T]: - Next: T | t.CPtr - Prev: T | t.CPtr - Child: T | t.CPtr - LastChild: T | t.CPtr - Parent: T | t.CPtr - Count: t.CSizeT - def append(self, node: T | t.CPtr): pass - def prepend(self, node: T | t.CPtr): pass - def detach(self): pass - def has_children(self) -> t.CInt: pass - def child_at(self, index: t.CSizeT) -> T | t.CPtr: pass - def count_children(self) -> t.CSizeT: pass - diff --git a/Test/G5/.tpv_build/temp/aa/aa246c6e6aa30484.vpi b/Test/G5/.tpv_build/temp/aa/aa246c6e6aa30484.vpi index 850204b..be87c45 100644 --- a/Test/G5/.tpv_build/temp/aa/aa246c6e6aa30484.vpi +++ b/Test/G5/.tpv_build/temp/aa/aa246c6e6aa30484.vpi @@ -9,14 +9,8 @@ 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 - diff --git a/Test/G5/.tpv_build/temp/f5/f5522571bcce7bcb.deps.txt b/Test/G5/.tpv_build/temp/f5/f5522571bcce7bcb.deps.txt deleted file mode 100644 index 32f64f4..0000000 --- a/Test/G5/.tpv_build/temp/f5/f5522571bcce7bcb.deps.txt +++ /dev/null @@ -1 +0,0 @@ -t \ No newline at end of file diff --git a/Test/G5/.tpv_build/temp/f5/f5522571bcce7bcb.vpi b/Test/G5/.tpv_build/temp/f5/f5522571bcce7bcb.vpi deleted file mode 100644 index 7871c20..0000000 --- a/Test/G5/.tpv_build/temp/f5/f5522571bcce7bcb.vpi +++ /dev/null @@ -1,95 +0,0 @@ -"""Auto-generated Python stub file""" - -import c - -import t -INT: t.CTypedef = t.CInt -INTPTR: t.CTypedef = t.CInt | t.CPtr -BOOL: t.CTypedef = t.CInt -UINT: t.CTypedef = t.CUnsignedInt -UINTPTR: t.CTypedef = UINT | t.CPtr -BYTE: t.CTypedef = t.CUnsignedChar -BYTEPTR: t.CTypedef = BYTE | t.CPtr -WORD: t.CTypedef = t.CUInt16T -DWORD: t.CTypedef = t.CUInt32T -QWORD: t.CTypedef = t.CUInt64T -TCHAR: t.CTypedef = t.CChar -CHARLIST: t.CTypedef = str | t.CPtr -VOID: t.CTypedef = t.CVoid -SHORT: t.CTypedef = t.CShort -SHORTPTR: t.CTypedef = t.CShort | t.CPtr -USHORT: t.CTypedef = t.CUnsignedShort -USHORTPTR: t.CTypedef = t.CUnsignedShort | t.CPtr -LONGLONG: t.CTypedef = t.CLongLong -ULONGLONG: t.CTypedef = t.CUnsignedLongLong -LONG: t.CTypedef = t.CLong -ULONG: t.CTypedef = t.CUnsignedLong -WCHAR: t.CTypedef = WORD -WCHARPTR: t.CTypedef = WORD | t.CPtr -CHARPTR: t.CTypedef = t.CChar | t.CPtr -FSIZE_t: t.CTypedef = DWORD -LBA_t: t.CTypedef = DWORD -VOIDPTR: t.CTypedef = t.CVoid | t.CPtr -FLOAT: t.CTypedef = t.CFloat -DOUBLE: t.CTypedef = t.CDouble -FLOAT8: t.CTypedef = t.CFloat8T -FLOAT16: t.CTypedef = t.CFloat16T -FLOAT32: t.CTypedef = t.CFloat32T -FLOAT64: t.CTypedef = t.CFloat64T -FLOAT128: t.CTypedef = t.CFloat128T -INT8: t.CTypedef = t.CInt8T -INT16: t.CTypedef = t.CInt16T -INT32: t.CTypedef = t.CInt32T -INT64: t.CTypedef = t.CInt64T -UINT8: t.CTypedef = t.CUInt8T -UINT16: t.CTypedef = t.CUInt16T -UINT32: t.CTypedef = t.CUInt32T -UINT64: t.CTypedef = t.CUInt64T -INT8PTR: t.CTypedef = t.CInt8T | t.CPtr -INT16PTR: t.CTypedef = t.CInt16T | t.CPtr -INT32PTR: t.CTypedef = t.CInt32T | t.CPtr -INT64PTR: t.CTypedef = t.CInt64T | t.CPtr -UINT8PTR: t.CTypedef = t.CUInt8T | t.CPtr -UINT16PTR: t.CTypedef = t.CUInt16T | t.CPtr -UINT32PTR: t.CTypedef = t.CUInt32T | t.CPtr -UINT64PTR: t.CTypedef = t.CUInt64T | t.CPtr -CHAR8: t.CTypedef = t.CChar8T -CHAR16: t.CTypedef = t.CChar16T -CHAR32: t.CTypedef = t.CChar32T -CHAR8PTR: t.CTypedef = t.CChar8T | t.CPtr -CHAR16PTR: t.CTypedef = t.CChar16T | t.CPtr -CHAR32PTR: t.CTypedef = t.CChar32T | t.CPtr -i8: t.CTypedef = t.CInt8T -i16: t.CTypedef = t.CInt16T -i32: t.CTypedef = t.CInt32T -i64: t.CTypedef = t.CInt64T -u8: t.CTypedef = t.CUInt8T -u16: t.CTypedef = t.CUInt16T -u32: t.CTypedef = t.CUInt32T -u64: t.CTypedef = t.CUInt64T -SIZE_T: t.CTypedef = t.CSizeT -SSIZE_T: t.CTypedef = t.CPtrDiffT -PTRDIFF_T: t.CTypedef = t.CPtrDiffT -int8_t: t.CTypedef = t.CInt8T -int16_t: t.CTypedef = t.CInt16T -int32_t: t.CTypedef = t.CInt32T -int64_t: t.CTypedef = t.CInt64T -uint8_t: t.CTypedef = t.CUInt8T -uint16_t: t.CTypedef = t.CUInt16T -uint32_t: t.CTypedef = t.CUInt32T -uint64_t: t.CTypedef = t.CUInt64T -size_t: t.CTypedef = t.CSizeT -ssize_t: t.CTypedef = t.CPtrDiffT -ptrdiff_t: t.CTypedef = t.CPtrDiffT -intptr_t: t.CTypedef = t.CIntPtrT -uintptr_t: t.CTypedef = t.CUIntPtrT -wchar_t: t.CTypedef = t.CWCharT -char8_t: t.CTypedef = t.CChar8T -char16_t: t.CTypedef = t.CChar16T -char32_t: t.CTypedef = t.CChar32T -float8_t: t.CTypedef = t.CFloat8T -float16_t: t.CTypedef = t.CFloat16T -float32_t: t.CTypedef = t.CFloat32T -float64_t: t.CTypedef = t.CFloat64T -float128_t: t.CTypedef = t.CFloat128T -_Bool: t.CTypedef = t.CBool diff --git a/Test/G7/.tpv_build/temp/12/12c1b8e59d117476.vpi b/Test/G7/.tpv_build/temp/12/12c1b8e59d117476.vpi index 9b89ab3..8af53d7 100644 --- a/Test/G7/.tpv_build/temp/12/12c1b8e59d117476.vpi +++ b/Test/G7/.tpv_build/temp/12/12c1b8e59d117476.vpi @@ -10,6 +10,4 @@ import memhub from conflict_node import Value Value: t.CPtr = None def test_value_struct_fields(): pass - def main() -> t.CInt: pass - diff --git a/Test/G7/.tpv_build/temp/74/748d0424e8976fa0.deps.txt b/Test/G7/.tpv_build/temp/74/748d0424e8976fa0.deps.txt deleted file mode 100644 index acdf15c..0000000 --- a/Test/G7/.tpv_build/temp/74/748d0424e8976fa0.deps.txt +++ /dev/null @@ -1 +0,0 @@ -t c stdio w32.win32console \ No newline at end of file diff --git a/Test/G7/.tpv_build/temp/74/748d0424e8976fa0.vpi b/Test/G7/.tpv_build/temp/74/748d0424e8976fa0.vpi deleted file mode 100644 index 4703a33..0000000 --- a/Test/G7/.tpv_build/temp/74/748d0424e8976fa0.vpi +++ /dev/null @@ -1,27 +0,0 @@ -"""Auto-generated Python stub file""" - - -import t, c -import stdio -from w32.win32console import SetConsoleOutputCP, SetConsoleCP -CP_UTF8: t.CDefine = 65001 -_pass_count: t.CInt = 0 -_fail_count: t.CInt = 0 -_total_pass: t.CInt = 0 -_total_fail: t.CInt = 0 -def begin(name: str): pass - -def section(name: str): pass - -def ok(msg: str): pass - -def fail(msg: str): pass - -def check(cond: t.CInt, ok_msg: str, fail_msg: str): pass - -def info(msg: str): pass - -def end() -> t.CInt: pass - -def summary() -> t.CInt: pass - diff --git a/Test/G7/.tpv_build/temp/_sha1_map.txt b/Test/G7/.tpv_build/temp/_sha1_map.txt index 6de0af7..1eaef9e 100644 --- a/Test/G7/.tpv_build/temp/_sha1_map.txt +++ b/Test/G7/.tpv_build/temp/_sha1_map.txt @@ -1,15 +1,15 @@ 09c0472e6fd0d088:includes/stdio.vp -748d0424e8976fa0:includes/testcheck.vp +23899f9254639ba7:includes/testcheck.vp 989dba6e92235032:includes/stdlib.vp -7e4672b992208969:includes/memhub.vp +1819d836dcee9afa:includes/memhub.vp d76710b4e0707c91:includes/conflict_node.vp -001947a1f780bd5f:includes/builtins.vp +50b9991a98ff2dd5:includes/builtins.vp db613a1bd6a3ca26:includes/w32/win32console.vp -f5522571bcce7bcb:includes/stdint.vp -b8970f3b6886efa6:includes/string.vp +d856ba5f6f074f04:includes/stdint.vp +4a42e6e4a0818b1e:includes/string.vp aa246c6e6aa30484:includes/atom.vp 2c175afd85852faf:includes/viperio.vp e94ef9e139461915:includes/_list.vp -a5e9a83e9db303ad:includes/linkedlist.vp +8e92345fd262a343:includes/linkedlist.vp e710417730391023:includes/w32/win32base.vp 12c1b8e59d117476:main.vp diff --git a/Test/G7/.tpv_build/temp/a5/a5e9a83e9db303ad.deps.txt b/Test/G7/.tpv_build/temp/a5/a5e9a83e9db303ad.deps.txt deleted file mode 100644 index 103beac..0000000 --- a/Test/G7/.tpv_build/temp/a5/a5e9a83e9db303ad.deps.txt +++ /dev/null @@ -1 +0,0 @@ -t c stdint \ No newline at end of file diff --git a/Test/G7/.tpv_build/temp/aa/aa246c6e6aa30484.vpi b/Test/G7/.tpv_build/temp/aa/aa246c6e6aa30484.vpi index 850204b..be87c45 100644 --- a/Test/G7/.tpv_build/temp/aa/aa246c6e6aa30484.vpi +++ b/Test/G7/.tpv_build/temp/aa/aa246c6e6aa30484.vpi @@ -9,14 +9,8 @@ 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 - diff --git a/Test/G7/.tpv_build/temp/f5/f5522571bcce7bcb.deps.txt b/Test/G7/.tpv_build/temp/f5/f5522571bcce7bcb.deps.txt deleted file mode 100644 index 32f64f4..0000000 --- a/Test/G7/.tpv_build/temp/f5/f5522571bcce7bcb.deps.txt +++ /dev/null @@ -1 +0,0 @@ -t \ No newline at end of file diff --git a/Test/G7/.tpv_build/temp/f5/f5522571bcce7bcb.vpi b/Test/G7/.tpv_build/temp/f5/f5522571bcce7bcb.vpi deleted file mode 100644 index 7871c20..0000000 --- a/Test/G7/.tpv_build/temp/f5/f5522571bcce7bcb.vpi +++ /dev/null @@ -1,95 +0,0 @@ -"""Auto-generated Python stub file""" - -import c - -import t -INT: t.CTypedef = t.CInt -INTPTR: t.CTypedef = t.CInt | t.CPtr -BOOL: t.CTypedef = t.CInt -UINT: t.CTypedef = t.CUnsignedInt -UINTPTR: t.CTypedef = UINT | t.CPtr -BYTE: t.CTypedef = t.CUnsignedChar -BYTEPTR: t.CTypedef = BYTE | t.CPtr -WORD: t.CTypedef = t.CUInt16T -DWORD: t.CTypedef = t.CUInt32T -QWORD: t.CTypedef = t.CUInt64T -TCHAR: t.CTypedef = t.CChar -CHARLIST: t.CTypedef = str | t.CPtr -VOID: t.CTypedef = t.CVoid -SHORT: t.CTypedef = t.CShort -SHORTPTR: t.CTypedef = t.CShort | t.CPtr -USHORT: t.CTypedef = t.CUnsignedShort -USHORTPTR: t.CTypedef = t.CUnsignedShort | t.CPtr -LONGLONG: t.CTypedef = t.CLongLong -ULONGLONG: t.CTypedef = t.CUnsignedLongLong -LONG: t.CTypedef = t.CLong -ULONG: t.CTypedef = t.CUnsignedLong -WCHAR: t.CTypedef = WORD -WCHARPTR: t.CTypedef = WORD | t.CPtr -CHARPTR: t.CTypedef = t.CChar | t.CPtr -FSIZE_t: t.CTypedef = DWORD -LBA_t: t.CTypedef = DWORD -VOIDPTR: t.CTypedef = t.CVoid | t.CPtr -FLOAT: t.CTypedef = t.CFloat -DOUBLE: t.CTypedef = t.CDouble -FLOAT8: t.CTypedef = t.CFloat8T -FLOAT16: t.CTypedef = t.CFloat16T -FLOAT32: t.CTypedef = t.CFloat32T -FLOAT64: t.CTypedef = t.CFloat64T -FLOAT128: t.CTypedef = t.CFloat128T -INT8: t.CTypedef = t.CInt8T -INT16: t.CTypedef = t.CInt16T -INT32: t.CTypedef = t.CInt32T -INT64: t.CTypedef = t.CInt64T -UINT8: t.CTypedef = t.CUInt8T -UINT16: t.CTypedef = t.CUInt16T -UINT32: t.CTypedef = t.CUInt32T -UINT64: t.CTypedef = t.CUInt64T -INT8PTR: t.CTypedef = t.CInt8T | t.CPtr -INT16PTR: t.CTypedef = t.CInt16T | t.CPtr -INT32PTR: t.CTypedef = t.CInt32T | t.CPtr -INT64PTR: t.CTypedef = t.CInt64T | t.CPtr -UINT8PTR: t.CTypedef = t.CUInt8T | t.CPtr -UINT16PTR: t.CTypedef = t.CUInt16T | t.CPtr -UINT32PTR: t.CTypedef = t.CUInt32T | t.CPtr -UINT64PTR: t.CTypedef = t.CUInt64T | t.CPtr -CHAR8: t.CTypedef = t.CChar8T -CHAR16: t.CTypedef = t.CChar16T -CHAR32: t.CTypedef = t.CChar32T -CHAR8PTR: t.CTypedef = t.CChar8T | t.CPtr -CHAR16PTR: t.CTypedef = t.CChar16T | t.CPtr -CHAR32PTR: t.CTypedef = t.CChar32T | t.CPtr -i8: t.CTypedef = t.CInt8T -i16: t.CTypedef = t.CInt16T -i32: t.CTypedef = t.CInt32T -i64: t.CTypedef = t.CInt64T -u8: t.CTypedef = t.CUInt8T -u16: t.CTypedef = t.CUInt16T -u32: t.CTypedef = t.CUInt32T -u64: t.CTypedef = t.CUInt64T -SIZE_T: t.CTypedef = t.CSizeT -SSIZE_T: t.CTypedef = t.CPtrDiffT -PTRDIFF_T: t.CTypedef = t.CPtrDiffT -int8_t: t.CTypedef = t.CInt8T -int16_t: t.CTypedef = t.CInt16T -int32_t: t.CTypedef = t.CInt32T -int64_t: t.CTypedef = t.CInt64T -uint8_t: t.CTypedef = t.CUInt8T -uint16_t: t.CTypedef = t.CUInt16T -uint32_t: t.CTypedef = t.CUInt32T -uint64_t: t.CTypedef = t.CUInt64T -size_t: t.CTypedef = t.CSizeT -ssize_t: t.CTypedef = t.CPtrDiffT -ptrdiff_t: t.CTypedef = t.CPtrDiffT -intptr_t: t.CTypedef = t.CIntPtrT -uintptr_t: t.CTypedef = t.CUIntPtrT -wchar_t: t.CTypedef = t.CWCharT -char8_t: t.CTypedef = t.CChar8T -char16_t: t.CTypedef = t.CChar16T -char32_t: t.CTypedef = t.CChar32T -float8_t: t.CTypedef = t.CFloat8T -float16_t: t.CTypedef = t.CFloat16T -float32_t: t.CTypedef = t.CFloat32T -float64_t: t.CTypedef = t.CFloat64T -float128_t: t.CTypedef = t.CFloat128T -_Bool: t.CTypedef = t.CBool diff --git a/Test/GenericTest2/.tpv_build/temp/74/748d0424e8976fa0.deps.txt b/Test/GenericTest2/.tpv_build/temp/74/748d0424e8976fa0.deps.txt deleted file mode 100644 index acdf15c..0000000 --- a/Test/GenericTest2/.tpv_build/temp/74/748d0424e8976fa0.deps.txt +++ /dev/null @@ -1 +0,0 @@ -t c stdio w32.win32console \ No newline at end of file diff --git a/Test/GenericTest2/.tpv_build/temp/74/748d0424e8976fa0.vpi b/Test/GenericTest2/.tpv_build/temp/74/748d0424e8976fa0.vpi deleted file mode 100644 index 4703a33..0000000 --- a/Test/GenericTest2/.tpv_build/temp/74/748d0424e8976fa0.vpi +++ /dev/null @@ -1,27 +0,0 @@ -"""Auto-generated Python stub file""" - - -import t, c -import stdio -from w32.win32console import SetConsoleOutputCP, SetConsoleCP -CP_UTF8: t.CDefine = 65001 -_pass_count: t.CInt = 0 -_fail_count: t.CInt = 0 -_total_pass: t.CInt = 0 -_total_fail: t.CInt = 0 -def begin(name: str): pass - -def section(name: str): pass - -def ok(msg: str): pass - -def fail(msg: str): pass - -def check(cond: t.CInt, ok_msg: str, fail_msg: str): pass - -def info(msg: str): pass - -def end() -> t.CInt: pass - -def summary() -> t.CInt: pass - diff --git a/Test/GenericTest2/.tpv_build/temp/_sha1_map.txt b/Test/GenericTest2/.tpv_build/temp/_sha1_map.txt index 849f4bf..fa182a3 100644 --- a/Test/GenericTest2/.tpv_build/temp/_sha1_map.txt +++ b/Test/GenericTest2/.tpv_build/temp/_sha1_map.txt @@ -1,7 +1,7 @@ 09c0472e6fd0d088:includes/stdio.vp -748d0424e8976fa0:includes/testcheck.vp -001947a1f780bd5f:includes/builtins.vp +23899f9254639ba7:includes/testcheck.vp +50b9991a98ff2dd5:includes/builtins.vp db613a1bd6a3ca26:includes/w32/win32console.vp -f5522571bcce7bcb:includes/stdint.vp +d856ba5f6f074f04:includes/stdint.vp e710417730391023:includes/w32/win32base.vp bdfc8bd243b7e5b7:main.vp diff --git a/Test/GenericTest2/.tpv_build/temp/bd/bdfc8bd243b7e5b7.vpi b/Test/GenericTest2/.tpv_build/temp/bd/bdfc8bd243b7e5b7.vpi index 932bfcf..0369768 100644 --- a/Test/GenericTest2/.tpv_build/temp/bd/bdfc8bd243b7e5b7.vpi +++ b/Test/GenericTest2/.tpv_build/temp/bd/bdfc8bd243b7e5b7.vpi @@ -6,13 +6,9 @@ import stdio import c import testcheck def square(x: T) -> T: pass - def test_generic_square_types(): pass - def clamp(val: T, lo: T, hi: T) -> T: pass - def test_generic_clamp(): pass - class Stack[T]: data: t.CArray[t.CInt, 16] top: t.CInt @@ -22,34 +18,23 @@ class Stack[T]: def is_empty(self) -> t.CInt: pass def size_of(self) -> t.CSizeT: pass def type_size(self) -> t.CSizeT: pass - def test_generic_stack(): pass - class IntPair: a: t.CInt b: t.CInt - def generic_swap(p: IntPair | t.CPtr): pass - def test_generic_swap(): pass - class Range[T]: start: T end_val: T step: T def __init__(self, s: T, e: T, st: T): pass def sum_all(self) -> T: pass - def test_generic_range(): pass - def array_sum(arr: t.CArray[t.CInt, 8], n: t.CInt) -> t.CInt: pass - def test_generic_array_sum(): pass - def max_of_three(a: T, b: T, c_val: T) -> T: pass - def test_generic_max_three(): pass - class Container[T]: values: t.CArray[t.CInt, 8] size: t.CInt @@ -58,22 +43,14 @@ class Container[T]: def get(self, idx: t.CInt) -> T: pass def contains(self, v: T) -> t.CInt: pass def total(self) -> T: pass - def test_generic_container(): pass - def factorial(n: T) -> T: pass - def test_generic_factorial(): pass - class Accumulator[T]: total: T def __init__(self, start: T): pass def add_val(self, v: T): pass def get_result(self) -> T: pass - def test_generic_accumulator(): pass - def test_generic_sizeof_bug(): pass - def main() -> t.CInt: pass - diff --git a/Test/GenericTest2/.tpv_build/temp/f5/f5522571bcce7bcb.deps.txt b/Test/GenericTest2/.tpv_build/temp/f5/f5522571bcce7bcb.deps.txt deleted file mode 100644 index 32f64f4..0000000 --- a/Test/GenericTest2/.tpv_build/temp/f5/f5522571bcce7bcb.deps.txt +++ /dev/null @@ -1 +0,0 @@ -t \ No newline at end of file diff --git a/Test/GenericTest2/.tpv_build/temp/f5/f5522571bcce7bcb.vpi b/Test/GenericTest2/.tpv_build/temp/f5/f5522571bcce7bcb.vpi deleted file mode 100644 index 7871c20..0000000 --- a/Test/GenericTest2/.tpv_build/temp/f5/f5522571bcce7bcb.vpi +++ /dev/null @@ -1,95 +0,0 @@ -"""Auto-generated Python stub file""" - -import c - -import t -INT: t.CTypedef = t.CInt -INTPTR: t.CTypedef = t.CInt | t.CPtr -BOOL: t.CTypedef = t.CInt -UINT: t.CTypedef = t.CUnsignedInt -UINTPTR: t.CTypedef = UINT | t.CPtr -BYTE: t.CTypedef = t.CUnsignedChar -BYTEPTR: t.CTypedef = BYTE | t.CPtr -WORD: t.CTypedef = t.CUInt16T -DWORD: t.CTypedef = t.CUInt32T -QWORD: t.CTypedef = t.CUInt64T -TCHAR: t.CTypedef = t.CChar -CHARLIST: t.CTypedef = str | t.CPtr -VOID: t.CTypedef = t.CVoid -SHORT: t.CTypedef = t.CShort -SHORTPTR: t.CTypedef = t.CShort | t.CPtr -USHORT: t.CTypedef = t.CUnsignedShort -USHORTPTR: t.CTypedef = t.CUnsignedShort | t.CPtr -LONGLONG: t.CTypedef = t.CLongLong -ULONGLONG: t.CTypedef = t.CUnsignedLongLong -LONG: t.CTypedef = t.CLong -ULONG: t.CTypedef = t.CUnsignedLong -WCHAR: t.CTypedef = WORD -WCHARPTR: t.CTypedef = WORD | t.CPtr -CHARPTR: t.CTypedef = t.CChar | t.CPtr -FSIZE_t: t.CTypedef = DWORD -LBA_t: t.CTypedef = DWORD -VOIDPTR: t.CTypedef = t.CVoid | t.CPtr -FLOAT: t.CTypedef = t.CFloat -DOUBLE: t.CTypedef = t.CDouble -FLOAT8: t.CTypedef = t.CFloat8T -FLOAT16: t.CTypedef = t.CFloat16T -FLOAT32: t.CTypedef = t.CFloat32T -FLOAT64: t.CTypedef = t.CFloat64T -FLOAT128: t.CTypedef = t.CFloat128T -INT8: t.CTypedef = t.CInt8T -INT16: t.CTypedef = t.CInt16T -INT32: t.CTypedef = t.CInt32T -INT64: t.CTypedef = t.CInt64T -UINT8: t.CTypedef = t.CUInt8T -UINT16: t.CTypedef = t.CUInt16T -UINT32: t.CTypedef = t.CUInt32T -UINT64: t.CTypedef = t.CUInt64T -INT8PTR: t.CTypedef = t.CInt8T | t.CPtr -INT16PTR: t.CTypedef = t.CInt16T | t.CPtr -INT32PTR: t.CTypedef = t.CInt32T | t.CPtr -INT64PTR: t.CTypedef = t.CInt64T | t.CPtr -UINT8PTR: t.CTypedef = t.CUInt8T | t.CPtr -UINT16PTR: t.CTypedef = t.CUInt16T | t.CPtr -UINT32PTR: t.CTypedef = t.CUInt32T | t.CPtr -UINT64PTR: t.CTypedef = t.CUInt64T | t.CPtr -CHAR8: t.CTypedef = t.CChar8T -CHAR16: t.CTypedef = t.CChar16T -CHAR32: t.CTypedef = t.CChar32T -CHAR8PTR: t.CTypedef = t.CChar8T | t.CPtr -CHAR16PTR: t.CTypedef = t.CChar16T | t.CPtr -CHAR32PTR: t.CTypedef = t.CChar32T | t.CPtr -i8: t.CTypedef = t.CInt8T -i16: t.CTypedef = t.CInt16T -i32: t.CTypedef = t.CInt32T -i64: t.CTypedef = t.CInt64T -u8: t.CTypedef = t.CUInt8T -u16: t.CTypedef = t.CUInt16T -u32: t.CTypedef = t.CUInt32T -u64: t.CTypedef = t.CUInt64T -SIZE_T: t.CTypedef = t.CSizeT -SSIZE_T: t.CTypedef = t.CPtrDiffT -PTRDIFF_T: t.CTypedef = t.CPtrDiffT -int8_t: t.CTypedef = t.CInt8T -int16_t: t.CTypedef = t.CInt16T -int32_t: t.CTypedef = t.CInt32T -int64_t: t.CTypedef = t.CInt64T -uint8_t: t.CTypedef = t.CUInt8T -uint16_t: t.CTypedef = t.CUInt16T -uint32_t: t.CTypedef = t.CUInt32T -uint64_t: t.CTypedef = t.CUInt64T -size_t: t.CTypedef = t.CSizeT -ssize_t: t.CTypedef = t.CPtrDiffT -ptrdiff_t: t.CTypedef = t.CPtrDiffT -intptr_t: t.CTypedef = t.CIntPtrT -uintptr_t: t.CTypedef = t.CUIntPtrT -wchar_t: t.CTypedef = t.CWCharT -char8_t: t.CTypedef = t.CChar8T -char16_t: t.CTypedef = t.CChar16T -char32_t: t.CTypedef = t.CChar32T -float8_t: t.CTypedef = t.CFloat8T -float16_t: t.CTypedef = t.CFloat16T -float32_t: t.CTypedef = t.CFloat32T -float64_t: t.CTypedef = t.CFloat64T -float128_t: t.CTypedef = t.CFloat128T -_Bool: t.CTypedef = t.CBool diff --git a/Test/GenericTest4/.tpv_build/temp/42/42e09c6149524d9d.vpi b/Test/GenericTest4/.tpv_build/temp/42/42e09c6149524d9d.vpi deleted file mode 100644 index 8d40d76..0000000 --- a/Test/GenericTest4/.tpv_build/temp/42/42e09c6149524d9d.vpi +++ /dev/null @@ -1,32 +0,0 @@ -"""Auto-generated Python stub file""" - -import c - -import t -import stdio -import testcheck -class Box[T]: - value: T - def __init__(self, v: T): pass - def get(self) -> T: pass - def set(self, v: T): pass -def test_explicit_box(): pass -class Pair[T1, T2]: - first: T1 - second: T2 - def __init__(self, a: T1, b: T2): pass - def sum_as_int(self) -> t.CInt: pass -def test_explicit_pair(): pass -class Wrapper[T]: - data: T - def __init__(self, v: T): pass - def get(self) -> T: pass -def test_mixed_generic_class(): pass -class Counter[T]: - count: T - def __init__(self, start: T): pass - def increment(self): pass - def get_count(self) -> T: pass -def test_explicit_counter(): pass -def test_explicit_box_set(): pass -def main() -> t.CInt: pass diff --git a/Test/GenericTest4/.tpv_build/temp/_sha1_map.txt b/Test/GenericTest4/.tpv_build/temp/_sha1_map.txt deleted file mode 100644 index c29d8d1..0000000 --- a/Test/GenericTest4/.tpv_build/temp/_sha1_map.txt +++ /dev/null @@ -1,7 +0,0 @@ -09c0472e6fd0d088:includes/stdio.vp -23899f9254639ba7:includes/testcheck.vp -50b9991a98ff2dd5:includes/builtins.vp -db613a1bd6a3ca26:includes/w32/win32console.vp -d856ba5f6f074f04:includes/stdint.vp -e710417730391023:includes/w32/win32base.vp -42e09c6149524d9d:main.vp diff --git a/Test/NewAstTest/.tpv_build/temp/_sha1_map.txt b/Test/NewAstTest/.tpv_build/temp/_sha1_map.txt index ed8cf0d..c0a645c 100644 --- a/Test/NewAstTest/.tpv_build/temp/_sha1_map.txt +++ b/Test/NewAstTest/.tpv_build/temp/_sha1_map.txt @@ -1,21 +1,21 @@ 09c0472e6fd0d088:includes/stdio.vp -7e4672b992208969:includes/memhub.vp +1819d836dcee9afa:includes/memhub.vp 989dba6e92235032:includes/stdlib.vp -b8970f3b6886efa6:includes/string.vp -6394599d6a61cabf:includes/ast/__init__.vp -001947a1f780bd5f:includes/builtins.vp -f5522571bcce7bcb:includes/stdint.vp +4a42e6e4a0818b1e:includes/string.vp +3571eabe5a83d798:includes/ast/__init__.vp +e94ef9e139461915:includes/_list.vp +50b9991a98ff2dd5:includes/builtins.vp +d856ba5f6f074f04:includes/stdint.vp aa246c6e6aa30484:includes/atom.vp 2c175afd85852faf:includes/viperio.vp -e94ef9e139461915:includes/_list.vp -eb09ac7f10988a63:includes/ast/tokens.vp -e9dfb296a8674aee:includes/ast/base.vp -4618d74293c6746a:includes/ast/stmts.vp -c0def010dcebadb1:includes/ast/exprs.vp -34dc6a647fa19b7b:includes/ast/astaux.vp -3b2a307c9c7d0129:includes/ast/match.vp -43ee0269efffadc3:includes/ast/lexer.vp -df83e214ee82d0f3:includes/ast/parser.vp +3c774069d112cc3f:includes/ast/tokens.vp +7565e081d88517ac:includes/ast/base.vp +ebe3b1f219d7b887:includes/ast/stmts.vp +12bc7ec9063821df:includes/ast/exprs.vp +7ebdc3bbda127a46:includes/ast/astaux.vp +ad445c65d2ac295a:includes/ast/match.vp +58d97de24b40f9dc:includes/ast/lexer.vp +269b410a8b96c1f5:includes/ast/parser.vp 95a546a38b5b6316:includes/viperlib.vp cf900a640e6eeff3:includes/stdarg.vp 4175f14c5fbef360:main.vp diff --git a/Test/NewAstTest/.tpv_build/temp/f5/f5522571bcce7bcb.deps.txt b/Test/NewAstTest/.tpv_build/temp/f5/f5522571bcce7bcb.deps.txt deleted file mode 100644 index 32f64f4..0000000 --- a/Test/NewAstTest/.tpv_build/temp/f5/f5522571bcce7bcb.deps.txt +++ /dev/null @@ -1 +0,0 @@ -t \ No newline at end of file diff --git a/Test/NewAstTest/App/main.vp b/Test/NewAstTest/App/main.vp index 3765416..9699dbc 100644 --- a/Test/NewAstTest/App/main.vp +++ b/Test/NewAstTest/App/main.vp @@ -1648,10 +1648,10 @@ class C(Base1, Base2): m_complex_mod: Module | CPtr = parse(m_complex_src, pool) if m_complex_mod is not None: dump(m_complex_mod, dump_buf, DUMP_BUF_SIZE) - has_c_mv: str = string.strstr(dump_buf, "MatchValue(") + has_c_mv: str = string.strstr(dump_buf, "MatchValue(") has_c_msq: str = string.strstr(dump_buf, "MatchSequence(") - has_c_mc: str = string.strstr(dump_buf, "MatchClass(") - has_c_ma: str = string.strstr(dump_buf, "MatchAs(") + has_c_mc: str = string.strstr(dump_buf, "MatchClass(") + has_c_ma: str = string.strstr(dump_buf, "MatchAs(") if has_c_mv is not None and has_c_msq is not None and \ has_c_mc is not None and has_c_ma is not None: passed += 1 diff --git a/Test/NoVTableTest/.tpv_build/temp/74/748d0424e8976fa0.deps.txt b/Test/NoVTableTest/.tpv_build/temp/74/748d0424e8976fa0.deps.txt deleted file mode 100644 index acdf15c..0000000 --- a/Test/NoVTableTest/.tpv_build/temp/74/748d0424e8976fa0.deps.txt +++ /dev/null @@ -1 +0,0 @@ -t c stdio w32.win32console \ No newline at end of file diff --git a/Test/NoVTableTest/.tpv_build/temp/74/748d0424e8976fa0.vpi b/Test/NoVTableTest/.tpv_build/temp/74/748d0424e8976fa0.vpi deleted file mode 100644 index 4703a33..0000000 --- a/Test/NoVTableTest/.tpv_build/temp/74/748d0424e8976fa0.vpi +++ /dev/null @@ -1,27 +0,0 @@ -"""Auto-generated Python stub file""" - - -import t, c -import stdio -from w32.win32console import SetConsoleOutputCP, SetConsoleCP -CP_UTF8: t.CDefine = 65001 -_pass_count: t.CInt = 0 -_fail_count: t.CInt = 0 -_total_pass: t.CInt = 0 -_total_fail: t.CInt = 0 -def begin(name: str): pass - -def section(name: str): pass - -def ok(msg: str): pass - -def fail(msg: str): pass - -def check(cond: t.CInt, ok_msg: str, fail_msg: str): pass - -def info(msg: str): pass - -def end() -> t.CInt: pass - -def summary() -> t.CInt: pass - diff --git a/Test/NoVTableTest/.tpv_build/temp/_sha1_map.txt b/Test/NoVTableTest/.tpv_build/temp/_sha1_map.txt index 3c6e217..bbbabca 100644 --- a/Test/NoVTableTest/.tpv_build/temp/_sha1_map.txt +++ b/Test/NoVTableTest/.tpv_build/temp/_sha1_map.txt @@ -1,11 +1,11 @@ 09c0472e6fd0d088:includes/stdio.vp -b8970f3b6886efa6:includes/string.vp -748d0424e8976fa0:includes/testcheck.vp -a5e9a83e9db303ad:includes/linkedlist.vp +4a42e6e4a0818b1e:includes/string.vp +23899f9254639ba7:includes/testcheck.vp +8e92345fd262a343:includes/linkedlist.vp 95a546a38b5b6316:includes/viperlib.vp 989dba6e92235032:includes/stdlib.vp -001947a1f780bd5f:includes/builtins.vp -f5522571bcce7bcb:includes/stdint.vp +50b9991a98ff2dd5:includes/builtins.vp +d856ba5f6f074f04:includes/stdint.vp db613a1bd6a3ca26:includes/w32/win32console.vp 2c175afd85852faf:includes/viperio.vp cf900a640e6eeff3:includes/stdarg.vp diff --git a/Test/NoVTableTest/.tpv_build/temp/a5/a5e9a83e9db303ad.deps.txt b/Test/NoVTableTest/.tpv_build/temp/a5/a5e9a83e9db303ad.deps.txt deleted file mode 100644 index 103beac..0000000 --- a/Test/NoVTableTest/.tpv_build/temp/a5/a5e9a83e9db303ad.deps.txt +++ /dev/null @@ -1 +0,0 @@ -t c stdint \ No newline at end of file diff --git a/Test/NoVTableTest/.tpv_build/temp/a5/a5e9a83e9db303ad.vpi b/Test/NoVTableTest/.tpv_build/temp/a5/a5e9a83e9db303ad.vpi deleted file mode 100644 index 4031ba3..0000000 --- a/Test/NoVTableTest/.tpv_build/temp/a5/a5e9a83e9db303ad.vpi +++ /dev/null @@ -1,64 +0,0 @@ -"""Auto-generated Python stub file""" - - -import t, c -from stdint import * -@t.NoVTable -class LinkedNode: - next: 'LinkedNode' | t.CPtr - prev: 'LinkedNode' | t.CPtr - child: 'LinkedNode' | t.CPtr - last_child: 'LinkedNode' | t.CPtr - parent: 'LinkedNode' | t.CPtr - child_count: t.CSizeT - def append(self, node: 'LinkedNode' | t.CPtr): pass - def prepend(self, node: 'LinkedNode' | t.CPtr): pass - def insert_before(self, node: 'LinkedNode' | t.CPtr, new_node: 'LinkedNode' | t.CPtr): pass - def insert_after(self, node: 'LinkedNode' | t.CPtr, new_node: 'LinkedNode' | t.CPtr): pass - def remove_child(self, node: 'LinkedNode' | t.CPtr): pass - def detach(self): pass - def unlink(self): pass - def has_children(self) -> t.CInt: pass - def child_at(self, index: t.CSizeT) -> 'LinkedNode' | t.CPtr: pass - def count_children(self) -> t.CSizeT: pass - def first_sibling(self) -> 'LinkedNode' | t.CPtr: pass - def last_sibling(self) -> 'LinkedNode' | t.CPtr: pass - -@t.NoVTable -class SListNode: - Next: 'SListNode' | t.CPtr - def append(self, node: 'SListNode' | t.CPtr) -> 'SListNode' | t.CPtr: pass - def append_after(self, node: 'SListNode' | t.CPtr) -> 'SListNode' | t.CPtr: pass - def count(self) -> t.CSizeT: pass - def at(self, index: t.CSizeT) -> 'SListNode' | t.CPtr: pass - def remove(self, node: 'SListNode' | t.CPtr) -> 'SListNode' | t.CPtr: pass - -@t.NoVTable -class GSListNode[T]: - Next: T | t.CPtr - -@t.NoVTable -class GSList[T]: - Head: T | t.CPtr - Tail: T | t.CPtr - Count: t.CSizeT - def __init__(self): pass - def append(self, node: T): pass - def count(self) -> t.CSizeT: pass - def at(self, index: t.CSizeT) -> T | t.CPtr: pass - -@t.NoVTable -class GTreeNode[T]: - Next: T | t.CPtr - Prev: T | t.CPtr - Child: T | t.CPtr - LastChild: T | t.CPtr - Parent: T | t.CPtr - Count: t.CSizeT - def append(self, node: T | t.CPtr): pass - def prepend(self, node: T | t.CPtr): pass - def detach(self): pass - def has_children(self) -> t.CInt: pass - def child_at(self, index: t.CSizeT) -> T | t.CPtr: pass - def count_children(self) -> t.CSizeT: pass - diff --git a/Test/NoVTableTest/.tpv_build/temp/f5/f5522571bcce7bcb.deps.txt b/Test/NoVTableTest/.tpv_build/temp/f5/f5522571bcce7bcb.deps.txt deleted file mode 100644 index 32f64f4..0000000 --- a/Test/NoVTableTest/.tpv_build/temp/f5/f5522571bcce7bcb.deps.txt +++ /dev/null @@ -1 +0,0 @@ -t \ No newline at end of file diff --git a/Test/NoVTableTest/.tpv_build/temp/f5/f5522571bcce7bcb.vpi b/Test/NoVTableTest/.tpv_build/temp/f5/f5522571bcce7bcb.vpi deleted file mode 100644 index 7871c20..0000000 --- a/Test/NoVTableTest/.tpv_build/temp/f5/f5522571bcce7bcb.vpi +++ /dev/null @@ -1,95 +0,0 @@ -"""Auto-generated Python stub file""" - -import c - -import t -INT: t.CTypedef = t.CInt -INTPTR: t.CTypedef = t.CInt | t.CPtr -BOOL: t.CTypedef = t.CInt -UINT: t.CTypedef = t.CUnsignedInt -UINTPTR: t.CTypedef = UINT | t.CPtr -BYTE: t.CTypedef = t.CUnsignedChar -BYTEPTR: t.CTypedef = BYTE | t.CPtr -WORD: t.CTypedef = t.CUInt16T -DWORD: t.CTypedef = t.CUInt32T -QWORD: t.CTypedef = t.CUInt64T -TCHAR: t.CTypedef = t.CChar -CHARLIST: t.CTypedef = str | t.CPtr -VOID: t.CTypedef = t.CVoid -SHORT: t.CTypedef = t.CShort -SHORTPTR: t.CTypedef = t.CShort | t.CPtr -USHORT: t.CTypedef = t.CUnsignedShort -USHORTPTR: t.CTypedef = t.CUnsignedShort | t.CPtr -LONGLONG: t.CTypedef = t.CLongLong -ULONGLONG: t.CTypedef = t.CUnsignedLongLong -LONG: t.CTypedef = t.CLong -ULONG: t.CTypedef = t.CUnsignedLong -WCHAR: t.CTypedef = WORD -WCHARPTR: t.CTypedef = WORD | t.CPtr -CHARPTR: t.CTypedef = t.CChar | t.CPtr -FSIZE_t: t.CTypedef = DWORD -LBA_t: t.CTypedef = DWORD -VOIDPTR: t.CTypedef = t.CVoid | t.CPtr -FLOAT: t.CTypedef = t.CFloat -DOUBLE: t.CTypedef = t.CDouble -FLOAT8: t.CTypedef = t.CFloat8T -FLOAT16: t.CTypedef = t.CFloat16T -FLOAT32: t.CTypedef = t.CFloat32T -FLOAT64: t.CTypedef = t.CFloat64T -FLOAT128: t.CTypedef = t.CFloat128T -INT8: t.CTypedef = t.CInt8T -INT16: t.CTypedef = t.CInt16T -INT32: t.CTypedef = t.CInt32T -INT64: t.CTypedef = t.CInt64T -UINT8: t.CTypedef = t.CUInt8T -UINT16: t.CTypedef = t.CUInt16T -UINT32: t.CTypedef = t.CUInt32T -UINT64: t.CTypedef = t.CUInt64T -INT8PTR: t.CTypedef = t.CInt8T | t.CPtr -INT16PTR: t.CTypedef = t.CInt16T | t.CPtr -INT32PTR: t.CTypedef = t.CInt32T | t.CPtr -INT64PTR: t.CTypedef = t.CInt64T | t.CPtr -UINT8PTR: t.CTypedef = t.CUInt8T | t.CPtr -UINT16PTR: t.CTypedef = t.CUInt16T | t.CPtr -UINT32PTR: t.CTypedef = t.CUInt32T | t.CPtr -UINT64PTR: t.CTypedef = t.CUInt64T | t.CPtr -CHAR8: t.CTypedef = t.CChar8T -CHAR16: t.CTypedef = t.CChar16T -CHAR32: t.CTypedef = t.CChar32T -CHAR8PTR: t.CTypedef = t.CChar8T | t.CPtr -CHAR16PTR: t.CTypedef = t.CChar16T | t.CPtr -CHAR32PTR: t.CTypedef = t.CChar32T | t.CPtr -i8: t.CTypedef = t.CInt8T -i16: t.CTypedef = t.CInt16T -i32: t.CTypedef = t.CInt32T -i64: t.CTypedef = t.CInt64T -u8: t.CTypedef = t.CUInt8T -u16: t.CTypedef = t.CUInt16T -u32: t.CTypedef = t.CUInt32T -u64: t.CTypedef = t.CUInt64T -SIZE_T: t.CTypedef = t.CSizeT -SSIZE_T: t.CTypedef = t.CPtrDiffT -PTRDIFF_T: t.CTypedef = t.CPtrDiffT -int8_t: t.CTypedef = t.CInt8T -int16_t: t.CTypedef = t.CInt16T -int32_t: t.CTypedef = t.CInt32T -int64_t: t.CTypedef = t.CInt64T -uint8_t: t.CTypedef = t.CUInt8T -uint16_t: t.CTypedef = t.CUInt16T -uint32_t: t.CTypedef = t.CUInt32T -uint64_t: t.CTypedef = t.CUInt64T -size_t: t.CTypedef = t.CSizeT -ssize_t: t.CTypedef = t.CPtrDiffT -ptrdiff_t: t.CTypedef = t.CPtrDiffT -intptr_t: t.CTypedef = t.CIntPtrT -uintptr_t: t.CTypedef = t.CUIntPtrT -wchar_t: t.CTypedef = t.CWCharT -char8_t: t.CTypedef = t.CChar8T -char16_t: t.CTypedef = t.CChar16T -char32_t: t.CTypedef = t.CChar32T -float8_t: t.CTypedef = t.CFloat8T -float16_t: t.CTypedef = t.CFloat16T -float32_t: t.CTypedef = t.CFloat32T -float64_t: t.CTypedef = t.CFloat64T -float128_t: t.CTypedef = t.CFloat128T -_Bool: t.CTypedef = t.CBool diff --git a/wiki/02-type-system.md b/wiki/02-type-system.md index d4bcaef..b5ccfb0 100644 --- a/wiki/02-type-system.md +++ b/wiki/02-type-system.md @@ -158,84 +158,6 @@ Viper 的类型系统通过 `t` 模块提供,所有类型注解继承 `t.CType | `t.CUIntPtrT` | `uintptr_t` | 64 | 否 | | `t.CPtrDiffT` | `ptrdiff_t` | 64 | 是 | -### stdint 短名别名 - -Viper 在 `stdint` 模块中提供了更简短的类型别名,通过 `t.CTypedef` 映射到对应的完整类型。使用时需 `import stdint`。 - -#### 固定宽度整数短名 - -| 短名 | 等价 Viper 类型 | C 等价 | -|------|----------------|--------| -| `INT8` | `t.CInt8T` | `int8_t` | -| `INT16` | `t.CInt16T` | `int16_t` | -| `INT32` | `t.CInt32T` | `int32_t` | -| `INT64` | `t.CInt64T` | `int64_t` | -| `UINT8` | `t.CUInt8T` | `uint8_t` | -| `UINT16` | `t.CUInt16T` | `uint16_t` | -| `UINT32` | `t.CUInt32T` | `uint32_t` | -| `UINT64` | `t.CUInt64T` | `uint64_t` | - -#### 固定宽度指针短名 - -| 短名 | 等价 Viper 类型 | C 等价 | -|------|----------------|--------| -| `INT8PTR` | `t.CInt8T \| t.CPtr` | `int8_t*` | -| `INT16PTR` | `t.CInt16T \| t.CPtr` | `int16_t*` | -| `INT32PTR` | `t.CInt32T \| t.CPtr` | `int32_t*` | -| `INT64PTR` | `t.CInt64T \| t.CPtr` | `int64_t*` | -| `UINT8PTR` | `t.CUInt8T \| t.CPtr` | `uint8_t*` | -| `UINT16PTR` | `t.CUInt16T \| t.CPtr` | `uint16_t*` | -| `UINT32PTR` | `t.CUInt32T \| t.CPtr` | `uint32_t*` | -| `UINT64PTR` | `t.CUInt64T \| t.CPtr` | `uint64_t*` | - -#### 字符类型短名 - -| 短名 | 等价 Viper 类型 | C 等价 | -|------|----------------|--------| -| `CHAR8` | `t.CChar8T` | `char8_t` | -| `CHAR16` | `t.CChar16T` | `char16_t` | -| `CHAR32` | `t.CChar32T` | `char32_t` | -| `CHAR8PTR` | `t.CChar8T \| t.CPtr` | `char8_t*` | -| `CHAR16PTR` | `t.CChar16T \| t.CPtr` | `char16_t*` | -| `CHAR32PTR` | `t.CChar32T \| t.CPtr` | `char32_t*` | - -#### 基本类型短名 - -| 短名 | 等价 Viper 类型 | C 等价 | -|------|----------------|--------| -| `INT` | `t.CInt` | `int` | -| `UINT` | `t.CUnsignedInt` | `unsigned int` | -| `BOOL` | `t.CInt` | `int`(0/1) | -| `SHORT` | `t.CShort` | `short` | -| `USHORT` | `t.CUnsignedShort` | `unsigned short` | -| `LONG` | `t.CLong` | `long` | -| `ULONG` | `t.CUnsignedLong` | `unsigned long` | -| `LONGLONG` | `t.CLong \| t.CLong` | `long long` | -| `ULONGLONG` | `t.CUnsignedLong \| t.CLong` | `unsigned long long` | -| `FLOAT` | `t.CFloat` | `float` | -| `DOUBLE` | `t.CDouble` | `double` | - -#### 平台 / Windows 风格短名 - -| 短名 | 等价 Viper 类型 | C 等价 | -|------|----------------|--------| -| `BYTE` | `t.CUnsignedChar` | `unsigned char`(8位) | -| `BYTEPTR` | `BYTE \| t.CPtr` | `unsigned char*` | -| `WORD` | `t.CUInt16T` | `uint16_t`(16位) | -| `DWORD` | `t.CUInt32T` | `uint32_t`(32位) | -| `QWORD` | `t.CUInt64T` | `uint64_t`(64位) | -| `INTPTR` | `t.CInt \| t.CPtr` | `int*` | -| `UINTPTR` | `t.CUnsignedInt \| t.CPtr` | `unsigned int*` | -| `SHORTPTR` | `t.CShort \| t.CPtr` | `short*` | -| `USHORTPTR` | `t.CUnsignedShort \| t.CPtr` | `unsigned short*` | -| `VOIDPTR` | `t.CVoid \| t.CPtr` | `void*` | -| `TCHAR` | `t.CChar` | `char` | -| `WCHAR` | `WORD` | `uint16_t`(UTF-16) | -| `WCHARPTR` | `WORD \| t.CPtr` | `uint16_t*`(UTF-16) | -| `CHARLIST` | `str \| t.CPtr` | `char*` | -| `FSIZE_t` | `DWORD` | `uint32_t` | -| `LBA_t` | `DWORD` | `uint32_t` | - ### 浮点类型 | Viper 类型 | C 等价 | 大小(位) | @@ -248,7 +170,7 @@ Viper 在 `stdint` 模块中提供了更简短的类型别名,通过 `t.CTyped | Viper 类型 | C 等价 | 说明 | |------------|--------|------| | `t.CVoid` | `void` | 空类型 | -| `t.CBool` | `bool` | 布尔类型(8位) | +| `t.CBool` | `bool` | 布尔类型(LLVM i1,1 位;C _Bool 存储 1 字节) | | `t.CWCharT` | `wchar_t` | 宽字符(32位) | | `t.CChar8T` | `char8_t` | UTF-8 字符(8位,无符号) | | `t.CChar16T` | `char16_t` | UTF-16 字符(16位,无符号) | @@ -263,13 +185,23 @@ Viper 在 `stdint` 模块中提供了更简短的类型别名,通过 `t.CTyped |`bool`|`t.CBool`|-| |`True`|`t.CBool`|`1`| |`False`|`t.CBool`|`0`| -|`None`|`NULL`|`t.CIntPtr(0)`| +|`None`|`NULL`|`i8* NULL 常量(语义 NULL/零值)`| -对于 t.py 和 c.py 的引用,必须使用 import,不能使用 from ... import ...,也不能使用 as,因为这两者都是直接以字符串识别的。 +> 注:`True`/`False` 裸字面量在 LLVM 层为 i32 的 1/0;赋给 `bool`/`t.CBool`(i1)注解变量时,经比较归一化为 i1。 + +对于 t.py 和 c.py 的引用,支持 from ... import ... 与 as 别名(编译器自身大量依赖)。 ## 类型组合 -Viper 使用 Python 的 `|` 来组合类型修饰符(TypeUnion),其仅在左值注解中有效,其它位置均为位或语义(至少重载前是这样的),这是 Viper 最重要的语法特性之一。 +Viper 使用 Python 的 `|` 来组合类型修饰符(TypeUnion):`|` 在类型/注解上下文(参数、返回、字段、typedef、强转表达式)中表示组合,在值表达式上下文中为位或。这是 Viper 最重要的语法特性之一。 + +> **规划演进(新语法方向,尚未实现)**: +> - `t.CConst | t.CInt | t.CPtr` 这类链式组合过于冗长且不符合标准语义,**即将被取消(暂未取消,过渡期仍可用)**,改为贴近 C 的写法: +> - `a: const rawptr[int] = xxx`(rawptr = 裸指针,与 `t.CPtr[T]` 等价;规范命名为 **rawptr**——现编译器内置保留字写作 `rowptr[T]` 属笔误,将修正为 rawptr) +> - 或 `a: const int* = xxx`(C 风格指针/const 前缀类型注解) +> - `T1 | T2` 将**在基本类型间完全禁用**;`|` 转回其本意 **TypeUnion(类型联合)**。 +> - 引入 `T1 & T2` = **TypeIntersection(类型交集)**,主要面向 `object`,尤其是带 vtable 的 `object`。 +> - 基本类型联合(如 `a: int | str`)是否支持仍需考虑,目前只期望未来先针对 `object` 落实联合/交集。 ### 指针类型 @@ -312,6 +244,8 @@ int** pp2; ### 类型限定符组合 +> 规划:本节 `t.CConst | T`/`t.CConst | T | t.CPtr` 链式写法将随上述演进被 `const rawptr[int]`/`const int*` 取代(当前仍可用)。 + ```python x: t.CConst | t.CInt # const int p: t.CConst | t.CChar | t.CPtr # const char* @@ -324,6 +258,8 @@ x: t.CStatic | t.CInt # static int f: t.CExtern | t.CInt # extern int(声明其存在于外部) ``` +> 注:变量级 `static`/`extern` 语义尚未实现(仅函数级);上述声明当前会生成普通(零初始化)全局定义。外部全局与 FFI 函数推荐使用 `extern` 关键字(期望后续实现变量级语义)。 + ### 函数返回类型组合 ```python @@ -358,14 +294,16 @@ HANDLE CreateFileA(LPCSTR, ULONG, ULONG, SECURITY_ATTRIBUTES*, ULONG, ULONG, HAN ## 数组类型 -使用 Python 的 `list[ElementType, Size]` 语法表示固定大小数组(通常的,这用于栈上和 BSS 段上): +固定大小数组使用 `t.CArray[ElemType, Size]`(= rawarray)表示(通常用于栈上和 BSS 段上)。`Size` 可为模块级 `t.CDefine` 常量;单参 `t.CArray[Elem]` 可配合列表字面量推断长度;也支持多维嵌套。注意:`list[Elem, N]` 旧写法已不再表示定长数组(`list[...]` 现为泛型容器): ```python -buf: list[t.CChar, 64] # char buf[64] -ids: list[t.CInt, 10] # int ids[10] -matrix: list[t.CFloat, 16] # float matrix[16] -entries: list[idt_entry, 256] # struct idt_entry entries[256] -s: list[t.CChar, None] # 自推长度 char s[]; +buf: t.CArray[t.CChar, 64] # char buf[64] +ids: t.CArray[t.CInt, 10] # int ids[10] +matrix: t.CArray[t.CFloat, 16] # float matrix[16] +entries: t.CArray[idt_entry, 256] # struct idt_entry entries[256]; +s: t.CArray[t.CChar] = [0x68, 0x69] # char s[] = {0x68, 0x69}; 由列表字面量推断长度 2 +grid: t.CArray[t.CArray[t.CFloat, 4], 8] # float grid[8][4]; 多维嵌套 +seg: t.CArray[t.CChar, BUF_SIZE] # char seg[BUF_SIZE]; Size 可为模块级 t.CDefine 常量 ``` 等价 C 代码: @@ -379,7 +317,7 @@ struct idt_entry entries[256]; ### 数组指针和函数指针 ```python -lp: list[t.CInt, 12] | t.CPtr +lp: t.CArray[t.CInt, 12] | t.CPtr vp: t.Callable[[t.CInt, t.CInt], t.CInt] = x # 其中 t.Callable = typing.Callable,可以直接使用。 ``` diff --git a/wiki/03-variables.md b/wiki/03-variables.md index 684e8d1..341170c 100644 --- a/wiki/03-variables.md +++ b/wiki/03-variables.md @@ -9,18 +9,24 @@ Viper 的变量声明使用 Python 的类型注解语法,通过 `t` 模块指 ```python x: t.CInt = 0 # int x = 0; y: t.CUInt32T = 42 # uint32_t y = 42; -name: list[t.CChar, 64] # char name[64]; +name: t.CArray[t.CChar, 64] # char name[64]; ptr: t.CVoid | t.CPtr # void* ptr; msg: t.CConst | str = "Hello" # const char* msg = "Hello"; ``` ### 无初始值的声明 -未赋值的变量声明会生成零初始化的变量,此处是未定义行为,即在不同环境位置可能会覆盖0,也可能不会,最好预先复制或用 memset 清除: +**模块级(全局)无初值声明**生成零初始化的全局变量(LLVM `zeroinitializer`,零初始化成立): ```python -count: t.CInt # int count = 0; -buffer: list[t.CChar, 256] # char buffer[256] = {0}; +count: t.CInt # int count = 0;(zeroinitializer;仅模块级成立) +buffer: t.CArray[t.CChar, 256] # char buffer[256] = {0}; +``` + +**函数内局部无初值声明**仅分配空间、不初始化——值未定义,勿假定为 0,最好预先赋值或用 memset 清除: + +```python +tmp: t.CInt # 函数内局部:仅分配未初始化(值未定义,勿假定为 0) ``` ### 延迟赋值 @@ -100,6 +106,8 @@ x: t.CStatic | t.CInt = 0 # static int x = 0; x: t.CExtern | t.CInt # extern int x; ``` +> 注:变量级 `static`/`extern` 语义尚未实现(仅函数级);上述声明当前会生成普通(零初始化)全局定义。外部全局与 FFI 函数推荐 `extern` 关键字(期望后续实现变量级语义)。 + ## 常量定义 使用 `t.CDefine` 定义编译时常量。`t.CDefine` 不是数据类型,而是编译时元指令——常量在 LLVM IR 中不生成全局变量,而是在引用处直接内联展开。详见 [01-overview.md 中 t.CDefine 深度解析](01-overview.md#tcdefine-深度解析)。 diff --git a/wiki/04-functions.md b/wiki/04-functions.md index 48da6aa..e5b5e82 100644 --- a/wiki/04-functions.md +++ b/wiki/04-functions.md @@ -36,20 +36,20 @@ void print_msg(const char* msg) { ### 导出函数 -` t.CExport` 控制函数的符号可见性——标记为 `t.CExport` 的函数不加 SHA1 前缀,全局可见。详见 [01-overview.md 中 t.CExport 深度解析](01-overview.md#tcexport-深度解析)。 +`export` 关键字控制函数的符号可见性——标记为 `export` 的函数不加 SHA1 前缀,裸名导出、全局可见。详见 [01-overview.md 中 t.CExport 深度解析](01-overview.md#tcexport-深度解析)。 ```python -def _start() -> t.CInt | t.CExport: +export def _start() -> t.CInt: return 0 ``` ### 外部函数声明 -使用 `c.State` 表示仅声明不定义: +使用 `extern` 关键字表示仅声明不定义: ```python -def isr0() -> t.CExtern | t.CVoid | c.State: pass -def isr1() -> t.CExtern | t.CVoid | c.State: pass +extern def isr0() -> t.CVoid: pass +extern def isr1() -> t.CVoid: pass ``` 等价 C 代码: @@ -58,9 +58,11 @@ extern void isr0(); extern void isr1(); ``` +> 注明:`t.State` / `t.CExtern` / `t.CExport` 注解旧写法已废弃(`t.State` 仅 `t.CEnum` 内部临时使用)。 + ### 内联函数 -`t.CInline` 标记函数为内联函数,编译器在调用点直接展开函数体。详见 [01-overview.md 中 t.CInline 深度解析](01-overview.md#tcinline-深度解析)。 +`t.CInline` 标记函数为内联函数。当前无调用点展开实现,`t.CInline` 仅作存储类标记;实际内联用 `@c.Attribute(t.attr.always_inline())`(期望后续支持)。详见 [01-overview.md 中 t.CInline 深度解析](01-overview.md#tcinline-深度解析)。 ```python def fast_add(a: t.CInt, b: t.CInt) -> t.CInt | t.CInline: @@ -69,7 +71,9 @@ def fast_add(a: t.CInt, b: t.CInt) -> t.CInt | t.CInline: ### 宏函数 -当函数返回类型注解包含 `t.CDefine` 时,该函数被视为宏函数,不生成 LLVM IR 函数定义,在调用处内联展开。详见 [01-overview.md 中 t.CDefine 函数](01-overview.md#tcdefine-函数)。 +宏函数存在两种形式:`def f(...) -> t.CDefine`,或 `define` 软关键字 `define f(...)`(自动追加 `t.CDefine` 返回注解);存根保留完整函数体;调用点按编译期内联宏展开(TPC 已实现,Test/DefineTest 实证)。详见 [01-overview.md 中 t.CDefine 函数](01-overview.md#tcdefine-函数)。 + +> 注明:TransPyV 端目前仅识别返回注解为 i32,调用点展开尚未对齐(期望)。 ```python def MAKE_FLAG(bit) -> t.CDefine: @@ -125,9 +129,11 @@ def foo() -> t.CInt | t.attr.llvm.nobuiltin | t.attr.llvm.nounwind: return 0 ``` +已支持:`always_inline` / `noinline` / `noreturn` / `pure` / `const` / `nounwind` / `noredzone` / `stackrealign` / `willreturn` / `mustprogress`;示例中的 `nobuiltin` 尚未映射(会被静默丢弃,期望支持)。 + ## 多返回值(CReturn) -使用 `@c.CReturn` 装饰器实现多返回值,通过指针参数实现: +使用 `@c.CReturn` 装饰器实现多返回值,返回多个值的函数打包为 LLVM struct 返回,调用处用元组解包 `a, b = f()` 接收: ```python @c.CReturn(t.CInt, t.CInt) @@ -135,14 +141,13 @@ def divmod(a: t.CInt, b: t.CInt) -> t.CVoid: q: t.CInt = a // b r: t.CInt = a % b return q, r + +q, r = divmod(a, b) ``` 规则: 1. `CReturn` 中的类型数量决定返回值个数 -2. 自动为每个返回类型添加指针参数(`t.CInt` → `t.CInt | t.CPtr`) -3. 参数名自动生成为 `__ReturnValue0__`、`__ReturnValue1__` 等 -4. 调用处自动传参 `&xxx` -5. 必须使用左右值赋值,返回值不能直接传入函数。 +2. 必须使用左右值(元组解包)赋值,返回值不能直接传入函数。 ## 指针参数 @@ -229,7 +234,7 @@ def init() -> t.CVoid: def add(x: int, y: int, z: int): return (x + y) * z -def main() -> int | t.CExport: +export def main() -> int: print(add(1, 2, 3)) # (1 + 2) * 3 = 9 ``` @@ -237,7 +242,7 @@ def main() -> int | t.CExport: ```python # 仍然用刚才的 add 举例 -def main() -> int | t.CExport: +export def main() -> int: print(add(z=3, x=1, y=2)) # (1 + 2) * 3 = 9 ``` @@ -247,7 +252,7 @@ def main() -> int | t.CExport: def add(x: int, y: int, z: int = 1): return (x + y) * z -def main() -> int | t.CExport: +export def main() -> int: print(add(1, 2)) # (1 + 2) * 1 = 3 ``` diff --git a/wiki/05-classes.md b/wiki/05-classes.md index 9217369..b5411e2 100644 --- a/wiki/05-classes.md +++ b/wiki/05-classes.md @@ -41,8 +41,10 @@ class idt_entry: ### 结构体数组 +定长数组语法:`arr: t.CArray[ElemType, Count] = []`。`t.CArray` / `rawarray` 是定长数组;`list[Elem, N]` 旧写法已不再表示定长数组。 + ```python -idt: list[idt_entry, 256] = [] +idt: t.CArray[idt_entry, 256] = [] ``` ### 结构体指针成员 @@ -88,7 +90,7 @@ obj_ptr: MyClass | t.CPtr = c.Addr(MyClass(arg1, arg2)) ### 匿名结构体成员(❌) -> WARNING: **警告:** 由于 Viper 在声明结构体,枚举等处不需要关键字,因此 `t.Anonymouse` 是不需要使用的。此关键字不再维护,强行使用可能导致未定义行为。 +> WARNING: **警告:** `t.Anonymous` 已废弃。由于 Viper 在声明结构体,枚举等处不需要关键字,因此 `t.Anonymouse` 是不需要使用的。此关键字不再维护,强行使用可能导致未定义行为。 继承 `t.Anonymous` 的类作为匿名成员嵌入: @@ -104,6 +106,8 @@ class packet: ### 字节序标记 +> 待实现(尚无字节序处理代码)。 + > WARNING: **警告:** 此关键字是实验性的。未经充分测试,不当使用可能导致未定义行为。 使用 `t.BigEndian` 或 `t.LittleEndian` 标记成员的字节序: @@ -186,7 +190,7 @@ class LLVMType(t.REnum): pass ``` -布局为 `{ i32 __tag, }`,所有变体共享最大变体的 payload 空间。 +布局为 `{ i32 __tag, _p1, _p2, ... }`:按字段位置逐槽取所有变体的最大尺寸(i32/i64),而非单一最大 payload 区。 ### match 分派 @@ -262,6 +266,8 @@ lst.append(node) # 类型安全:append 只接受 GNode ## 位域 +> 待实现(TPC/TPV 均无解析路径)。 + 使用 `t.Bit(n)` 定义位域成员: ```python diff --git a/wiki/06-oop.md b/wiki/06-oop.md index cdb349f..20c2ec4 100644 --- a/wiki/06-oop.md +++ b/wiki/06-oop.md @@ -126,7 +126,7 @@ class Sheet: ### `__before_init__` 方法 -所有类(不限 `@t.Object`/`@t.CVTable`)自动生成 `__before_init__` 方法,在 `__init__` 之前**自动填充成员默认值**,并对 `@t.CVTable` 类初始化 vtable: +仅当类内含方法或继承虚方法时才生成 `__before_init__` 方法(纯数据 `class` 不生成)。它在 `__init__` 之前**自动填充成员默认值**,并对 `@t.CVTable` 类初始化 vtable: ```llvm define void @".ClassName.__before_init__"(%".ClassName"* %self) { @@ -143,9 +143,14 @@ entry: - 对 `@t.CVTable` 类额外初始化 vtable 指针 **调用时机**(由编译器在构造时自动插入): -1. `alloca` 栈分配后调用一次 -2. 若存在 `__new__` 方法且返回堆指针,对堆指针再调用一次(alloca 的默认值已随栈帧丢弃,必须重新填充) -3. `__init__` 调用前 +1. 不存在 `__new__` 时:在 `alloca` 分配之后调用一次,随后进入 `__init__` +2. 存在 `__new__` 时:在 `__new__` 之后对**最终存储指针**调用一次,随后进入 `__init__` + +**关于 `__new__`**: +- `__new__` 返回 `self` 时使用默认的 `alloca` 存储 +- `__new__` 的签名可与 `__init__` 不同 +- `__new__` 与 `@t.CVTable` 兼容 +- `__new__` 本身不入虚表 **就地构造**:用户也可手动调用 `__before_init__` 实现就地构造(placement new 语义),典型用法见 `mpool.alloc_buf`: @@ -165,7 +170,7 @@ buf.__init__(args) # 用户初始化逻辑 |------|---------------|--------------| | vtable 指针 | ❌ 无 | ✅ 自动插入 slot 0 | | 虚派发 | ❌ 无 | ✅ 支持 | -| 方法继承 | ✅ 生成包装函数转发 | ✅ 通过 vtable | +| 方法继承 | ✅ 调用点解析直调父类 | ✅ 通过 vtable | | 字段展平 | ✅ 父类字段前置嵌入 | ✅ 父类字段前置嵌入(vtable 之后) | | 运行时开销 | 零 | 每次虚调用一次间接跳转 | @@ -187,16 +192,7 @@ class GNode(LinkedNode): # 非多态继承 ### 方法继承机制 -子类调用父类方法时,编译器通过 `_generate_inherited_method_wrappers` 自动生成包装函数:将 `self` bitcast 为父类指针后尾调用父类方法。例如 `gnode.append(child)` 会生成: - -```llvm -define void @".GNode.append"(%".GNode"* %self, ...) { -entry: - %base = bitcast %".GNode"* %self to %".LinkedNode"* - call void @".LinkedNode.append"(%".LinkedNode"* %base, ...) - ret void -} -``` +子类调用父类方法时,实际机制为**调用点解析**:编译器沿 MRO(方法解析顺序)定位到**定义该方法**的父类,按字节偏移调整 `this` 指针后 `bitcast`,在调用点**直接调用**父类实现(无 wrapper 生成、无尾调用)。 ### 跨模块继承 @@ -217,6 +213,8 @@ node: Node | t.CPtr = (Node | t.CPtr)(child) ## `@t.CVTable` 虚函数表与多态 +> **规划**:将引入 `T1 & T2`(TypeIntersection)表达 object(尤其是带 vtable 的 object)的交集类型,作为多态对象组合的静态类型手段(详见 02-type-system.md 类型组合规划演进,尚未实现)。 + > 尽可能避免使用 `self[0]` 来获取结构体成员,其不稳定,也不要手动操作虚表。 使用 `@t.CVTable` 装饰器可以启用虚函数表支持。启用后,结构体第一个成员自动插入 `i8*` 类型的 vtable 指针。`@t.CVTable` 的操作必须配合 `@t.Object`,但有时编译器会自动识别是否存在结构体内函数,自动使用 `@t.Object`。 @@ -239,10 +237,12 @@ class Base: %".Base" = type { i8*, i32 } ``` -同时,编译器会生成全局 vtable 变量: +同时,编译器会生成全局 vtable 变量。vtable 实为 `internal constant struct{ n x i8* }`——即含 n 个 `i8*` 函数指针成员的结构体常量(成员为带 `bitcast` 的初始化文本),变量名为 `.Class.vtable`,并非 `[1 x i8*] zeroinitializer`: ```llvm -@".Base_Vtable" = internal global [1 x i8*] zeroinitializer +@".Base.vtable" = internal constant { i8* } { + i8* bitcast (i32 (%".Base"*)* @".Base.method" to i8*) +} ``` ### 继承与多态 @@ -304,6 +304,33 @@ def main() -> t.CInt | t.CExport: 6. bitcast 为正确的函数指针类型 7. 间接调用 +### 方法级虚表开关 + +类级装饰器 `@t.CVTable`/`@t.NoVTable` 决定类级默认策略,方法级装饰器可覆盖类级默认: + +- `@t.NoVTable` 类中单独标注 `@t.CVTable` 的方法进入虚表 +- `@t.CVTable` 类中单独标注 `@t.NoVTable` 的方法被排除在虚表之外 + +以上行为由 `func_vtable_test` 实证。 + +### super() + +`super().method(...)` 形态被编译为**静态父类方法调用**(仅该形态被支持),不经过 vtable 动态派发: + +```python +@t.Object +@t.CVTable +class Base: + def method(self) -> t.CVoid: + pass + +@t.Object +@t.CVTable +class Derived(Base): + def method(self) -> t.CVoid: + super().method() # 静态调用父类实现 +``` + ## 继承 ### 结构体成员继承 @@ -317,7 +344,7 @@ def main() -> t.CInt | t.CExport: ```python @t.Object class Animal: - name: list[t.CChar, 32] + name: t.CArray[t.CChar, 32] age: t.CInt def __init__(self, age: t.CInt): @@ -362,7 +389,9 @@ class SpecificError(MyError): | `/` | `__truediv__` | `a / b` → `a.__truediv__(b)` | | `//` | `__floordiv__` | `a // b` → `a.__floordiv__(b)` | | `%` | `__mod__` | `a % b` → `a.__mod__(b)` | -| `**` | `__pow__` | `a ** b` → `a.__pow__(b)` | +| `**` | `__pow__` | `a ** b` → `a.__pow__(b)`(期望实现) | + +> **注意**:binop 的 `**` 未调度——基础类型 `**` 编译失败;自定义类型走 `__pow__` 重载也属期望实现。 示例: @@ -391,30 +420,20 @@ class Vec2: ### 增量赋值运算符重载 -| 增量运算符 | 优先 Dunder | 回退 Dunder | -|-----------|------------|------------| -| `+=` | `__iadd__` | `__add__` | -| `-=` | `__isub__` | `__sub__` | -| `*=` | `__imul__` | `__mul__` | -| `/=` | `__itruediv__` | `__truediv__` | -| `//=` | `__ifloordiv__` | `__floordiv__` | -| `%=` | `__imod__` | `__mod__` | -| `**=` | `__ipow__` | `__pow__` | - -如果未定义增量版本(如 `__iadd__`),编译器自动回退到普通版本(如 `__add__`)。 +> **期望实现**:当前 `AugAssign`(增量赋值)一律按原生运算符展开(`+=`→`add`、`//=`→`sdiv` …),不调用 `__iadd__`,也没有回退到普通版本(如 `__add__`)的机制。`__iadd__` 等增量 dunder 方法均属期望实现。 ### 比较运算符重载 -> **实验性**:以下比较运算符 dunder 方法在编译器中被识别,但尚未实现自动调度。定义它们不会报错,但比较运算不会自动调用。 +`__eq__`/`__ne__`/`__lt__`/`__le__`/`__gt__`/`__ge__` 已自动调度(映射与调用点自动调度,`opovl_test` 覆盖);未定义 `__eq__` 时比较回退为默认身份比较。 | 运算符 | Dunder 方法 | 状态 | |--------|------------|------| -| `==` | `__eq__` | 仅类型推断识别 | -| `!=` | `__ne__` | 仅类型推断识别 | -| `<` | `__lt__` | 仅类型推断识别 | -| `<=` | `__le__` | 仅类型推断识别 | -| `>` | `__gt__` | 仅类型推断识别 | -| `>=` | `__ge__` | 仅类型推断识别 | +| `==` | `__eq__` | 已自动调度 | +| `!=` | `__ne__` | 已自动调度 | +| `<` | `__lt__` | 已自动调度 | +| `<=` | `__le__` | 已自动调度 | +| `>` | `__gt__` | 已自动调度 | +| `>=` | `__ge__` | 已自动调度 | ### 反向运算符重载 @@ -432,15 +451,18 @@ class Vec2: ### 一元运算符重载 -> **实验性**:以下一元运算符 dunder 方法在编译器中被识别,但尚未实现自动调度。 +`__neg__`/`__pos__`/`__invert__` 已自动调度。 | 运算符 | Dunder 方法 | 状态 | |--------|------------|------| -| `-a` | `__neg__` | 仅类型推断识别 | -| `+a` | `__pos__` | 仅类型推断识别 | +| `-a` | `__neg__` | 已自动调度 | +| `+a` | `__pos__` | 已自动调度 | +| `~a` | `__invert__` | 已自动调度 | ## 可调用对象 `__call__` +> **期望实现**:当前未调度 `__call__`,`obj(args)` 不会自动分发到该方法。 + ```python @t.Object class Counter: @@ -483,11 +505,13 @@ def __delitem__(self, key: t.CInt): ## 布尔转换 `__bool__` +> **期望实现**:当前条件真值对 struct 值恒真/指针判非空,不调度 `__bool__`。 + ```python @t.Object class Buffer: size: t.CInt - data: list[t.CChar, 1024] + data: t.CArray[t.CChar, 1024] def __bool__(self) -> t.CBool: return self.size > 0 @@ -513,6 +537,8 @@ n: t.CInt = len(buf) ## 字符串转换 `__str__` +> **期望实现**:`print` 是类型感知格式化(`str`/`%s`、`int`、`float`、`struct` 输出占位符),当前**不调度** `__str__`。 + ```python @t.Object class Point: @@ -523,11 +549,13 @@ class Point: return "Point" p: Point = Point(1, 2) -print(p) # 调用 p.__str__() +print(p) # 类型感知格式化:不调用 p.__str__() ``` ## 绝对值 `__abs__` +> **期望实现**:当前 `abs()` 不调度 `__abs__`(`abs` 为 C 库裸名调用/TPC 内建,见 11-builtins.md)。 + ```python @t.Object class SignedValue: @@ -545,7 +573,7 @@ a: t.CInt = abs(sv) # a = 42 ## 迭代器协议 -Viper 的迭代器协议与 Python 相同,但 `__next__` 的实现方式通过 `StopIteration` 异常来结束。 +Viper 的迭代器协议与 Python 相同。`__next__` 带编译器注入的隐藏 `i1*` 参数 `__stop_iter_flag__`:方法内 `raise StopIteration` 会将该参数置位并返回默认值以结束迭代。 ### `__iter__` 和 `__next__` @@ -564,7 +592,7 @@ class IntRange: def __iter__(self): return self - def __next__(self, stop_flag) -> t.CInt: + def __next__(self, __stop_iter_flag__) -> t.CInt: # 编译器注入的隐藏 i1* 参数 if self.current >= self.end: raise StopIteration val: t.CInt = self.current @@ -586,9 +614,9 @@ for i in r: IntRange r = IntRange_init(0, 10); IntRange iter = IntRange___iter__(&r); while (1) { - i1 stop_flag = 0; - int i = IntRange___next__(&iter, &stop_flag); - if (stop_flag == 1) break; + i1 __stop_iter_flag__ = 0; /* 编译器注入的隐藏 i1* 参数 */ + int i = IntRange___next__(&iter, &__stop_iter_flag__); + if (__stop_iter_flag__ == 1) break; print_int(i); } ``` @@ -629,8 +657,10 @@ with File("/test.txt", FA_READ) as f: ## 析构 `__del__` / `__delete__` +> **期望实现**:当前 `del obj` 不调度 `__del__`/`__delete__`;已实现的是 `del obj.attr`(property deleter)与 `del obj[key]`(`__delitem__`)。 + ```python -del obj # 调用 obj.__del__() 或 obj.__delete__() +del obj # 期望:调用 obj.__del__() 或 obj.__delete__()(尚未实现) del arr[idx] # 调用 arr.__delitem__(idx) ``` @@ -641,52 +671,58 @@ del arr[idx] # 调用 arr.__delitem__(idx) | Dunder 方法 | 触发语法 | 说明 | |------------|---------|------| | `__init__` | `ClassName(args)` | 构造函数 | -| `__before_init__` | 自动生成 | vtable 初始化,在 `__init__` 之前执行 | +| `__before_init__` | 自动生成 | 填充成员默认值并初始化 vtable(类内含方法或继承虚方法时才生成),在 `__init__` 之前执行 | | `__add__` | `a + b` | 加法 | | `__sub__` | `a - b` | 减法 | | `__mul__` | `a * b` | 乘法 | | `__truediv__` | `a / b` | 真除法 | | `__floordiv__` | `a // b` | 整除 | | `__mod__` | `a % b` | 取模 | -| `__pow__` | `a ** b` | 幂运算 | -| `__iadd__` | `a += b` | 增量加法(回退到 `__add__`) | -| `__isub__` | `a -= b` | 增量减法(回退到 `__sub__`) | -| `__imul__` | `a *= b` | 增量乘法(回退到 `__mul__`) | -| `__itruediv__` | `a /= b` | 增量真除法(回退到 `__truediv__`) | -| `__ifloordiv__` | `a //= b` | 增量整除(回退到 `__floordiv__`) | -| `__imod__` | `a %= b` | 增量取模(回退到 `__mod__`) | -| `__ipow__` | `a **= b` | 增量幂运算(回退到 `__pow__`) | -| `__call__` | `obj(args)` | 可调用对象 | +| `__and__` | `a & b` | 按位与 | +| `__or__` | `a \| b` | 按位或 | +| `__xor__` | `a ^ b` | 按位异或 | +| `__lshift__` | `a << b` | 左移 | +| `__rshift__` | `a >> b` | 右移 | +| `__eq__` | `a == b` | 等于(未定义 `__eq__` 时默认身份比较) | +| `__ne__` | `a != b` | 不等于 | +| `__lt__` | `a < b` | 小于 | +| `__le__` | `a <= b` | 小于等于 | +| `__gt__` | `a > b` | 大于 | +| `__ge__` | `a >= b` | 大于等于 | +| `__neg__` | `-a` | 一元负号 | +| `__pos__` | `+a` | 一元正号 | +| `__invert__` | `~a` | 按位取反 | | `__getitem__` | `obj[key]` | 下标读取 | | `__setitem__` | `obj[key] = value` | 下标赋值 | | `__delitem__` | `del obj[key]` | 下标删除 | -| `__bool__` | `if obj:` | 布尔转换 | | `__len__` | `len(obj)` | 长度 | -| `__str__` | `str(obj)` / `print(obj)` | 字符串转换 | -| `__abs__` | `abs(obj)` | 绝对值 | | `__iter__` | `for x in obj:` | 获取迭代器 | -| `__next__` | `for x in obj:` | 获取下一个值(标志位方式) | +| `__next__` | `for x in obj:` | 取下一个值(隐藏 `i1*` 参数 `__stop_iter_flag__`,`raise StopIteration` 置位后返回默认值结束迭代) | | `__enter__` | `with obj as x:` | 上下文管理器进入 | | `__exit__` | `with obj as x:` | 上下文管理器退出 | -| `__del__` | `del obj` | 析构 | -| `__delete__` | `del obj` | 删除描述符 | ### 声明支持但未实现自动调度的 Dunder 方法 | Dunder 方法 | 预期触发语法 | 当前状态 | |------------|------------|---------| -| `__eq__` | `a == b` | 仅类型推断识别,比较运算不自动调度 | -| `__ne__` | `a != b` | 同上 | -| `__lt__` | `a < b` | 同上 | -| `__le__` | `a <= b` | 同上 | -| `__gt__` | `a > b` | 同上 | -| `__ge__` | `a >= b` | 同上 | -| `__neg__` | `-a` | 仅类型推断识别,一元负号不自动调度 | -| `__pos__` | `+a` | 同上 | -| `__radd__` | 右操作数加法 | 仅类型推断识别 | -| `__rsub__` | 右操作数减法 | 同上 | -| `__rmul__` | 右操作数乘法 | 同上 | -| `__rtruediv__` | 右操作数真除法 | 同上 | -| `__rfloordiv__` | 右操作数整除 | 同上 | -| `__rmod__` | 右操作数取模 | 同上 | -| `__rpow__` | 右操作数幂运算 | 同上 | +| `__pow__` | `a ** b` | 期望实现:binop `**` 未调度(基础类型 `**` 编译失败;自定义类型走 `__pow__` 重载亦属期望) | +| `__iadd__` | `a += b` | 期望实现:AugAssign 一律按原生运算符展开(`+=`→`add`、`//=`→`sdiv` …),不调用 `__iadd__`,也无 `__add__` 回退 | +| `__isub__` | `a -= b` | 同上 | +| `__imul__` | `a *= b` | 同上 | +| `__itruediv__` | `a /= b` | 同上 | +| `__ifloordiv__` | `a //= b` | 同上 | +| `__imod__` | `a %= b` | 同上 | +| `__ipow__` | `a **= b` | 同上 | +| `__str__` | `str(obj)` / `print(obj)` | 期望实现:`print` 为类型感知格式化(`str`/`%s`、`int`、`float`、`struct` 输出占位符),不调度 `__str__` | +| `__call__` | `obj(args)` | 期望实现:当前未调度 | +| `__bool__` | `if obj:` | 期望实现:当前未调度 | +| `__abs__` | `abs(obj)` | 期望实现:当前未调度 | +| `__del__` | `del obj` | 期望实现:当前未调度 | +| `__delete__` | `del obj` | 期望实现:当前未调度 | +| `__radd__` | 右操作数加法 | 尚未调度 | +| `__rsub__` | 右操作数减法 | 尚未调度 | +| `__rmul__` | 右操作数乘法 | 尚未调度 | +| `__rtruediv__` | 右操作数真除法 | 尚未调度 | +| `__rfloordiv__` | 右操作数整除 | 尚未调度 | +| `__rmod__` | 右操作数取模 | 尚未调度 | +| `__rpow__` | 右操作数幂运算 | 尚未调度 | diff --git a/wiki/07-control-flow.md b/wiki/07-control-flow.md index 6115aee..9d6f01c 100644 --- a/wiki/07-control-flow.md +++ b/wiki/07-control-flow.md @@ -77,6 +77,8 @@ while (i < 10) { ### while-else +> 期望实现——当前编译器不生成 orelse 代码,else 块会被忽略 + ```python while i < count: if found: @@ -141,6 +143,8 @@ for item in container: ### for-else +> 期望实现——当前编译器不生成 orelse 代码,else 块会被忽略 + ```python for i in range(count): if items[i] == target: @@ -207,6 +211,8 @@ match code: ### match 或模式 +> 期望实现——当前实现只取第一个值做 switch case,其余值会落入默认分支(c.NoBreak 相关) + ```python match value: case 1 | 2 | 3: @@ -230,8 +236,11 @@ match value: 如果需要提前 break,需要使用 `c.Break()`,因为在 `Python` 中,`match` 分支不支持直接使用 `break`。 +> 期望实现——当前不存在 `c.Break()`;case 体默认自动 break,fallthrough 需用 `c.NoBreak`。 + ## assert 语句 > 避免使用此语句,此语句未经充分测试,在多数情况下,编译器不知道如何展示结果。 +> 期望实现——当前语句分派无 assert 分支 ```python assert ptr != None, "null pointer" @@ -254,3 +263,9 @@ File* f = File_enter(File_new("/test.txt", FA_READ)); int data = File_read(f); File_exit(f); ``` + +## 协程 async/await(已实现) + +`async def` / `await` 编译为帧状态机(`AsyncGenMixin`),运行时由 `coro` 模块提供 `coro_run` / `coro_sleep` / `coro_destroy` / `coro_exception` / `coro_exception_msg` / `coro_gather`,`async_test.vp` 提供实证。 + +`await` 可与 `for` / `try` / `except` / `finally` / 自定义异常等组合使用。 diff --git a/wiki/08-c-operations.md b/wiki/08-c-operations.md index 2c51ac0..a8cc8f4 100644 --- a/wiki/08-c-operations.md +++ b/wiki/08-c-operations.md @@ -101,6 +101,8 @@ c.Asm(f"""mov rdi, {c.AsmInp(msg, t.ASM_DESCR.REG_ANY)} ### ASM_DESCR 约束字符 +> 下表为 `t.ASM_DESCR` 的完整期望常量集;TPV 实际已映射子集见本节末。 + #### 操作数修饰符 | 常量 | 值 | 说明 | @@ -156,50 +158,61 @@ c.Asm(f"""mov rdi, {c.AsmInp(msg, t.ASM_DESCR.REG_ANY)} | `CLOBBER_MEMORY` | 破坏内存 | | `CLOBBER_R8` ~ `CLOBBER_R15` | 破坏 R8~R15 | +> TPV 实际已映射子集:`REG_ANY` / `REG_EAX..RDI` / `RAX..R15`、`OUTPUT_REG` / `OUTPUT_MEM` / `OUTPUT_EAX`、`INPUT_REG` / `INPUT_MEM` / `INPUT_EAX`…、`CLOBBER_MEMORY` / `CLOBBER_CC` / `CLOBBER_RAX..R15`。`REG_XMM` / `MEMORY` / `IMMEDIATE` / `ANY` / `MODIFIER_OUTPUT` / `READWRITE` / `INPUT` / `GLOBAL` 等期望实现。 + ## 预处理指令 Viper 通过 `c` 模块的函数调用实现 C 预处理指令。 ### #define -```python -c.CDefine("MAX_SIZE", 1024) # #define MAX_SIZE 1024 -``` - -上述方法容易引起未定义行为,至少是不便于理解,更常用的方式是使用类型注解: - ```python MAX_SIZE: t.CDefine = 1024 # #define MAX_SIZE 1024 ``` +注解式 `MAX_SIZE: t.CDefine = 1024` 是支持且推荐的宏定义写法。 + +> 调用式 `c.CDefine("X", v)` 不存在(期望)。 + +### define 宏函数 + +`define` 软关键字与 `def f(...) -> t.CDefine` 声明的函数均为宏函数:存根保留完整函数体,调用点在编译期内联展开。 + +> TPC 已实现;TransPyV 的展开尚未对齐。 + ### 条件编译 +编译期条件编译的真实形态是 `if` 缩进块(已实现),块结束即 `#endif`: + ```python -c.CIfndef(HEADER_H) # #ifndef HEADER_H -c.CDefine(HEADER_H) # #define HEADER_H -c.CEndif() # #endif +if c.CIfdef(DEBUG): + ... # #ifdef DEBUG ``` ```python -c.CIfdef(DEBUG) # #ifdef DEBUG -c.CEndif() # #endif +if c.CIfndef(HEADER_H): + ... # #ifndef HEADER_H ``` ```python -c.CIf(VERSION > 2) # #if VERSION > 2 -c.CElif(VERSION > 1) # #elif VERSION > 1 -c.CElse() # #else -c.CEndif() # #endif +if c.CIf(VERSION > 2): + ... # #if VERSION > 2 ``` +> 语句式 `c.CEndif()` / `c.CElif(...)` / `c.CElse()` 不存在,且暂不实现。 + ### #undef +> 期望实现——当前不存在 `c.Undef`。 + ```python c.Undef(MACRO_NAME) # #undef MACRO_NAME ``` ### #error +> 期望实现——当前不存在 `c.CError`。 + ```python c.CError("Platform not supported") # #error "Platform not supported" ``` @@ -211,7 +224,7 @@ c.CPragma("GCC diagnostic push") # #pragma GCC diagnostic push ``` ### ## 连接符 -> 此方法可能已经不再支持 +> 此方法已不再支持(属实) ```python c.TokenPast("PREFIX_", "NAME") # PREFIX_ ## NAME ``` @@ -220,35 +233,42 @@ c.TokenPast("PREFIX_", "NAME") # PREFIX_ ## NAME ## FFI 外部函数声明 -Viper 的 FFI(Foreign Function Interface)**无需任何特殊语法**——仅靠返回类型注解中的 `t.State` 标记即可声明外部函数。`t.State` 是声明性标记类型,表示"仅声明不定义"(语义等价于 `t.CExport | t.CExtern`),编译器只生成 `declare` 原型,不生成 `define` 函数体,由链接器在外部库中解析符号。 +Viper 的 FFI(Foreign Function Interface)通过 `extern` / `export` 关键字声明,无需旧版注解: + +- `extern def foo() -> T`(函数体为 `pass`):仅声明。编译器只生成 `declare` 原型,不生成 `define` 函数体,由链接器在外部库中解析符号; +- `export def foo() -> T`:以裸名导出函数定义。 + +> 旧注解写法(`t.State` / `t.CExtern` / `t.CExport`)已废弃:`t.State` 仅 `t.CEnum` 内部临时使用,很快移除。 ### 基本声明 -函数体为 `pass`,返回类型用 `RetType | t.State`: +`extern def` 仅声明(函数体为 `pass`);`export def` 以裸名导出: ```python -def isr0() -> t.CVoid | t.State: pass # extern void isr0(); — 来自汇编或外部 -def getchar() -> t.CInt | t.State: pass # extern int getchar(); — 来自 libc +extern def isr0() -> t.CVoid: pass # extern void isr0(); — 来自汇编或外部 +extern def getchar() -> t.CInt: pass # extern int getchar(); — 来自 libc +export def foo() -> t.CInt: pass # export int foo(); — 裸名导出(define) ``` 编译为 LLVM IR: ```llvm -declare void @"isr0"() ; 不加 SHA1 前缀(t.State 含 CExport 语义) +declare void @"isr0"() ; extern:不加 SHA1 前缀,仅 declare declare i32 @"getchar"() +define i32 @"foo"() { ... } ; export:不加 SHA1 前缀,裸名 define ``` ### Win32 API 绑定示例 -[includes/w32](../includes/w32) 中的 Win32 绑定全部通过 `t.State` 声明,零特殊语法: +[includes/w32](../includes/w32) 中的 Win32 绑定以 `extern` 关键字声明,零特殊语法: ```python -def CreateFileA(lpFileName: LPCSTR, dwDesiredAccess: ULONG, +extern def CreateFileA(lpFileName: LPCSTR, dwDesiredAccess: ULONG, dwShareMode: ULONG, lpSecurityAttributes: SECURITY_ATTRIBUTES | t.CPtr, dwCreationDisposition: ULONG, dwFlagsAndAttributes: ULONG, - hTemplateFile: HANDLE) -> HANDLE | t.State: + hTemplateFile: HANDLE) -> HANDLE: pass ``` @@ -261,18 +281,19 @@ HANDLE CreateFileA(LPCSTR, ULONG, ULONG, SECURITY_ATTRIBUTES*, 链接时通过 `project.json` 指定外部库(如 `kernel32.lib`、`user32.lib`),链接器解析这些符号。 -### `t.State` 与 `t.CExtern` 的区别 +### 修饰方式 -| 修饰 | SHA1 前缀 | 生成内容 | 用途 | +| 写法 | SHA1 前缀 | 生成内容 | 用途 | |------|----------|---------|------| -| 无修饰 | ✅ 加前缀 | `declare` + `define` | 模块私有函数 | -| `t.CExtern` | ❌ 不加 | `declare`(引用外部) | 引用外部 C 函数 | -| `t.CExport` | ❌ 不加 | `declare` + `define` | 对外暴露 API | -| `t.State` | ❌ 不加 | 仅 `declare` | FFI 外部函数声明(= `CExport \| CExtern`) | +| 无修饰(普通函数) | ✅ 加前缀 | `declare` + `define` | 模块私有函数 | +| `extern def f()` | ❌ 不加 | 仅 `declare` | FFI 外部函数声明(引用外部) | +| `export def f()` | ❌ 不加 | 裸名 `define` | 对外导出 API | + +> 新关键字等价写法:无修饰 = 普通函数加 SHA1 前缀;`extern` = 仅 declare;`export` = 裸名 define。原 `t.CExtern` / `t.CExport` / `t.State` 注解修饰已废弃。 ### 声明外部全局变量 -外部全局变量通过 `t.CExtern` 注解声明: +外部全局变量目前仍通过 `t.CExtern` 类型注解声明(变量声明场景,属旧注解遗留写法): ```python errno: t.CExtern | t.CInt # extern int errno; @@ -284,7 +305,7 @@ errno: t.CExtern | t.CInt # extern int errno; ### c.LLVMIR -直接嵌入原始 LLVM IR 文本来实现高效且跨平台的汇编操作(无返回值、不做指令解析): +设计期望无返回值(void),直接嵌入原始 LLVM IR 文本(不做指令解析);当前过渡期调用可带第二类型参数取得返回值(`llvmir_test` 用法),后续以无返回值为准并修订代码: ```python c.LLVMIR(f"{c.LOut(r)} = add i32 {c.LInp(a)}, {c.LInp(b)}") diff --git a/wiki/09-exceptions.md b/wiki/09-exceptions.md index 7f93516..d14e0b6 100644 --- a/wiki/09-exceptions.md +++ b/wiki/09-exceptions.md @@ -1,10 +1,12 @@ # 09 - 异常处理 -Viper 支持 Python 风格的 `try/except/finally` 异常处理,编译为基于 jmp_buf 和错误码的 C 级别异常处理机制。 +> 本章待修订(机制与实现存在偏差,见各节标注) + +Viper 支持 Python 风格的 `try/except/finally` 异常处理,采用基于错误码 + 错误消息出参的传播机制(不使用 C++ 风格的零开销异常)。 ## 异常处理机制 -Viper 的异常处理不使用 C++ 风格的零开销异常,而是通过函数参数传递错误码和错误消息实现。编译器自动为可能抛出异常的函数添加 `__eh_msg_out__` 和 `__eh_code_out__` 参数。 +编译器自动为可能抛出异常的函数追加 `__eh_code_out__(i32*)` 与 `__eh_msg_out__(i8**)` 出参;调用点传入接收缓冲,调用后检查 `msg != NULL`,按 `code` 匹配 `except`。 ## try / except @@ -50,6 +52,8 @@ class ReadOnlyError(DiskFullError): ### 多异常捕获 +> 语法暂不支持(期望)。 + ```python try: result = operation() @@ -68,6 +72,8 @@ except Exception as e: ## try / finally +> 普通函数中尚未实现(仅协程子集支持纯 try/finally)——期望/后续修正 + ```python try: result = operation() @@ -79,6 +85,8 @@ finally: ## try / except / finally +> 普通函数中尚未实现(仅协程子集支持纯 try/finally)——期望/后续修正 + ```python try: result = operation() @@ -104,6 +112,8 @@ raise MyCustomError("something went wrong") ### 重新抛出异常 +> 当前裸 raise 不重新抛出(返回默认值),期望实现重抛当前异常。 + ```python raise ``` diff --git a/wiki/10-imports.md b/wiki/10-imports.md index 8aed548..531b434 100644 --- a/wiki/10-imports.md +++ b/wiki/10-imports.md @@ -2,6 +2,8 @@ Viper 的模块系统基于 Python 的 `import` 语法,但编译时通过 TransPyC 的符号表和类型系统实现跨模块的类型解析。 +> 注:`extern`/`export`/`define` 关键字属语言语法([includes/ast](../includes/ast) parser 中的软关键字;`define` 为宏函数),而非 `t` 模块的类型注解。 + ## 导入语法 ### 标准导入 @@ -70,7 +72,7 @@ asm.BSSClean() # 清零 BSS 段 ### `string` 模块 字符串/内存操作模块,对应 C 标准库的 `string.h`: -> string 部分使用 x86_64 专有汇编进行加速,因此某些函数在其它架构可能需要手动重新编写。 +> 确认:string 模块确实使用 Viper `c.Asm` 内联汇编进行加速(`memset`/`memcpy`/`memmove` 等,见 [includes/string.vp](../includes/string.vp))。因使用 x86_64 专有汇编,某些函数在其它架构可能需要手动重新编写。 ```python import string @@ -121,7 +123,7 @@ import vpsdk.syscall as syscall ### `ast` 模块(自研解析器) -[includes/ast](../includes/ast) 是**完全自研的 Python 解析器**(词法器 + 语法器 + AST 构造,约 4176 LOC),覆盖 CPython 几乎全部语法。这是向 `TransPyV` 完全自举的关键组件——自举后编译器不再依赖 Python 运行时解析源文件。 +[includes/ast](../includes/ast) 是**完全自研的 Python 解析器**(词法器 + 语法器 + AST 构造,现行 9 个文件约 8K 行;"约 4176 LOC"为 2026-06 历史口径),覆盖 CPython 几乎全部语法。这是向 `TransPyV` 完全自举的关键组件——自举后编译器不再依赖 Python 运行时解析源文件。 ```python from ast import parse, parse_expression @@ -134,7 +136,7 @@ AST 采用**胖节点**设计:70+ 变体共用一个 struct,用 `vtype`(`A ### `llvmlite` 模块(自研 IR 生成库) -[includes/llvmlite](../includes/llvmlite) 是**完全自研的 LLVM IR 文本生成库**(约 1500 LOC),封装类型/值/模块/函数/基本块/构造器的创建与打印。同样是自举的关键组件。 +[includes/llvmlite](../includes/llvmlite) 是**完全自研的 LLVM IR 文本生成库**(现行约 5.9K 行;"约 1500 LOC"为 2026-06 历史口径),封装类型/值/模块/函数/基本块/构造器的创建与打印。同样是自举的关键组件。 ```python from llvmlite import LLVMTypeCore, LLVMModuleCore @@ -186,6 +188,14 @@ handle: HANDLE = CreateFileA("test.txt", GENERIC_READ, FILE_SHARE_READ, 子模块:`win32base`(基础类型/常量)、`win32file`(文件 IO)、`win32console`(控制台)、`win32memory`(内存)、`win32process`(进程/线程)、`win32sync`(同步对象)、`fileio`(高层文件操作封装)。详见 [08-c-operations.md 的 FFI 章节](08-c-operations.md#ffi-外部函数声明)。 +### `coro`/`stdio`/`stdlib`/`memhub`/`testcheck` 等内置模块 + +特殊模块清单末尾补充: +- `coro`:协程运行时,提供 `coro_run`/`coro_sleep`/`coro_destroy`/`coro_exception`/`coro_exception_msg`/`coro_gather` +- `stdio` / `stdlib`:C 标准库风格的 IO 与通用库函数 +- `memhub`:内存管理中枢 +- `testcheck`:测试辅助(断言/检查用例) + ## 模块解析流程 ### 编译时模块加载 @@ -198,20 +208,20 @@ Viper 的 `import` 是编译时操作,不涉及运行时模块加载。完整 4. **阶段二**:翻译源文件时,通过符号表解析跨模块的类型和函数引用 5. **阶段二**:将被引用模块的 `.stub.ll` 声明嵌入到生成的 `.ll` 文件头部 +> 注:阶段一主要产出 `.vpi`;`.stub.ll`/`.text.ll` 由阶段二 Phase A 写盘。`.vpi`/`.stub` 按需加载而非全量;共享符号表为内存 `StubMergerStore`;`_sha1_map.txt` 仅人类可读(映射本体在内存 `Sha1Store`)。 + ### 类型存根文件(.vpi) -`.vpi` 文件是模块的声明接口,由 `PythonToStubConverter` 在阶段一生成。存根文件的内容规则: +`.vpi` 文件是模块的声明接口,由 `PythonToStubConverter` 在阶段一生成。TPV 自举路径使用自研 `StubGen`/`Converter.vp`(从 AST 直接生成,不依赖 CPython 的 `PythonToStubConverter`)。存根文件的内容规则: | 元素 | 存根表示 | |------|---------| | `t.CDefine` 常量 | 保留完整定义(含赋值) | | `t.CDefine` 函数 | 保留完整函数体 | -| 普通函数 | 仅签名 + `t.State` | +| 普通函数 | 仅保留签名:`def foo(...) -> T: pass` | | 全局变量 | 添加 `t.CExtern` | | 类定义 | 保留成员类型注解和方法签名 | -存根文件还自动添加宏守卫(`c.CIfndef`/`c.CEndif()`),防止重复包含。 - ### SHA1 命名空间与导入 每个模块的函数和结构体在 LLVM IR 中自动加上 SHA1 前缀,消除跨模块符号冲突。只有标记为 `t.CExport` 的函数保持原始名称。详见 [01-overview.md 中 SHA1 命名空间机制](01-overview.md#sha1-命名空间机制)。 @@ -230,7 +240,7 @@ Viper 的 `import` 是编译时操作,不涉及运行时模块加载。完整 ```python # 在 fat32_types.vp 中定义 class fat32_fileinfo: - fname: list[t.CChar, 13] + fname: t.CArray[t.CChar, 13] attr: t.CUInt8T file_size: t.CUInt32T diff --git a/wiki/11-builtins.md b/wiki/11-builtins.md index 877b367..9abfaa6 100644 --- a/wiki/11-builtins.md +++ b/wiki/11-builtins.md @@ -24,13 +24,17 @@ s: t.CSizeT = sizeof(t.CInt) # sizeof(int) s: t.CSizeT = obj.__sizeof__() # sizeof(obj) ``` +> **注意**:裸 `sizeof()` 为 TPC 支持;TransPyV 以 `X.__sizeof__()`/`len(数组)` 为主。 + ### abs ```python a: t.CInt = abs(x) # abs(x) ``` -### int / float / bool +> **注意**:TPC 为硬编码内建;TransPyV 按 C 库裸名调用 `@abs`(两者并存)。 + +### int / float / bool / char / double(裸内建强转) ```python i: t.CInt = int(3.14) # (int)3.14 @@ -38,18 +42,17 @@ f: t.CFloat = float(42) # (float)42 b: t.CBool = bool(x) # x != 0 ``` -### min / max +> **已实现**:编译器硬编码内建强转(`bool(x)`=与 0 比较得 `i1`;`int(x)`=截断/零扩展/浮点转整;`char(x)`=`i8`;`float`/`double(x)`=`sitofp`/`fpext` 等)。 + +### min / max / chr / ord + +> **实现说明**:min/max/chr/ord 定义于 `includes/builtins.vp`(`ord`: `t.CChar`→`int`;`chr`: `int`→`t.CChar`;`min`/`max`: `double` 参数,`int`/`float` 实参无损提升,返回按调用侧目标类型 coerce),编译器自动关联 builtins 模块,无需显式 import。 ```python -m: t.CInt = min(a, b) # a < b ? a : b -m: t.CInt = max(a, b) # a > b ? a : b -``` - -### chr / ord - -```python -c: t.CChar = chr(65) # 'A' (整数转字符) -n: t.CInt = ord('A') # 65 (字符转整数) +m: t.CInt = min(a, b) # min(a, b)(builtins.vp,double 参数,返回按目标类型 coerce) +m: t.CInt = max(a, b) # max(a, b) +c: t.CChar = chr(65) # chr: int → t.CChar +n: t.CInt = ord('A') # ord: t.CChar → int ``` ### range @@ -74,7 +77,7 @@ for i in range(0, 10, 2): pass # for (int i = 0; i < 10; i += 2) | `a / b` | `a / b` | 浮点除法 | | `a // b` | `a / b` | 整数除法 | | `a % b` | `a % b` | 取模 | -| `a ** b` | `pow(a, b)` | 幂运算 | +| `a ** b` | — | 暂不支持:基础类型 `**` 无内建翻译;自定义类型走 `__pow__` 重载(`__pow__` 属期望实现) | | `-a` | `-a` | 取负 | | `+a` | `+a` | 正号 | @@ -149,7 +152,7 @@ buf[i] = value # buf[i] = value; (自动计算偏移) ## 数组下标 ```python -buf: list[t.CChar, 64] +buf: t.CArray[t.CChar, 64] buf[0] = 'H' # buf[0] = 'H'; buf[i] = value # buf[i] = value; diff --git a/wiki/12-project.md b/wiki/12-project.md index 854f007..9f9e60e 100644 --- a/wiki/12-project.md +++ b/wiki/12-project.md @@ -1,16 +1,15 @@ # 12 - 项目配置与构建 -Viper 项目使用 `project.json` 配置文件管理编译和链接参数。 +Viper 项目使用 `project.vpj` 配置文件管理编译和链接参数(Python 单文件模式仍接受 `project.json`)。 -## project.json 结构 +## project.vpj 结构 ```json { "name": "Kernel", "version": "1.0.0", "source_dir": "./Kernel", - "temp_dir": "./temp", - "output_dir": "./output", + "build_dir": "./.tpv_build", "compiler": { "cmd": "llc", "flags": ["-filetype=obj", "-mtriple=x86_64-none-elf", "-relocation-model=static", "-O2"] @@ -32,6 +31,7 @@ Viper 项目使用 `project.json` 配置文件管理编译和链接参数。 }, "options": { "slice_level": 3, + "sha1_slice_level": 1, "target": "llvm", "strict_mode": true } @@ -46,9 +46,8 @@ Viper 项目使用 `project.json` 配置文件管理编译和链接参数。 |------|------|------| | `name` | string | 项目名称 | | `version` | string | 项目版本 | -| `source_dir` | string | 源代码目录(相对于 project.json 所在目录) | -| `temp_dir` | string | 临时文件目录(存放 .vpi 存根等) | -| `output_dir` | string | 输出文件目录 | +| `source_dir` | string | 源代码目录(相对于 project.vpj 所在目录) | +| `build_dir` | string | 构建目录(默认 `./.tpv_build`);`temp`/`output` 均由它派生 | ### 编译器配置 @@ -67,10 +66,14 @@ Viper 项目使用 `project.json` 配置文件管理编译和链接参数。 | 字段 | 类型 | 说明 | |------|------|------| -| `linker.cmd` | string | 链接器命令(通常为 `ld.lld.exe`) | +| `linker.cmd` | string | 链接器命令(通常为 `ld.lld.exe`;TransPyV 宿主工程为 `clang++`) | | `linker.flags` | string[] | 链接器标志 | +| `linker.static_libs` | string[] | 静态库/目标文件列表(`.a`/`.obj`) | +| `linker.dynamic_libs` | string[] | 动态库列表(`.dll`/`.so`) | | `linker.output` | string | 输出文件名 | +支持 DSO(动态共享对象)构建:开启后产物为 `*_dso.ll`。 + 常用 `ld.lld` 标志: - `-m elf_x86_64`:ELF x86_64 格式 - `-T linker.ld`:链接脚本 @@ -85,9 +88,8 @@ Viper 项目使用 `project.json` 配置文件管理编译和链接参数。 | `target.triple` | string | LLVM 目标三元组 | | `target.datalayout` | string | LLVM 数据布局字符串 | -默认值: -- triple: `x86_64-none-elf` -- datalayout: `e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128` +注意:**无统一默认 triple**——由各工程 `project.vpj` 自行指定(TransPyV 自身为 `x86_64-pc-windows-gnu`;ViperOS 内核为 `x86_64-none-elf`)。`target.datalayout` 同样随工程配置,内核工程常用: +`e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128` ### 包含路径 @@ -100,6 +102,7 @@ Viper 项目使用 `project.json` 配置文件管理编译和链接参数。 | 字段 | 类型 | 说明 | |------|------|------| | `options.slice_level` | int | 切片优化级别(0-3) | +| `options.sha1_slice_level` | int | SHA1 切片存储级别(默认 1;≥1 时产物按 `{temp}/{sha1[0:2]}/` 子目录存放) | | `options.target` | string | 编译目标(目前仅支持 `llvm`) | | `options.strict_mode` | bool | 严格模式 | @@ -119,7 +122,7 @@ Viper 项目使用 `project.json` 配置文件管理编译和链接参数。 ``` VKernel/ -├── project.json # 项目配置 +├── project.vpj # 项目配置 ├── linker.ld # 链接脚本 ├── Kernel/ # 源代码目录 │ ├── main.vp # 内核入口 @@ -134,37 +137,43 @@ VKernel/ │ │ ├── storage/ │ │ └── ... │ └── ... -├── temp/ # 临时文件(自动生成) -│ ├── .vpi # 签名存根(阶段一生成) -│ ├── .stub.ll # LLVM IR 声明(阶段一生成) -│ └── _sha1_map.txt # SHA1→源文件路径映射 -└── output/ # 输出文件(自动生成) - ├── kernel.bin # 内核二进制 - ├── *.deps.json # 依赖信息 - └── linker.ld # 生成的链接脚本 +├── .tpv_build/ # 构建目录(build_dir,自动生成) +│ ├── temp/ # 临时文件 +│ │ ├── / # SHA1 切片子目录(sha1_slice_level ≥ 1) +│ │ │ ├── .vpi # 签名存根 +│ │ │ ├── .stub.ll # LLVM IR 声明 +│ │ │ ├── .text.ll # 含代码的 .ll +│ │ │ └── .deps.txt # 依赖信息 +│ │ └── _sha1_map.txt # SHA1→源文件路径映射(仅人类可读) +│ └── output/ # 输出文件 +│ ├── kernel.bin # 内核二进制 +│ ├── *.deps.txt # 依赖信息 +│ └── linker.ld # 生成的链接脚本 ``` ### 应用项目 ``` HelloWorld/ -├── project.json # 项目配置 +├── project.vpj # 项目配置 ├── linker.ld # 链接脚本 ├── main.vp # 应用入口 -├── temp/ # 临时文件 -└── output/ # 输出文件 - └── helloworld.elf # ELF 可执行文件 +└── .tpv_build/ # 构建目录(自动生成) + ├── temp/ # 临时文件 + └── output/ # 输出文件 + └── helloworld.elf # ELF 可执行文件 ``` ### 库项目 ``` SerialLogger/ -├── project.json # 项目配置 +├── project.vpj # 项目配置 ├── linker.ld # 链接脚本 ├── serial_logger.vp # 库源码 -├── temp/ # 临时文件 -└── output/ # 输出文件 +└── .tpv_build/ # 构建目录(自动生成) + ├── temp/ # 临时文件 + └── output/ # 输出文件 ``` ## 链接脚本 @@ -220,28 +229,40 @@ python TransPyC.py -f InputFile -o OutputFile [options] | `-args` | 运行参数 | | `-h` | 辅助文件(C 或 Python) | -工程编译使用: +工程编译使用(`--project` 指定工程文件): ```bash -python Projectrans.py xxx.json +python Projectrans.py --project project.vpj ``` 即可 +## 构建流程(真实骨架) + +工程构建的实际流水线: + +- **Phase 1(声明阶段)**:扫描入口与依赖并建依赖图 → 1a 结构体注册 → 1b 生成 `.vpi` 并翻译生成 stub +- **Phase 2(翻译与链接)** + - **Phase A-pre-vpi / Phase A-pre**:加载 `.vpi`,预翻译准备 + - **Phase A**:主循环多遍收敛翻译,`.stub.ll`/`.text.ll` 在此写盘 + - **Phase B**:`llc` 并行编译 `.ll` → `.o` + - **Phase B+**:缺失 includes 按需编译 + - **Phase C**:链接(`linker.cmd` 决定链接器) + ## 增量编译 TransPyC 支持基于 SHA1 的增量编译,与两阶段编译模型紧密耦合: ### 阶段一增量 -- 每个源文件按内容计算 SHA1 哈希(16位) +- 每个源文件按内容计算 SHA1 哈希(16 个十六进制字符,即 64 位截断) - 如果 `.vpi` 和 `.stub.ll` 已存在,则跳过生成(缓存命中) - 只有源文件内容变化导致 SHA1 变化时才重新生成声明接口 -- `temp/_sha1_map.txt` 记录 SHA1 → 源文件路径的映射,格式为 `:` +- SHA1 → 源文件路径映射在内存 `Sha1Store` 中多遍收敛构建;`temp/_sha1_map.txt`(格式 `:`)仅人类可读 ### 阶段二增量 -- 阶段二加载 `temp/_sha1_map.txt` 重建 SHA1 映射 -- 过滤掉不在当前 SHA1 映射中的旧 `.vpi` 和 `.stub.ll` 文件 -- 共享符号表一次性构建,避免每个文件重复加载 +- 阶段二(Phase A 主循环)在内存 `Sha1Store`/`StubMergerStore` 中多遍收敛构建并复用映射,不依赖 `_sha1_map.txt` +- 旧产物清理使用 `--clear-cache` +- 共享符号表为内存 `StubMergerStore`,按需加载避免每个文件重复加载 ### SHA1 命名空间与增量编译的协同 diff --git a/wiki/13-bootstrapping.md b/wiki/13-bootstrapping.md index e5cfe83..7538bed 100644 --- a/wiki/13-bootstrapping.md +++ b/wiki/13-bootstrapping.md @@ -1,9 +1,10 @@ # TransPyC 自举可行性分析 -> **状态**:进行中 -> **创建时间**:2026-06-26 -> **最后更新**:2026-06-30 -> **结论**:完全自举可行,核心障碍已被攻克,剩余工作明确 +> **状态**:已完成(本文为 2026-06-30 可行性分析历史记录) +> **创建时间**:2026-06-26 +> **最后更新**:2026-06-30 +> **结论**:完全自举可行——已于 2026-08 后实现:TPC 编译 TransPyV → `TransPyV/output/TransPyV.exe`(Phase A)→ 自举编译自身(Phase B/C 已跑通);当前编译器脱离 Python 运行时,由 includes/ast 自研解析器 + Viper 编译器自举 +> **现状说明**:本文全部 LOC/文件结构数据(includes/ast 4,176 行、`__tokens`/`__nodes`/`__parser` 文件名、llvmlite ~1,500 行、main.vp 10 个 llvmlite 测试等)均为 2026-06-30 历史数据。现状:includes/ast 为 tokens/base/exprs/stmts/parser 等 9 文件约 8K 行;llvmlite 7 文件约 5.9K 行;TransPyV/App/main.vp 现为编译器 CLI 入口。 --- @@ -59,8 +60,8 @@ |------|-----|------| | `includes/numpy/__init__.vp` | 1,016 | ndarray n 维数组 | | `includes/zlib/` | ~1,900 | 完整 deflate/inflate/huffman/checksum | -| `includes/ast/` | 4,176 | **自研 Python 解析器(自举组件)** | -| `includes/llvmlite/` | ~1,500 | **自研 LLVM IR 生成库(自举组件)** | +| `includes/ast/` | 4,176 | **自研 Python 解析器(自举组件)**(历史数据,2026-06-30) | +| `includes/llvmlite/` | ~1,500 | **自研 LLVM IR 生成库(自举组件)**(历史数据,2026-06-30) | | `includes/linkedlist.vp` | ~400 | 泛型链表(@t.NoVTable + PEP 695) | | `includes/vipermath.vp` | 450 | 数学库 | | ...(30+ 文件) | ... | mpool/mbuddy/string/stdio/json/w32 等 | @@ -92,6 +93,8 @@ | `__lexer.vp` | ~800 | 词法分析器 | | `__parser.vp` | 4,176(含表格) | 递归下降语法分析器 | +*注:上表 includes/ast 文件名与行数(`__tokens`/`__nodes`/`__lexer`/`__parser`,4,176 行)为 2026-06-30 历史数据;现状:includes/ast 已重构为 tokens/base/exprs/stmts/parser 等 9 文件约 8K 行。* + **覆盖语法**:装饰器、async/await、match(含复杂模式 `[x,*rest]`/`{'type':t,**rest}`/`Point(x,y)`/`0|1|2`)、try/except/finally/raise from、with、lambda、列表/集合/字典/生成器推导式、f-string(含 `!r`/`!s` 转换和 `:>{width}` 格式说明)、链式比较、walrus、yield from、global/nonlocal、切片、嵌套三元。 **设计要点**: @@ -111,13 +114,15 @@ | `__module.vp` | Module 容器 + 目标三元组 + 输出 .ll | | `__builder.vp` | IRBuilder(指令发射 + SSA 命名) | +*注:上表 includes/llvmlite 结构(~1,500 行、18/18 测试)为 2026-06-30 历史数据;现状:llvmlite 7 文件约 5.9K 行。* + **设计要点**: - `LLVMType` 用 `t.REnum`(tagged union)—— 少变体、无通用字段、match 分派的理想场景 - 指令 opcode 用 `t.CEnum`(IROp)—— 类型安全且零开销 - IR 文本生成用 `viperlib.snprintf` 格式化,避免手写逐字符拼接 - 对象分配用普通类 + `mpool`,不持有全局 `mbuddy` -**验证**:[TransPyV/App/main.vp](../TransPyV/App/main.vp) 10 个测试覆盖类型打印、值打印、build_add、if-else、模块打印、lli 实际执行。TransPyV 程序运行时自己生成合法 IR,被 `lli` 成功执行。 +**验证**:[TransPyV/App/main.vp](../TransPyV/App/main.vp) 10 个 llvmlite 测试覆盖类型打印、值打印、build_add、if-else、模块打印、lli 实际执行。TransPyV 程序运行时自己生成合法 IR,被 `lli` 成功执行。(历史数据,2026-06-30;该 main.vp 现为编译器 CLI 入口) ### 3.3 ✅ 基础设施库 @@ -147,7 +152,7 @@ **原问题**:编译器用 Python `ast` 模块解析源码,自举需自己写 Python 解析器(预计 5,000-10,000 LOC)。 -**解决**:`includes/ast/` 4,176 LOC 实现完整 Python 解析器,AstTest 解析 CPython 凥乎全部语法通过。预言已兑现,且实际规模(4,176 LOC)低于预估下限(5,000 LOC)。 +**解决**:`includes/ast/` 4,176 LOC(历史数据,2026-06-30)实现完整 Python 解析器,AstTest 解析 CPython 凥乎全部语法通过。预言已兑现,且实际规模(4,176 LOC)低于预估下限(5,000 LOC)。 ### 4.3 ~~动态反射 4241 处(原:致命)~~ → ⚠️ 降级为可控 @@ -187,8 +192,8 @@ ### 5.1 路径 A:完全自举(当前目标,可行) **已完成**: -1. ✅ `includes/ast/` Python 解析器(4,176 LOC) -2. ✅ `includes/llvmlite/` LLVM IR 生成库(~1,500 LOC) +1. ✅ `includes/ast/` Python 解析器(4,176 LOC,历史数据,2026-06-30;现为 9 文件约 8K 行) +2. ✅ `includes/llvmlite/` LLVM IR 生成库(~1,500 LOC,历史数据,2026-06-30;现为 7 文件约 5.9K 行) 3. ✅ 基础设施库(linkedlist/mpool/mbuddy/string/json/w32) **剩余工作**: @@ -198,7 +203,7 @@ 4. **lib/StubGen 重写**(~2K LOC) 5. **Python 标准库缺口补齐**(os/subprocess/re/pickle,~5K LOC) -**预计新增代码量**:30-35K LOC TransPyC。与已完成的 includes/ast(4,176 LOC)+ includes/llvmlite(~1,500 LOC)+ 其他基础库为同一量级——已经证明过两次能做这件事。 +**预计新增代码量**:30-35K LOC TransPyC。与已完成的 includes/ast(4,176 LOC)+ includes/llvmlite(~1,500 LOC)+ 其他基础库为同一量级(历史数据,2026-06-30)——已经证明过两次能做这件事。 ### 5.2 关键技术验证点(已完成) @@ -250,3 +255,14 @@ | "4241 处动态反射致命" | 90% 是工程偷懒(isinstance 节点分派/IR 类型分派),真实反射约 200-500 处 | | "推荐路径 C:不自举" | 推荐路径 A:完全自举 | | "预计自举后 60K-80K LOC" | 修正为 30-35K LOC(基础组件已 5,700 LOC 完成) | + +--- + +## 9. 当前自举状态(2026-08 后) + +完整构建流程、产物与命令见 [TransPyV/README.md](../TransPyV/README.md) 与 [MCP/protocol.md](../MCP/protocol.md)(在仓库根目录执行): + +```text +python Projectrans.py --project TransPyV\project.json --clean +TransPyV/output/TransPyV.exe --help +``` diff --git a/wiki/14-oo-refactor.md b/wiki/14-oo-refactor.md index 077fb95..e1fc2d5 100644 --- a/wiki/14-oo-refactor.md +++ b/wiki/14-oo-refactor.md @@ -1,7 +1,7 @@ # TPV 对象化重构方案 > 基线:TPV `f63dcd7` / TransPyC `e1cb560`(对象化前最后稳定版本,2026-08-09) -> 状态:方案讨论稿,未开始实施 +> 状态:已实施(落地形态与方案存在偏差,见下) ## 1. 背景与目标 @@ -19,6 +19,8 @@ TPV 编译器当前是"**数据对象 + 行为函数式**"架构: | HandlesClassDef.vp | 172KB | 4010 | | HandlesType.vp | 102KB | 2360 | +*注:表中 Handles*.vp 行数为历史基线(TransPyV/App/lib/core/Handles 已删除);迁移去向:HandlesExprCall → Gen/Call(12 文件)、HandlesExpr → Gen/Expr、HandlesClassDef → Gen/Class、HandlesType → Gen/Type(位于 TransPyV/App/lib/core/Gen/)。* + ### 1.2 重构目标 1. **对象化**:引入 `Generator` 生成器对象(Mixin 组合),状态集中于 `self`,与 TPC 的 `Translator + LlvmCodeGenerator` 架构对齐 @@ -63,7 +65,7 @@ includes/llvmlite/ # ① 方法化平移(P0) TransPyV/App/lib/core/ ├── Gen/ # ② 生成器对象(P1-P6) - │ ├── Generator.vp # 入口:@t.CVTable,Mixin 组合,visit 分派 + │ ├── Generator.vp # 入口:实际落地为组合:@t.NoVTable class Generator 持 46 个 GenMixin 子对象,非 Mixin 多继承 │ ├── BaseGenMixin.vp # 状态/Pool/Module/Builder/SymTab + 错误/trace │ ├── TypeGenMixin.vp # 类型映射/注解解析(← HandlesType) │ ├── StructGenMixin.vp # struct 注册/字段/继承/vtable(← HandlesStruct+ClassDef 布局) @@ -78,6 +80,8 @@ TransPyV/App/lib/core/ ## 4. P0:llvmlite 方法化(双轨过渡) +> **落地状态**:未实施/已放弃,保留顶层函数调用(build_load → self.load 方法化未落地)。 + ### 4.1 原则 **纯方法化平移,不改布局、不改语义**:顶层函数 → 类方法,`self` 替代首参;类保持 `@t.NoVTable` + 硬编码 SIZE(不引入 vtable 继承)。 @@ -146,6 +150,8 @@ class Generator(BaseGenMixin, TypeGenMixin, StructGenMixin, pass ``` +*注:本骨架为原始方案;实际落地为组合架构(@t.NoVTable class Generator 持 46 个 GenMixin 子对象),见 §3 图注。* + BaseGenMixin 状态字段(迁移自 HandlesTranslator): `Pool` / `Module` / `Builder` / `SymTab` / `FuncTable` / `FuncCount` / `StructTable` / `VTableCache` / `ImportedModules` / `FromImports` / `ModuleSha1` / `CurFunc` / `CurBuilder` / `CurClassName` / 错误 trace 栈 @@ -175,6 +181,8 @@ self.visit_call(node) # 内部用 self.Pool/self.Builder/self.Module/se - 中间态:`self.visit_call(node, funcs_ptr, func_count)`(表引用局部化后去参) - 迁移顺序**从叶子到根**(先无依赖者),每迁移一个 Mixin 立即 bootstrap +> **落地状态**:未完全落地:pool/builder/mod/funcs 仍显式连传(CallGenMixin.translate_call),GenApi 保留模块级兼容壳。 + ### 5.4 CallGen 拆解(P4,膨胀治理重点) `translate_call` 7043 行按分支簇拆为方法(**纯移动,逻辑零改动**): diff --git a/wiki/15-multiple-inheritance.md b/wiki/15-multiple-inheritance.md index dfb49f5..5d9e63f 100644 --- a/wiki/15-multiple-inheritance.md +++ b/wiki/15-multiple-inheritance.md @@ -1,9 +1,9 @@ # Viper 多继承支持方案 > 背景:Viper 语法层已支持 `class X(A, B)`(`ClassDef.bases` 是列表,parser 正常解析), -> 但语义层只实现单继承(`StructEntry.ParentName` 单值,字段展平/vtable/方法查找均单父)。 -> 目标:实现多继承(含字段合并、vtable 合并、方法查找、菱形去重),并同步 TPC 参考实现。 -> 状态:方案稿,未实施。 +> 已支持 `class X(A, B)` 多继承:`StructEntry` 含 `ParentName`(首父兼容)+ `ParentNames` + `ParentCount`。 +> 目标:实现多继承(含字段合并、vtable 合并、方法查找、菱形去重)并同步参考实现——本文为实施方案记录,均已落地。 +> 状态:已实现。 ## 1. 现状(已实测定位) @@ -17,8 +17,12 @@ | HandlesExprCall.vp `try_operator_overload` / `_translate_method_call` | `get_parent_name` 单链 | 需多父链 | | HandlesExpr.vp 属性访问回退链 | `get_parent_name` 单链 | 需多父链 | +*注:上表 Handles*.vp 位置/行号均为实施方案(历史稿)引用,路径已失效;等价实现已迁移至 Gen:字段展平 ClassGenDef、vtable 合并 ClassGenVTable、MRO StructGenMixin、this 调整 CallGenCall、运算符重载 ExprGenOps(下文各节同)。* + ## 2. MRO 规则(分阶段) +> **落地状态**:已按方案落地:DFS + 声明序去重 MRO、字段/方法短名去重先声明优先、菱形静默最左;无 C3(Phase 2 未实施)、无虚继承。 + ### Phase 1(本方案默认):深度优先 + 声明顺序 + 去重 - 查找顺序:**当前类 → bases 声明顺序逐个递归** - 同名冲突:**先声明者优先**(最左优先) @@ -116,6 +120,8 @@ TPC(Python,`lib/core/`)与 TPV 结构一致,按顺序同步: ## 10. 验证用例(Test/MultiInheritTest/App/main.vp) +*注:回归用例位于仓库根 Test/MultiInheritTest 与 Test/NoVTableCrossMixinTest(TransPyV/Test 自身无双父用例)。* + - 多父字段合并 + 属性访问(`d = D(); d.a + d.b`) - 多父方法调用(非虚 + 虚 vtable 分派) - 运算符重载继承链(父类 dunder)