diff --git a/Test/HashLibTest/App/main.vp b/Test/HashLibTest/App/main.vp index ac111ff..ec994d4 100644 --- a/Test/HashLibTest/App/main.vp +++ b/Test/HashLibTest/App/main.vp @@ -1,26 +1,123 @@ import t, c +import stdio +import stdlib +import string import testcheck import hashlib import binascii +import base64 import w32.win32console +# ============================================== +# 工具函数:打印十六进制哈希串 +# ============================================== +def print_hex(buf: t.CUInt8T | t.CPtr, length: t.CInt): + for i in range(length): + stdio.printf("%02x", buf[i]) + stdio.printf("\n") + + +def default_value_test_function(a: t.CInt, b: t.CInt = 1): + print(a, b) + + def main() -> t.CInt | t.CExport: w32.win32console.SetConsoleCP(65001) w32.win32console.SetConsoleOutputCP(65001) testcheck.begin("HashLibTest: 哈希与校验测试") + # ---------- hashlib 摘要测试 ---------- testcheck.section("HASHLIB") + plain: str = "hello123" + md5_buf: t.CArray[t.CUInt8T, hashlib.MD5_DIGEST_LEN] mctx = hashlib.md5() - mctx.update("hello") + mctx.update(plain) mctx.final(md5_buf) + print("MD5: ") + print_hex(md5_buf, hashlib.MD5_DIGEST_LEN) testcheck.ok("HASHLIB md5 completed") + sha1_buf: t.CArray[t.CUInt8T, hashlib.SHA1_DIGEST_LEN] + s1ctx = hashlib.sha1() + s1ctx.update(plain) + s1ctx.final(sha1_buf) + print("SHA1: ") + print_hex(sha1_buf, hashlib.SHA1_DIGEST_LEN) + testcheck.ok("HASHLIB sha1 completed") + + sha256_buf: t.CArray[t.CUInt8T, hashlib.SHA256_DIGEST_LEN] + s2ctx = hashlib.sha256() + s2ctx.update(plain) + s2ctx.final(sha256_buf) + print("SHA256: ") + print_hex(sha256_buf, hashlib.SHA256_DIGEST_LEN) + testcheck.ok("HASHLIB sha256 completed") + + sha512_buf: t.CArray[t.CUInt8T, hashlib.SHA512_DIGEST_LEN] + s5ctx = hashlib.sha512() + s5ctx.update(plain) + s5ctx.final(sha512_buf) + print("SHA512: ") + print_hex(sha512_buf, hashlib.SHA512_DIGEST_LEN) + testcheck.ok("HASHLIB sha512 completed") + + default_value_test_function(b=2, a=1) + testcheck.ok("default value test completed") + + # ---------- base64 编解码测试 ---------- + testcheck.section("BASE64") + b64_out: t.CArray[t.CChar, 256] + b64_dec: t.CArray[t.CUInt8T, 256] + base64.b64encode(plain, b64_out) + print("Base64 编码:", b64_out) + dlen: t.CSizeT = base64.b64decode(b64_out, b64_dec) + b64_dec[dlen] = 0 + print("Base64 解码:", b64_dec) + testcheck.ok("BASE64 encode/decode completed") + + # ---------- binascii 全套测试 ---------- testcheck.section("BINASCII") binascii.init_binascii() - crc_val: t.CUnsignedInt = binascii.crc32("hello", 5, 0) + raw: str = "HelloWorld!" + raw_length: t.CInt = 11 + + hex_out: str = binascii.b2a_hex(raw, raw_length) + if hex_out: + stdio.printf("Hex: %s\n", hex_out) + stdlib.free(hex_out) + testcheck.ok("BINASCII b2a_hex completed") + + crc_val: t.CUnsignedInt = binascii.crc32(raw, raw_length, 0) + stdio.printf("CRC32: %u\n", crc_val) testcheck.ok("BINASCII crc32 completed") + b64_out2: str = binascii.b2a_base64(raw, raw_length) + if b64_out2: + stdio.printf("Base64: %s\n", b64_out2) + stdlib.free(b64_out2) + testcheck.ok("BINASCII b2a_base64 completed") + + uu_out: str = binascii.b2a_uu(raw, raw_length) + if uu_out: + stdio.printf("UU: %s\n", uu_out) + stdlib.free(uu_out) + testcheck.ok("BINASCII b2a_uu completed") + + hqx_in: t.CArray[t.CChar, 4] = ['A', 'B', 'C', '\0'] + hqx_crc: t.CUnsignedShort = 0 + hqx_out: str + unhqx: str + hqx_out, hqx_crc = binascii.b2a_hqx(hqx_in, 3) + unhqx, hqx_crc = binascii.a2b_hqx(hqx_out) + stdio.printf("HQX Test: ABC -> %s -> %s (CRC:%u)\n", hqx_out, unhqx, hqx_crc) + stdlib.free(hqx_out); stdlib.free(unhqx) + testcheck.ok("BINASCII hqx completed") + + adler_val: t.CUnsignedInt = binascii.adler32(raw, raw_length, 1) + stdio.printf("Adler32: %u\n", adler_val) + testcheck.ok("BINASCII adler32 completed") + return testcheck.end() diff --git a/Test/TestProject/.tpv_build/temp/7a/7a2aeb1d7ef1f519.vpi b/Test/TestProject/.tpv_build/temp/7a/7a2aeb1d7ef1f519.vpi deleted file mode 100644 index d54c65c..0000000 --- a/Test/TestProject/.tpv_build/temp/7a/7a2aeb1d7ef1f519.vpi +++ /dev/null @@ -1,10 +0,0 @@ -"""Auto-generated Python stub file""" - - -import stdio -import stdlib -import string -import binascii -import t, c -def main222(): pass - diff --git a/Test/TestProject/.tpv_build/temp/_sha1_map.txt b/Test/TestProject/.tpv_build/temp/_sha1_map.txt deleted file mode 100644 index ae75833..0000000 --- a/Test/TestProject/.tpv_build/temp/_sha1_map.txt +++ /dev/null @@ -1,10 +0,0 @@ -7a2aeb1d7ef1f519:BINASCII.vp -22ae99fbf5fa16e6:config.vp -49315f8913bda6a4:HASHLIB.vp -49cae05490a513cb:main.vp -3cd87018ba1e76bc:test_numpy.vp -9ba2a595433e0d35:test_zlib.vp -110d7d2c8a47ff77:zc/class_test.vp -15b2db4f5d33f57e:zc/config.vp -faec3233d98371da:zc/logic_test.vp -07b189ae3dcfb270:zc/test.vp diff --git a/Test/TestProject/App/BINASCII.vp b/Test/TestProject/App/BINASCII.vp deleted file mode 100644 index f58b7c1..0000000 --- a/Test/TestProject/App/BINASCII.vp +++ /dev/null @@ -1,47 +0,0 @@ -import stdio -import stdlib -import string -import binascii -import t, c - - - - -def main222(): - binascii.init_binascii() - raw: str = "HelloWorld!" - raw_length: t.CInt = 11 - - stdio.printf("你好\n") - - hex_out: str = binascii.b2a_hex(raw, raw_length) - if hex_out: - stdio.printf("Hex: %s\n", hex_out) - free(hex_out) - - crc_val: t.CUnsignedInt = binascii.crc32(raw, raw_length, 0) - stdio.printf("CRC32: %u\n", crc_val) - - b64_out: str = binascii.b2a_base64(raw, raw_length) - if b64_out: - stdio.printf("Base64: %s\n", b64_out) - free(b64_out) - - uu_out: str = binascii.b2a_uu(raw, raw_length) - if uu_out: - stdio.printf("UU: %s\n", uu_out) - free(uu_out) - - hqx_in: t.CArray[t.CChar, 4] = ['A', 'B', 'C', '\0'] - hqx_crc: t.CUnsignedShort = 0 - hqx_out: str - unhqx: str - hqx_out, hqx_crc = binascii.b2a_hqx(hqx_in, 3) - unhqx, hqx_crc = binascii.a2b_hqx(hqx_out) - stdio.printf("HQX Test: ABC -> %s -> %s (CRC:%u)\n", hqx_out, unhqx, hqx_crc) - free(hqx_out); free(unhqx) - - adler_val: t.CUnsignedInt = binascii.adler32(raw, raw_length, 1) - stdio.printf("Adler32: %u\n", adler_val) - - stdio.printf("Bye\n") diff --git a/Test/TestProject/App/HASHLIB.vp b/Test/TestProject/App/HASHLIB.vp deleted file mode 100644 index b84258c..0000000 --- a/Test/TestProject/App/HASHLIB.vp +++ /dev/null @@ -1,80 +0,0 @@ -import stdio -import stdlib -import string -import stdint -import t, c -import base64 -import hashlib - - - - - - - - -def default_value_test_function(a: t.CInt, b: t.CInt = 1): - print(a, b) - - - - -# ============================================== -# 工具函数:打印十六进制哈希串 -# ============================================== -def print_hex(buf: t.CUInt8T | t.CPtr, length: t.CInt): - for i in range(length): - stdio.printf("%02x", buf[i]) - stdio.printf("\n") - -# ============================================== -# 主函数测试入口 -# ============================================== -def main1() -> t.CInt: - plain: str = "hello123" - print("原文", plain) - - # ---------- Base64 测试 ---------- - b64_out: t.CArray[t.CChar, 256] - b64_dec: t.CArray[t.CUInt8T, 256] - base64.b64encode(plain, b64_out) - print("Base64 编码:", b64_out) - dlen: t.CSizeT = base64.b64decode(b64_out, b64_dec) - b64_dec[dlen] = 0 - print("Base64 解码:", b64_dec) - - # ---------- MD5 测试 ---------- - md5_buf: t.CArray[t.CUInt8T, hashlib.MD5_DIGEST_LEN] - mctx = hashlib.md5() - mctx.update(plain) - mctx.final(md5_buf) - print("MD5: ") - print_hex(md5_buf, hashlib.MD5_DIGEST_LEN) - - # ---------- SHA1 测试 ---------- - sha1_buf: t.CArray[t.CUInt8T, hashlib.SHA1_DIGEST_LEN] - s1ctx = hashlib.sha1() - s1ctx.update(plain) - s1ctx.final(sha1_buf) - print("SHA1: ") - print_hex(sha1_buf, hashlib.SHA1_DIGEST_LEN) - - # ---------- SHA256 测试 ---------- - sha256_buf: t.CArray[t.CUInt8T, hashlib.SHA256_DIGEST_LEN] - s2ctx = hashlib.sha256() - s2ctx.update(plain) - s2ctx.final(sha256_buf) - print("SHA256: ") - print_hex(sha256_buf, hashlib.SHA256_DIGEST_LEN) - - # ---------- SHA512 测试 ---------- - sha512_buf: t.CArray[t.CUInt8T, hashlib.SHA512_DIGEST_LEN] - s5ctx = hashlib.sha512() - s5ctx.update(plain) - s5ctx.final(sha512_buf) - print("SHA512: ") - print_hex(sha512_buf, hashlib.SHA512_DIGEST_LEN) - - default_value_test_function(b=2, a=1) - - return 0 diff --git a/Test/TestProject/App/config.vp b/Test/TestProject/App/config.vp deleted file mode 100644 index 5ead5bc..0000000 --- a/Test/TestProject/App/config.vp +++ /dev/null @@ -1,24 +0,0 @@ -import stdint -import t, c - - -A: t.CChar | t.CPtr = "你好" - -class BIT_TEST(t.Object): - a: t.CInt | t.Bit(1) - b: t.CInt | t.Bit(1) - c: t.CInt | t.Bit(1) - d: t.CInt | t.Bit(5) - -class OOP_TEST(t.Object): - a: t.CInt - def __init__(self): - self.a = 0 - def __call__(self) -> stdint.UINT: - return 123 - -class ENUM_TEST(t.CEnum): - A: t.State = 0 - B: t.State - C: t.State - Len: t.State diff --git a/Test/TestProject/App/main.vp b/Test/TestProject/App/main.vp deleted file mode 100644 index 12043d7..0000000 --- a/Test/TestProject/App/main.vp +++ /dev/null @@ -1,220 +0,0 @@ -import stdio -import stdint -import zc.config as config -import zc.test as test -import zc.logic_test as logic -import zc.class_test as class_test -import testcheck -import test_numpy - - -def main() -> stdint.INT: - testcheck.begin("Hello World!") - testcheck.section("Cross-module macros") - stdio.printf(" POSMAX: %d\n", config.POSMAX) - stdio.printf(" MATH_SCALE: %d\n", config.MATH_SCALE) - stdio.printf(" THRESHOLD: %d\n", config.THRESHOLD) - stdio.printf(" SHIFT_AMOUNT: %d\n", config.SHIFT_AMOUNT) - stdio.printf(" MASK_VALUE: 0x%x\n", config.MASK_VALUE) - testcheck.ok("config macros accessible") - - testcheck.section("While Loop Test") - test.AboutSizeTWhileTest(10) - testcheck.ok("While Loop Test (10)") - - testcheck.section("Math Basic Test (20, 6)") - test.MathBasicTest(20, 6) - testcheck.ok("Math Basic Test (20, 6)") - - testcheck.section("Math Advanced Test (value=15)") - test.MathAdvancedTest(15) - testcheck.ok("Math Advanced Test (value=15)") - - testcheck.section("While with Elif-Else Test (-2 to 12)") - test.WhileWithElifElseTest(-2, 12) - testcheck.ok("While with Elif-Else Test (-2 to 12)") - - testcheck.section("Nested While with Macros Test") - test.NestedWhileWithMacrosTest(3, 4) - testcheck.ok("Nested While with Macros Test (3, 4)") - - testcheck.section("Complex Condition Test (1, 2, 3)") - test.ComplexConditionTest(1, 2, 3) - testcheck.ok("Complex Condition Test (1, 2, 3)") - - testcheck.section("Retry Loop Test (8)") - test.RetryLoopTest(8) - testcheck.ok("Retry Loop Test (8)") - - testcheck.section("Bitwise Operations Test (0b1101101)") - test.BitwiseOperationsTest(109) - testcheck.ok("Bitwise Operations Test (109)") - - testcheck.section("Compound Assignment Math Test (15, 4)") - test.CompoundAssignmentMathTest(15, 4) - testcheck.ok("Compound Assignment Math Test (15, 4)") - - testcheck.section("Power and Modulo Test (2, 8)") - test.PowerAndModuloTest(2, 8) - testcheck.ok("Power and Modulo Test (2, 8)") - - testcheck.section("Mixed Arithmetic Test (5, 3, 4)") - test.MixedArithmeticTest(5, 3, 4) - testcheck.ok("Mixed Arithmetic Test (5, 3, 4)") - - testcheck.section("Math with While Loop Test (start=1, count=5)") - test.MathWithWhileLoopTest(1, 5) - testcheck.ok("Math with While Loop Test (1, 5)") - - testcheck.section("Complex Nested Math Test (7, 3)") - test.ComplexNestedMathTest(7, 3) - testcheck.ok("Complex Nested Math Test (7, 3)") - - testcheck.section("Conditional Math Chain Test (value=10)") - test.ConditionalMathChainTest(10) - testcheck.ok("Conditional Math Chain Test (value=10)") - - testcheck.section("Bit Manipulation Math Test (0xABCD)") - test.BitManipulationMathTest(0xABCD) - testcheck.ok("Bit Manipulation Math Test (0xABCD)") - - testcheck.section("COMPLEX LOGIC TESTS") - - testcheck.section("For Range Basic Test (stop=5)") - logic.ForRangeBasicTest(5) - testcheck.ok("For Range Basic Test (5)") - - testcheck.section("For Range With Start Stop Step (start=1, stop=10, step=2)") - logic.ForRangeWithStartStop(1, 10, 2) - testcheck.ok("For Range With Start Stop (1, 10, 2)") - - testcheck.section("Nested For Range Test (rows=2, cols=3)") - logic.NestedForRangeTest(2, 3) - testcheck.ok("Nested For Range Test (2, 3)") - - testcheck.section("For With If Break Test (size=8)") - logic.ForWithIfBreakTest(8) - testcheck.ok("For With If Break Test (8)") - - testcheck.section("For With If Continue Test (n=10)") - logic.ForWithIfContinueTest(10) - testcheck.ok("For With If Continue Test (10)") - - testcheck.section("For With Elif Branch Test (value=10)") - logic.ForWithElifBranchTest(10) - testcheck.ok("For With Elif Branch Test (10)") - - testcheck.section("While With If Elif Else Test (iterations=7)") - logic.WhileWithIfElifElseTest(7) - testcheck.ok("While With If Elif Else Test (7)") - - testcheck.section("While With Nested If Test (limit=4)") - logic.WhileWithNestedIfTest(4) - testcheck.ok("While With Nested If Test (4)") - - testcheck.section("While With Match Case Test (value=2)") - logic.WhileWithMatchCaseTest(2) - testcheck.ok("While With Match Case Test (2)") - - testcheck.section("While With Match Case Test (value=99)") - logic.WhileWithMatchCaseTest(99) - testcheck.ok("While With Match Case Test (99)") - - testcheck.section("While With Match Case NoBreak Test (value=3)") - logic.WhileWithMatchCaseNoBreakTest(3) - testcheck.ok("While With Match Case NoBreak Test (3)") - - testcheck.section("Complex For While Match Test (outer=3, inner=3)") - logic.ComplexForWhileMatchTest(3, 3) - testcheck.ok("Complex For While Match Test (3, 3)") - - testcheck.section("For With Case And NoBreak Test (n=5)") - logic.ForWithCaseAndNoBreakTest(5) - testcheck.ok("For With Case And NoBreak Test (5)") - - testcheck.section("While With Break Condition Test (limit=6)") - logic.WhileWithBreakConditionTest(6) - testcheck.ok("While With Break Condition Test (6)") - - testcheck.section("Nested While With Multiple BreakPoints (depth=3, width=4)") - logic.NestedWhileWithMultipleBreakPoints(3, 4) - testcheck.ok("Nested While With Multiple BreakPoints (3, 4)") - - testcheck.section("For With Match Case In Loop Test (iterations=9)") - logic.ForWithMatchCaseInLoopTest(9) - testcheck.ok("For With Match Case In Loop Test (9)") - - testcheck.section("Complex Logic With Elif Chains (a=3, b=5, c=7)") - logic.ComplexLogicWithElifChains(3, 5, 7) - testcheck.ok("Complex Logic With Elif Chains (3, 5, 7)") - - testcheck.section("For Range With Step And Condition (n=12, step=2)") - logic.ForRangeWithStepAndCondition(12, 2) - testcheck.ok("For Range With Step And Condition (12, 2)") - - testcheck.section("Match Case With Guard Conditions (value=1)") - logic.MatchCaseWithGuardConditions(1) - testcheck.ok("Match Case With Guard Conditions (1)") - - testcheck.section("While With Multiple Match Cases (iterations=12)") - logic.WhileWithMultipleMatchCases(12) - testcheck.ok("While With Multiple Match Cases (12)") - - testcheck.section("For While Mix With Break And Continue (n=5)") - logic.ForWhileMixWithBreakAndContinue(5) - testcheck.ok("For While Mix With Break And Continue (5)") - - testcheck.section("Complex Case Matching With Ranges (start=0, end=35)") - logic.ComplexCaseMatchingWithRanges(0, 35) - testcheck.ok("Complex Case Matching With Ranges (0, 35)") - - testcheck.section("While With Elif In Elif Chain (limit=7)") - logic.WhileWithElifInElifChain(7) - testcheck.ok("While With Elif In Elif Chain (7)") - - testcheck.section("For With Case NoBreak Nested (inner_limit=4)") - logic.ForWithCaseNoBreakNested(4) - testcheck.ok("For With Case NoBreak Nested (4)") - - testcheck.section("CLASS TESTS") - class_test.TestBasicDataClass() - testcheck.ok("TestBasicDataClass") - class_test.TestPoint3DClass() - testcheck.ok("TestPoint3DClass") - class_test.TestStudentClass() - testcheck.ok("TestStudentClass") - class_test.TestCounterClass() - testcheck.ok("TestCounterClass") - class_test.TestStackAllocation() - testcheck.ok("TestStackAllocation") - class_test.TestHeapAllocation() - testcheck.ok("TestHeapAllocation") - class_test.TestHeapObjectWithInit() - testcheck.ok("TestHeapObjectWithInit") - class_test.TestMultipleStackObjects() - testcheck.ok("TestMultipleStackObjects") - class_test.TestImplicitInitCall() - testcheck.ok("TestImplicitInitCall") - class_test.TestClassWithBitFields() - testcheck.ok("TestClassWithBitFields") - - testcheck.section("ARRAY TESTS") - class_test.TestIntArray() - testcheck.ok("TestIntArray") - class_test.TestFloatArray() - testcheck.ok("TestFloatArray") - class_test.TestCharArray() - testcheck.ok("TestCharArray") - class_test.TestNestedArray() - testcheck.ok("TestNestedArray") - class_test.TestArrayWithStruct() - testcheck.ok("TestArrayWithStruct") - class_test.TestArrayPointer() - testcheck.ok("TestArrayPointer") - class_test.TestDynamicString() - testcheck.ok("TestDynamicString") - - testcheck.section("numpy Correctness Tests") - test_numpy.test_numpy_correct() - - return testcheck.end() diff --git a/Test/TestProject/App/test_numpy.vp b/Test/TestProject/App/test_numpy.vp deleted file mode 100644 index 91cf870..0000000 --- a/Test/TestProject/App/test_numpy.vp +++ /dev/null @@ -1,1087 +0,0 @@ -from stdint import * -import numpy -from stdio import printf -from stdlib import calloc, free -import string -import vipermath -import memhub -import t, c - -# ============================================================ -# Constants -# ============================================================ -EPS: t.CDouble = t.CDouble(1e-9) -EPS_LOOSE: t.CDouble = t.CDouble(1e-5) -SIMD_BLOCK: t.CSizeT = 4 - -# ============================================================ -# Global state -# ============================================================ -arena: t.CUInt8T | t.CPtr = None -pool: memhub.MemPool | t.CPtr = None - -test_passed: t.CInt = 0 -test_failed: t.CInt = 0 - -# ============================================================ -# Global check function -# ============================================================ -def check(name: str, condition: t.CInt, detail: str): - global test_passed, test_failed - if condition: - test_passed += 1 - printf(" [PASS] %s\n", name) - else: - test_failed += 1 - printf(" [FAIL] %s -- %s\n", name, detail if detail else "") - - -# ============================================================ -# Approximate comparison (top-level, uses vipermath.fabs) -# ============================================================ -def approx_eq(a: t.CDouble, b: t.CDouble) -> t.CInt: - d: t.CDouble = a - b - if d < t.CDouble(0.0): - d = t.CDouble(0.0) - d - if d < EPS: - return 1 - return 0 - -def approx_loose(a: t.CDouble, b: t.CDouble) -> t.CInt: - d: t.CDouble = a - b - if d < t.CDouble(0.0): - d = t.CDouble(0.0) - d - if d < EPS_LOOSE: - return 1 - return 0 - - -# ============================================================ -# Section headers -# ============================================================ -def section_header(title: str): - printf("\n+-- %s --+\n", title) - -def section_footer(): - printf("+--------------------------------------------+\n") - - -# ============================================================ -# Utility: quick array creation -# ============================================================ -def vec4(p: memhub.MemPool | t.CPtr, v0: t.CDouble, v1: t.CDouble, v2: t.CDouble, v3: t.CDouble) -> numpy.ndarray | t.CPtr: - a: numpy.ndarray | t.CPtr = numpy.zeros(p, 4) - a.data[0] = v0; a.data[1] = v1; a.data[2] = v2; a.data[3] = v3 - return a - -def vec3(p: memhub.MemPool | t.CPtr, v0: t.CDouble, v1: t.CDouble, v2: t.CDouble) -> numpy.ndarray | t.CPtr: - a: numpy.ndarray | t.CPtr = numpy.zeros(p, 3) - a.data[0] = v0; a.data[1] = v1; a.data[2] = v2 - return a - -def vec2(p: memhub.MemPool | t.CPtr, v0: t.CDouble, v1: t.CDouble) -> numpy.ndarray | t.CPtr: - a: numpy.ndarray | t.CPtr = numpy.zeros(p, 2) - a.data[0] = v0; a.data[1] = v1 - return a - - -# ============================================================ -# 1. Array creation -# ============================================================ -def test_zeros_ones(): - section_header("zeros / ones / full") - - a: numpy.ndarray | t.CPtr = numpy.zeros(pool, 5) - check("zeros not None", a != None, "zeros returned None") - check("zeros size == 5", a.size == 5, "size mismatch") - check("zeros [0]==0", a.data[0] == t.CDouble(0.0), "not zero") - check("zeros [4]==0", a.data[4] == t.CDouble(0.0), "not zero") - - b: numpy.ndarray | t.CPtr = numpy.ones(pool, 4) - check("ones not None", b != None, "ones returned None") - check("ones [0]==1", b.data[0] == t.CDouble(1.0), "not one") - check("ones [3]==1", b.data[3] == t.CDouble(1.0), "not one") - - c: numpy.ndarray | t.CPtr = numpy.full(pool, 3, t.CDouble(7.5)) - check("full not None", c != None, "full returned None") - check("full value", c.data[0] == t.CDouble(7.5), "value mismatch") - - a.delete() - b.delete() - c.delete() - section_footer() - - -def test_arange_linspace(): - section_header("arange / linspace") - - a: numpy.ndarray | t.CPtr = numpy.arange(pool, t.CDouble(0.0), t.CDouble(5.0), t.CDouble(1.0)) - check("arange not None", a != None, "arange returned None") - check("arange size == 5", a.size == 5, "size mismatch") - check("arange [0]==0", approx_eq(a.data[0], t.CDouble(0.0)), "mismatch") - check("arange [4]==4", approx_eq(a.data[4], t.CDouble(4.0)), "mismatch") - - b: numpy.ndarray | t.CPtr = numpy.linspace(pool, t.CDouble(0.0), t.CDouble(1.0), 5) - check("linspace not None", b != None, "linspace returned None") - check("linspace size == 5", b.size == 5, "size mismatch") - check("linspace [0]==0", approx_eq(b.data[0], t.CDouble(0.0)), "mismatch") - check("linspace [4]==1", approx_eq(b.data[4], t.CDouble(1.0)), "mismatch") - - a.delete() - b.delete() - section_footer() - - -def test_eye_diag(): - section_header("eye / diag") - - e: numpy.ndarray | t.CPtr = numpy.eye(pool, 3) - check("eye not None", e != None, "eye returned None") - check("eye ndim == 2", e.ndim == 2, "ndim mismatch") - check("eye [0,0]==1", e.at2d(0, 0) == t.CDouble(1.0), "mismatch") - check("eye [0,1]==0", e.at2d(0, 1) == t.CDouble(0.0), "mismatch") - check("eye [1,1]==1", e.at2d(1, 1) == t.CDouble(1.0), "mismatch") - - vals: numpy.ndarray | t.CPtr = vec3(pool, t.CDouble(1.0), t.CDouble(2.0), t.CDouble(3.0)) - d: numpy.ndarray | t.CPtr = numpy.diag(pool, vals) - check("diag not None", d != None, "diag returned None") - check("diag [0,0]==1", d.at2d(0, 0) == t.CDouble(1.0), "mismatch") - check("diag [1,1]==2", d.at2d(1, 1) == t.CDouble(2.0), "mismatch") - check("diag [2,2]==3", d.at2d(2, 2) == t.CDouble(3.0), "mismatch") - - e.delete() - vals.delete() - d.delete() - section_footer() - - -# ============================================================ -# 2. Methods -# ============================================================ -def test_sum_mean_min_max(): - section_header("sum / mean / min / max / argmax / argmin") - - a: numpy.ndarray | t.CPtr = numpy.arange(pool, t.CDouble(1.0), t.CDouble(6.0), t.CDouble(1.0)) - check("sum == 15", approx_eq(a.sum(), t.CDouble(15.0)), "mismatch") - check("mean == 3", approx_eq(a.mean(), t.CDouble(3.0)), "mismatch") - check("min == 1", approx_eq(a.min(), t.CDouble(1.0)), "mismatch") - check("max == 5", approx_eq(a.max(), t.CDouble(5.0)), "mismatch") - check("argmax == 4", a.argmax() == 4, "mismatch") - check("argmin == 0", a.argmin() == 0, "mismatch") - - a.delete() - section_footer() - - -def test_fill_copy(): - section_header("fill / copy") - - a: numpy.ndarray | t.CPtr = numpy.zeros(pool, 3) - a.fill(t.CDouble(9.0)) - check("fill [0]==9", a.data[0] == t.CDouble(9.0), "mismatch") - check("fill [2]==9", a.data[2] == t.CDouble(9.0), "mismatch") - - b: numpy.ndarray | t.CPtr = a.copy() - check("copy not None", b != None, "copy returned None") - check("copy [0]==9", b.data[0] == t.CDouble(9.0), "mismatch") - - b.data[0] = t.CDouble(0.0) - check("copy is independent", a.data[0] == t.CDouble(9.0), "copy not independent") - - a.delete() - b.delete() - section_footer() - - -# ============================================================ -# 3. Operator overloading -# ============================================================ -def test_add_sub_mul_div(): - section_header("__add__ / __sub__ / __mul__ / __truediv__") - - a: numpy.ndarray | t.CPtr = vec3(pool, t.CDouble(1.0), t.CDouble(2.0), t.CDouble(3.0)) - b: numpy.ndarray | t.CPtr = vec3(pool, t.CDouble(4.0), t.CDouble(5.0), t.CDouble(6.0)) - - c_add: numpy.ndarray | t.CPtr = a + b - check("a+b not None", c_add != None, "add returned None") - check("a+b [0]==5", c_add.data[0] == t.CDouble(5.0), "mismatch") - check("a+b [2]==9", c_add.data[2] == t.CDouble(9.0), "mismatch") - - c_sub: numpy.ndarray | t.CPtr = a - b - check("a-b [0]==-3", c_sub.data[0] == t.CDouble(-3.0), "mismatch") - - c_mul: numpy.ndarray | t.CPtr = a * b - check("a*b [1]==10", c_mul.data[1] == t.CDouble(10.0), "mismatch") - - c_div: numpy.ndarray | t.CPtr = b / a - check("b/a [0]==4", c_div.data[0] == t.CDouble(4.0), "mismatch") - check("b/a [2]==2", c_div.data[2] == t.CDouble(2.0), "mismatch") - - a.delete() - b.delete() - c_add.delete() - c_sub.delete() - c_mul.delete() - c_div.delete() - section_footer() - - -def test_neg(): - section_header("__neg__") - - a: numpy.ndarray | t.CPtr = vec3(pool, t.CDouble(1.0), t.CDouble(-2.0), t.CDouble(3.0)) - neg_a: numpy.ndarray | t.CPtr = -a - check("neg not None", neg_a != None, "neg returned None") - check("neg [0]==-1", neg_a.data[0] == t.CDouble(-1.0), "mismatch") - check("neg [1]==2", neg_a.data[1] == t.CDouble(2.0), "mismatch") - - a.delete() - neg_a.delete() - section_footer() - - -def test_len(): - section_header("__len__") - - a: numpy.ndarray | t.CPtr = numpy.zeros(pool, 10) - check("len == 10", len(a) == 10, "mismatch") - - a.delete() - section_footer() - - -# ============================================================ -# 4. Scalar operations -# ============================================================ -def test_scalar_ops(): - section_header("add_scalar / mul_scalar / sub_scalar / div_scalar") - - a: numpy.ndarray | t.CPtr = numpy.ones(pool, 3) - - r1: numpy.ndarray | t.CPtr = numpy.add_scalar(a, t.CDouble(2.0)) - check("add_scalar [0]==3", r1.data[0] == t.CDouble(3.0), "mismatch") - - r2: numpy.ndarray | t.CPtr = numpy.mul_scalar(a, t.CDouble(5.0)) - check("mul_scalar [0]==5", r2.data[0] == t.CDouble(5.0), "mismatch") - - r3: numpy.ndarray | t.CPtr = numpy.sub_scalar(a, t.CDouble(0.5)) - check("sub_scalar [0]==0.5", r3.data[0] == t.CDouble(0.5), "mismatch") - - r4: numpy.ndarray | t.CPtr = numpy.div_scalar(a, t.CDouble(2.0)) - check("div_scalar [0]==0.5", r4.data[0] == t.CDouble(0.5), "mismatch") - - a.delete() - r1.delete() - r2.delete() - r3.delete() - r4.delete() - section_footer() - - -# ============================================================ -# 5. Math functions -# ============================================================ -def test_math_funcs(): - section_header("np_abs / np_sqrt / np_pow") - - a: numpy.ndarray | t.CPtr = vec3(pool, t.CDouble(1.0), t.CDouble(4.0), t.CDouble(9.0)) - - r_sqrt: numpy.ndarray | t.CPtr = numpy.np_sqrt(a) - check("sqrt [0]==1", approx_eq(r_sqrt.data[0], t.CDouble(1.0)), "mismatch") - check("sqrt [1]==2", approx_eq(r_sqrt.data[1], t.CDouble(2.0)), "mismatch") - check("sqrt [2]==3", approx_eq(r_sqrt.data[2], t.CDouble(3.0)), "mismatch") - - b: numpy.ndarray | t.CPtr = vec3(pool, t.CDouble(-1.0), t.CDouble(-4.0), t.CDouble(9.0)) - r_abs: numpy.ndarray | t.CPtr = numpy.np_abs(b) - check("abs [0]==1", approx_eq(r_abs.data[0], t.CDouble(1.0)), "mismatch") - check("abs [1]==4", approx_eq(r_abs.data[1], t.CDouble(4.0)), "mismatch") - - c: numpy.ndarray | t.CPtr = vec3(pool, t.CDouble(1.0), t.CDouble(2.0), t.CDouble(3.0)) - r_pow: numpy.ndarray | t.CPtr = numpy.np_pow(c, t.CDouble(2.0)) - check("pow [0]==1", approx_eq(r_pow.data[0], t.CDouble(1.0)), "mismatch") - check("pow [1]==4", approx_eq(r_pow.data[1], t.CDouble(4.0)), "mismatch") - check("pow [2]==9", approx_eq(r_pow.data[2], t.CDouble(9.0)), "mismatch") - - a.delete() - b.delete() - c.delete() - r_sqrt.delete() - r_abs.delete() - r_pow.delete() - section_footer() - - -# ============================================================ -# 6. Matrix operations -# ============================================================ -def test_matmul(): - section_header("matmul") - - # [1,2;3,4] x [5,6;7,8] = [19,22;43,50] - a: numpy.ndarray | t.CPtr = numpy.empty2d(pool, 2, 2) - a.set2d(0, 0, t.CDouble(1.0)); a.set2d(0, 1, t.CDouble(2.0)) - a.set2d(1, 0, t.CDouble(3.0)); a.set2d(1, 1, t.CDouble(4.0)) - - b: numpy.ndarray | t.CPtr = numpy.empty2d(pool, 2, 2) - b.set2d(0, 0, t.CDouble(5.0)); b.set2d(0, 1, t.CDouble(6.0)) - b.set2d(1, 0, t.CDouble(7.0)); b.set2d(1, 1, t.CDouble(8.0)) - - c: numpy.ndarray | t.CPtr = numpy.matmul(a, b) - check("matmul not None", c != None, "matmul returned None") - check("matmul [0,0]==19", c.at2d(0, 0) == t.CDouble(19.0), "mismatch") - check("matmul [0,1]==22", c.at2d(0, 1) == t.CDouble(22.0), "mismatch") - check("matmul [1,0]==43", c.at2d(1, 0) == t.CDouble(43.0), "mismatch") - check("matmul [1,1]==50", c.at2d(1, 1) == t.CDouble(50.0), "mismatch") - - a.delete() - b.delete() - c.delete() - section_footer() - - -def test_dot(): - section_header("dot / dot_product") - - a: numpy.ndarray | t.CPtr = vec3(pool, t.CDouble(1.0), t.CDouble(2.0), t.CDouble(3.0)) - b: numpy.ndarray | t.CPtr = vec3(pool, t.CDouble(4.0), t.CDouble(5.0), t.CDouble(6.0)) - - d: t.CDouble = a.dot(b) - check("dot == 32", approx_eq(d, t.CDouble(32.0)), "mismatch") - - d2: t.CDouble = numpy.dot_product(a, b) - check("dot_product == 32", approx_eq(d2, t.CDouble(32.0)), "mismatch") - - a.delete() - b.delete() - section_footer() - - -def test_transpose(): - section_header("T (transpose)") - - a: numpy.ndarray | t.CPtr = numpy.empty2d(pool, 2, 3) - a.set2d(0, 0, t.CDouble(1.0)); a.set2d(0, 1, t.CDouble(2.0)); a.set2d(0, 2, t.CDouble(3.0)) - a.set2d(1, 0, t.CDouble(4.0)); a.set2d(1, 1, t.CDouble(5.0)); a.set2d(1, 2, t.CDouble(6.0)) - - at: numpy.ndarray | t.CPtr = a.T() - check("T not None", at != None, "T returned None") - check("T shape[0]==3", at.shape[0] == 3, "shape mismatch") - check("T shape[1]==2", at.shape[1] == 2, "shape mismatch") - check("T [0,0]==1", at.at2d(0, 0) == t.CDouble(1.0), "mismatch") - check("T [0,1]==4", at.at2d(0, 1) == t.CDouble(4.0), "mismatch") - check("T [1,0]==2", at.at2d(1, 0) == t.CDouble(2.0), "mismatch") - - a.delete() - at.delete() - section_footer() - - -# ============================================================ -# 7. Utility -# ============================================================ -def test_var_std_norm(): - section_header("var / std / norm") - - # [2,4,4,4,5,5,7,9] mean=5, var=4, std=2 - a: numpy.ndarray | t.CPtr = numpy.zeros(pool, 8) - a.data[0] = t.CDouble(2.0); a.data[1] = t.CDouble(4.0) - a.data[2] = t.CDouble(4.0); a.data[3] = t.CDouble(4.0) - a.data[4] = t.CDouble(5.0); a.data[5] = t.CDouble(5.0) - a.data[6] = t.CDouble(7.0); a.data[7] = t.CDouble(9.0) - - v: t.CDouble = numpy.var(a) - printf(" var = %.6f (expect 4.0)\n", v) - check("var ~= 4", approx_eq(v, t.CDouble(4.0)), "mismatch") - - s: t.CDouble = numpy.std(a) - printf(" std = %.6f (expect 2.0)\n", s) - check("std ~= 2", approx_eq(s, t.CDouble(2.0)), "mismatch") - - b: numpy.ndarray | t.CPtr = vec2(pool, t.CDouble(3.0), t.CDouble(4.0)) - n: t.CDouble = numpy.norm(b) - printf(" norm = %.6f (expect 5.0)\n", n) - check("norm ~= 5", approx_eq(n, t.CDouble(5.0)), "mismatch") - - a.delete() - b.delete() - section_footer() - - -def test_clip_concatenate(): - section_header("clip / concatenate") - - a: numpy.ndarray | t.CPtr = vec3(pool, t.CDouble(1.0), t.CDouble(5.0), t.CDouble(10.0)) - r: numpy.ndarray | t.CPtr = numpy.clip(a, t.CDouble(2.0), t.CDouble(8.0)) - check("clip [0]==2", r.data[0] == t.CDouble(2.0), "mismatch") - check("clip [1]==5", r.data[1] == t.CDouble(5.0), "mismatch") - check("clip [2]==8", r.data[2] == t.CDouble(8.0), "mismatch") - - b: numpy.ndarray | t.CPtr = vec2(pool, t.CDouble(1.0), t.CDouble(2.0)) - c: numpy.ndarray | t.CPtr = vec2(pool, t.CDouble(3.0), t.CDouble(4.0)) - cat: numpy.ndarray | t.CPtr = numpy.concatenate(b, c) - check("concatenate not None", cat != None, "concatenate returned None") - check("concatenate size == 4", cat.size == 4, "size mismatch") - check("concatenate [0]==1", cat.data[0] == t.CDouble(1.0), "mismatch") - check("concatenate [3]==4", cat.data[3] == t.CDouble(4.0), "mismatch") - - a.delete() - r.delete() - b.delete() - c.delete() - cat.delete() - section_footer() - - -def test_sort_reverse(): - section_header("sort_arr / reverse") - - a: numpy.ndarray | t.CPtr = vec3(pool, t.CDouble(3.0), t.CDouble(1.0), t.CDouble(2.0)) - s: numpy.ndarray | t.CPtr = numpy.sort_arr(a) - check("sort not None", s != None, "sort returned None") - check("sort [0]==1", s.data[0] == t.CDouble(1.0), "mismatch") - check("sort [1]==2", s.data[1] == t.CDouble(2.0), "mismatch") - check("sort [2]==3", s.data[2] == t.CDouble(3.0), "mismatch") - - r: numpy.ndarray | t.CPtr = numpy.reverse(a) - check("reverse not None", r != None, "reverse returned None") - check("reverse [0]==2", r.data[0] == t.CDouble(2.0), "mismatch") - check("reverse [1]==1", r.data[1] == t.CDouble(1.0), "mismatch") - check("reverse [2]==3", r.data[2] == t.CDouble(3.0), "mismatch") - - a.delete() - s.delete() - r.delete() - section_footer() - - -def test_print_arr(): - section_header("print_arr") - - a: numpy.ndarray | t.CPtr = vec3(pool, t.CDouble(1.0), t.CDouble(2.0), t.CDouble(3.0)) - printf(" 1D array: ") - a.print_arr() - - b: numpy.ndarray | t.CPtr = numpy.eye(pool, 3) - printf(" 2D eye(3):\n") - b.print_arr() - - a.delete() - b.delete() - section_footer() - - -# ============================================================ -# 8. Additional operator overloading -# ============================================================ -def test_floordiv_mod(): - section_header("__floordiv__ / __mod__") - - a: numpy.ndarray | t.CPtr = vec3(pool, t.CDouble(7.0), t.CDouble(10.0), t.CDouble(15.0)) - b: numpy.ndarray | t.CPtr = vec3(pool, t.CDouble(2.0), t.CDouble(3.0), t.CDouble(4.0)) - - c_fd: numpy.ndarray | t.CPtr = a // b - check("7//2==3", c_fd.data[0] == t.CDouble(3.0), "mismatch") - check("10//3==3", c_fd.data[1] == t.CDouble(3.0), "mismatch") - check("15//4==3", c_fd.data[2] == t.CDouble(3.0), "mismatch") - - c_mod: numpy.ndarray | t.CPtr = a % b - check("7%%2==1", c_mod.data[0] == t.CDouble(1.0), "mismatch") - check("10%%3==1", c_mod.data[1] == t.CDouble(1.0), "mismatch") - check("15%%4==3", c_mod.data[2] == t.CDouble(3.0), "mismatch") - - a.delete() - b.delete() - c_fd.delete() - c_mod.delete() - section_footer() - - -# ============================================================ -# 9. Additional math functions -# ============================================================ -def test_additional_math(): - section_header("np_log10 / np_log2 / np_floor / np_ceil / np_round / np_sign") - - a: numpy.ndarray | t.CPtr = vec3(pool, t.CDouble(10.0), t.CDouble(100.0), t.CDouble(1000.0)) - r_log10: numpy.ndarray | t.CPtr = numpy.np_log10(a) - check("log10(10)~=1", approx_loose(r_log10.data[0], t.CDouble(1.0)), "mismatch") - check("log10(100)~=2", approx_loose(r_log10.data[1], t.CDouble(2.0)), "mismatch") - - b: numpy.ndarray | t.CPtr = vec3(pool, t.CDouble(2.0), t.CDouble(4.0), t.CDouble(8.0)) - r_log2: numpy.ndarray | t.CPtr = numpy.np_log2(b) - check("log2(2)~=1", approx_loose(r_log2.data[0], t.CDouble(1.0)), "mismatch") - check("log2(4)~=2", approx_loose(r_log2.data[1], t.CDouble(2.0)), "mismatch") - - c: numpy.ndarray | t.CPtr = vec3(pool, t.CDouble(1.5), t.CDouble(2.7), t.CDouble(-1.3)) - r_floor: numpy.ndarray | t.CPtr = numpy.np_floor(c) - check("floor(1.5)==1", r_floor.data[0] == t.CDouble(1.0), "mismatch") - check("floor(2.7)==2", r_floor.data[1] == t.CDouble(2.0), "mismatch") - check("floor(-1.3)==-2", r_floor.data[2] == t.CDouble(-2.0), "mismatch") - - r_ceil: numpy.ndarray | t.CPtr = numpy.np_ceil(c) - check("ceil(1.5)==2", r_ceil.data[0] == t.CDouble(2.0), "mismatch") - check("ceil(2.7)==3", r_ceil.data[1] == t.CDouble(3.0), "mismatch") - check("ceil(-1.3)==-1", r_ceil.data[2] == t.CDouble(-1.0), "mismatch") - - d: numpy.ndarray | t.CPtr = vec3(pool, t.CDouble(1.4), t.CDouble(2.5), t.CDouble(3.6)) - r_round: numpy.ndarray | t.CPtr = numpy.np_round(d) - check("round(1.4)==1", r_round.data[0] == t.CDouble(1.0), "mismatch") - check("round(3.6)==4", r_round.data[2] == t.CDouble(4.0), "mismatch") - - e: numpy.ndarray | t.CPtr = numpy.zeros(pool, 4) - e.data[0] = t.CDouble(-3.0); e.data[1] = t.CDouble(0.0); e.data[2] = t.CDouble(5.0); e.data[3] = t.CDouble(-0.1) - r_sign: numpy.ndarray | t.CPtr = numpy.np_sign(e) - check("sign(-3)==-1", r_sign.data[0] == t.CDouble(-1.0), "mismatch") - check("sign(0)==0", r_sign.data[1] == t.CDouble(0.0), "mismatch") - check("sign(5)==1", r_sign.data[2] == t.CDouble(1.0), "mismatch") - - a.delete() - b.delete() - c.delete() - d.delete() - e.delete() - r_log10.delete() - r_log2.delete() - r_floor.delete() - r_ceil.delete() - r_round.delete() - r_sign.delete() - section_footer() - - -def test_trig_hyperbolic(): - section_header("np_tanh / np_sinh / np_cosh / np_arcsin / np_arccos / np_arctan") - - a: numpy.ndarray | t.CPtr = vec3(pool, t.CDouble(0.0), t.CDouble(1.0), t.CDouble(-1.0)) - - r_tanh: numpy.ndarray | t.CPtr = numpy.np_tanh(a) - check("tanh(0)~=0", approx_loose(r_tanh.data[0], t.CDouble(0.0)), "mismatch") - - r_sinh: numpy.ndarray | t.CPtr = numpy.np_sinh(a) - check("sinh(0)~=0", approx_loose(r_sinh.data[0], t.CDouble(0.0)), "mismatch") - - r_cosh: numpy.ndarray | t.CPtr = numpy.np_cosh(a) - check("cosh(0)~=1", approx_loose(r_cosh.data[0], t.CDouble(1.0)), "mismatch") - - b: numpy.ndarray | t.CPtr = vec2(pool, t.CDouble(0.0), t.CDouble(0.5)) - r_asin: numpy.ndarray | t.CPtr = numpy.np_arcsin(b) - check("arcsin(0)~=0", approx_loose(r_asin.data[0], t.CDouble(0.0)), "mismatch") - - r_acos: numpy.ndarray | t.CPtr = numpy.np_arccos(b) - check("arccos(0)~=pi/2", approx_loose(r_acos.data[0], t.CDouble(1.5707963)), "mismatch") - - r_atan: numpy.ndarray | t.CPtr = numpy.np_arctan(b) - check("arctan(0)~=0", approx_loose(r_atan.data[0], t.CDouble(0.0)), "mismatch") - - a.delete() - b.delete() - r_tanh.delete() - r_sinh.delete() - r_cosh.delete() - r_asin.delete() - r_acos.delete() - r_atan.delete() - section_footer() - - -def test_degrees_radians(): - section_header("np_degrees / np_radians") - - a: numpy.ndarray | t.CPtr = vec2(pool, t.CDouble(0.0), t.CDouble(1.5707963267948966)) - - r_deg: numpy.ndarray | t.CPtr = numpy.np_degrees(a) - check("deg(0)~=0", approx_loose(r_deg.data[0], t.CDouble(0.0)), "mismatch") - check("deg(pi/2)~=90", approx_loose(r_deg.data[1], t.CDouble(90.0)), "mismatch") - - b: numpy.ndarray | t.CPtr = vec2(pool, t.CDouble(0.0), t.CDouble(90.0)) - r_rad: numpy.ndarray | t.CPtr = numpy.np_radians(b) - check("rad(0)~=0", approx_loose(r_rad.data[0], t.CDouble(0.0)), "mismatch") - check("rad(90)~=pi/2", approx_loose(r_rad.data[1], t.CDouble(1.5707963)), "mismatch") - - a.delete() - b.delete() - r_deg.delete() - r_rad.delete() - section_footer() - - -# ============================================================ -# 10. Additional array operations -# ============================================================ -def test_cumsum_diff(): - section_header("cumsum / diff") - - a: numpy.ndarray | t.CPtr = numpy.zeros(pool, 4) - a.data[0] = t.CDouble(1.0); a.data[1] = t.CDouble(2.0); a.data[2] = t.CDouble(3.0); a.data[3] = t.CDouble(4.0) - - r_cs: numpy.ndarray | t.CPtr = numpy.cumsum(a) - check("cumsum not None", r_cs != None, "cumsum returned None") - check("cumsum[0]==1", r_cs.data[0] == t.CDouble(1.0), "mismatch") - check("cumsum[1]==3", r_cs.data[1] == t.CDouble(3.0), "mismatch") - check("cumsum[2]==6", r_cs.data[2] == t.CDouble(6.0), "mismatch") - check("cumsum[3]==10", r_cs.data[3] == t.CDouble(10.0), "mismatch") - - r_diff: numpy.ndarray | t.CPtr = numpy.diff(a) - check("diff not None", r_diff != None, "diff returned None") - check("diff size==3", r_diff.size == 3, "size mismatch") - check("diff[0]==1", r_diff.data[0] == t.CDouble(1.0), "mismatch") - check("diff[2]==1", r_diff.data[2] == t.CDouble(1.0), "mismatch") - - a.delete() - r_cs.delete() - r_diff.delete() - section_footer() - - -def test_max_min_where(): - section_header("np_maximum / np_minimum / np_where") - - a: numpy.ndarray | t.CPtr = vec3(pool, t.CDouble(1.0), t.CDouble(5.0), t.CDouble(3.0)) - b: numpy.ndarray | t.CPtr = vec3(pool, t.CDouble(4.0), t.CDouble(2.0), t.CDouble(6.0)) - - r_max: numpy.ndarray | t.CPtr = numpy.np_maximum(a, b) - check("maximum[0]==4", r_max.data[0] == t.CDouble(4.0), "mismatch") - check("maximum[1]==5", r_max.data[1] == t.CDouble(5.0), "mismatch") - check("maximum[2]==6", r_max.data[2] == t.CDouble(6.0), "mismatch") - - r_min: numpy.ndarray | t.CPtr = numpy.np_minimum(a, b) - check("minimum[0]==1", r_min.data[0] == t.CDouble(1.0), "mismatch") - check("minimum[1]==2", r_min.data[1] == t.CDouble(2.0), "mismatch") - check("minimum[2]==3", r_min.data[2] == t.CDouble(3.0), "mismatch") - - # where: cond > 0 ? a : b - cond: numpy.ndarray | t.CPtr = vec3(pool, t.CDouble(0.0), t.CDouble(1.0), t.CDouble(0.0)) - r_where: numpy.ndarray | t.CPtr = numpy.np_where(cond, a, b) - check("where[0]==4", r_where.data[0] == t.CDouble(4.0), "mismatch") - check("where[1]==5", r_where.data[1] == t.CDouble(5.0), "mismatch") - check("where[2]==6", r_where.data[2] == t.CDouble(6.0), "mismatch") - - a.delete() - b.delete() - cond.delete() - r_max.delete() - r_min.delete() - r_where.delete() - section_footer() - - -def test_flatten_trace(): - section_header("flatten / trace") - - a: numpy.ndarray | t.CPtr = numpy.empty2d(pool, 2, 3) - a.set2d(0, 0, t.CDouble(1.0)); a.set2d(0, 1, t.CDouble(2.0)); a.set2d(0, 2, t.CDouble(3.0)) - a.set2d(1, 0, t.CDouble(4.0)); a.set2d(1, 1, t.CDouble(5.0)); a.set2d(1, 2, t.CDouble(6.0)) - - r_flat: numpy.ndarray | t.CPtr = numpy.flatten(a) - check("flatten not None", r_flat != None, "flatten returned None") - check("flatten ndim==1", r_flat.ndim == 1, "ndim mismatch") - check("flatten size==6", r_flat.size == 6, "size mismatch") - check("flatten[0]==1", r_flat.data[0] == t.CDouble(1.0), "mismatch") - - # trace of [[1,2],[3,4]] = 1+4 = 5 - b: numpy.ndarray | t.CPtr = numpy.empty2d(pool, 2, 2) - b.set2d(0, 0, t.CDouble(1.0)); b.set2d(0, 1, t.CDouble(2.0)) - b.set2d(1, 0, t.CDouble(3.0)); b.set2d(1, 1, t.CDouble(4.0)) - tr: t.CDouble = numpy.trace(b) - check("trace == 5", tr == t.CDouble(5.0), "mismatch") - - a.delete() - r_flat.delete() - b.delete() - section_footer() - - -def test_outer(): - section_header("outer") - - a: numpy.ndarray | t.CPtr = vec2(pool, t.CDouble(1.0), t.CDouble(2.0)) - b: numpy.ndarray | t.CPtr = vec3(pool, t.CDouble(3.0), t.CDouble(4.0), t.CDouble(5.0)) - - r: numpy.ndarray | t.CPtr = numpy.outer(a, b) - check("outer not None", r != None, "outer returned None") - check("outer ndim==2", r.ndim == 2, "ndim mismatch") - check("outer[0,0]==3", r.at2d(0, 0) == t.CDouble(3.0), "mismatch") - check("outer[0,1]==4", r.at2d(0, 1) == t.CDouble(4.0), "mismatch") - check("outer[1,0]==6", r.at2d(1, 0) == t.CDouble(6.0), "mismatch") - check("outer[1,2]==10", r.at2d(1, 2) == t.CDouble(10.0), "mismatch") - - a.delete() - b.delete() - r.delete() - section_footer() - - -# ============================================================ -# 11. Boolean / comparison -# ============================================================ -def test_bool_comparison(): - section_header("np_all / np_any / np_count_nonzero / np_equal / np_less / np_greater") - - a: numpy.ndarray | t.CPtr = numpy.zeros(pool, 4) - a.data[0] = t.CDouble(1.0); a.data[1] = t.CDouble(0.0); a.data[2] = t.CDouble(3.0); a.data[3] = t.CDouble(0.0) - check("count_nonzero==2", numpy.np_count_nonzero(a) == 2, "mismatch") - check("any==1", numpy.np_any(a) == 1, "mismatch") - - b: numpy.ndarray | t.CPtr = vec3(pool, t.CDouble(1.0), t.CDouble(2.0), t.CDouble(3.0)) - check("all(1,2,3)==1", numpy.np_all(b) == 1, "mismatch") - - c: numpy.ndarray | t.CPtr = numpy.zeros(pool, 3) - check("all(0,0,0)==0", numpy.np_all(c) == 0, "mismatch") - check("any(0,0,0)==0", numpy.np_any(c) == 0, "mismatch") - - d: numpy.ndarray | t.CPtr = vec3(pool, t.CDouble(1.0), t.CDouble(2.0), t.CDouble(3.0)) - e: numpy.ndarray | t.CPtr = vec3(pool, t.CDouble(1.0), t.CDouble(0.0), t.CDouble(4.0)) - - r_eq: numpy.ndarray | t.CPtr = numpy.np_equal(d, e) - check("equal[0]==1", r_eq.data[0] == t.CDouble(1.0), "mismatch") - check("equal[1]==0", r_eq.data[1] == t.CDouble(0.0), "mismatch") - - r_lt: numpy.ndarray | t.CPtr = numpy.np_less(d, e) - check("less[2]==1", r_lt.data[2] == t.CDouble(1.0), "mismatch") - check("less[0]==0", r_lt.data[0] == t.CDouble(0.0), "mismatch") - - r_gt: numpy.ndarray | t.CPtr = numpy.np_greater(d, e) - check("greater[1]==1", r_gt.data[1] == t.CDouble(1.0), "mismatch") - - a.delete() - b.delete() - c.delete() - d.delete() - e.delete() - r_eq.delete() - r_lt.delete() - r_gt.delete() - section_footer() - - -# ============================================================ -# 12. Linear algebra -# ============================================================ -def test_linalg(): - section_header("det2x2 / inv2x2 / cross3 / prod / median / percentile") - - # det2x2: [[1,2],[3,4]] -> 1*4-2*3 = -2 - a: numpy.ndarray | t.CPtr = numpy.empty2d(pool, 2, 2) - a.set2d(0, 0, t.CDouble(1.0)); a.set2d(0, 1, t.CDouble(2.0)) - a.set2d(1, 0, t.CDouble(3.0)); a.set2d(1, 1, t.CDouble(4.0)) - d: t.CDouble = numpy.det2x2(a) - check("det2x2==-2", d == t.CDouble(-2.0), "mismatch") - - # inv2x2 of [[1,2],[3,4]] - inv: numpy.ndarray | t.CPtr = numpy.inv2x2(a) - check("inv2x2 not None", inv != None, "inv2x2 returned None") - check("inv[0,0]==-2", approx_eq(inv.at2d(0, 0), t.CDouble(-2.0)), "mismatch") - check("inv[0,1]==1", approx_eq(inv.at2d(0, 1), t.CDouble(1.0)), "mismatch") - - # cross3: [1,0,0] x [0,1,0] = [0,0,1] - x: numpy.ndarray | t.CPtr = vec3(pool, t.CDouble(1.0), t.CDouble(0.0), t.CDouble(0.0)) - y: numpy.ndarray | t.CPtr = vec3(pool, t.CDouble(0.0), t.CDouble(1.0), t.CDouble(0.0)) - cr: numpy.ndarray | t.CPtr = numpy.cross3(x, y) - check("cross not None", cr != None, "cross returned None") - check("cross[2]==1", cr.data[2] == t.CDouble(1.0), "mismatch") - - # prod - p: numpy.ndarray | t.CPtr = numpy.zeros(pool, 4) - p.data[0] = t.CDouble(1.0); p.data[1] = t.CDouble(2.0); p.data[2] = t.CDouble(3.0); p.data[3] = t.CDouble(4.0) - check("prod==24", numpy.prod(p) == t.CDouble(24.0), "mismatch") - - # median - m: numpy.ndarray | t.CPtr = numpy.zeros(pool, 5) - m.data[0] = t.CDouble(3.0); m.data[1] = t.CDouble(1.0); m.data[2] = t.CDouble(2.0) - m.data[3] = t.CDouble(5.0); m.data[4] = t.CDouble(4.0) - check("median==3", numpy.median(m) == t.CDouble(3.0), "mismatch") - - # percentile - check("p50==3", approx_eq(numpy.percentile(m, t.CDouble(50.0)), t.CDouble(3.0)), "mismatch") - - a.delete() - inv.delete() - x.delete() - y.delete() - cr.delete() - p.delete() - m.delete() - section_footer() - - -# ============================================================ -# 13. Additional creation / constants -# ============================================================ -def test_additional_creation(): - section_header("full2d / zeros_like / ones_like / arange1 / constants") - - f: numpy.ndarray | t.CPtr = numpy.full2d(pool, 2, 3, t.CDouble(7.0)) - check("full2d not None", f != None, "full2d returned None") - check("full2d ndim==2", f.ndim == 2, "ndim mismatch") - check("full2d[0,0]==7", f.at2d(0, 0) == t.CDouble(7.0), "mismatch") - check("full2d[1,2]==7", f.at2d(1, 2) == t.CDouble(7.0), "mismatch") - - a: numpy.ndarray | t.CPtr = vec3(pool, t.CDouble(1.0), t.CDouble(2.0), t.CDouble(3.0)) - zl: numpy.ndarray | t.CPtr = numpy.zeros_like(a) - check("zeros_like not None", zl != None, "returned None") - check("zeros_like size==3", zl.size == 3, "size mismatch") - check("zeros_like[0]==0", zl.data[0] == t.CDouble(0.0), "mismatch") - - ol: numpy.ndarray | t.CPtr = numpy.ones_like(a) - check("ones_like not None", ol != None, "returned None") - check("ones_like[0]==1", ol.data[0] == t.CDouble(1.0), "mismatch") - - ar: numpy.ndarray | t.CPtr = numpy.arange1(pool, t.CDouble(4.0)) - check("arange1 not None", ar != None, "returned None") - check("arange1 size==4", ar.size == 4, "size mismatch") - check("arange1[0]==0", ar.data[0] == t.CDouble(0.0), "mismatch") - check("arange1[3]==3", ar.data[3] == t.CDouble(3.0), "mismatch") - - # Constants - check("pi ~= 3.14", approx_loose(numpy.pi, t.CDouble(3.14159265)), "mismatch") - check("e ~= 2.71", approx_loose(numpy.e, t.CDouble(2.71828182)), "mismatch") - - f.delete() - a.delete() - zl.delete() - ol.delete() - ar.delete() - section_footer() - - -# ============================================================ -# 14. Interpolation -# ============================================================ -def test_interp(): - section_header("np_interp") - - xp: numpy.ndarray | t.CPtr = vec3(pool, t.CDouble(0.0), t.CDouble(1.0), t.CDouble(2.0)) - fp: numpy.ndarray | t.CPtr = vec3(pool, t.CDouble(0.0), t.CDouble(10.0), t.CDouble(20.0)) - - v: t.CDouble = numpy.np_interp(t.CDouble(0.5), xp, fp) - check("interp(0.5)==5", approx_eq(v, t.CDouble(5.0)), "mismatch") - - v2: t.CDouble = numpy.np_interp(t.CDouble(1.5), xp, fp) - check("interp(1.5)==15", approx_eq(v2, t.CDouble(15.0)), "mismatch") - - v3: t.CDouble = numpy.np_interp(t.CDouble(-1.0), xp, fp) - check("interp(-1)==0", approx_eq(v3, t.CDouble(0.0)), "mismatch") - - v4: t.CDouble = numpy.np_interp(t.CDouble(3.0), xp, fp) - check("interp(3)==20", approx_eq(v4, t.CDouble(20.0)), "mismatch") - - xp.delete() - fp.delete() - section_footer() - - -# ============================================================ -# 15. Edge / boundary / exception tests -# ============================================================ -def test_numpy_edge(): - section_header("edge: size=0 / size=1 / non-SIMD-block / negative / div-zero") - - # size=0: pool.alloc(0) returns None, so zeros(0) returns None (expected) - a0: numpy.ndarray | t.CPtr = numpy.zeros(pool, 0) - check("zeros(0) returns None", a0 == None, "expected None for size=0") - - # size=1 - a1: numpy.ndarray | t.CPtr = numpy.zeros(pool, 1) - check("zeros(1) not None", a1 != None, "returned None") - check("zeros(1) size==1", a1.size == 1, "size mismatch") - check("zeros(1) [0]==0", a1.data[0] == t.CDouble(0.0), "mismatch") - a1.delete() - - # non-SIMD-block sizes (1,2,3,5,6,7) - a5: numpy.ndarray | t.CPtr = numpy.arange(pool, t.CDouble(0.0), t.CDouble(5.0), t.CDouble(1.0)) - check("arange(5) size==5", a5.size == 5, "size mismatch") - check("arange(5) sum==10", approx_eq(a5.sum(), t.CDouble(10.0)), "mismatch") - a5.delete() - - a6: numpy.ndarray | t.CPtr = numpy.arange(pool, t.CDouble(0.0), t.CDouble(6.0), t.CDouble(1.0)) - check("arange(6) sum==15", approx_eq(a6.sum(), t.CDouble(15.0)), "mismatch") - a6.delete() - - a7: numpy.ndarray | t.CPtr = numpy.arange(pool, t.CDouble(0.0), t.CDouble(7.0), t.CDouble(1.0)) - check("arange(7) sum==21", approx_eq(a7.sum(), t.CDouble(21.0)), "mismatch") - a7.delete() - - # negative values in sqrt - neg_arr: numpy.ndarray | t.CPtr = vec3(pool, t.CDouble(-1.0), t.CDouble(0.0), t.CDouble(4.0)) - r_sqrt_neg: numpy.ndarray | t.CPtr = numpy.np_sqrt(neg_arr) - check("sqrt(neg) not None", r_sqrt_neg != None, "returned None") - # sqrt(4)=2, sqrt(0)=0; sqrt(-1) is NaN (implementation-defined) - check("sqrt(4)==2", approx_eq(r_sqrt_neg.data[2], t.CDouble(2.0)), "mismatch") - neg_arr.delete() - r_sqrt_neg.delete() - - # div-by-zero: b/a where a has zeros - za: numpy.ndarray | t.CPtr = vec3(pool, t.CDouble(0.0), t.CDouble(2.0), t.CDouble(0.0)) - zb: numpy.ndarray | t.CPtr = vec3(pool, t.CDouble(6.0), t.CDouble(4.0), t.CDouble(8.0)) - r_divz: numpy.ndarray | t.CPtr = za / zb - check("0/6==0", r_divz.data[0] == t.CDouble(0.0), "mismatch") - check("2/4==0.5", r_divz.data[1] == t.CDouble(0.5), "mismatch") - za.delete() - zb.delete() - r_divz.delete() - - # large array (non-aligned, non-SIMD-block) - big: numpy.ndarray | t.CPtr = numpy.zeros(pool, 1000) - check("zeros(1000) not None", big != None, "returned None") - check("zeros(1000) size==1000", big.size == 1000, "size mismatch") - big.delete() - - section_footer() - - -# ============================================================ -# 16. Performance benchmark -# ============================================================ -def bench_numpy_perf(): - section_header("Benchmark: numpy ops") - - N: t.CSizeT = 10000 - ITERS: t.CInt = 5 - - a: numpy.ndarray | t.CPtr = numpy.zeros(pool, N) - b: numpy.ndarray | t.CPtr = numpy.zeros(pool, N) - i: t.CSizeT = 0 - while i < N: - a.data[i] = t.CDouble(1.0) - b.data[i] = t.CDouble(2.0) - i += 1 - - # add benchmark - t0: t.CDouble = c.Timer() - j: t.CInt = 0 - while j < ITERS: - r: numpy.ndarray | t.CPtr = a + b - r.delete() - j += 1 - t1: t.CDouble = c.Timer() - printf(" ADD: %.1f ms\n", (t1 - t0) * t.CDouble(1000.0)) - - # mul benchmark - t0 = c.Timer() - j = 0 - while j < ITERS: - r2: numpy.ndarray | t.CPtr = a * b - r2.delete() - j += 1 - t1 = c.Timer() - printf(" MUL: %.1f ms\n", (t1 - t0) * t.CDouble(1000.0)) - - # sqrt benchmark - t0 = c.Timer() - j = 0 - while j < ITERS: - r3: numpy.ndarray | t.CPtr = numpy.np_sqrt(a) - r3.delete() - j += 1 - t1 = c.Timer() - printf(" SQRT: %.1f ms\n", (t1 - t0) * t.CDouble(1000.0)) - - a.delete() - b.delete() - section_footer() - - -# ============================================================ -# Entry points -# ============================================================ -def test_numpy_correct() -> t.CInt: - global arena, pool, test_passed, test_failed - - arena = calloc(2 * 1024 * 1024, 1) - pool = memhub.MemPool(arena, 2 * 1024 * 1024) - - test_passed = 0 - test_failed = 0 - - printf("==============================================\n") - printf(" numpy Correctness Tests\n") - printf("==============================================\n") - - test_zeros_ones() - test_arange_linspace() - test_eye_diag() - test_sum_mean_min_max() - test_fill_copy() - test_add_sub_mul_div() - test_neg() - test_len() - test_scalar_ops() - test_math_funcs() - test_matmul() - test_dot() - test_transpose() - test_var_std_norm() - test_clip_concatenate() - test_sort_reverse() - test_print_arr() - test_floordiv_mod() - test_additional_math() - test_trig_hyperbolic() - test_degrees_radians() - test_cumsum_diff() - test_max_min_where() - test_flatten_trace() - test_outer() - test_bool_comparison() - test_linalg() - test_additional_creation() - test_interp() - - printf("\n==============================================\n") - printf(" Correctness: %d passed, %d failed\n", test_passed, test_failed) - printf("==============================================\n") - - return test_failed - - -def test_numpy_edge_main() -> t.CInt: - global arena, pool, test_passed, test_failed - - arena = calloc(2 * 1024 * 1024, 1) - pool = memhub.MemPool(arena, 2 * 1024 * 1024) - - test_passed = 0 - test_failed = 0 - - printf("==============================================\n") - printf(" numpy Edge / Boundary Tests\n") - printf("==============================================\n") - - test_numpy_edge() - - printf("\n==============================================\n") - printf(" Edge: %d passed, %d failed\n", test_passed, test_failed) - printf("==============================================\n") - - return test_failed - - -def bench_numpy_main() -> t.CInt: - global arena, pool - - arena = calloc(8 * 1024 * 1024, 1) - pool = memhub.MemPool(arena, 8 * 1024 * 1024) - - printf("==============================================\n") - printf(" numpy Performance Benchmark\n") - printf("==============================================\n") - - bench_numpy_perf() - - printf("==============================================\n") - return 0 - - -# Backward-compatible entry -def test_numpy_main() -> t.CInt: - global arena, pool - - arena = calloc(2 * 1024 * 1024, 1) - pool = memhub.MemPool(arena, 2 * 1024 * 1024) - - failed: t.CInt = test_numpy_correct() - if failed == 0: - failed = test_numpy_edge_main() - if failed == 0: - bench_numpy_main() - return failed diff --git a/Test/TestProject/App/test_zlib.vp b/Test/TestProject/App/test_zlib.vp deleted file mode 100644 index 7833ffe..0000000 --- a/Test/TestProject/App/test_zlib.vp +++ /dev/null @@ -1,883 +0,0 @@ -from stdint import * -import zlib.pyzlib as pyzlib -import zlib.zhuff as zhuff -import zlib.zdef as zdef -from stdio import printf -from string import strlen, memcmp, memcpy, memset -from stdlib import malloc, free, realloc -import stdlib -import string -import memhub -import t, c - -pool: t.CPtr = None - -test_passed: t.CInt = 0 -test_failed: t.CInt = 0 -def check(name: str, condition: t.CInt, detail: str): - global test_passed, test_failed - if condition: - test_passed += 1 - printf(" [PASS] %s\n", name) - else: - test_failed += 1 - printf(" [FAIL] %s -- %s\n", name, detail if detail else "") - -def print_hex_test(data: BYTEPTR, length: t.CSizeT, max_show: t.CSizeT): - if not data or length == 0: - printf("(empty)\n") - return - show: t.CSizeT = max_show if (length > max_show) else length - i: t.CSizeT - for i in range(show): - printf("%02X ", data[i]) - if length > max_show: - printf("... (%zu bytes total)", length) - printf("\n") - -def print_separator(): - printf(" -------------------------------------------\n") - -def section_header(title: str): - printf("\n+-- %s --+\n", title) - -def section_footer(): - printf("+--------------------------------------------+\n") - -# ============================================================ - -def test_version(): - section_header("Version Info") - - ver: str = pyzlib.ZLIB_VERSION - printf(" ZLIB_VERSION (compile-time) : %s\n", ver) - check("ZLIB_VERSION not None", ver != None, "version string is None") - check("ZLIB_VERSION not empty", strlen(ver) > 0, "version string is empty") - - runtime_ver: str = pyzlib.runtime_version() - printf(" ZLIB_RUNTIME_VERSION : %s\n", runtime_ver) - check("runtime version not None", runtime_ver != None, "runtime version is None") - check("runtime version not empty", strlen(runtime_ver) > 0, "runtime version is empty") - - section_footer() - - -def test_compress_decompress(): - section_header("compress / decompress") - - inp: str = "Hello, World! This is a test of zlib compression and decompression." - input_length: t.CSizeT = strlen(inp) - printf(" Input (%zu bytes): \"%s\"\n", input_length, inp) - - out_length: t.CSizeT = 0 - compressed: BYTEPTR = pyzlib.compress(pool, BYTEPTR(inp), input_length, - pyzlib.Z_DEFAULT_COMPRESSION, pyzlib.MAX_WBITS, c.Addr(out_length)) - check("compress returns non-None", compressed != None, "compress returned None") - check("compress output size > 0", out_length > 0, "compressed size is 0") - check("compress output produced", out_length > 0, "compressed size is 0") - - printf(" Compressed (%zu bytes): ", out_length) - print_hex_test(compressed, out_length, 32) - printf(" Compression ratio: %.1f%%\n", t.CDouble(out_length) / input_length * 100) - - dec_length: t.CSizeT = 0 - decompressed: BYTEPTR = pyzlib.decompress(pool, compressed, out_length, - pyzlib.MAX_WBITS, pyzlib.DEF_BUF_SIZE, c.Addr(dec_length)) - check("decompress returns non-None", decompressed != None, "decompress returned None") - check("decompress output size matches input", dec_length == input_length, "size mismatch") - check("decompress output matches input", decompressed != None and memcmp(decompressed, inp, input_length) == 0, "content mismatch") - - printf(" Decompressed (%zu bytes): \"%.*s\"\n", dec_length, t.CInt(dec_length), str(decompressed)) - - free(compressed) - free(decompressed) - section_footer() - - -def test_compress_levels(): - section_header("Compression Levels") - - inp: str = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - input_length: t.CSizeT = strlen(inp) - printf(" Input (%zu bytes): \"%s\"\n", input_length, inp) - - out_length: t.CSizeT = 0 - - c0: BYTEPTR = pyzlib.compress(pool, BYTEPTR(inp), input_length, - pyzlib.Z_NO_COMPRESSION, pyzlib.MAX_WBITS, c.Addr(out_length)) - check("level 0 compress OK", c0 != None, "level 0 returned None") - printf(" Level 0 (Z_NO_COMPRESSION): %zu bytes\n", out_length) - length0: t.CSizeT = out_length - free(c0) - - c1: BYTEPTR = pyzlib.compress(pool, BYTEPTR(inp), input_length, - pyzlib.Z_BEST_SPEED, pyzlib.MAX_WBITS, c.Addr(out_length)) - check("level 1 compress OK", c1 != None, "level 1 returned None") - printf(" Level 1 (Z_BEST_SPEED) : %zu bytes\n", out_length) - free(c1) - - c6: BYTEPTR = pyzlib.compress(pool, BYTEPTR(inp), input_length, - pyzlib.Z_DEFAULT_COMPRESSION, pyzlib.MAX_WBITS, c.Addr(out_length)) - check("level -1 compress OK", c6 != None, "default level returned None") - printf(" Level -1 (DEFAULT) : %zu bytes\n", out_length) - free(c6) - - c9: BYTEPTR = pyzlib.compress(pool, BYTEPTR(inp), input_length, - pyzlib.Z_BEST_COMPRESSION, pyzlib.MAX_WBITS, c.Addr(out_length)) - check("level 9 compress OK", c9 != None, "level 9 returned None") - printf(" Level 9 (Z_BEST_COMPRESS) : %zu bytes\n", out_length) - length9: t.CSizeT = out_length - free(c9) - - check("level 9 smaller than level 0", length9 < length0, "level 9 not smaller than level 0") - - section_footer() - - -def test_compressobj(): - section_header("compressobj (incremental)") - - part1: str = "Hello, " - part2: str = "World!" - printf(" Part 1: \"%s\"\n", part1) - printf(" Part 2: \"%s\"\n", part2) - - out_length: t.CSizeT = 0 - - s: pyzlib.Compress | t.CPtr = pyzlib.compressobj(pool, pyzlib.Z_DEFAULT_COMPRESSION, pyzlib.DEFLATED, - pyzlib.MAX_WBITS, pyzlib.DEF_MEM_LEVEL, - pyzlib.Z_DEFAULT_STRATEGY, None, 0) - check("compressobj created", s != None, "compressobj is None") - print_separator() - - c1: BYTEPTR = s.compress(BYTEPTR(part1), strlen(part1), c.Addr(out_length)) - check("compress part1 OK", c1 != None, "compress part1 failed") - printf(" Compressed part1: %zu bytes -> ", out_length) - print_hex_test(c1, out_length, 16) - total: t.CSizeT = out_length - all: BYTEPTR = None - if out_length > 0 and c1: - all = BYTEPTR(malloc(total)) - if all: memcpy(all, c1, out_length) - free(c1) - - c2: BYTEPTR = s.compress(BYTEPTR(part2), - strlen(part2), c.Addr(out_length)) - check("compress part2 OK", c2 != None, "compress part2 failed") - printf(" Compressed part2: %zu bytes -> ", out_length) - print_hex_test(c2, out_length, 16) - if out_length > 0 and c2: - new_all: BYTEPTR = BYTEPTR(realloc(all, total + out_length)) - if new_all: - all = new_all - memcpy(all + total, c2, out_length) - total += out_length - free(c2) - - c3: BYTEPTR = s.flush(pyzlib.Z_FINISH, c.Addr(out_length)) - check("flush (Z_FINISH) OK", c3 != None, "flush failed") - printf(" Flush result : %zu bytes -> ", out_length) - print_hex_test(c3, out_length, 16) - if out_length > 0 and c3: - new_all: BYTEPTR = realloc(all, total + out_length) # 隐式转换 - if new_all: - all = new_all - memcpy(all + total, c3, out_length) - total += out_length - free(c3) - - print_separator() - - if all: - dec_length: t.CSizeT = 0 - dec: BYTEPTR = pyzlib.decompress(pool, all, total, pyzlib.MAX_WBITS, pyzlib.DEF_BUF_SIZE, c.Addr(dec_length)) - check("decompress incremental OK", dec != None, "decompress returned None") - check("decompress incremental size", dec != None and dec_length == strlen(part1) + strlen(part2), "size mismatch") - check("decompress incremental content", - dec != None and memcmp(dec, "Hello, World!", dec_length) == 0, "content mismatch") - if dec: - printf(" Decompressed: \"%.*s\" (%zu bytes)\n", t.CInt(dec_length), str(dec), dec_length) - free(dec) - free(all) - - s.delete() # del s - section_footer() - -def test_decompressobj(): - section_header("decompressobj") - - inp: str = "Test data for decompress object." - input_length: t.CSizeT = strlen(inp) - printf(" Input (%zu bytes): \"%s\"\n", input_length, inp) - - out_length: t.CSizeT = 0 - compressed: BYTEPTR = pyzlib.compress(pool, BYTEPTR(inp), input_length, - pyzlib.Z_DEFAULT_COMPRESSION, pyzlib.MAX_WBITS, c.Addr(out_length)) - printf(" Compressed: %zu bytes\n", out_length) - - d: pyzlib.Decompress | t.CPtr = pyzlib.decompressobj(pool, pyzlib.MAX_WBITS, None, 0) - check("decompressobj created", d != None, "decompressobj is None") - check("eof is false initially", d.eof == 0, "eof should be 0") - print_separator() - - dec_length: t.CSizeT = 0 - dec: BYTEPTR = d.decompress(compressed, out_length, - 0, c.Addr(dec_length)) - check("decompress OK", dec != None, "decompress returned None") - check("decompress size", dec != None and dec_length == input_length, "size mismatch") - check("decompress content", dec != None and memcmp(dec, inp, input_length) == 0, "content mismatch") - check("eof is true after stream end", d.eof == 1, "eof should be 1") - - if dec: - printf(" Decompressed (%zu bytes): \"%.*s\"\n", dec_length, t.CInt(dec_length), str(dec)) - printf(" eof = %d\n", d.eof) - - free(dec) - free(compressed) - d.delete() - section_footer() - -def test_decompressobj_max_lengthgth(): - section_header("decompressobj max_lengthgth") - - inp: str = "This is a longer string for testing max_lengthgth parameter in decompress." - input_length: t.CSizeT = strlen(inp) - printf(" Input (%zu bytes): \"%s\"\n", input_length, inp) - - out_length: t.CSizeT = 0 - compressed: BYTEPTR = pyzlib.compress(pool, BYTEPTR(inp), input_length, - pyzlib.Z_DEFAULT_COMPRESSION, pyzlib.MAX_WBITS, c.Addr(out_length)) - printf(" Compressed: %zu bytes\n", out_length) - - d: pyzlib.Decompress | t.CPtr = pyzlib.decompressobj(pool, pyzlib.MAX_WBITS, None, 0) - - dec_length: t.CSizeT = 0 - dec: BYTEPTR = d.decompress(compressed, out_length, - 10, c.Addr(dec_length)) - check("max_lengthgth decompress OK", dec != None, "decompress returned None") - check("max_lengthgth limits output", dec_length <= 10, "output exceeded max_lengthgth") - if dec: - printf(" First chunk (max_lengthgth=10): \"%.*s\" (%zu bytes)\n", t.CInt(dec_length), str(dec), dec_length) - free(dec) - - tail_length: t.CSizeT = 0 - tail: BYTEPTR = d.unconsumed_tail(c.Addr(tail_length)) - check("unconsumed_tail exists", tail != None or tail_length == 0, "no unconsumed_tail") - printf(" unconsumed_tail: %zu bytes remaining\n", tail_length) - printf(" eof = %d\n", d.eof) - - if tail_length > 0 or not d.eof: - flushed: BYTEPTR = d.flush(pyzlib.DEF_BUF_SIZE, c.Addr(dec_length)) - check("flush after max_lengthgth OK", flushed != None, "flush returned None") - if flushed: printf(" Flushed (%zu bytes): \"%.*s\"\n", dec_length, t.CInt(dec_length), str(flushed)) - free(flushed) - - printf(" eof after flush = %d\n", d.eof) - - d.delete() - free(compressed) - section_footer() - - -def test_decompressobj_unused_data(): - section_header("decompressobj unused_data") - - inp: str = "Hello" - input_length: t.CSizeT = strlen(inp) - printf(" Input: \"%s\"\n", inp) - - out_length: t.CSizeT = 0 - compressed: BYTEPTR = pyzlib.compress(pool, BYTEPTR(inp), input_length, - pyzlib.Z_DEFAULT_COMPRESSION, pyzlib.MAX_WBITS, c.Addr(out_length)) - printf(" Compressed: %zu bytes\n", out_length) - - total_length: t.CSizeT = out_length + 5 - combined: BYTEPTR = BYTEPTR(malloc(total_length)) - memcpy(combined, compressed, out_length) - memcpy(combined + out_length, "EXTRA", 5) - free(compressed) - printf(" Combined (compressed + \"EXTRA\"): %zu bytes\n", total_length) - - d: pyzlib.Decompress | t.CPtr = pyzlib.decompressobj(pool, pyzlib.MAX_WBITS, None, 0) - - dec_length: t.CSizeT = 0 - dec: BYTEPTR = d.decompress(combined, total_length, - 0, c.Addr(dec_length)) - check("decompress with extra OK", dec != None, "decompress returned None") - check("eof after stream end", d.eof == 1, "eof should be 1") - if dec: - printf(" Decompressed: \"%.*s\" (%zu bytes)\n", t.CInt(dec_length), str(dec), dec_length) - free(dec) - - print_separator() - - unused_length: t.CSizeT = 0 - unused: BYTEPTR = d.unused_data(c.Addr(unused_length)) - check("unused_data exists", unused != None and unused_length > 0, "no unused_data") - check("unused_data is EXTRA", unused_length == 5 and unused != None and memcmp(unused, "EXTRA", 5) == 0, "unused_data mismatch") - printf(" unused_data (%zu bytes): \"%.*s\"\n", unused_length, t.CInt(unused_length), str(unused)) - - d.delete() - free(combined) - section_footer() - - -def test_compress_copy(): - section_header("Compress.copy()") - - inp: str = "Copy test data for compress object" - input_length: t.CSizeT = strlen(inp) - printf(" Input: \"%s\"\n", inp) - - out_length: t.CSizeT = 0 - c1: pyzlib.Compress | t.CPtr = pyzlib.compressobj(pool, pyzlib.Z_DEFAULT_COMPRESSION, pyzlib.DEFLATED, - pyzlib.MAX_WBITS, pyzlib.DEF_MEM_LEVEL, - pyzlib.Z_DEFAULT_STRATEGY, None, 0) - c1.compress(BYTEPTR(inp), input_length, c.Addr(out_length)) - printf(" Original: compressed %zu bytes so far\n", out_length) - - c2: pyzlib.Compress | t.CPtr = c1.copy() - check("compress copy OK", c2 != None, "copy returned None") - printf(" Copied compressobj\n") - - print_separator() - - f1: BYTEPTR = c1.flush(pyzlib.Z_FINISH, c.Addr(out_length)) - check("flush original OK", f1 != None, "flush original failed") - length1: t.CSizeT = out_length - printf(" Original flush: %zu bytes\n", length1) - free(f1) - - f2: BYTEPTR = c2.flush(pyzlib.Z_FINISH, c.Addr(out_length)) - check("flush copy OK", f2 != None, "flush copy failed") - length2: t.CSizeT = out_length - printf(" Copy flush : %zu bytes\n", length2) - free(f2) - - check("copy produces same output", length1 == length2, "output lengthgths differ") - - c1.delete() - c2.delete() - section_footer() - - -def test_decompress_copy(): - section_header("Decompress.copy()") - - inp: str = "Decompress copy test" - input_length: t.CSizeT = strlen(inp) - printf(" Input: \"%s\"\n", inp) - - out_length: t.CSizeT = 0 - compressed: BYTEPTR = pyzlib.compress(pool, BYTEPTR(inp), input_length, - pyzlib.Z_DEFAULT_COMPRESSION, pyzlib.MAX_WBITS, c.Addr(out_length)) - printf(" Compressed: %zu bytes\n", out_length) - - d1: pyzlib.Decompress | t.CPtr = pyzlib.decompressobj(pool, pyzlib.MAX_WBITS, None, 0) - d2: pyzlib.Decompress | t.CPtr = d1.copy() - check("decompress copy OK", d2 != None, "copy returned None") - printf(" Copied decompressobj\n") - - print_separator() - - dec_length1: t.CSizeT = 0 - dec_length2: t.CSizeT = 0 - dec1: BYTEPTR = d1.decompress(compressed, out_length, - 0, c.Addr(dec_length1)) - dec2: BYTEPTR = d2.decompress(compressed, out_length, - 0, c.Addr(dec_length2)) - check("decompress copy output size", dec_length1 == dec_length2, "sizes differ") - check("decompress copy output content", - dec1 and dec2 and memcmp(dec1, dec2, dec_length1) == 0, "content differs") - - if dec1: printf(" Original: \"%.*s\" (%zu bytes)\n", t.CInt(dec_length1), str(dec1), dec_length1) - if dec2: printf(" Copy : \"%.*s\" (%zu bytes)\n", t.CInt(dec_length2), str(dec2), dec_length2) - - free(dec1) - free(dec2) - free(compressed) - d1.delete() - d2.delete() - section_footer() - - -def test_adler32(): - section_header("adler32 checksum") - - checksum: ULONG = pyzlib.zlib_adler32(BYTEPTR("Hello"), 5, 1) - printf(" adler32(\"Hello\") = 0x%08lX (%lu)\n", checksum, checksum) - check("adler32 returns non-zero", checksum != 0, "checksum is 0") - - incremental: ULONG = pyzlib.zlib_adler32(BYTEPTR("Hel"), 3, 1) - printf(" adler32(\"Hel\") = 0x%08lX\n", incremental) - incremental = pyzlib.zlib_adler32(BYTEPTR("lo"), 2, incremental) - printf(" adler32(\"lo\", prev) = 0x%08lX\n", incremental) - check("adler32 incremental matches one-shot", incremental == checksum, "incremental != one-shot") - printf(" Incremental == One-shot: %s\n", incremental == checksum if checksum else "NO") - - section_footer() - - -def test_crc32(): - section_header("crc32 checksum") - - checksum: ULONG = pyzlib.zlib_crc32(BYTEPTR("Hello"), 5, 0) - printf(" crc32(\"Hello\") = 0x%08lX (%lu)\n", checksum, checksum) - check("crc32 returns non-zero", checksum != 0, "checksum is 0") - - incremental: ULONG = pyzlib.zlib_crc32(BYTEPTR("Hel"), 3, 0) - printf(" crc32(\"Hel\") = 0x%08lX\n", incremental) - incremental = pyzlib.zlib_crc32(BYTEPTR("lo"), 2, incremental) - printf(" crc32(\"lo\", prev) = 0x%08lX\n", incremental) - check("crc32 incremental matches one-shot", incremental == checksum, "incremental != one-shot") - printf(" Incremental == One-shot: %s\n", incremental == checksum if checksum else "NO") - - section_footer() - - -def test_empty_compress(): - section_header("Empty data compress/decompress") - - out_length: t.CSizeT = 0 - compressed: BYTEPTR = pyzlib.compress(pool, BYTEPTR(""), 0, - pyzlib.Z_DEFAULT_COMPRESSION, pyzlib.MAX_WBITS, c.Addr(out_length)) - check("compress empty OK", compressed != None, "compress empty returned None") - check("compress empty output > 0", out_length > 0, "compressed empty is 0 bytes") - printf(" Empty input compressed: %zu bytes (header only)\n", out_length) - printf(" Hex: ") - print_hex_test(compressed, out_length, 32) - - dec_length: t.CSizeT = 0 - decompressed: BYTEPTR = pyzlib.decompress(pool, compressed, out_length, - pyzlib.MAX_WBITS, pyzlib.DEF_BUF_SIZE, c.Addr(dec_length)) - check("decompress empty OK", decompressed != None, "decompress empty returned None") - check("decompress empty size == 0", dec_length == 0, "decompressed size != 0") - printf(" Decompressed back: %zu bytes\n", dec_length) - - free(compressed) - free(decompressed) - section_footer() - - -def test_gzip_format(): - section_header("Gzip format (wbits=31)") - - inp: str = "Gzip format test" - input_length: t.CSizeT = strlen(inp) - printf(" Input: \"%s\" (%zu bytes)\n", inp, input_length) - - gzip_wbits: t.CInt = pyzlib.MAX_WBITS + 16 - printf(" wbits = MAX_WBITS + 16 = %d\n", gzip_wbits) - - out_length: t.CSizeT = 0 - compressed: BYTEPTR = pyzlib.compress(pool, BYTEPTR(inp), input_length, - pyzlib.Z_DEFAULT_COMPRESSION, gzip_wbits, c.Addr(out_length)) - check("gzip compress OK", compressed != None, "gzip compress failed") - printf(" Gzip compressed: %zu bytes\n", out_length) - printf(" Header bytes: ") - print_hex_test(compressed, 4 if (out_length > 4) else out_length, 4) - - dec_length: t.CSizeT = 0 - decompressed: BYTEPTR = pyzlib.decompress(pool, compressed, out_length, - gzip_wbits, pyzlib.DEF_BUF_SIZE, c.Addr(dec_length)) - check("gzip decompress OK", decompressed != None, "gzip decompress failed") - check("gzip decompress size", dec_length == input_length, "size mismatch") - check("gzip decompress content", decompressed != None and memcmp(decompressed, inp, input_length) == 0, "content mismatch") - if decompressed: printf(" Decompressed: \"%.*s\" (%zu bytes)\n", t.CInt(dec_length), str(decompressed), dec_length) - - free(compressed) - free(decompressed) - section_footer() - - -def test_raw_deflate(): - section_header("Raw deflate (wbits=-15)") - - inp: str = "Raw deflate test" - input_length: t.CSizeT = strlen(inp) - printf(" Input: \"%s\" (%zu bytes)\n", inp, input_length) - - raw_wbits: t.CInt = -pyzlib.MAX_WBITS - printf(" wbits = -MAX_WBITS = %d\n", raw_wbits) - - out_length: t.CSizeT = 0 - compressed: BYTEPTR = pyzlib.compress(pool, BYTEPTR(inp), input_length, - pyzlib.Z_DEFAULT_COMPRESSION, raw_wbits, c.Addr(out_length)) - check("raw deflate compress OK", compressed != None, "raw deflate compress failed") - printf(" Raw compressed: %zu bytes\n", out_length) - - dec_length: t.CSizeT = 0 - decompressed: BYTEPTR = pyzlib.decompress(pool, compressed, out_length, - raw_wbits, pyzlib.DEF_BUF_SIZE, c.Addr(dec_length)) - check("raw deflate decompress OK", decompressed != None, "raw deflate decompress failed") - check("raw deflate decompress size", dec_length == input_length, "size mismatch") - check("raw deflate decompress content", decompressed != None and memcmp(decompressed, inp, input_length) == 0, "content mismatch") - if decompressed: printf(" Decompressed: \"%.*s\" (%zu bytes)\n", t.CInt(dec_length), str(decompressed), dec_length) - - free(compressed) - free(decompressed) - section_footer() - - -def test_zdict(): - section_header("Preset dictionary (zdict)") - - dict: str = "common words that appear frequently in the data" - inp: str = "common words that appear frequently" - input_length: t.CSizeT = strlen(inp) - printf(" Dictionary: \"%s\" (%zu bytes)\n", dict, strlen(dict)) - printf(" Input : \"%s\" (%zu bytes)\n", inp, input_length) - - out_length: t.CSizeT = 0 - s: pyzlib.Compress | t.CPtr = pyzlib.compressobj(pool, pyzlib.Z_DEFAULT_COMPRESSION, pyzlib.DEFLATED, - pyzlib.MAX_WBITS, pyzlib.DEF_MEM_LEVEL, - pyzlib.Z_DEFAULT_STRATEGY, - BYTEPTR(dict), strlen(dict)) - check("compressobj with zdict OK", s != None, "compressobj with zdict failed") - - comp_data: BYTEPTR = s.compress(BYTEPTR(inp), - input_length, c.Addr(out_length)) - check("compress with zdict OK", comp_data != None, "compress with zdict failed") - printf(" Compressed with zdict: %zu bytes\n", out_length) - free(comp_data) - - flush_data: BYTEPTR = s.flush(pyzlib.Z_FINISH, c.Addr(out_length)) - check("flush with zdict OK", flush_data != None, "flush with zdict failed") - printf(" Flush: %zu bytes\n", out_length) - free(flush_data) - - print_separator() - - total_comp: t.CSizeT = out_length - s.delete() - - s = pyzlib.compressobj(pool, pyzlib.Z_DEFAULT_COMPRESSION, pyzlib.DEFLATED, - pyzlib.MAX_WBITS, pyzlib.DEF_MEM_LEVEL, - pyzlib.Z_DEFAULT_STRATEGY, None, 0) - comp_no_dict: BYTEPTR = s.compress(BYTEPTR(inp), - input_length, c.Addr(out_length)) - flush_no_dict: BYTEPTR = s.flush(pyzlib.Z_FINISH, c.Addr(out_length)) - no_dict_total: t.CSizeT = 0 - if comp_no_dict: no_dict_total += out_length - if flush_no_dict: no_dict_total += out_length - printf(" Without zdict: ~%zu bytes compressed\n", no_dict_total) - printf(" With zdict : %zu bytes compressed\n", total_comp) - free(comp_no_dict) - free(flush_no_dict) - s.delete() - - section_footer() - - -def test_huffman_tree(): - section_header("Huffman tree construction") - - printf(" --- Fixed Huffman tree (literal/lengthgth) ---\n") - lit_tree = zhuff.zhuff_tree() - lit_tree.build_fixed_lit_tree() - - check("fixed lit tree count == 288", lit_tree.count == 288, "count mismatch") - check("fixed lit tree max_bits == 9", lit_tree.max_bits == 9, "max_bits mismatch") - - has_8bit: t.CInt = 0 - has_9bit: t.CInt = 0 - has_7bit: t.CInt = 0 - for i in range(143 + 1): - if lit_tree.codes[i].bits == 8: - has_8bit += 1 - for i in range(143 + 1, 255 + 1): - if lit_tree.codes[i].bits == 9: - has_9bit += 1 - for i in range(255 + 1, 279 + 1): - if lit_tree.codes[i].bits == 7: - has_7bit += 1 - check("0-143 are 8-bit", has_8bit == 144, "wrong count") - check("144-255 are 9-bit", has_9bit == 112, "wrong count") - check("256-279 are 7-bit", has_7bit == 24, "wrong count") - - printf(" 0-143: %d codes with 8 bits\n", has_8bit) - printf(" 144-255: %d codes with 9 bits\n", has_9bit) - printf(" 256-279: %d codes with 7 bits\n", has_7bit) - printf(" 280-287: 8-bit (end-of-block 256 = 7-bit)\n") - printf(" EOB (256): code=0x%X, bits=%d\n", lit_tree.codes[256].code, lit_tree.codes[256].bits) - - printf("\n --- Fixed Huffman tree (distance) ---\n") - dist_tree = zhuff.zhuff_tree() - dist_tree.build_fixed_dist_tree() - - check("fixed dist tree count == 32", dist_tree.count == 32, "count mismatch") - check("fixed dist tree max_bits == 5", dist_tree.max_bits == 5, "max_bits mismatch") - - all_5bit: t.CInt = 1 - for i in range(32): - if dist_tree.codes[i].bits != 5: - all_5bit = 0 - check("all 32 distance codes are 5-bit", all_5bit, "not all 5-bit") - printf(" All 32 distance codes: 5 bits each\n") - - printf("\n --- Dynamic Huffman tree from frequencies ---\n") - freqs: t.CArray[t.CInt, 257] - memset(freqs, 0, freqs.__sizeof__()) - freqs['A'] = 50 - freqs['B'] = 25 - freqs['C'] = 12 - freqs['D'] = 6 - freqs['E'] = 3 - freqs['F'] = 1 - freqs[256] = 1 - - dyn_tree = zhuff.zhuff_tree() - dyn_tree.build_codes(freqs, 257, 15) - - check("dynamic tree count == 257", dyn_tree.count == 257, "count mismatch") - check("dynamic tree max_bits <= 15", dyn_tree.max_bits <= 15, "max_bits overflow") - - total_codes: t.CInt = 0 - max_length_found: t.CInt = 0 - for i in range(257): - if dyn_tree.codes[i].bits > 0: - total_codes += 1 - if dyn_tree.codes[i].bits > max_length_found: - max_length_found = dyn_tree.codes[i].bits - check("dynamic tree has 7 active codes", total_codes == 7, "wrong active count") - check("dynamic tree max code lengthgth found <= 15", max_length_found <= 15, "code lengthgth overflow") - - printf(" Frequencies: A=50, B=25, C=12, D=6, E=3, F=1, EOB=1\n") - printf(" Active codes: %d, max code lengthgth: %d\n", total_codes, max_length_found) - - printf(" Code assignments:\n") - names: t.CArray[str, None] = ["A","B","C","D","E","F"] # 一个都是char* 的数组 - syms: t.CArray[t.CInt, None] = ['A','B','C','D','E','F'] - for i in range(6): - printf(" '%s' (freq=%3d): code=0x%04X, bits=%d\n", - names[i], freqs[syms[i]], - dyn_tree.codes[syms[i]].code, - dyn_tree.codes[syms[i]].bits) - - - - printf(" EOB (freq=1): code=0x%04X, bits=%d\n", - dyn_tree.codes[256].code, dyn_tree.codes[256].bits) - a_bits: t.CInt = dyn_tree.codes['A'].bits - f_bits: t.CInt = dyn_tree.codes['F'].bits - check("high-freq symbol has shorter code", a_bits <= f_bits, "A should be <= F") - printf(" High-freq 'A' (%d bits) <= low-freq 'F' (%d bits): %s\n", - a_bits, f_bits, "YES" if (a_bits <= f_bits) else "NO") - - printf("\n --- Huffman encode/decode roundtrip ---\n") - freqs: t.CArray[t.CInt, 288] - memset(freqs, 0, freqs.__sizeof__()) - freqs['H'] = 10 - freqs['e'] = 8 - freqs['l'] = 20 - freqs['o'] = 8 - freqs[' '] = 5 - freqs['W'] = 3 - freqs['r'] = 5 - freqs['d'] = 3 - freqs['!'] = 2 - freqs[256] = 1 - - enc_tree = zhuff.zhuff_tree() - enc_tree.build_codes(freqs, 257, 15) - - dec_tree = zhuff.zhuff_decode_tree() - dec_tree.build_decode_tree(c.Addr(enc_tree)) - - writer = zdef.zbit_writer() - - symbols: t.CArray[t.CInt, 16] - symbols[0] = 'H'; symbols[1] = 'e'; symbols[2] = 'l'; symbols[3] = 'l' - symbols[4] = 'o'; symbols[5] = ' '; symbols[6] = 'W'; symbols[7] = 'o' - symbols[8] = 'r'; symbols[9] = 'l'; symbols[10] = 'd'; symbols[11] = '!' - symbols[12] = 256 - num_symbols: t.CInt = 13 - - for i in range(num_symbols): - enc_tree.encode_symbol(symbols[i], c.Addr(writer)) - - reader = zdef.zbit_reader() - reader.buf = writer.buf - reader.length = writer.byte_pos + (1 if (writer.bit_pos > 0) else 0) - reader.byte_pos = 0 - reader.bit_pos = 0 - - roundtrip_ok: t.CInt = 1 - for i in range(num_symbols): - decoded: t.CInt = dec_tree.decode_symbol(c.Addr(reader)) - if decoded != symbols[i]: - roundtrip_ok = 0 - printf(" MISMATCH at symbol %d: expected %d, got %d\n", i, symbols[i], decoded) - break - check("encode/decode roundtrip matches", roundtrip_ok, "roundtrip failed") - printf(" Encoded %d symbols into %zu bytes, decoded all correctly\n", - num_symbols, writer.byte_pos + (1 if (writer.bit_pos > 0) else 0)) - - free(writer.buf) - - printf("\n --- Overflow handling (many symbols, limited max_bits) ---\n") - freqs: t.CArray[t.CInt, 257] - for i in range(256): - freqs[i] = 1 - freqs[256] = 1 - - tree = zhuff.zhuff_tree() - tree.build_codes(freqs, 257, 15) - - overflow_ok: t.CInt = 1 - for i in range(257): - if tree.codes[i].bits > 15 or tree.codes[i].bits < 0: - overflow_ok = 0 - break - check("all code lengthgths <= 15 with 257 symbols", overflow_ok, "code lengthgth overflow") - - bl_count: t.CArray[t.CInt, 16] = [0] - for i in range(257): - if tree.codes[i].bits > 0: - bl_count[tree.codes[i].bits] += 1 - printf(" Code lengthgth distribution (257 equal-freq symbols, max_bits=15):\n") - for i in range(1, 15 + 1): - if bl_count[i] > 0: - printf(" %2d bits: %3d codes\n", i, bl_count[i]) - - dt = zhuff.zhuff_decode_tree() - dt.build_decode_tree(c.Addr(tree)) - - w = zdef.zbit_writer() - tree.encode_symbol(0, c.Addr(w)) - tree.encode_symbol(128, c.Addr(w)) - tree.encode_symbol(255, c.Addr(w)) - tree.encode_symbol(256, c.Addr(w)) - - r = zdef.zbit_reader() - r.buf = w.buf - r.length = w.byte_pos + (1 if (w.bit_pos > 0) else 0) - r.byte_pos = 0 - r.bit_pos = 0 - - s0: t.CInt = dt.decode_symbol(c.Addr(r)) - s1: t.CInt = dt.decode_symbol(c.Addr(r)) - s2: t.CInt = dt.decode_symbol(c.Addr(r)) - s3: t.CInt = dt.decode_symbol(c.Addr(r)) - - check("overflow roundtrip: symbol 0", s0 == 0, "decode mismatch") - check("overflow roundtrip: symbol 128", s1 == 128, "decode mismatch") - check("overflow roundtrip: symbol 255", s2 == 255, "decode mismatch") - check("overflow roundtrip: symbol 256 (EOB)", s3 == 256, "decode mismatch") - - free(w.buf) - - - printf("\n --- Kraft inequality check ---\n") - freqs: t.CArray[t.CInt, 257] - memset(freqs, 0, freqs.__sizeof__()) - freqs['X'] = 100 - freqs['Y'] = 50 - freqs['Z'] = 25 - freqs[256] = 1 - - tree = zhuff.zhuff_tree() - tree.build_codes(freqs, 257, 15) - - kraft_sum: t.CDouble = 0.0 - for i in range(257): - if tree.codes[i].bits > 0: - kraft_sum += 1.0 / (t.CDouble(ULONGLONG(1) << tree.codes[i].bits)) - check("Kraft inequality: sum <= 1.0", kraft_sum <= 1.0 + 1e-9, "Kraft violated") - printf(" Kraft sum = %.10f (must be <= 1.0)\n", kraft_sum) - - section_footer() - - -def test_error_handling(): - section_header("Error handling") - - out_length: t.CSizeT = 0 - printf(" Trying to decompress garbage data...\n") - - result: BYTEPTR = pyzlib.decompress(pool, BYTEPTR("garbage"), 7, - pyzlib.MAX_WBITS, pyzlib.DEF_BUF_SIZE, c.Addr(out_length)) - check("decompress garbage returns None", result == None, "should have returned None") - printf(" Error code : %d\n", pyzlib.get_error_code()) - printf(" Error message: \"%s\"\n", pyzlib.get_error()) - check("error message set", strlen(pyzlib.get_error()) > 0, "error message is empty") - check("error code is set", pyzlib.get_error_code() != pyzlib.Z_OK, "error code is Z_OK") - - print_separator() - - pyzlib.clear_error() - check("clear error clears code", pyzlib.get_error_code() == 0, "error code not cleared") - printf(" After clear: code=%d, msg=\"%s\"\n", pyzlib.get_error_code(), pyzlib.get_error()) - - section_footer() - - -def test_constants(): - section_header("Constants") - printf(" Compression Levels:\n") - printf(" Z_NO_COMPRESSION = %d\n", pyzlib.Z_NO_COMPRESSION) - printf(" Z_BEST_SPEED = %d\n", pyzlib.Z_BEST_SPEED) - printf(" Z_BEST_COMPRESSION = %d\n", pyzlib.Z_BEST_COMPRESSION) - printf(" Z_DEFAULT_COMPRESSION = %d\n", pyzlib.Z_DEFAULT_COMPRESSION) - printf(" Methods:\n") - printf(" DEFLATED = %d\n", pyzlib.DEFLATED) - printf(" Flush Modes:\n") - printf(" Z_NO_FLUSH = %d\n", pyzlib.Z_NO_FLUSH) - printf(" Z_PARTIAL_FLUSH = %d\n", pyzlib.Z_PARTIAL_FLUSH) - printf(" Z_SYNC_FLUSH = %d\n", pyzlib.Z_SYNC_FLUSH) - printf(" Z_FULL_FLUSH = %d\n", pyzlib.Z_FULL_FLUSH) - printf(" Z_FINISH = %d\n", pyzlib.Z_FINISH) - printf(" Z_BLOCK = %d\n", pyzlib.Z_BLOCK) - printf(" Z_TREES = %d\n", pyzlib.Z_TREES) - printf(" Strategies:\n") - printf(" Z_DEFAULT_STRATEGY = %d\n", pyzlib.Z_DEFAULT_STRATEGY) - printf(" Z_FILTERED = %d\n", pyzlib.Z_FILTERED) - printf(" Z_HUFFMAN_ONLY = %d\n", pyzlib.Z_HUFFMAN_ONLY) - printf(" Z_RLE = %d\n", pyzlib.Z_RLE) - printf(" Z_FIXED = %d\n", pyzlib.Z_FIXED) - printf(" Return Codes:\n") - printf(" Z_OK = %d\n", pyzlib.Z_OK) - printf(" Z_STREAM_END = %d\n", pyzlib.Z_STREAM_END) - printf(" Z_NEED_DICT = %d\n", pyzlib.Z_NEED_DICT) - printf(" Z_ERRNO = %d\n", pyzlib.Z_ERRNO) - printf(" Z_STREAM_ERROR = %d\n", pyzlib.Z_STREAM_ERROR) - printf(" Z_DATA_ERROR = %d\n", pyzlib.Z_DATA_ERROR) - printf(" Z_MEM_ERROR = %d\n", pyzlib.Z_MEM_ERROR) - printf(" Z_BUF_ERROR = %d\n", pyzlib.Z_BUF_ERROR) - printf(" Z_VERSION_ERROR = %d\n", pyzlib.Z_VERSION_ERROR) - printf(" Window / Buffer:\n") - printf(" MAX_WBITS = %d\n", pyzlib.MAX_WBITS) - printf(" DEF_BUF_SIZE = %d\n", pyzlib.DEF_BUF_SIZE) - printf(" DEF_MEM_LEVEL = %d\n", pyzlib.DEF_MEM_LEVEL) - section_footer() - - -def main123456() -> t.CInt: - printf("==============================================\n") - printf(" Python zlib - C Implementation Tests\n") - printf("==============================================\n") - - test_constants() - test_version() - test_compress_decompress() - test_compress_levels() - test_compressobj() - test_decompressobj() - test_decompressobj_max_lengthgth() - test_decompressobj_unused_data() - test_compress_copy() - test_decompress_copy() - test_adler32() - test_crc32() - test_empty_compress() - test_gzip_format() - test_raw_deflate() - test_zdict() - test_huffman_tree() - test_error_handling() - - printf("\n==============================================\n") - printf(" Results: %d passed, %d failed\n", test_passed, test_failed) - printf("==============================================\n") - - return 1 if test_failed > 0 else 0 diff --git a/Test/TestProject/App/zc/class_test.vp b/Test/TestProject/App/zc/class_test.vp deleted file mode 100644 index 4594f8b..0000000 --- a/Test/TestProject/App/zc/class_test.vp +++ /dev/null @@ -1,245 +0,0 @@ -import stdio -import stdint -import t, c - - -class SimpleData(t.Object): - x: t.CInt - y: t.CInt - - -class Point3D(t.Object): - x: t.CFloat - y: t.CFloat - z: t.CFloat - - -class Student(t.Object): - name: t.CChar | t.CPtr - age: t.CInt - score: t.CInt - - def __init__(self, n: t.CChar | t.CPtr, a: t.CInt, s: t.CInt): - self.name = n - self.age = a - self.score = s - - def get_age(self) -> t.CInt: - return self.age - - def get_score(self) -> t.CInt: - return self.score - - -class Counter(t.Object): - value: t.CInt - - def __init__(self, initial: t.CInt): - self.value = initial - - def increment(self): - self.value += 1 - - def get_value(self) -> t.CInt: - return self.value - - -class StackObj(t.Object): - data: t.CInt - next_ptr: t.CVoid | t.CPtr - - -def TestBasicDataClass(): - stdio.printf("=== Test Basic Data Class ===\n") - p: SimpleData = SimpleData() - p.x = 10 - p.y = 20 - stdio.printf("SimpleData: x=%d, y=%d\n", p.x, p.y) - - -def TestPoint3DClass(): - stdio.printf("=== Test Point3D Class ===\n") - pt: Point3D = Point3D() - pt.x = 1.5 - pt.y = 2.5 - pt.z = 3.5 - stdio.printf("Point3D: x=%.1f, y=%.1f, z=%.1f\n", pt.x, pt.y, pt.z) - - -def TestStudentClass(): - stdio.printf("=== Test Student Class ===\n") - s: Student = Student("Alice", 20, 95) - stdio.printf("Student: name=%s, age=%d, score=%d\n", s.name, s.age, s.score) - stdio.printf(" get_age()=%d, get_score()=%d\n", s.get_age(), s.get_score()) - - -def TestCounterClass(): - stdio.printf("=== Test Counter Class ===\n") - cnt: Counter = Counter(0) - stdio.printf("Initial value: %d\n", cnt.get_value()) - cnt.increment() - cnt.increment() - cnt.increment() - stdio.printf("After 3 increments: %d\n", cnt.get_value()) - - -def TestStackAllocation(): - stdio.printf("=== Test Stack Allocation ===\n") - obj1: SimpleData = SimpleData() - obj1.x = 100 - obj1.y = 200 - stdio.printf("Stack obj1: x=%d, y=%d\n", obj1.x, obj1.y) - - obj2: Point3D = Point3D() - obj2.x = 10.0 - obj2.y = 20.0 - obj2.z = 30.0 - stdio.printf("Stack obj2: x=%.1f, y=%.1f, z=%.1f\n", obj2.x, obj2.y, obj2.z) - - -def TestHeapAllocation(): - stdio.printf("=== Test Heap Allocation ===\n") - ptr: t.CVoid | t.CPtr = c.malloc(1024) - if ptr != 0: - stdio.printf("Allocated 1024 bytes at %p\n", ptr) - c.free(ptr) - stdio.printf("Freed memory\n") - else: - stdio.printf("malloc failed\n") - - -def TestHeapObjectWithInit(): - stdio.printf("=== Test Heap Object with Init ===\n") - mem_size: t.CSizeT = 256 - ptr: t.CVoid | t.CPtr = c.malloc(mem_size) - if ptr != 0: - stdio.printf("Allocated %d bytes\n", mem_size) - c.free(ptr) - else: - stdio.printf("malloc failed\n") - - -def TestMultipleStackObjects(): - stdio.printf("=== Test Multiple Stack Objects ===\n") - objs: SimpleData = SimpleData() - objs.x = 1 - objs.y = 2 - obj2: Point3D = Point3D() - obj2.x = 5.0 - obj2.y = 10.0 - obj2.z = 15.0 - obj3: Counter = Counter(42) - stdio.printf("objs: x=%d, y=%d\n", objs.x, objs.y) - stdio.printf("obj2: x=%.1f, y=%.1f, z=%.1f\n", obj2.x, obj2.y, obj2.z) - stdio.printf("obj3 initial: %d\n", obj3.get_value()) - obj3.increment() - obj3.increment() - stdio.printf("obj3 after 2 increments: %d\n", obj3.get_value()) - - -def TestImplicitInitCall(): - stdio.printf("=== Test Implicit Init Call ===\n") - stu1: Student = Student("Bob", 22, 88) - stu2: Student = Student("Charlie", 19, 77) - stdio.printf("stu1: name=%s, age=%d, score=%d\n", stu1.name, stu1.age, stu1.score) - stdio.printf("stu2: name=%s, age=%d, score=%d\n", stu2.name, stu2.age, stu2.score) - - -def TestClassWithBitFields(): - stdio.printf("=== Test Class with Bit Fields ===\n") - flags: StackObj = StackObj() - flags.data = 0 - flags.next_ptr = 0 - stdio.printf("StackObj: data=%d, next_ptr=%p\n", flags.data, flags.next_ptr) - - -def TestIntArray(): - stdio.printf("=== Test Int Array ===\n") - arr: t.CArray[t.CInt, 5] = t.CArray[t.CInt, 5]() - i: t.CInt = 0 - while i < 5: - arr[i] = i * 10 - i += 1 - i = 0 - while i < 5: - stdio.printf("arr[%d]=%d\n", i, arr[i]) - i += 1 - - -def TestFloatArray(): - stdio.printf("=== Test Float Array ===\n") - farr: t.CArray[t.CFloat, 4] = t.CArray[t.CFloat, 4]() - farr[0] = 1.5 - farr[1] = 2.5 - farr[2] = 3.5 - farr[3] = 4.5 - i: t.CInt = 0 - while i < 4: - stdio.printf("farr[%d]=%.1f\n", i, farr[i]) - i += 1 - - -def TestCharArray(): - stdio.printf("=== Test Char Array (String) ===\n") - str_arr: t.CArray[t.CChar, 32] = t.CArray[t.CChar, 32]() - str_arr[0] = 'H' - str_arr[1] = 'e' - str_arr[2] = 'l' - str_arr[3] = 'l' - str_arr[4] = 'o' - str_arr[5] = '\0' - stdio.printf("String: %s\n", str_arr) - - -def TestNestedArray(): - stdio.printf("=== Test Nested Array (Array of Arrays) ===\n") - row0: t.CArray[t.CInt, 3] = t.CArray[t.CInt, 3]() - row1: t.CArray[t.CInt, 3] = t.CArray[t.CInt, 3]() - row0[0] = 0 - row0[1] = 1 - row0[2] = 2 - row1[0] = 10 - row1[1] = 11 - row1[2] = 12 - i: t.CInt = 0 - while i < 3: - stdio.printf("row0[%d]=%d ", i, row0[i]) - i += 1 - stdio.printf("\n") - i = 0 - while i < 3: - stdio.printf("row1[%d]=%d ", i, row1[i]) - i += 1 - stdio.printf("\n") - - -def TestArrayWithStruct(): - stdio.printf("=== Test Array with Struct ===\n") - points: t.CArray[SimpleData, 3] = t.CArray[SimpleData, 3]() - i: t.CInt = 0 - while i < 3: - points[i].x = i * 10 - points[i].y = i * 100 - i += 1 - i = 0 - while i < 3: - stdio.printf("Point[%d]: x=%d, y=%d\n", i, points[i].x, points[i].y) - i += 1 - - -def TestArrayPointer(): - stdio.printf("=== Test Array Pointer ===\n") - data: t.CArray[t.CInt, 8] = t.CArray[t.CInt, 8]() - data[0] = 100 - data[1] = 200 - data[2] = 300 - ptr: t.CInt | t.CPtr = data - stdio.printf("ptr[0]=%d\n", ptr[0]) - stdio.printf("ptr[1]=%d\n", ptr[1]) - stdio.printf("ptr[2]=%d\n", ptr[2]) - - -def TestDynamicString(): - stdio.printf("=== Test Dynamic String ===\n") - name: str = "TransPyC" - stdio.printf("Hello %s!\n", name) \ No newline at end of file diff --git a/Test/TestProject/App/zc/config.vp b/Test/TestProject/App/zc/config.vp deleted file mode 100644 index 1b4e36f..0000000 --- a/Test/TestProject/App/zc/config.vp +++ /dev/null @@ -1,24 +0,0 @@ -import t, c - - -POSMAX: t.CDefine = 100 -MAX_RETRY: t.CDefine = 5 -BUFFER_SIZE: t.CDefine = 256 -PI: t.CDefine = 3.14159 -EULER: t.CDefine = 2.71828 -TRUE: t.CDefine = 1 -FALSE: t.CDefine = 0 -NULL: t.CDefine = 0 - - -MATH_OFFSET: t.CDefine = 10 -MATH_SCALE: t.CDefine = 2 -THRESHOLD: t.CDefine = 50 -LOOP_LIMIT: t.CDefine = 20 -SHIFT_AMOUNT: t.CDefine = 2 -MASK_VALUE: t.CDefine = 0xFF -BIT_RANGE: t.CDefine = 4 -EXPONENT_BASE: t.CDefine = 3 -MODULO_DIVISOR: t.CDefine = 7 -SCALE_SHIFT: t.CDefine = 4 -HALF_SCALE: t.CDefine = 0.5 \ No newline at end of file diff --git a/Test/TestProject/App/zc/logic_test.vp b/Test/TestProject/App/zc/logic_test.vp deleted file mode 100644 index 4d5c266..0000000 --- a/Test/TestProject/App/zc/logic_test.vp +++ /dev/null @@ -1,372 +0,0 @@ -import config -import t, c - - -def ForRangeBasicTest(stop: t.CInt): - i: t.CInt = 0 - for i in range(stop): - print("For range: ", i) - print("Done") - - -def ForRangeWithStartStop(start: t.CInt, stop: t.CInt, step: t.CInt): - i: t.CInt = 0 - for i in range(start, stop, step): - print("Range: ", i) - print("Done") - - -def NestedForRangeTest(rows: t.CInt, cols: t.CInt): - r: t.CInt = 0 - c_val: t.CInt = 0 - for r in range(rows): - for c_val in range(cols): - print("Cell: ", r, c_val) - print("Grid done") - - -def ForWithIfBreakTest(data_size: t.CInt): - i: t.CInt = 0 - found: t.CInt = 0 - for i in range(data_size): - if i == 5: - print("Found at: ", i) - found = 1 - break - print("Checking: ", i) - if found == 0: - print("Not found") - - -def ForWithIfContinueTest(n: t.CInt): - i: t.CInt = 0 - count: t.CInt = 0 - for i in range(n): - if i % 2 == 0: - continue - print("Odd: ", i) - count += 1 - print("Total odd: ", count) - - -def ForWithElifBranchTest(value: t.CInt): - i: t.CInt = 0 - result: t.CInt = 0 - for i in range(value): - if i < 3: - result += 1 - elif i < 6: - result += 2 - elif i < 9: - result += 3 - else: - result += 4 - print("Elif branch result: ", result) - - -def WhileWithIfElifElseTest(iterations: t.CInt): - counter: t.CInt = 0 - while counter < iterations: - if counter < 2: - print("Phase 1: ", counter) - elif counter < 4: - print("Phase 2: ", counter) - elif counter < 6: - print("Phase 3: ", counter) - else: - print("Phase 4: ", counter) - counter += 1 - print("While done") - - -def WhileWithNestedIfTest(limit: t.CInt): - outer: t.CInt = 0 - while outer < limit: - inner: t.CInt = 0 - while inner < limit: - if inner == 2 and outer == 1: - print("Target: ", outer, inner) - inner += 1 - continue - if inner > 3: - break - print("Inner: ", inner) - inner += 1 - outer += 1 - - -def WhileWithMatchCaseTest(value: t.CInt): - result: t.CInt = 0 - match value: - case 1: - result = 100 - print("Case 1") - case 2: - result = 200 - print("Case 2") - case 3: - result = 300 - print("Case 3") - case _: - result = 999 - print("Default case") - print("Match result: ", result) - - -def WhileWithMatchCaseNoBreakTest(value: t.CInt): - result: t.CInt = 0 - match value: - case 1: - result = 10 - print("Case 1: ", result) - case 2: - result = 20 - print("Case 2: ", result) - result += 5 - case 3: - result = 30 - print("Case 3: ", result) - case _: - result = 0 - print("No break match result: ", result) - - -def ComplexForWhileMatchTest(outer_limit: t.CInt, inner_limit: t.CInt): - i: t.CInt = 0 - j: t.CInt = 0 - result: t.CInt = 0 - for i in range(outer_limit): - j = 0 - while j < inner_limit: - match (i, j): - case (0, 0): - result += 1 - case (1, 1): - result += 10 - case (2, _): - result += 100 - case (_, 0): - result += 1000 - case _: - result += 10000 - j += 1 - print("Complex match result: ", result) - - -def ForWithCaseAndNoBreakTest(n: t.CInt): - i: t.CInt = 0 - result: t.CInt = 0 - for i in range(n): - match i: - case 0: - result += 1 - case 1: - result += 2 - case 2: - result += 3 - result += 10 - case _: - result += i - c.NoBreak - print("NoBreak result: ", result) - - -def WhileWithBreakConditionTest(limit: t.CInt): - i: t.CInt = 0 - early_exit: t.CInt = 0 - while i < limit: - if i == 3: - early_exit = 1 - break - if i == 2: - i += 1 - continue - print("While i: ", i) - i += 1 - - -def NestedWhileWithMultipleBreakPoints(depth: t.CInt, width: t.CInt): - d: t.CInt = 0 - w: t.CInt = 0 - count: t.CInt = 0 - while d < depth: - w = 0 - while w < width: - if w == 2: - break - if d == 1 and w == 1: - c.Break - count += 1 - w += 1 - d += 1 - print("Nested break count: ", count) - - -def ForWithMatchCaseInLoopTest(iterations: t.CInt): - i: t.CInt = 0 - sum_even: t.CInt = 0 - sum_odd: t.CInt = 0 - for i in range(iterations): - match i % 3: - case 0: - sum_even += i - case 1: - sum_odd += i - case 2: - sum_even += i * 2 - case _: - pass - print("Sum even: ", sum_even) - print("Sum odd: ", sum_odd) - - -def ComplexLogicWithElifChains(a: t.CInt, b: t.CInt, c_val: t.CInt): - i: t.CInt = 0 - result: t.CInt = 0 - while i < 10: - if i < a: - if i < b: - result += 1 - elif i < c_val: - result += 2 - else: - result += 3 - elif i < b: - if i < c_val: - result += 4 - else: - result += 5 - elif i < c_val: - result += 6 - else: - result += 7 - i += 1 - print("Complex elif chain result: ", result) - - -def ForRangeWithStepAndCondition(n: t.CInt, step: t.CInt): - i: t.CInt = 0 - count: t.CInt = 0 - for i in range(0, n, step): - if i % 2 == 0: - print("Even step: ", i) - count += 1 - else: - if i > 5: - print("Large odd: ", i) - else: - print("Small odd: ", i) - print("Total steps: ", count) - - -def MatchCaseWithGuardConditions(value: t.CInt): - result: t.CInt = 0 - match value: - case 1 if config.TRUE == 1: - result = 100 - case 2 if config.FALSE == 0: - result = 200 - case 3: - result = 300 - case _: - result = 0 - print("Guard match result: ", result) - - -def WhileWithMultipleMatchCases(iterations: t.CInt): - i: t.CInt = 0 - state: t.CInt = 0 - while i < iterations: - match state: - case 0: - if i > 3: - state = 1 - case 1: - if i > 6: - state = 2 - case 2: - if i > 9: - state = 0 - print("State at i=", i, ": ", state) - i += 1 - - -def ForWhileMixWithBreakAndContinue(n: t.CInt): - i: t.CInt = 0 - j: t.CInt = 0 - count: t.CInt = 0 - for i in range(n): - j = 0 - while j < n: - if j == 2: - j += 1 - continue - if i == 3 and j == 3: - break - count += 1 - j += 1 - print("Mix break continue count: ", count) - - -def ComplexCaseMatchingWithRanges(start: t.CInt, end: t.CInt): - i: t.CInt = 0 - bucket0: t.CInt = 0 - bucket1: t.CInt = 0 - bucket2: t.CInt = 0 - bucket3: t.CInt = 0 - for i in range(start, end): - match i: - case _ if i < 10: - bucket0 += 1 - case _ if i < 20: - bucket1 += 1 - case _ if i < 30: - bucket2 += 1 - case _: - bucket3 += 1 - print("Bucket0 (<10): ", bucket0) - print("Bucket1 (10-19): ", bucket1) - print("Bucket2 (20-29): ", bucket2) - print("Bucket3 (>=30): ", bucket3) - - -def WhileWithElifInElifChain(limit: t.CInt): - i: t.CInt = 0 - result: t.CInt = 0 - while i < limit: - if i < 2: - if i == 0: - result = 1 - else: - result = 2 - elif i < 4: - if i == 2: - result = 3 - else: - result = 4 - elif i < 6: - if i == 4: - result = 5 - else: - result = 6 - else: - result = 7 - print("Chain result[", i, "]: ", result) - i += 1 - - -def ForWithCaseNoBreakNested(inner_limit: t.CInt): - i: t.CInt = 0 - j: t.CInt = 0 - result: t.CInt = 0 - for i in range(3): - for j in range(inner_limit): - match j: - case 0: - result += 1 - case 1: - result += 2 - case _: - result += 3 - c.NoBreak - print("Nested NoBreak result: ", result) \ No newline at end of file diff --git a/Test/TestProject/App/zc/test.vp b/Test/TestProject/App/zc/test.vp deleted file mode 100644 index 24a08a8..0000000 --- a/Test/TestProject/App/zc/test.vp +++ /dev/null @@ -1,298 +0,0 @@ -import config -import t, c - - -def AboutSizeTWhileTest(length: t.CSizeT): - pos: t.CSizeT = 0 - while pos < length: - print("Pos: ", pos) - if pos > config.POSMAX: break - pos += 1 - while pos < length: - if pos > config.POSMAX: - print("Pos: ", pos) - pos += 1 - else: - print("Pos: ", pos) - pos += 1 - if pos > config.POSMAX: break - else: - pos += 1 - print("Pos: ", pos) - while pos < length: - print("Pos: ", pos) - pos += 1 - - -def MathBasicTest(x: t.CInt, y: t.CInt) -> t.CInt: - result: t.CInt = 0 - result = x + y - print("Add: ", result) - result = x - y - print("Sub: ", result) - result = x * y - print("Mul: ", result) - if y != 0: - result = x / y - print("Div: ", result) - result = x % y if y != 0 else 0 - print("Mod: ", result) - return result - - -def MathAdvancedTest(value: t.CInt) -> t.CInt: - counter: t.CInt = 0 - scaled: t.CInt = 0 - offset: t.CInt = 0 - scaled = value * config.MATH_SCALE - print("Scaled: ", scaled) - offset = scaled + config.MATH_OFFSET - print("Offset: ", offset) - threshold: t.CInt = config.THRESHOLD - if offset > threshold: - print("Above threshold") - counter = 1 - elif offset == threshold: - print("At threshold") - counter = 0 - else: - print("Below threshold") - counter = -1 - return counter - - -def WhileWithElifElseTest(start: t.CInt, end: t.CInt): - idx: t.CInt = start - while idx < end: - if idx < 0: - print("Negative: ", idx) - elif idx == 0: - print("Zero: ", idx) - elif idx > 0 and idx < 5: - print("Small positive: ", idx) - elif idx >= 5 and idx < 10: - print("Medium positive: ", idx) - else: - print("Large: ", idx) - idx += 1 - - -def NestedWhileWithMacrosTest(outer_limit: t.CInt, inner_limit: t.CInt): - outer: t.CInt = 0 - inner: t.CInt = 0 - total_ops: t.CInt = 0 - while outer < outer_limit: - inner = 0 - while inner < inner_limit: - if inner == config.TRUE: - print("Inner loop break condition at: ", inner) - total_ops += 1 - inner += 1 - outer += 1 - print("Total operations: ", total_ops) - - -def ComplexConditionTest(a: t.CInt, b: t.CInt, c_val: t.CInt): - x: t.CInt = a - y: t.CInt = b - z: t.CInt = c_val - while x < config.LOOP_LIMIT: - if x > 0 and y > 0 and z > 0: - print("All positive: ", x, y, z) - elif x <= 0 and y <= 0 and z <= 0: - print("All non-positive: ", x, y, z) - else: - if x > 0: - print("X positive") - elif y > 0: - print("Y positive") - else: - print("Z positive") - x += 1 - y += 1 - z += 1 - - -def RetryLoopTest(retry_count: t.CInt) -> t.CInt: - attempt: t.CInt = 0 - success: t.CInt = 0 - while attempt < retry_count: - if attempt < config.MAX_RETRY: - print("Attempt: ", attempt, " less than max") - success = attempt * 2 - elif attempt == config.MAX_RETRY: - print("At max retry") - success = -1 - else: - print("Beyond max retry") - success = -2 - attempt += 1 - return success - - -def BitwiseOperationsTest(value: t.CInt) -> t.CInt: - shifted: t.CInt = 0 - masked: t.CInt = 0 - xored: t.CInt = 0 - anded: t.CInt = 0 - ored: t.CInt = 0 - shifted = value << config.SHIFT_AMOUNT - print("Left shift: ", shifted) - shifted = value >> config.SHIFT_AMOUNT - print("Right shift: ", shifted) - masked = value & config.MASK_VALUE - print("Bitwise AND mask: ", masked) - xored = value ^ config.MASK_VALUE - print("Bitwise XOR: ", xored) - anded = value & (config.MASK_VALUE >> config.SHIFT_AMOUNT) - print("Bitwise AND shifted mask: ", anded) - ored = value | config.SHIFT_AMOUNT - print("Bitwise OR shift: ", ored) - return masked - - -def CompoundAssignmentMathTest(a: t.CInt, b: t.CInt) -> t.CInt: - x: t.CInt = a - y: t.CInt = b - result: t.CInt = 0 - x += y - print("x += y: ", x) - x -= y - print("x -= y: ", x) - x *= y - print("x *= y: ", x) - x = a - y = b - if b != 0: - x /= b - print("x /= y: ", x) - x = a - if b != 0: - x %= b - print("x %%= y: ", x) - x = a - x <<= config.SHIFT_AMOUNT - print("x <<= shift: ", x) - x >>= config.SHIFT_AMOUNT - print("x >>= shift: ", x) - x &= config.MASK_VALUE - print("x &= mask: ", x) - x |= config.SHIFT_AMOUNT - print("x |= shift: ", x) - result = (a + b) * config.MATH_SCALE - config.MATH_OFFSET - print("Compound: (a+b)*scale-offset: ", result) - result = (a * b) + (config.MATH_OFFSET / 2) - print("Compound: a*b+offset/2: ", result) - return result - - -def PowerAndModuloTest(base: t.CInt, exponent: t.CInt) -> t.CInt: - result: t.CInt = 1 - temp: t.CInt = 0 - i: t.CInt = 0 - while i < exponent: - result *= base - i += 1 - print("Power: ", result) - temp = result % config.MODULO_DIVISOR - print("Power mod: ", temp) - temp = (base * config.EXPONENT_BASE) % config.MODULO_DIVISOR - print("base*exp %% divisor: ", temp) - temp = ((base + config.MATH_OFFSET) * config.MATH_SCALE) % config.MODULO_DIVISOR - print("(base+offset)*scale %% divisor: ", temp) - return result - - -def MixedArithmeticTest(x: t.CInt, y: t.CInt, z: t.CInt) -> t.CInt: - result: t.CInt = 0 - result = (x + y) * z - print("(x+y)*z: ", result) - result = x + (y * z) - print("x+(y*z): ", result) - result = ((x + y) * config.MATH_SCALE) - config.MATH_OFFSET - print("((x+y)*scale)-offset: ", result) - result = (x * config.MATH_SCALE) + (y * config.MATH_SCALE) - print("x*scale + y*scale: ", result) - result = ((x % config.MODULO_DIVISOR) + (y % config.MODULO_DIVISOR)) * config.MATH_SCALE - print("(x%%mod + y%%mod)*scale: ", result) - temp: t.CInt = 0 - temp = x | y & z - print("x | y & z: ", temp) - temp = (x | y) & z - print("(x | y) & z: ", temp) - temp = x ^ y ^ z - print("x ^ y ^ z: ", temp) - return result - - -def MathWithWhileLoopTest(start: t.CInt, count: t.CInt) -> t.CInt: - idx: t.CInt = 0 - accumulator: t.CInt = 0 - multiplier: t.CInt = config.MATH_SCALE - while idx < count: - temp: t.CInt = (start + idx) * multiplier - temp = temp + config.MATH_OFFSET - if temp > config.THRESHOLD: - temp = config.THRESHOLD - accumulator += temp - multiplier += 1 - idx += 1 - print("Accumulator: ", accumulator) - return accumulator - - -def ComplexNestedMathTest(a: t.CInt, b: t.CInt) -> t.CInt: - layer1: t.CInt = 0 - layer2: t.CInt = 0 - layer3: t.CInt = 0 - i: t.CInt = 0 - layer1 = (a + b) * config.MATH_SCALE - print("Layer1: ", layer1) - while i < config.BIT_RANGE: - layer2 += layer1 >> 1 - i += 1 - print("Layer2: ", layer2) - layer3 = layer1 + layer2 - config.MATH_OFFSET - print("Layer3: ", layer3) - layer3 = layer3 * config.MATH_SCALE / 2 if config.MATH_SCALE != 0 else layer3 - print("Layer3 scaled: ", layer3) - return layer3 - - -def ConditionalMathChainTest(value: t.CInt) -> t.CInt: - result: t.CInt = 0 - step: t.CInt = 0 - while step < config.LOOP_LIMIT: - if step < 5: - result += step * config.MATH_SCALE - print("step<5: ", result) - elif step < 10: - result -= step - config.MATH_OFFSET - print("step<10: ", result) - elif step < 15: - result += (step * config.MATH_OFFSET) / config.MATH_SCALE - print("step<15: ", result) - else: - result = result * config.EXPONENT_BASE % config.MODULO_DIVISOR - print("step>=15: ", result) - step += 1 - return result - - -def BitManipulationMathTest(value: t.CInt) -> t.CInt: - original: t.CInt = value - nibble: t.CInt = 0 - result: t.CInt = 0 - result = (value << config.SHIFT_AMOUNT) | (value >> (8 - config.SHIFT_AMOUNT)) - print("Rotate left: ", result) - result = (value >> config.SHIFT_AMOUNT) | (value << (8 - config.SHIFT_AMOUNT)) - print("Rotate right: ", result) - nibble = value & 0xF - print("Lower nibble: ", nibble) - nibble = (value >> config.BIT_RANGE) & 0xF - print("Upper nibble: ", nibble) - result = ((value & config.MASK_VALUE) + config.MATH_OFFSET) * config.MATH_SCALE - print("Masked and scaled: ", result) - result = ((original << config.SHIFT_AMOUNT) ^ original) & config.MASK_VALUE - print("XOR shifted: ", result) - return result \ No newline at end of file diff --git a/Test/TestProject/output/49cae05490a513cb.deps.json b/Test/TestProject/output/49cae05490a513cb.deps.json deleted file mode 100644 index acdc08a..0000000 --- a/Test/TestProject/output/49cae05490a513cb.deps.json +++ /dev/null @@ -1 +0,0 @@ -{"memhub": "04e5fe47ff2af528", "stdio": "285b6aa29a34754d", "test_numpy": "3cd87018ba1e76bc", "vipermath": "3f7c5e78d8652535", "stdlib": "6c658cc728d0bbf4", "testcheck": "748d0424e8976fa0", "zc.test": "75583f20a922ab2e", "test": "75583f20a922ab2e", "config": "cfc83b830141b00e", "string": "928c0ff6d8c69ec9", "atom": "aa246c6e6aa30484", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "numpy.__init__": "c3a6aed1f1fb8b1e", "__init__": "c3a6aed1f1fb8b1e", "numpy": "c3a6aed1f1fb8b1e", "viperio": "c9f4be41ca1cc2b4", "zc.config": "cfc83b830141b00e", "zc.class_test": "e5fb16127bce8f68", "class_test": "e5fb16127bce8f68", "stdint": "f5522571bcce7bcb", "zc.logic_test": "faec3233d98371da", "logic_test": "faec3233d98371da", "w32.win32base": "fc980acec33d69a7", "win32base": "fc980acec33d69a7"} \ No newline at end of file diff --git a/Test/TestProject/output/75583f20a922ab2e.deps.json b/Test/TestProject/output/75583f20a922ab2e.deps.json deleted file mode 100644 index dc354b7..0000000 --- a/Test/TestProject/output/75583f20a922ab2e.deps.json +++ /dev/null @@ -1 +0,0 @@ -{"memhub": "04e5fe47ff2af528", "stdio": "285b6aa29a34754d", "test_numpy": "3cd87018ba1e76bc", "vipermath": "3f7c5e78d8652535", "main": "49cae05490a513cb", "stdlib": "6c658cc728d0bbf4", "testcheck": "748d0424e8976fa0", "config": "cfc83b830141b00e", "string": "928c0ff6d8c69ec9", "atom": "aa246c6e6aa30484", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "numpy.__init__": "c3a6aed1f1fb8b1e", "__init__": "c3a6aed1f1fb8b1e", "numpy": "c3a6aed1f1fb8b1e", "viperio": "c9f4be41ca1cc2b4", "zc.config": "cfc83b830141b00e", "zc.class_test": "e5fb16127bce8f68", "class_test": "e5fb16127bce8f68", "stdint": "f5522571bcce7bcb", "zc.logic_test": "faec3233d98371da", "logic_test": "faec3233d98371da", "w32.win32base": "fc980acec33d69a7", "win32base": "fc980acec33d69a7"} \ No newline at end of file diff --git a/Test/TestProject/output/8e0d8fdba991b3b4.deps.json b/Test/TestProject/output/8e0d8fdba991b3b4.deps.json deleted file mode 100644 index 8f09b8f..0000000 --- a/Test/TestProject/output/8e0d8fdba991b3b4.deps.json +++ /dev/null @@ -1 +0,0 @@ -{"memhub": "04e5fe47ff2af528", "stdio": "285b6aa29a34754d", "test_numpy": "3cd87018ba1e76bc", "vipermath": "3f7c5e78d8652535", "main": "49cae05490a513cb", "stdlib": "6c658cc728d0bbf4", "testcheck": "748d0424e8976fa0", "zc.test": "75583f20a922ab2e", "test": "75583f20a922ab2e", "string": "928c0ff6d8c69ec9", "atom": "aa246c6e6aa30484", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "numpy.__init__": "c3a6aed1f1fb8b1e", "__init__": "c3a6aed1f1fb8b1e", "numpy": "c3a6aed1f1fb8b1e", "viperio": "c9f4be41ca1cc2b4", "zc.config": "cfc83b830141b00e", "config": "cfc83b830141b00e", "zc.class_test": "e5fb16127bce8f68", "class_test": "e5fb16127bce8f68", "stdint": "f5522571bcce7bcb", "zc.logic_test": "faec3233d98371da", "logic_test": "faec3233d98371da", "w32.win32base": "fc980acec33d69a7", "win32base": "fc980acec33d69a7"} \ No newline at end of file diff --git a/Test/TestProject/output/cfc83b830141b00e.deps.json b/Test/TestProject/output/cfc83b830141b00e.deps.json deleted file mode 100644 index 0b2b60e..0000000 --- a/Test/TestProject/output/cfc83b830141b00e.deps.json +++ /dev/null @@ -1 +0,0 @@ -{"memhub": "04e5fe47ff2af528", "stdio": "285b6aa29a34754d", "test_numpy": "3cd87018ba1e76bc", "vipermath": "3f7c5e78d8652535", "main": "49cae05490a513cb", "stdlib": "6c658cc728d0bbf4", "testcheck": "748d0424e8976fa0", "zc.test": "75583f20a922ab2e", "test": "75583f20a922ab2e", "config": "8e0d8fdba991b3b4", "string": "928c0ff6d8c69ec9", "atom": "aa246c6e6aa30484", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "numpy.__init__": "c3a6aed1f1fb8b1e", "__init__": "c3a6aed1f1fb8b1e", "numpy": "c3a6aed1f1fb8b1e", "viperio": "c9f4be41ca1cc2b4", "zc.class_test": "e5fb16127bce8f68", "class_test": "e5fb16127bce8f68", "stdint": "f5522571bcce7bcb", "zc.logic_test": "faec3233d98371da", "logic_test": "faec3233d98371da", "w32.win32base": "fc980acec33d69a7", "win32base": "fc980acec33d69a7"} \ No newline at end of file diff --git a/Test/TestProject/output/e5fb16127bce8f68.deps.json b/Test/TestProject/output/e5fb16127bce8f68.deps.json deleted file mode 100644 index c91720d..0000000 --- a/Test/TestProject/output/e5fb16127bce8f68.deps.json +++ /dev/null @@ -1 +0,0 @@ -{"memhub": "04e5fe47ff2af528", "stdio": "285b6aa29a34754d", "test_numpy": "3cd87018ba1e76bc", "vipermath": "3f7c5e78d8652535", "main": "49cae05490a513cb", "stdlib": "6c658cc728d0bbf4", "testcheck": "748d0424e8976fa0", "zc.test": "75583f20a922ab2e", "test": "75583f20a922ab2e", "config": "cfc83b830141b00e", "string": "928c0ff6d8c69ec9", "atom": "aa246c6e6aa30484", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "numpy.__init__": "c3a6aed1f1fb8b1e", "__init__": "c3a6aed1f1fb8b1e", "numpy": "c3a6aed1f1fb8b1e", "viperio": "c9f4be41ca1cc2b4", "zc.config": "cfc83b830141b00e", "stdint": "f5522571bcce7bcb", "zc.logic_test": "faec3233d98371da", "logic_test": "faec3233d98371da", "w32.win32base": "fc980acec33d69a7", "win32base": "fc980acec33d69a7"} \ No newline at end of file diff --git a/Test/TestProject/output/faec3233d98371da.deps.json b/Test/TestProject/output/faec3233d98371da.deps.json deleted file mode 100644 index 5b29178..0000000 --- a/Test/TestProject/output/faec3233d98371da.deps.json +++ /dev/null @@ -1 +0,0 @@ -{"memhub": "04e5fe47ff2af528", "stdio": "285b6aa29a34754d", "test_numpy": "3cd87018ba1e76bc", "vipermath": "3f7c5e78d8652535", "main": "49cae05490a513cb", "stdlib": "6c658cc728d0bbf4", "testcheck": "748d0424e8976fa0", "zc.test": "75583f20a922ab2e", "test": "75583f20a922ab2e", "config": "cfc83b830141b00e", "string": "928c0ff6d8c69ec9", "atom": "aa246c6e6aa30484", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "numpy.__init__": "c3a6aed1f1fb8b1e", "__init__": "c3a6aed1f1fb8b1e", "numpy": "c3a6aed1f1fb8b1e", "viperio": "c9f4be41ca1cc2b4", "zc.config": "cfc83b830141b00e", "zc.class_test": "e5fb16127bce8f68", "class_test": "e5fb16127bce8f68", "stdint": "f5522571bcce7bcb", "w32.win32base": "fc980acec33d69a7", "win32base": "fc980acec33d69a7"} \ No newline at end of file diff --git a/Test/TestProject/project.json b/Test/TestProject/project.json deleted file mode 100644 index 743baad..0000000 --- a/Test/TestProject/project.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/TermiNexus/TransPyC/main/schemas/project-schema.json", - "name": "TestProject", - "version": "1.0.0", - "source_dir": "./App", - "build_dir": "./.tpv_build", - "compiler": { - "cmd": "llc", - "flags": ["-filetype=obj"] - }, - "linker": { - "cmd": "clang++", - "flags": ["-Wl,--allow-multiple-definition", "-Wl,--unresolved-symbols=ignore-in-object-files", "-lmsvcrt", "-lucrt", "-lpthread", "-lmingwex", "-lkernel32", "-luser32", "-latomic"], - "output": "TestProject.exe" - }, - "includes": [ - "../../includes" - ], - "target": { - "triple": "x86_64-pc-windows-gnu", - "datalayout": "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" - }, - "options": { - "slice_level": 3, - "sha1_slice_level": 1, - "target": "llvm", - "strict_mode": true - } -} diff --git a/Test/TestProject/temp/285b6aa29a34754d.stub.ll.dep b/Test/TestProject/temp/285b6aa29a34754d.stub.ll.dep deleted file mode 100644 index e69de29..0000000 diff --git a/Test/TestProject/temp/285b6aa29a34754d.vpi b/Test/TestProject/temp/285b6aa29a34754d.vpi deleted file mode 100644 index acc57c7..0000000 --- a/Test/TestProject/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/TestProject/temp/3cd87018ba1e76bc.doc.json b/Test/TestProject/temp/3cd87018ba1e76bc.doc.json deleted file mode 100644 index 9e26dfe..0000000 --- a/Test/TestProject/temp/3cd87018ba1e76bc.doc.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/Test/TestProject/temp/3cd87018ba1e76bc.vpi b/Test/TestProject/temp/3cd87018ba1e76bc.vpi deleted file mode 100644 index 18dba6c..0000000 --- a/Test/TestProject/temp/3cd87018ba1e76bc.vpi +++ /dev/null @@ -1,108 +0,0 @@ -""" -Auto-generated Python stub file from test_numpy.vp -Module: test_numpy -""" - - -from stdint import * -import numpy -from stdio import printf -from stdlib import calloc, free -import string -import vipermath -import memhub -import t, c - -EPS: t.CExtern | t.CDouble -EPS_LOOSE: t.CExtern | t.CDouble -SIMD_BLOCK: t.CExtern | t.CSizeT -arena: t.CExtern | t.CUInt8T | t.CPtr -pool: t.CExtern | memhub.MemPool | t.CPtr -test_passed: t.CExtern | t.CInt -test_failed: t.CExtern | t.CInt - -def check(name: str, condition: t.CInt, detail: str) -> t.CInt: pass - -def approx_eq(a: t.CDouble, b: t.CDouble) -> t.CInt: pass - -def approx_loose(a: t.CDouble, b: t.CDouble) -> t.CInt: pass - -def section_header(title: str) -> t.CInt: pass - -def section_footer() -> t.CInt: pass - -def vec4(p: memhub.MemPool | t.CPtr, v0: t.CDouble, v1: t.CDouble, v2: t.CDouble, v3: t.CDouble) -> numpy.ndarray | t.CPtr: pass - -def vec3(p: memhub.MemPool | t.CPtr, v0: t.CDouble, v1: t.CDouble, v2: t.CDouble) -> numpy.ndarray | t.CPtr: pass - -def vec2(p: memhub.MemPool | t.CPtr, v0: t.CDouble, v1: t.CDouble) -> numpy.ndarray | t.CPtr: pass - -def test_zeros_ones() -> t.CInt: pass - -def test_arange_linspace() -> t.CInt: pass - -def test_eye_diag() -> t.CInt: pass - -def test_sum_mean_min_max() -> t.CInt: pass - -def test_fill_copy() -> t.CInt: pass - -def test_add_sub_mul_div() -> t.CInt: pass - -def test_neg() -> t.CInt: pass - -def test_len() -> t.CInt: pass - -def test_scalar_ops() -> t.CInt: pass - -def test_math_funcs() -> t.CInt: pass - -def test_matmul() -> t.CInt: pass - -def test_dot() -> t.CInt: pass - -def test_transpose() -> t.CInt: pass - -def test_var_std_norm() -> t.CInt: pass - -def test_clip_concatenate() -> t.CInt: pass - -def test_sort_reverse() -> t.CInt: pass - -def test_print_arr() -> t.CInt: pass - -def test_floordiv_mod() -> t.CInt: pass - -def test_additional_math() -> t.CInt: pass - -def test_trig_hyperbolic() -> t.CInt: pass - -def test_degrees_radians() -> t.CInt: pass - -def test_cumsum_diff() -> t.CInt: pass - -def test_max_min_where() -> t.CInt: pass - -def test_flatten_trace() -> t.CInt: pass - -def test_outer() -> t.CInt: pass - -def test_bool_comparison() -> t.CInt: pass - -def test_linalg() -> t.CInt: pass - -def test_additional_creation() -> t.CInt: pass - -def test_interp() -> t.CInt: pass - -def test_numpy_edge() -> t.CInt: pass - -def bench_numpy_perf() -> t.CInt: pass - -def test_numpy_correct() -> t.CInt: pass - -def test_numpy_edge_main() -> t.CInt: pass - -def bench_numpy_main() -> t.CInt: pass - -def test_numpy_main() -> t.CInt: pass diff --git a/Test/TestProject/temp/3f7c5e78d8652535.stub.ll.dep b/Test/TestProject/temp/3f7c5e78d8652535.stub.ll.dep deleted file mode 100644 index e69de29..0000000 diff --git a/Test/TestProject/temp/3f7c5e78d8652535.vpi b/Test/TestProject/temp/3f7c5e78d8652535.vpi deleted file mode 100644 index b7c7585..0000000 --- a/Test/TestProject/temp/3f7c5e78d8652535.vpi +++ /dev/null @@ -1,128 +0,0 @@ -""" -Auto-generated Python stub file from vipermath.vp -Module: vipermath -""" - - -import t, c - -U_M_PI: t.CDefine = 3.14159265358979323846 -U_M_E: t.CDefine = 2.71828182845904523536 -U_M_PI_2: t.CDefine = 1.57079632679489661923 -U_M_PI_4: t.CDefine = 0.78539816339744830962 -U_M_1_PI: t.CDefine = 0.31830988618379067154 -U_M_2_PI: t.CDefine = 0.63661977236758134308 -U_M_LN2: t.CDefine = 0.69314718055994530942 -U_M_LN10: t.CDefine = 2.30258509299404568402 -U_M_2_SQRT_PI: t.CDefine = 1.77245385090551602730 - -def radians(degrees: t.CDouble) -> t.CDouble: pass - -def degrees(radians: t.CDouble) -> t.CDouble: pass - -def sin(x: t.CDouble) -> t.CDouble: pass - -def cos(x: t.CDouble) -> t.CDouble: pass - -def tan(x: t.CDouble) -> t.CDouble: pass - -def asin(x: t.CDouble) -> t.CDouble: pass - -def acos(x: t.CDouble) -> t.CDouble: pass - -def _atan_core(x: t.CDouble) -> t.CDouble: pass - -def atan(x: t.CDouble) -> t.CDouble: pass - -def atan2(y: t.CDouble, x: t.CDouble) -> t.CDouble: pass - -def sinh(x: t.CDouble) -> t.CDouble: pass - -def cosh(x: t.CDouble) -> t.CDouble: pass - -def tanh(x: t.CDouble) -> t.CDouble: pass - -def exp(x: t.CDouble) -> t.CDouble: pass - -def log(x: t.CDouble) -> t.CDouble: pass - -def sqrt(x: t.CDouble) -> t.CDouble: pass - -def abs(x: t.CInt) -> t.CInt: pass - -def fabs(x: t.CDouble) -> t.CDouble: pass - -def labs(x: t.CLong) -> t.CLong: pass - -def factorial(n: t.CInt) -> t.CDouble: pass - -def combination(n: t.CInt, k: t.CInt) -> t.CDouble: pass - -def permutation(n: t.CInt, k: t.CInt) -> t.CDouble: pass - -def pow(x: t.CDouble, y: t.CDouble) -> t.CDouble: pass - -def powf(x: t.CDouble, y: t.CDouble) -> t.CDouble: pass - -def cbrt(x: t.CDouble) -> t.CDouble: pass - -def hypot(x: t.CDouble, y: t.CDouble) -> t.CDouble: pass - -def floor(x: t.CDouble) -> t.CDouble: pass - -def ceil(x: t.CDouble) -> t.CDouble: pass - -def round(x: t.CDouble) -> t.CDouble: pass - -def trunc(x: t.CDouble) -> t.CDouble: pass - -def fmod(x: t.CDouble, y: t.CDouble) -> t.CDouble: pass - -def fmodf(x: float, y: float) -> float: pass - -def modf(x: t.CDouble, iptr: t.CDouble | t.CPtr) -> t.CDouble: pass - -def log10(x: t.CDouble) -> t.CDouble: pass - -def log2(x: t.CDouble) -> t.CDouble: pass - -def exp2(x: t.CDouble) -> t.CDouble: pass - -def expm1(x: t.CDouble) -> t.CDouble: pass - -def log1p(x: t.CDouble) -> t.CDouble: pass - -def asinh(x: t.CDouble) -> t.CDouble: pass - -def acosh(x: t.CDouble) -> t.CDouble: pass - -def atanh(x: t.CDouble) -> t.CDouble: pass - -def gamma(x: t.CDouble) -> t.CDouble: pass - -def erf(x: t.CDouble) -> t.CDouble: pass - -def erfc(x: t.CDouble) -> t.CDouble: pass - -def sqrtf(x: t.CFloat) -> t.CFloat: pass - -def sinf(x: t.CFloat) -> t.CFloat: pass - -def cosf(x: t.CFloat) -> t.CFloat: pass - -def tanf(x: t.CFloat) -> t.CFloat: pass - -def fabsf(x: t.CFloat) -> t.CFloat: pass - -def floorf(x: t.CFloat) -> t.CFloat: pass - -def ceilf(x: t.CFloat) -> t.CFloat: pass - - -class _U(t.CUnion): - d: t.CDouble - u: t.CUInt64T - -def isnan(x: t.CDouble) -> t.CStatic | t.CInt: pass - -def isinf(x: t.CDouble) -> t.CStatic | t.CInt: pass diff --git a/Test/TestProject/temp/49cae05490a513cb.doc.json b/Test/TestProject/temp/49cae05490a513cb.doc.json deleted file mode 100644 index 9e26dfe..0000000 --- a/Test/TestProject/temp/49cae05490a513cb.doc.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/Test/TestProject/temp/49cae05490a513cb.vpi b/Test/TestProject/temp/49cae05490a513cb.vpi deleted file mode 100644 index 634d3d0..0000000 --- a/Test/TestProject/temp/49cae05490a513cb.vpi +++ /dev/null @@ -1,19 +0,0 @@ -""" -Auto-generated Python stub file from main.vp -Module: main -""" - -import t -import c - - -import stdio -import stdint -import zc.config as config -import zc.test as test -import zc.logic_test as logic -import zc.class_test as class_test -import testcheck -import test_numpy - -def main() -> stdint.INT: pass diff --git a/Test/TestProject/temp/6c658cc728d0bbf4.stub.ll.dep b/Test/TestProject/temp/6c658cc728d0bbf4.stub.ll.dep deleted file mode 100644 index 793e7ed..0000000 --- a/Test/TestProject/temp/6c658cc728d0bbf4.stub.ll.dep +++ /dev/null @@ -1 +0,0 @@ -f5522571bcce7bcb \ No newline at end of file diff --git a/Test/TestProject/temp/6c658cc728d0bbf4.vpi b/Test/TestProject/temp/6c658cc728d0bbf4.vpi deleted file mode 100644 index d7c42cf..0000000 --- a/Test/TestProject/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/TestProject/temp/748d0424e8976fa0.stub.ll.dep b/Test/TestProject/temp/748d0424e8976fa0.stub.ll.dep deleted file mode 100644 index be4eebc..0000000 --- a/Test/TestProject/temp/748d0424e8976fa0.stub.ll.dep +++ /dev/null @@ -1 +0,0 @@ -285b6aa29a34754d|bbdf3bbd4c3bc28c|f5522571bcce7bcb|fc980acec33d69a7 \ No newline at end of file diff --git a/Test/TestProject/temp/748d0424e8976fa0.vpi b/Test/TestProject/temp/748d0424e8976fa0.vpi deleted file mode 100644 index 5ff4850..0000000 --- a/Test/TestProject/temp/748d0424e8976fa0.vpi +++ /dev/null @@ -1,31 +0,0 @@ -""" -Auto-generated Python stub file from testcheck.vp -Module: testcheck -""" - - -import t, c -import stdio -from w32.win32console import SetConsoleOutputCP, SetConsoleCP - -CP_UTF8: t.CDefine = 65001 -_pass_count: t.CExtern | t.CInt -_fail_count: t.CExtern | t.CInt -_total_pass: t.CExtern | t.CInt -_total_fail: t.CExtern | t.CInt - -def begin(name: str) -> t.CInt: pass - -def section(name: str) -> t.CInt: pass - -def ok(msg: str) -> t.CInt: pass - -def fail(msg: str) -> t.CInt: pass - -def check(cond: t.CInt, ok_msg: str, fail_msg: str) -> t.CInt: pass - -def info(msg: str) -> t.CInt: pass - -def end() -> t.CInt: pass - -def summary() -> t.CInt: pass diff --git a/Test/TestProject/temp/75583f20a922ab2e.doc.json b/Test/TestProject/temp/75583f20a922ab2e.doc.json deleted file mode 100644 index 9e26dfe..0000000 --- a/Test/TestProject/temp/75583f20a922ab2e.doc.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/Test/TestProject/temp/75583f20a922ab2e.vpi b/Test/TestProject/temp/75583f20a922ab2e.vpi deleted file mode 100644 index 9da5382..0000000 --- a/Test/TestProject/temp/75583f20a922ab2e.vpi +++ /dev/null @@ -1,38 +0,0 @@ -""" -Auto-generated Python stub file from zc.test.vp -Module: zc.test -""" - - -import config -import t, c - -def AboutSizeTWhileTest(length: t.CSizeT) -> t.CInt: pass - -def MathBasicTest(x: t.CInt, y: t.CInt) -> t.CInt: pass - -def MathAdvancedTest(value: t.CInt) -> t.CInt: pass - -def WhileWithElifElseTest(start: t.CInt, end: t.CInt) -> t.CInt: pass - -def NestedWhileWithMacrosTest(outer_limit: t.CInt, inner_limit: t.CInt) -> t.CInt: pass - -def ComplexConditionTest(a: t.CInt, b: t.CInt, c_val: t.CInt) -> t.CInt: pass - -def RetryLoopTest(retry_count: t.CInt) -> t.CInt: pass - -def BitwiseOperationsTest(value: t.CInt) -> t.CInt: pass - -def CompoundAssignmentMathTest(a: t.CInt, b: t.CInt) -> t.CInt: pass - -def PowerAndModuloTest(base: t.CInt, exponent: t.CInt) -> t.CInt: pass - -def MixedArithmeticTest(x: t.CInt, y: t.CInt, z: t.CInt) -> t.CInt: pass - -def MathWithWhileLoopTest(start: t.CInt, count: t.CInt) -> t.CInt: pass - -def ComplexNestedMathTest(a: t.CInt, b: t.CInt) -> t.CInt: pass - -def ConditionalMathChainTest(value: t.CInt) -> t.CInt: pass - -def BitManipulationMathTest(value: t.CInt) -> t.CInt: pass diff --git a/Test/TestProject/temp/8e0d8fdba991b3b4.doc.json b/Test/TestProject/temp/8e0d8fdba991b3b4.doc.json deleted file mode 100644 index 9e26dfe..0000000 --- a/Test/TestProject/temp/8e0d8fdba991b3b4.doc.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/Test/TestProject/temp/8e0d8fdba991b3b4.vpi b/Test/TestProject/temp/8e0d8fdba991b3b4.vpi deleted file mode 100644 index e6465d3..0000000 --- a/Test/TestProject/temp/8e0d8fdba991b3b4.vpi +++ /dev/null @@ -1,25 +0,0 @@ -""" -Auto-generated Python stub file from config.vp -Module: config -""" - - -import stdint -import t, c - -A: t.CExtern | t.CChar | t.CPtr - -class BIT_TEST(t.Object): - a: t.CInt | t.Bit(1) - b: t.CInt | t.Bit(1) - c: t.CInt | t.Bit(1) - d: t.CInt | t.Bit(5) -class OOP_TEST(t.Object): - a: t.CInt - def __init__(self: OOP_TEST) -> t.CInt: pass - def __call__(self: OOP_TEST) -> stdint.UINT: pass -class ENUM_TEST(t.CEnum): - A: t.State = 0 - B: t.State - C: t.State - Len: t.State \ No newline at end of file diff --git a/Test/TestProject/temp/_phase1_manifest.json b/Test/TestProject/temp/_phase1_manifest.json deleted file mode 100644 index cd39d9f..0000000 --- a/Test/TestProject/temp/_phase1_manifest.json +++ /dev/null @@ -1 +0,0 @@ -{"d:\\Users\\TermiNexus\\Desktop\\TransPyC\\Test\\TestProject\\App\\config.vp": {"sha1": "8e0d8fdba991b3b4", "mtime": 1781111175.0269876, "size": 445}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\Test\\TestProject\\App\\main.vp": {"sha1": "49cae05490a513cb", "mtime": 1782949786.0815294, "size": 8223}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\Test\\TestProject\\App\\test_numpy.vp": {"sha1": "3cd87018ba1e76bc", "mtime": 1782828269.700148, "size": 40140}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\Test\\TestProject\\App\\zc\\class_test.vp": {"sha1": "e5fb16127bce8f68", "mtime": 1782266207.4312654, "size": 6472}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\Test\\TestProject\\App\\zc\\config.vp": {"sha1": "cfc83b830141b00e", "mtime": 1778402243.1661563, "size": 531}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\Test\\TestProject\\App\\zc\\logic_test.vp": {"sha1": "faec3233d98371da", "mtime": 1778402365.7843194, "size": 8848}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\Test\\TestProject\\App\\zc\\test.vp": {"sha1": "75583f20a922ab2e", "mtime": 1778401973.4865518, "size": 8976}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\atom.vp": {"sha1": "aa246c6e6aa30484", "mtime": 1785389628.701967, "size": 1198}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\memhub.vp": {"sha1": "04e5fe47ff2af528", "mtime": 1786093335.1900027, "size": 27855}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\numpy\\__init__.vp": {"sha1": "c3a6aed1f1fb8b1e", "mtime": 1784446436.2910569, "size": 39111}, "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": "928c0ff6d8c69ec9", "mtime": 1786032947.9330952, "size": 11557}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\testcheck.vp": {"sha1": "748d0424e8976fa0", "mtime": 1785332415.20287, "size": 1919}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\viperio.vp": {"sha1": "c9f4be41ca1cc2b4", "mtime": 1782812279.506002, "size": 1556}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\vipermath.vp": {"sha1": "3f7c5e78d8652535", "mtime": 1781532528.2518907, "size": 15412}, "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}} \ No newline at end of file diff --git a/Test/TestProject/temp/_sha1_map.txt b/Test/TestProject/temp/_sha1_map.txt deleted file mode 100644 index 1dd02a0..0000000 --- a/Test/TestProject/temp/_sha1_map.txt +++ /dev/null @@ -1,19 +0,0 @@ -04e5fe47ff2af528:includes/memhub.vp -285b6aa29a34754d:includes/stdio.vp -3cd87018ba1e76bc:test_numpy.vp -3f7c5e78d8652535:includes/vipermath.vp -49cae05490a513cb:main.vp -6c658cc728d0bbf4:includes/stdlib.vp -748d0424e8976fa0:includes/testcheck.vp -75583f20a922ab2e:zc/test.vp -8e0d8fdba991b3b4:config.vp -928c0ff6d8c69ec9:includes/string.vp -aa246c6e6aa30484:includes/atom.vp -bbdf3bbd4c3bc28c:includes/w32\win32console.vp -c3a6aed1f1fb8b1e:includes/numpy\__init__.vp -c9f4be41ca1cc2b4:includes/viperio.vp -cfc83b830141b00e:zc/config.vp -e5fb16127bce8f68:zc/class_test.vp -f5522571bcce7bcb:includes/stdint.vp -faec3233d98371da:zc/logic_test.vp -fc980acec33d69a7:includes/w32\win32base.vp diff --git a/Test/TestProject/temp/_shared_sym.json b/Test/TestProject/temp/_shared_sym.json deleted file mode 100644 index 0b82583..0000000 Binary files a/Test/TestProject/temp/_shared_sym.json and /dev/null differ diff --git a/Test/TestProject/temp/aa246c6e6aa30484.stub.ll.dep b/Test/TestProject/temp/aa246c6e6aa30484.stub.ll.dep deleted file mode 100644 index e69de29..0000000 diff --git a/Test/TestProject/temp/aa246c6e6aa30484.vpi b/Test/TestProject/temp/aa246c6e6aa30484.vpi deleted file mode 100644 index 3147b54..0000000 --- a/Test/TestProject/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/TestProject/temp/bbdf3bbd4c3bc28c.stub.ll.dep b/Test/TestProject/temp/bbdf3bbd4c3bc28c.stub.ll.dep deleted file mode 100644 index d4b382c..0000000 --- a/Test/TestProject/temp/bbdf3bbd4c3bc28c.stub.ll.dep +++ /dev/null @@ -1 +0,0 @@ -f5522571bcce7bcb|fc980acec33d69a7 \ No newline at end of file diff --git a/Test/TestProject/temp/bbdf3bbd4c3bc28c.vpi b/Test/TestProject/temp/bbdf3bbd4c3bc28c.vpi deleted file mode 100644 index 4709b3e..0000000 --- a/Test/TestProject/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/TestProject/temp/c3a6aed1f1fb8b1e.stub.ll.dep b/Test/TestProject/temp/c3a6aed1f1fb8b1e.stub.ll.dep deleted file mode 100644 index e69de29..0000000 diff --git a/Test/TestProject/temp/c3a6aed1f1fb8b1e.vpi b/Test/TestProject/temp/c3a6aed1f1fb8b1e.vpi deleted file mode 100644 index fd928e3..0000000 --- a/Test/TestProject/temp/c3a6aed1f1fb8b1e.vpi +++ /dev/null @@ -1,240 +0,0 @@ -""" -Auto-generated Python stub file from numpy.__init__.vp -Module: numpy.__init__ -""" - - -from stdint import * -import stdlib -import string -import vipermath -import stdio -import t, c -import memhub - -MAX_NDIM: t.CDefine = 4 -float64: t.CTypedef = t.CDouble -float32: t.CTypedef = t.CFloat -int64: t.CTypedef = t.CLong -int32: t.CTypedef = t.CInt -uint8: t.CTypedef = t.CUnsignedChar -pi: t.CDefine = 3.14159265358979323846 -e: t.CDefine = 2.71828182845904523536 - -@t.Object -class ndarray[T]: - data: T | t.CPtr - shape: t.CArray[t.CSizeT, MAX_NDIM] - strides: t.CArray[t.CSizeT, MAX_NDIM] - ndim: t.CInt - size: t.CSizeT - owns_data: t.CInt - pool: memhub.MemManager | t.CPtr - def __new__(self: ndarray, pool: memhub.MemManager | t.CPtr, n: t.CSizeT) -> t.CInt: pass - def __add__(self: ndarray, other: ndarray[T] | t.CPtr) -> ndarray[T] | t.CPtr: pass - def __sub__(self: ndarray, other: ndarray[T] | t.CPtr) -> ndarray[T] | t.CPtr: pass - def __mul__(self: ndarray, other: ndarray[T] | t.CPtr) -> ndarray[T] | t.CPtr: pass - def __truediv__(self: ndarray, other: ndarray[T] | t.CPtr) -> ndarray[T] | t.CPtr: pass - def __floordiv__(self: ndarray, other: ndarray[T] | t.CPtr) -> ndarray[T] | t.CPtr: pass - def __mod__(self: ndarray, other: ndarray[T] | t.CPtr) -> ndarray[T] | t.CPtr: pass - def __neg__(self: ndarray) -> ndarray[T] | t.CPtr: pass - def __len__(self: ndarray) -> t.CInt: pass - def at2d(self: ndarray, row: t.CSizeT, col: t.CSizeT) -> T: pass - def set2d(self: ndarray, row: t.CSizeT, col: t.CSizeT, val: T) -> t.CInt: pass - def delete(self: ndarray) -> t.CInt: pass - def fill(self: ndarray, val: T) -> t.CInt: pass - def copy(self: ndarray) -> ndarray[T] | t.CPtr: pass - def reshape(self: ndarray, new_shape: INTPTR, new_ndim: t.CInt) -> ndarray[T] | t.CPtr: pass - def sum(self: ndarray) -> T: pass - def mean(self: ndarray) -> T: pass - def min(self: ndarray) -> T: pass - def max(self: ndarray) -> T: pass - def argmax(self: ndarray) -> t.CInt: pass - def argmin(self: ndarray) -> t.CInt: pass - def dot(self: ndarray, other: ndarray[T] | t.CPtr) -> T: pass - def T(self: ndarray) -> ndarray[T] | t.CPtr: pass - def print_arr(self: ndarray) -> t.CInt: pass - -Float64Array: t.CTypedef = ndarray[t.CDouble] -Float32Array: t.CTypedef = ndarray[t.CFloat] -Int64Array: t.CTypedef = ndarray[t.CLong] -Int32Array: t.CTypedef = ndarray[t.CInt] -Uint8Array: t.CTypedef = ndarray[t.CUnsignedChar] - -def _alloc_ndarray(pool: memhub.MemManager | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def _compute_strides(a: ndarray[t.CDouble] | t.CPtr) -> t.CInt: pass - -def _empty_like(a: ndarray[t.CDouble] | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def array(pool: memhub.MemManager | t.CPtr, data: t.CDouble | t.CPtr, n: t.CSizeT) -> ndarray[t.CDouble] | t.CPtr: pass - -def zeros(pool: memhub.MemManager | t.CPtr, n: t.CSizeT) -> ndarray[t.CDouble] | t.CPtr: pass - -def ones(pool: memhub.MemManager | t.CPtr, n: t.CSizeT) -> ndarray[t.CDouble] | t.CPtr: pass - -def full(pool: memhub.MemManager | t.CPtr, n: t.CSizeT, val: t.CDouble) -> ndarray[t.CDouble] | t.CPtr: pass - -def arange(pool: memhub.MemManager | t.CPtr, start: t.CDouble, stop: t.CDouble, step: t.CDouble) -> ndarray[t.CDouble] | t.CPtr: pass - -def linspace(pool: memhub.MemManager | t.CPtr, start: t.CDouble, stop: t.CDouble, num: t.CSizeT) -> ndarray[t.CDouble] | t.CPtr: pass - -def empty2d(pool: memhub.MemManager | t.CPtr, rows: t.CSizeT, cols: t.CSizeT) -> ndarray[t.CDouble] | t.CPtr: pass - -def zeros2d(pool: memhub.MemManager | t.CPtr, rows: t.CSizeT, cols: t.CSizeT) -> ndarray[t.CDouble] | t.CPtr: pass - -def ones2d(pool: memhub.MemManager | t.CPtr, rows: t.CSizeT, cols: t.CSizeT) -> ndarray[t.CDouble] | t.CPtr: pass - -def eye(pool: memhub.MemManager | t.CPtr, n: t.CSizeT) -> ndarray[t.CDouble] | t.CPtr: pass - -def diag(pool: memhub.MemManager | t.CPtr, vals: ndarray[t.CDouble] | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def np_abs(a: ndarray[t.CDouble] | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def np_sqrt(a: ndarray[t.CDouble] | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def np_exp(a: ndarray[t.CDouble] | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def np_log(a: ndarray[t.CDouble] | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def np_sin(a: ndarray[t.CDouble] | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def np_cos(a: ndarray[t.CDouble] | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def np_tan(a: ndarray[t.CDouble] | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def np_pow(a: ndarray[t.CDouble] | t.CPtr, p: t.CDouble) -> ndarray[t.CDouble] | t.CPtr: pass - -def add_scalar(a: ndarray[t.CDouble] | t.CPtr, s: t.CDouble) -> ndarray[t.CDouble] | t.CPtr: pass - -def mul_scalar(a: ndarray[t.CDouble] | t.CPtr, s: t.CDouble) -> ndarray[t.CDouble] | t.CPtr: pass - -def sub_scalar(a: ndarray[t.CDouble] | t.CPtr, s: t.CDouble) -> ndarray[t.CDouble] | t.CPtr: pass - -def div_scalar(a: ndarray[t.CDouble] | t.CPtr, s: t.CDouble) -> ndarray[t.CDouble] | t.CPtr: pass - -def matmul(a: ndarray[t.CDouble] | t.CPtr, b: ndarray[t.CDouble] | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def dot_product(a: ndarray[t.CDouble] | t.CPtr, b: ndarray[t.CDouble] | t.CPtr) -> t.CDouble: pass - -def np_sum(a: ndarray[t.CDouble] | t.CPtr) -> t.CDouble: pass - -def np_mean(a: ndarray[t.CDouble] | t.CPtr) -> t.CDouble: pass - -def np_min(a: ndarray[t.CDouble] | t.CPtr) -> t.CDouble: pass - -def np_max(a: ndarray[t.CDouble] | t.CPtr) -> t.CDouble: pass - -def np_argmax(a: ndarray[t.CDouble] | t.CPtr) -> t.CInt: pass - -def np_argmin(a: ndarray[t.CDouble] | t.CPtr) -> t.CInt: pass - -def var(a: ndarray[t.CDouble] | t.CPtr) -> t.CDouble: pass - -def std(a: ndarray[t.CDouble] | t.CPtr) -> t.CDouble: pass - -def norm(a: ndarray[t.CDouble] | t.CPtr) -> t.CDouble: pass - -def clip(a: ndarray[t.CDouble] | t.CPtr, lo: t.CDouble, hi: t.CDouble) -> ndarray[t.CDouble] | t.CPtr: pass - -def concatenate(a: ndarray[t.CDouble] | t.CPtr, b: ndarray[t.CDouble] | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def sort_arr(a: ndarray[t.CDouble] | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def reverse(a: ndarray[t.CDouble] | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def np_log10(a: ndarray[t.CDouble] | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def np_log2(a: ndarray[t.CDouble] | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def np_floor(a: ndarray[t.CDouble] | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def np_ceil(a: ndarray[t.CDouble] | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def np_round(a: ndarray[t.CDouble] | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def np_sign(a: ndarray[t.CDouble] | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def np_tanh(a: ndarray[t.CDouble] | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def np_sinh(a: ndarray[t.CDouble] | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def np_cosh(a: ndarray[t.CDouble] | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def np_arcsin(a: ndarray[t.CDouble] | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def np_arccos(a: ndarray[t.CDouble] | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def np_arctan(a: ndarray[t.CDouble] | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def np_arctan2(y: ndarray[t.CDouble] | t.CPtr, x: ndarray[t.CDouble] | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def np_degrees(a: ndarray[t.CDouble] | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def np_radians(a: ndarray[t.CDouble] | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def np_isnan(a: ndarray[t.CDouble] | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def np_isinf(a: ndarray[t.CDouble] | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def np_maximum(a: ndarray[t.CDouble] | t.CPtr, b: ndarray[t.CDouble] | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def np_minimum(a: ndarray[t.CDouble] | t.CPtr, b: ndarray[t.CDouble] | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def cumsum(a: ndarray[t.CDouble] | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def diff(a: ndarray[t.CDouble] | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def flatten(a: ndarray[t.CDouble] | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def trace(a: ndarray[t.CDouble] | t.CPtr) -> t.CDouble: pass - -def outer(a: ndarray[t.CDouble] | t.CPtr, b: ndarray[t.CDouble] | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def np_where(condition: ndarray[t.CDouble] | t.CPtr, x: ndarray[t.CDouble] | t.CPtr, y: ndarray[t.CDouble] | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def np_count_nonzero(a: ndarray[t.CDouble] | t.CPtr) -> t.CInt: pass - -def np_all(a: ndarray[t.CDouble] | t.CPtr) -> t.CInt: pass - -def np_any(a: ndarray[t.CDouble] | t.CPtr) -> t.CInt: pass - -def np_equal(a: ndarray[t.CDouble] | t.CPtr, b: ndarray[t.CDouble] | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def np_not_equal(a: ndarray[t.CDouble] | t.CPtr, b: ndarray[t.CDouble] | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def np_less(a: ndarray[t.CDouble] | t.CPtr, b: ndarray[t.CDouble] | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def np_greater(a: ndarray[t.CDouble] | t.CPtr, b: ndarray[t.CDouble] | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def np_less_equal(a: ndarray[t.CDouble] | t.CPtr, b: ndarray[t.CDouble] | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def np_greater_equal(a: ndarray[t.CDouble] | t.CPtr, b: ndarray[t.CDouble] | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def empty(pool: memhub.MemManager | t.CPtr, n: t.CSizeT) -> ndarray[t.CDouble] | t.CPtr: pass - -def full2d(pool: memhub.MemManager | t.CPtr, rows: t.CSizeT, cols: t.CSizeT, val: t.CDouble) -> ndarray[t.CDouble] | t.CPtr: pass - -def zeros_like(a: ndarray[t.CDouble] | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def ones_like(a: ndarray[t.CDouble] | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def arange1(pool: memhub.MemManager | t.CPtr, stop: t.CDouble) -> ndarray[t.CDouble] | t.CPtr: pass - -def linspace2(pool: memhub.MemManager | t.CPtr, start: t.CDouble, stop: t.CDouble) -> ndarray[t.CDouble] | t.CPtr: pass - -def meshgrid(x: ndarray[t.CDouble] | t.CPtr, y: ndarray[t.CDouble] | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def det2x2(a: ndarray[t.CDouble] | t.CPtr) -> t.CDouble: pass - -def inv2x2(a: ndarray[t.CDouble] | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def cross3(a: ndarray[t.CDouble] | t.CPtr, b: ndarray[t.CDouble] | t.CPtr) -> ndarray[t.CDouble] | t.CPtr: pass - -def np_interp(x: t.CDouble, xp: ndarray[t.CDouble] | t.CPtr, fp: ndarray[t.CDouble] | t.CPtr) -> t.CDouble: pass - -def prod(a: ndarray[t.CDouble] | t.CPtr) -> t.CDouble: pass - -def median(a: ndarray[t.CDouble] | t.CPtr) -> t.CDouble: pass - -def percentile(a: ndarray[t.CDouble] | t.CPtr, q: t.CDouble) -> t.CDouble: pass diff --git a/Test/TestProject/temp/c9f4be41ca1cc2b4.stub.ll.dep b/Test/TestProject/temp/c9f4be41ca1cc2b4.stub.ll.dep deleted file mode 100644 index 793e7ed..0000000 --- a/Test/TestProject/temp/c9f4be41ca1cc2b4.stub.ll.dep +++ /dev/null @@ -1 +0,0 @@ -f5522571bcce7bcb \ No newline at end of file diff --git a/Test/TestProject/temp/c9f4be41ca1cc2b4.vpi b/Test/TestProject/temp/c9f4be41ca1cc2b4.vpi deleted file mode 100644 index f7ed5fd..0000000 --- a/Test/TestProject/temp/c9f4be41ca1cc2b4.vpi +++ /dev/null @@ -1,22 +0,0 @@ -""" -Auto-generated Python stub file from viperio.vp -Module: viperio -""" - - -import t, c -from stdint import * - -class Buf: - data: t.CChar | t.CPtr - length: t.CSizeT - capacity: t.CSizeT - owned: bool - def __init__(self: Buf, data: t.CChar | t.CPtr, capacity: t.CSizeT, length: t.CSizeT = 0, owned: bool = False) -> t.CInt: pass - def clear(self: Buf) -> t.CInt: pass - def write(self: Buf, src: t.CChar | t.CPtr, count: t.CSizeT) -> t.CSizeT: pass - def cstr(self: Buf) -> t.CChar | t.CPtr: pass - def reset(self: Buf) -> t.CInt: pass - def __enter__(self: Buf) -> 'Buf' | t.CPtr: pass - def __exit__(self: Buf) -> t.CInt: pass - def free(self: Buf) -> t.CInt: pass \ No newline at end of file diff --git a/Test/TestProject/temp/cfc83b830141b00e.doc.json b/Test/TestProject/temp/cfc83b830141b00e.doc.json deleted file mode 100644 index 9e26dfe..0000000 --- a/Test/TestProject/temp/cfc83b830141b00e.doc.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/Test/TestProject/temp/cfc83b830141b00e.vpi b/Test/TestProject/temp/cfc83b830141b00e.vpi deleted file mode 100644 index a3a9f1c..0000000 --- a/Test/TestProject/temp/cfc83b830141b00e.vpi +++ /dev/null @@ -1,27 +0,0 @@ -""" -Auto-generated Python stub file from zc.config.vp -Module: zc.config -""" - - -import t, c - -POSMAX: t.CDefine = 100 -MAX_RETRY: t.CDefine = 5 -BUFFER_SIZE: t.CDefine = 256 -PI: t.CDefine = 3.14159 -EULER: t.CDefine = 2.71828 -TRUE: t.CDefine = 1 -FALSE: t.CDefine = 0 -NULL: t.CDefine = 0 -MATH_OFFSET: t.CDefine = 10 -MATH_SCALE: t.CDefine = 2 -THRESHOLD: t.CDefine = 50 -LOOP_LIMIT: t.CDefine = 20 -SHIFT_AMOUNT: t.CDefine = 2 -MASK_VALUE: t.CDefine = 0xFF -BIT_RANGE: t.CDefine = 4 -EXPONENT_BASE: t.CDefine = 3 -MODULO_DIVISOR: t.CDefine = 7 -SCALE_SHIFT: t.CDefine = 4 -HALF_SCALE: t.CDefine = 0.5 \ No newline at end of file diff --git a/Test/TestProject/temp/e5fb16127bce8f68.doc.json b/Test/TestProject/temp/e5fb16127bce8f68.doc.json deleted file mode 100644 index 9e26dfe..0000000 --- a/Test/TestProject/temp/e5fb16127bce8f68.doc.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/Test/TestProject/temp/e5fb16127bce8f68.vpi b/Test/TestProject/temp/e5fb16127bce8f68.vpi deleted file mode 100644 index 70b33c7..0000000 --- a/Test/TestProject/temp/e5fb16127bce8f68.vpi +++ /dev/null @@ -1,66 +0,0 @@ -""" -Auto-generated Python stub file from zc.class_test.vp -Module: zc.class_test -""" - - -import stdio -import stdint -import t, c - -class SimpleData(t.Object): - x: t.CInt - y: t.CInt -class Point3D(t.Object): - x: t.CFloat - y: t.CFloat - z: t.CFloat -class Student(t.Object): - name: t.CChar | t.CPtr - age: t.CInt - score: t.CInt - def __init__(self: Student, n: t.CChar | t.CPtr, a: t.CInt, s: t.CInt) -> t.CInt: pass - def get_age(self: Student) -> t.CInt: pass - def get_score(self: Student) -> t.CInt: pass -class Counter(t.Object): - value: t.CInt - def __init__(self: Counter, initial: t.CInt) -> t.CInt: pass - def increment(self: Counter) -> t.CInt: pass - def get_value(self: Counter) -> t.CInt: pass -class StackObj(t.Object): - data: t.CInt - next_ptr: t.CVoid | t.CPtr - -def TestBasicDataClass() -> t.CInt: pass - -def TestPoint3DClass() -> t.CInt: pass - -def TestStudentClass() -> t.CInt: pass - -def TestCounterClass() -> t.CInt: pass - -def TestStackAllocation() -> t.CInt: pass - -def TestHeapAllocation() -> t.CInt: pass - -def TestHeapObjectWithInit() -> t.CInt: pass - -def TestMultipleStackObjects() -> t.CInt: pass - -def TestImplicitInitCall() -> t.CInt: pass - -def TestClassWithBitFields() -> t.CInt: pass - -def TestIntArray() -> t.CInt: pass - -def TestFloatArray() -> t.CInt: pass - -def TestCharArray() -> t.CInt: pass - -def TestNestedArray() -> t.CInt: pass - -def TestArrayWithStruct() -> t.CInt: pass - -def TestArrayPointer() -> t.CInt: pass - -def TestDynamicString() -> t.CInt: pass diff --git a/Test/TestProject/temp/f5522571bcce7bcb.stub.ll.dep b/Test/TestProject/temp/f5522571bcce7bcb.stub.ll.dep deleted file mode 100644 index e69de29..0000000 diff --git a/Test/TestProject/temp/f5522571bcce7bcb.vpi b/Test/TestProject/temp/f5522571bcce7bcb.vpi deleted file mode 100644 index f0bc071..0000000 --- a/Test/TestProject/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/TestProject/temp/faec3233d98371da.doc.json b/Test/TestProject/temp/faec3233d98371da.doc.json deleted file mode 100644 index 9e26dfe..0000000 --- a/Test/TestProject/temp/faec3233d98371da.doc.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/Test/TestProject/temp/faec3233d98371da.vpi b/Test/TestProject/temp/faec3233d98371da.vpi deleted file mode 100644 index 01c9b57..0000000 --- a/Test/TestProject/temp/faec3233d98371da.vpi +++ /dev/null @@ -1,54 +0,0 @@ -""" -Auto-generated Python stub file from zc.logic_test.vp -Module: zc.logic_test -""" - - -import config -import t, c - -def ForRangeBasicTest(stop: t.CInt) -> t.CInt: pass - -def ForRangeWithStartStop(start: t.CInt, stop: t.CInt, step: t.CInt) -> t.CInt: pass - -def NestedForRangeTest(rows: t.CInt, cols: t.CInt) -> t.CInt: pass - -def ForWithIfBreakTest(data_size: t.CInt) -> t.CInt: pass - -def ForWithIfContinueTest(n: t.CInt) -> t.CInt: pass - -def ForWithElifBranchTest(value: t.CInt) -> t.CInt: pass - -def WhileWithIfElifElseTest(iterations: t.CInt) -> t.CInt: pass - -def WhileWithNestedIfTest(limit: t.CInt) -> t.CInt: pass - -def WhileWithMatchCaseTest(value: t.CInt) -> t.CInt: pass - -def WhileWithMatchCaseNoBreakTest(value: t.CInt) -> t.CInt: pass - -def ComplexForWhileMatchTest(outer_limit: t.CInt, inner_limit: t.CInt) -> t.CInt: pass - -def ForWithCaseAndNoBreakTest(n: t.CInt) -> t.CInt: pass - -def WhileWithBreakConditionTest(limit: t.CInt) -> t.CInt: pass - -def NestedWhileWithMultipleBreakPoints(depth: t.CInt, width: t.CInt) -> t.CInt: pass - -def ForWithMatchCaseInLoopTest(iterations: t.CInt) -> t.CInt: pass - -def ComplexLogicWithElifChains(a: t.CInt, b: t.CInt, c_val: t.CInt) -> t.CInt: pass - -def ForRangeWithStepAndCondition(n: t.CInt, step: t.CInt) -> t.CInt: pass - -def MatchCaseWithGuardConditions(value: t.CInt) -> t.CInt: pass - -def WhileWithMultipleMatchCases(iterations: t.CInt) -> t.CInt: pass - -def ForWhileMixWithBreakAndContinue(n: t.CInt) -> t.CInt: pass - -def ComplexCaseMatchingWithRanges(start: t.CInt, end: t.CInt) -> t.CInt: pass - -def WhileWithElifInElifChain(limit: t.CInt) -> t.CInt: pass - -def ForWithCaseNoBreakNested(inner_limit: t.CInt) -> t.CInt: pass diff --git a/Test/TestProject/temp/fc980acec33d69a7.stub.ll.dep b/Test/TestProject/temp/fc980acec33d69a7.stub.ll.dep deleted file mode 100644 index 793e7ed..0000000 --- a/Test/TestProject/temp/fc980acec33d69a7.stub.ll.dep +++ /dev/null @@ -1 +0,0 @@ -f5522571bcce7bcb \ No newline at end of file diff --git a/Test/TestProject/temp/fc980acec33d69a7.vpi b/Test/TestProject/temp/fc980acec33d69a7.vpi deleted file mode 100644 index 3f9feff..0000000 --- a/Test/TestProject/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/TestProject2/.tpv_build/temp/54/541a1ed9b8be53c8.vpi b/Test/TestProject2/.tpv_build/temp/54/541a1ed9b8be53c8.vpi deleted file mode 100644 index 2729a90..0000000 --- a/Test/TestProject2/.tpv_build/temp/54/541a1ed9b8be53c8.vpi +++ /dev/null @@ -1,13 +0,0 @@ -"""Auto-generated Python stub file""" - - -from stdint import * -import w32.win32console -import config -import hashlib -import binascii -import zlib.pyzlib as zp -import t, c -import testcheck -def main() -> t.CInt | t.CExport: pass - diff --git a/Test/TestProject2/.tpv_build/temp/_sha1_map.txt b/Test/TestProject2/.tpv_build/temp/_sha1_map.txt deleted file mode 100644 index 43460a2..0000000 --- a/Test/TestProject2/.tpv_build/temp/_sha1_map.txt +++ /dev/null @@ -1,5 +0,0 @@ -541a1ed9b8be53c8:main.vp -110d7d2c8a47ff77:zc/class_test.vp -15b2db4f5d33f57e:zc/config.vp -faec3233d98371da:zc/logic_test.vp -07b189ae3dcfb270:zc/test.vp diff --git a/Test/TestProject2/App/main.vp b/Test/TestProject2/App/main.vp deleted file mode 100644 index 69f06d0..0000000 --- a/Test/TestProject2/App/main.vp +++ /dev/null @@ -1,35 +0,0 @@ -from stdint import * -import w32.win32console -import config -import hashlib -import binascii -import zlib.pyzlib as zp - -import t, c -import testcheck - - -def main() -> t.CInt | t.CExport: - w32.win32console.SetConsoleCP(65001) - w32.win32console.SetConsoleOutputCP(65001) - - testcheck.begin("TestProject2: 综合库测试") - - testcheck.section("zlib runtime version") - print(zp.runtime_version()) - testcheck.ok("zlib runtime version printed") - - testcheck.section("HASHLIB") - md5_buf: t.CArray[t.CUInt8T, hashlib.MD5_DIGEST_LEN] - mctx = hashlib.md5() - mctx.update("hello") - mctx.final(md5_buf) - testcheck.ok("HASHLIB md5 completed") - - testcheck.section("BINASCII") - binascii.init_binascii() - crc_val: t.CUnsignedInt = binascii.crc32("hello", 5, 0) - testcheck.ok("BINASCII crc32 completed") - - testcheck.info("END") - return testcheck.end() diff --git a/Test/TestProject2/App/zc/class_test.vp b/Test/TestProject2/App/zc/class_test.vp deleted file mode 100644 index 4594f8b..0000000 --- a/Test/TestProject2/App/zc/class_test.vp +++ /dev/null @@ -1,245 +0,0 @@ -import stdio -import stdint -import t, c - - -class SimpleData(t.Object): - x: t.CInt - y: t.CInt - - -class Point3D(t.Object): - x: t.CFloat - y: t.CFloat - z: t.CFloat - - -class Student(t.Object): - name: t.CChar | t.CPtr - age: t.CInt - score: t.CInt - - def __init__(self, n: t.CChar | t.CPtr, a: t.CInt, s: t.CInt): - self.name = n - self.age = a - self.score = s - - def get_age(self) -> t.CInt: - return self.age - - def get_score(self) -> t.CInt: - return self.score - - -class Counter(t.Object): - value: t.CInt - - def __init__(self, initial: t.CInt): - self.value = initial - - def increment(self): - self.value += 1 - - def get_value(self) -> t.CInt: - return self.value - - -class StackObj(t.Object): - data: t.CInt - next_ptr: t.CVoid | t.CPtr - - -def TestBasicDataClass(): - stdio.printf("=== Test Basic Data Class ===\n") - p: SimpleData = SimpleData() - p.x = 10 - p.y = 20 - stdio.printf("SimpleData: x=%d, y=%d\n", p.x, p.y) - - -def TestPoint3DClass(): - stdio.printf("=== Test Point3D Class ===\n") - pt: Point3D = Point3D() - pt.x = 1.5 - pt.y = 2.5 - pt.z = 3.5 - stdio.printf("Point3D: x=%.1f, y=%.1f, z=%.1f\n", pt.x, pt.y, pt.z) - - -def TestStudentClass(): - stdio.printf("=== Test Student Class ===\n") - s: Student = Student("Alice", 20, 95) - stdio.printf("Student: name=%s, age=%d, score=%d\n", s.name, s.age, s.score) - stdio.printf(" get_age()=%d, get_score()=%d\n", s.get_age(), s.get_score()) - - -def TestCounterClass(): - stdio.printf("=== Test Counter Class ===\n") - cnt: Counter = Counter(0) - stdio.printf("Initial value: %d\n", cnt.get_value()) - cnt.increment() - cnt.increment() - cnt.increment() - stdio.printf("After 3 increments: %d\n", cnt.get_value()) - - -def TestStackAllocation(): - stdio.printf("=== Test Stack Allocation ===\n") - obj1: SimpleData = SimpleData() - obj1.x = 100 - obj1.y = 200 - stdio.printf("Stack obj1: x=%d, y=%d\n", obj1.x, obj1.y) - - obj2: Point3D = Point3D() - obj2.x = 10.0 - obj2.y = 20.0 - obj2.z = 30.0 - stdio.printf("Stack obj2: x=%.1f, y=%.1f, z=%.1f\n", obj2.x, obj2.y, obj2.z) - - -def TestHeapAllocation(): - stdio.printf("=== Test Heap Allocation ===\n") - ptr: t.CVoid | t.CPtr = c.malloc(1024) - if ptr != 0: - stdio.printf("Allocated 1024 bytes at %p\n", ptr) - c.free(ptr) - stdio.printf("Freed memory\n") - else: - stdio.printf("malloc failed\n") - - -def TestHeapObjectWithInit(): - stdio.printf("=== Test Heap Object with Init ===\n") - mem_size: t.CSizeT = 256 - ptr: t.CVoid | t.CPtr = c.malloc(mem_size) - if ptr != 0: - stdio.printf("Allocated %d bytes\n", mem_size) - c.free(ptr) - else: - stdio.printf("malloc failed\n") - - -def TestMultipleStackObjects(): - stdio.printf("=== Test Multiple Stack Objects ===\n") - objs: SimpleData = SimpleData() - objs.x = 1 - objs.y = 2 - obj2: Point3D = Point3D() - obj2.x = 5.0 - obj2.y = 10.0 - obj2.z = 15.0 - obj3: Counter = Counter(42) - stdio.printf("objs: x=%d, y=%d\n", objs.x, objs.y) - stdio.printf("obj2: x=%.1f, y=%.1f, z=%.1f\n", obj2.x, obj2.y, obj2.z) - stdio.printf("obj3 initial: %d\n", obj3.get_value()) - obj3.increment() - obj3.increment() - stdio.printf("obj3 after 2 increments: %d\n", obj3.get_value()) - - -def TestImplicitInitCall(): - stdio.printf("=== Test Implicit Init Call ===\n") - stu1: Student = Student("Bob", 22, 88) - stu2: Student = Student("Charlie", 19, 77) - stdio.printf("stu1: name=%s, age=%d, score=%d\n", stu1.name, stu1.age, stu1.score) - stdio.printf("stu2: name=%s, age=%d, score=%d\n", stu2.name, stu2.age, stu2.score) - - -def TestClassWithBitFields(): - stdio.printf("=== Test Class with Bit Fields ===\n") - flags: StackObj = StackObj() - flags.data = 0 - flags.next_ptr = 0 - stdio.printf("StackObj: data=%d, next_ptr=%p\n", flags.data, flags.next_ptr) - - -def TestIntArray(): - stdio.printf("=== Test Int Array ===\n") - arr: t.CArray[t.CInt, 5] = t.CArray[t.CInt, 5]() - i: t.CInt = 0 - while i < 5: - arr[i] = i * 10 - i += 1 - i = 0 - while i < 5: - stdio.printf("arr[%d]=%d\n", i, arr[i]) - i += 1 - - -def TestFloatArray(): - stdio.printf("=== Test Float Array ===\n") - farr: t.CArray[t.CFloat, 4] = t.CArray[t.CFloat, 4]() - farr[0] = 1.5 - farr[1] = 2.5 - farr[2] = 3.5 - farr[3] = 4.5 - i: t.CInt = 0 - while i < 4: - stdio.printf("farr[%d]=%.1f\n", i, farr[i]) - i += 1 - - -def TestCharArray(): - stdio.printf("=== Test Char Array (String) ===\n") - str_arr: t.CArray[t.CChar, 32] = t.CArray[t.CChar, 32]() - str_arr[0] = 'H' - str_arr[1] = 'e' - str_arr[2] = 'l' - str_arr[3] = 'l' - str_arr[4] = 'o' - str_arr[5] = '\0' - stdio.printf("String: %s\n", str_arr) - - -def TestNestedArray(): - stdio.printf("=== Test Nested Array (Array of Arrays) ===\n") - row0: t.CArray[t.CInt, 3] = t.CArray[t.CInt, 3]() - row1: t.CArray[t.CInt, 3] = t.CArray[t.CInt, 3]() - row0[0] = 0 - row0[1] = 1 - row0[2] = 2 - row1[0] = 10 - row1[1] = 11 - row1[2] = 12 - i: t.CInt = 0 - while i < 3: - stdio.printf("row0[%d]=%d ", i, row0[i]) - i += 1 - stdio.printf("\n") - i = 0 - while i < 3: - stdio.printf("row1[%d]=%d ", i, row1[i]) - i += 1 - stdio.printf("\n") - - -def TestArrayWithStruct(): - stdio.printf("=== Test Array with Struct ===\n") - points: t.CArray[SimpleData, 3] = t.CArray[SimpleData, 3]() - i: t.CInt = 0 - while i < 3: - points[i].x = i * 10 - points[i].y = i * 100 - i += 1 - i = 0 - while i < 3: - stdio.printf("Point[%d]: x=%d, y=%d\n", i, points[i].x, points[i].y) - i += 1 - - -def TestArrayPointer(): - stdio.printf("=== Test Array Pointer ===\n") - data: t.CArray[t.CInt, 8] = t.CArray[t.CInt, 8]() - data[0] = 100 - data[1] = 200 - data[2] = 300 - ptr: t.CInt | t.CPtr = data - stdio.printf("ptr[0]=%d\n", ptr[0]) - stdio.printf("ptr[1]=%d\n", ptr[1]) - stdio.printf("ptr[2]=%d\n", ptr[2]) - - -def TestDynamicString(): - stdio.printf("=== Test Dynamic String ===\n") - name: str = "TransPyC" - stdio.printf("Hello %s!\n", name) \ No newline at end of file diff --git a/Test/TestProject2/App/zc/config.vp b/Test/TestProject2/App/zc/config.vp deleted file mode 100644 index 1b4e36f..0000000 --- a/Test/TestProject2/App/zc/config.vp +++ /dev/null @@ -1,24 +0,0 @@ -import t, c - - -POSMAX: t.CDefine = 100 -MAX_RETRY: t.CDefine = 5 -BUFFER_SIZE: t.CDefine = 256 -PI: t.CDefine = 3.14159 -EULER: t.CDefine = 2.71828 -TRUE: t.CDefine = 1 -FALSE: t.CDefine = 0 -NULL: t.CDefine = 0 - - -MATH_OFFSET: t.CDefine = 10 -MATH_SCALE: t.CDefine = 2 -THRESHOLD: t.CDefine = 50 -LOOP_LIMIT: t.CDefine = 20 -SHIFT_AMOUNT: t.CDefine = 2 -MASK_VALUE: t.CDefine = 0xFF -BIT_RANGE: t.CDefine = 4 -EXPONENT_BASE: t.CDefine = 3 -MODULO_DIVISOR: t.CDefine = 7 -SCALE_SHIFT: t.CDefine = 4 -HALF_SCALE: t.CDefine = 0.5 \ No newline at end of file diff --git a/Test/TestProject2/App/zc/logic_test.vp b/Test/TestProject2/App/zc/logic_test.vp deleted file mode 100644 index 4d5c266..0000000 --- a/Test/TestProject2/App/zc/logic_test.vp +++ /dev/null @@ -1,372 +0,0 @@ -import config -import t, c - - -def ForRangeBasicTest(stop: t.CInt): - i: t.CInt = 0 - for i in range(stop): - print("For range: ", i) - print("Done") - - -def ForRangeWithStartStop(start: t.CInt, stop: t.CInt, step: t.CInt): - i: t.CInt = 0 - for i in range(start, stop, step): - print("Range: ", i) - print("Done") - - -def NestedForRangeTest(rows: t.CInt, cols: t.CInt): - r: t.CInt = 0 - c_val: t.CInt = 0 - for r in range(rows): - for c_val in range(cols): - print("Cell: ", r, c_val) - print("Grid done") - - -def ForWithIfBreakTest(data_size: t.CInt): - i: t.CInt = 0 - found: t.CInt = 0 - for i in range(data_size): - if i == 5: - print("Found at: ", i) - found = 1 - break - print("Checking: ", i) - if found == 0: - print("Not found") - - -def ForWithIfContinueTest(n: t.CInt): - i: t.CInt = 0 - count: t.CInt = 0 - for i in range(n): - if i % 2 == 0: - continue - print("Odd: ", i) - count += 1 - print("Total odd: ", count) - - -def ForWithElifBranchTest(value: t.CInt): - i: t.CInt = 0 - result: t.CInt = 0 - for i in range(value): - if i < 3: - result += 1 - elif i < 6: - result += 2 - elif i < 9: - result += 3 - else: - result += 4 - print("Elif branch result: ", result) - - -def WhileWithIfElifElseTest(iterations: t.CInt): - counter: t.CInt = 0 - while counter < iterations: - if counter < 2: - print("Phase 1: ", counter) - elif counter < 4: - print("Phase 2: ", counter) - elif counter < 6: - print("Phase 3: ", counter) - else: - print("Phase 4: ", counter) - counter += 1 - print("While done") - - -def WhileWithNestedIfTest(limit: t.CInt): - outer: t.CInt = 0 - while outer < limit: - inner: t.CInt = 0 - while inner < limit: - if inner == 2 and outer == 1: - print("Target: ", outer, inner) - inner += 1 - continue - if inner > 3: - break - print("Inner: ", inner) - inner += 1 - outer += 1 - - -def WhileWithMatchCaseTest(value: t.CInt): - result: t.CInt = 0 - match value: - case 1: - result = 100 - print("Case 1") - case 2: - result = 200 - print("Case 2") - case 3: - result = 300 - print("Case 3") - case _: - result = 999 - print("Default case") - print("Match result: ", result) - - -def WhileWithMatchCaseNoBreakTest(value: t.CInt): - result: t.CInt = 0 - match value: - case 1: - result = 10 - print("Case 1: ", result) - case 2: - result = 20 - print("Case 2: ", result) - result += 5 - case 3: - result = 30 - print("Case 3: ", result) - case _: - result = 0 - print("No break match result: ", result) - - -def ComplexForWhileMatchTest(outer_limit: t.CInt, inner_limit: t.CInt): - i: t.CInt = 0 - j: t.CInt = 0 - result: t.CInt = 0 - for i in range(outer_limit): - j = 0 - while j < inner_limit: - match (i, j): - case (0, 0): - result += 1 - case (1, 1): - result += 10 - case (2, _): - result += 100 - case (_, 0): - result += 1000 - case _: - result += 10000 - j += 1 - print("Complex match result: ", result) - - -def ForWithCaseAndNoBreakTest(n: t.CInt): - i: t.CInt = 0 - result: t.CInt = 0 - for i in range(n): - match i: - case 0: - result += 1 - case 1: - result += 2 - case 2: - result += 3 - result += 10 - case _: - result += i - c.NoBreak - print("NoBreak result: ", result) - - -def WhileWithBreakConditionTest(limit: t.CInt): - i: t.CInt = 0 - early_exit: t.CInt = 0 - while i < limit: - if i == 3: - early_exit = 1 - break - if i == 2: - i += 1 - continue - print("While i: ", i) - i += 1 - - -def NestedWhileWithMultipleBreakPoints(depth: t.CInt, width: t.CInt): - d: t.CInt = 0 - w: t.CInt = 0 - count: t.CInt = 0 - while d < depth: - w = 0 - while w < width: - if w == 2: - break - if d == 1 and w == 1: - c.Break - count += 1 - w += 1 - d += 1 - print("Nested break count: ", count) - - -def ForWithMatchCaseInLoopTest(iterations: t.CInt): - i: t.CInt = 0 - sum_even: t.CInt = 0 - sum_odd: t.CInt = 0 - for i in range(iterations): - match i % 3: - case 0: - sum_even += i - case 1: - sum_odd += i - case 2: - sum_even += i * 2 - case _: - pass - print("Sum even: ", sum_even) - print("Sum odd: ", sum_odd) - - -def ComplexLogicWithElifChains(a: t.CInt, b: t.CInt, c_val: t.CInt): - i: t.CInt = 0 - result: t.CInt = 0 - while i < 10: - if i < a: - if i < b: - result += 1 - elif i < c_val: - result += 2 - else: - result += 3 - elif i < b: - if i < c_val: - result += 4 - else: - result += 5 - elif i < c_val: - result += 6 - else: - result += 7 - i += 1 - print("Complex elif chain result: ", result) - - -def ForRangeWithStepAndCondition(n: t.CInt, step: t.CInt): - i: t.CInt = 0 - count: t.CInt = 0 - for i in range(0, n, step): - if i % 2 == 0: - print("Even step: ", i) - count += 1 - else: - if i > 5: - print("Large odd: ", i) - else: - print("Small odd: ", i) - print("Total steps: ", count) - - -def MatchCaseWithGuardConditions(value: t.CInt): - result: t.CInt = 0 - match value: - case 1 if config.TRUE == 1: - result = 100 - case 2 if config.FALSE == 0: - result = 200 - case 3: - result = 300 - case _: - result = 0 - print("Guard match result: ", result) - - -def WhileWithMultipleMatchCases(iterations: t.CInt): - i: t.CInt = 0 - state: t.CInt = 0 - while i < iterations: - match state: - case 0: - if i > 3: - state = 1 - case 1: - if i > 6: - state = 2 - case 2: - if i > 9: - state = 0 - print("State at i=", i, ": ", state) - i += 1 - - -def ForWhileMixWithBreakAndContinue(n: t.CInt): - i: t.CInt = 0 - j: t.CInt = 0 - count: t.CInt = 0 - for i in range(n): - j = 0 - while j < n: - if j == 2: - j += 1 - continue - if i == 3 and j == 3: - break - count += 1 - j += 1 - print("Mix break continue count: ", count) - - -def ComplexCaseMatchingWithRanges(start: t.CInt, end: t.CInt): - i: t.CInt = 0 - bucket0: t.CInt = 0 - bucket1: t.CInt = 0 - bucket2: t.CInt = 0 - bucket3: t.CInt = 0 - for i in range(start, end): - match i: - case _ if i < 10: - bucket0 += 1 - case _ if i < 20: - bucket1 += 1 - case _ if i < 30: - bucket2 += 1 - case _: - bucket3 += 1 - print("Bucket0 (<10): ", bucket0) - print("Bucket1 (10-19): ", bucket1) - print("Bucket2 (20-29): ", bucket2) - print("Bucket3 (>=30): ", bucket3) - - -def WhileWithElifInElifChain(limit: t.CInt): - i: t.CInt = 0 - result: t.CInt = 0 - while i < limit: - if i < 2: - if i == 0: - result = 1 - else: - result = 2 - elif i < 4: - if i == 2: - result = 3 - else: - result = 4 - elif i < 6: - if i == 4: - result = 5 - else: - result = 6 - else: - result = 7 - print("Chain result[", i, "]: ", result) - i += 1 - - -def ForWithCaseNoBreakNested(inner_limit: t.CInt): - i: t.CInt = 0 - j: t.CInt = 0 - result: t.CInt = 0 - for i in range(3): - for j in range(inner_limit): - match j: - case 0: - result += 1 - case 1: - result += 2 - case _: - result += 3 - c.NoBreak - print("Nested NoBreak result: ", result) \ No newline at end of file diff --git a/Test/TestProject2/App/zc/test.vp b/Test/TestProject2/App/zc/test.vp deleted file mode 100644 index 24a08a8..0000000 --- a/Test/TestProject2/App/zc/test.vp +++ /dev/null @@ -1,298 +0,0 @@ -import config -import t, c - - -def AboutSizeTWhileTest(length: t.CSizeT): - pos: t.CSizeT = 0 - while pos < length: - print("Pos: ", pos) - if pos > config.POSMAX: break - pos += 1 - while pos < length: - if pos > config.POSMAX: - print("Pos: ", pos) - pos += 1 - else: - print("Pos: ", pos) - pos += 1 - if pos > config.POSMAX: break - else: - pos += 1 - print("Pos: ", pos) - while pos < length: - print("Pos: ", pos) - pos += 1 - - -def MathBasicTest(x: t.CInt, y: t.CInt) -> t.CInt: - result: t.CInt = 0 - result = x + y - print("Add: ", result) - result = x - y - print("Sub: ", result) - result = x * y - print("Mul: ", result) - if y != 0: - result = x / y - print("Div: ", result) - result = x % y if y != 0 else 0 - print("Mod: ", result) - return result - - -def MathAdvancedTest(value: t.CInt) -> t.CInt: - counter: t.CInt = 0 - scaled: t.CInt = 0 - offset: t.CInt = 0 - scaled = value * config.MATH_SCALE - print("Scaled: ", scaled) - offset = scaled + config.MATH_OFFSET - print("Offset: ", offset) - threshold: t.CInt = config.THRESHOLD - if offset > threshold: - print("Above threshold") - counter = 1 - elif offset == threshold: - print("At threshold") - counter = 0 - else: - print("Below threshold") - counter = -1 - return counter - - -def WhileWithElifElseTest(start: t.CInt, end: t.CInt): - idx: t.CInt = start - while idx < end: - if idx < 0: - print("Negative: ", idx) - elif idx == 0: - print("Zero: ", idx) - elif idx > 0 and idx < 5: - print("Small positive: ", idx) - elif idx >= 5 and idx < 10: - print("Medium positive: ", idx) - else: - print("Large: ", idx) - idx += 1 - - -def NestedWhileWithMacrosTest(outer_limit: t.CInt, inner_limit: t.CInt): - outer: t.CInt = 0 - inner: t.CInt = 0 - total_ops: t.CInt = 0 - while outer < outer_limit: - inner = 0 - while inner < inner_limit: - if inner == config.TRUE: - print("Inner loop break condition at: ", inner) - total_ops += 1 - inner += 1 - outer += 1 - print("Total operations: ", total_ops) - - -def ComplexConditionTest(a: t.CInt, b: t.CInt, c_val: t.CInt): - x: t.CInt = a - y: t.CInt = b - z: t.CInt = c_val - while x < config.LOOP_LIMIT: - if x > 0 and y > 0 and z > 0: - print("All positive: ", x, y, z) - elif x <= 0 and y <= 0 and z <= 0: - print("All non-positive: ", x, y, z) - else: - if x > 0: - print("X positive") - elif y > 0: - print("Y positive") - else: - print("Z positive") - x += 1 - y += 1 - z += 1 - - -def RetryLoopTest(retry_count: t.CInt) -> t.CInt: - attempt: t.CInt = 0 - success: t.CInt = 0 - while attempt < retry_count: - if attempt < config.MAX_RETRY: - print("Attempt: ", attempt, " less than max") - success = attempt * 2 - elif attempt == config.MAX_RETRY: - print("At max retry") - success = -1 - else: - print("Beyond max retry") - success = -2 - attempt += 1 - return success - - -def BitwiseOperationsTest(value: t.CInt) -> t.CInt: - shifted: t.CInt = 0 - masked: t.CInt = 0 - xored: t.CInt = 0 - anded: t.CInt = 0 - ored: t.CInt = 0 - shifted = value << config.SHIFT_AMOUNT - print("Left shift: ", shifted) - shifted = value >> config.SHIFT_AMOUNT - print("Right shift: ", shifted) - masked = value & config.MASK_VALUE - print("Bitwise AND mask: ", masked) - xored = value ^ config.MASK_VALUE - print("Bitwise XOR: ", xored) - anded = value & (config.MASK_VALUE >> config.SHIFT_AMOUNT) - print("Bitwise AND shifted mask: ", anded) - ored = value | config.SHIFT_AMOUNT - print("Bitwise OR shift: ", ored) - return masked - - -def CompoundAssignmentMathTest(a: t.CInt, b: t.CInt) -> t.CInt: - x: t.CInt = a - y: t.CInt = b - result: t.CInt = 0 - x += y - print("x += y: ", x) - x -= y - print("x -= y: ", x) - x *= y - print("x *= y: ", x) - x = a - y = b - if b != 0: - x /= b - print("x /= y: ", x) - x = a - if b != 0: - x %= b - print("x %%= y: ", x) - x = a - x <<= config.SHIFT_AMOUNT - print("x <<= shift: ", x) - x >>= config.SHIFT_AMOUNT - print("x >>= shift: ", x) - x &= config.MASK_VALUE - print("x &= mask: ", x) - x |= config.SHIFT_AMOUNT - print("x |= shift: ", x) - result = (a + b) * config.MATH_SCALE - config.MATH_OFFSET - print("Compound: (a+b)*scale-offset: ", result) - result = (a * b) + (config.MATH_OFFSET / 2) - print("Compound: a*b+offset/2: ", result) - return result - - -def PowerAndModuloTest(base: t.CInt, exponent: t.CInt) -> t.CInt: - result: t.CInt = 1 - temp: t.CInt = 0 - i: t.CInt = 0 - while i < exponent: - result *= base - i += 1 - print("Power: ", result) - temp = result % config.MODULO_DIVISOR - print("Power mod: ", temp) - temp = (base * config.EXPONENT_BASE) % config.MODULO_DIVISOR - print("base*exp %% divisor: ", temp) - temp = ((base + config.MATH_OFFSET) * config.MATH_SCALE) % config.MODULO_DIVISOR - print("(base+offset)*scale %% divisor: ", temp) - return result - - -def MixedArithmeticTest(x: t.CInt, y: t.CInt, z: t.CInt) -> t.CInt: - result: t.CInt = 0 - result = (x + y) * z - print("(x+y)*z: ", result) - result = x + (y * z) - print("x+(y*z): ", result) - result = ((x + y) * config.MATH_SCALE) - config.MATH_OFFSET - print("((x+y)*scale)-offset: ", result) - result = (x * config.MATH_SCALE) + (y * config.MATH_SCALE) - print("x*scale + y*scale: ", result) - result = ((x % config.MODULO_DIVISOR) + (y % config.MODULO_DIVISOR)) * config.MATH_SCALE - print("(x%%mod + y%%mod)*scale: ", result) - temp: t.CInt = 0 - temp = x | y & z - print("x | y & z: ", temp) - temp = (x | y) & z - print("(x | y) & z: ", temp) - temp = x ^ y ^ z - print("x ^ y ^ z: ", temp) - return result - - -def MathWithWhileLoopTest(start: t.CInt, count: t.CInt) -> t.CInt: - idx: t.CInt = 0 - accumulator: t.CInt = 0 - multiplier: t.CInt = config.MATH_SCALE - while idx < count: - temp: t.CInt = (start + idx) * multiplier - temp = temp + config.MATH_OFFSET - if temp > config.THRESHOLD: - temp = config.THRESHOLD - accumulator += temp - multiplier += 1 - idx += 1 - print("Accumulator: ", accumulator) - return accumulator - - -def ComplexNestedMathTest(a: t.CInt, b: t.CInt) -> t.CInt: - layer1: t.CInt = 0 - layer2: t.CInt = 0 - layer3: t.CInt = 0 - i: t.CInt = 0 - layer1 = (a + b) * config.MATH_SCALE - print("Layer1: ", layer1) - while i < config.BIT_RANGE: - layer2 += layer1 >> 1 - i += 1 - print("Layer2: ", layer2) - layer3 = layer1 + layer2 - config.MATH_OFFSET - print("Layer3: ", layer3) - layer3 = layer3 * config.MATH_SCALE / 2 if config.MATH_SCALE != 0 else layer3 - print("Layer3 scaled: ", layer3) - return layer3 - - -def ConditionalMathChainTest(value: t.CInt) -> t.CInt: - result: t.CInt = 0 - step: t.CInt = 0 - while step < config.LOOP_LIMIT: - if step < 5: - result += step * config.MATH_SCALE - print("step<5: ", result) - elif step < 10: - result -= step - config.MATH_OFFSET - print("step<10: ", result) - elif step < 15: - result += (step * config.MATH_OFFSET) / config.MATH_SCALE - print("step<15: ", result) - else: - result = result * config.EXPONENT_BASE % config.MODULO_DIVISOR - print("step>=15: ", result) - step += 1 - return result - - -def BitManipulationMathTest(value: t.CInt) -> t.CInt: - original: t.CInt = value - nibble: t.CInt = 0 - result: t.CInt = 0 - result = (value << config.SHIFT_AMOUNT) | (value >> (8 - config.SHIFT_AMOUNT)) - print("Rotate left: ", result) - result = (value >> config.SHIFT_AMOUNT) | (value << (8 - config.SHIFT_AMOUNT)) - print("Rotate right: ", result) - nibble = value & 0xF - print("Lower nibble: ", nibble) - nibble = (value >> config.BIT_RANGE) & 0xF - print("Upper nibble: ", nibble) - result = ((value & config.MASK_VALUE) + config.MATH_OFFSET) * config.MATH_SCALE - print("Masked and scaled: ", result) - result = ((original << config.SHIFT_AMOUNT) ^ original) & config.MASK_VALUE - print("XOR shifted: ", result) - return result \ No newline at end of file diff --git a/Test/TestProject2/output/0df65b8ed15664b0.deps.json b/Test/TestProject2/output/0df65b8ed15664b0.deps.json deleted file mode 100644 index c832d07..0000000 --- a/Test/TestProject2/output/0df65b8ed15664b0.deps.json +++ /dev/null @@ -1 +0,0 @@ -{"memhub": "04e5fe47ff2af528", "hashlib.__sha1": "0df65b8ed15664b0", "__sha1": "0df65b8ed15664b0", "hashlib.__md5": "19f8024d10c828e8", "__md5": "19f8024d10c828e8", "zlib.zdef": "1f6617c02fc8899d", "zdef": "1f6617c02fc8899d", "stdio": "285b6aa29a34754d", "zlib.pyzlib": "3e775aa83705b119", "pyzlib": "3e775aa83705b119", "zlib.zinflate": "451745df21e598af", "zinflate": "451745df21e598af", "main": "541a1ed9b8be53c8", "stdlib": "6c658cc728d0bbf4", "hashlib.__sha512": "6ff26590374ae6fc", "__sha512": "6ff26590374ae6fc", "testcheck": "748d0424e8976fa0", "zlib.zchecksum": "8ebed83a7817fa0c", "zchecksum": "8ebed83a7817fa0c", "zlib.zdeflate": "90921d009fdd674c", "zdeflate": "90921d009fdd674c", "string": "928c0ff6d8c69ec9", "hashlib.__init__": "96837bcc64032444", "__init__": "d63d2c2a2bd9bd2a", "hashlib": "96837bcc64032444", "atom": "aa246c6e6aa30484", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "hashlib.__sha256": "c9d54a4158f7f5a8", "__sha256": "c9d54a4158f7f5a8", "viperio": "c9f4be41ca1cc2b4", "zc.config": "cfc83b830141b00e", "config": "cfc83b830141b00e", "binascii": "d3917d97537f703c", "zlib.zhuff": "d541ade6afb689a5", "zhuff": "d541ade6afb689a5", "stdint": "f5522571bcce7bcb", "w32.win32base": "fc980acec33d69a7", "win32base": "fc980acec33d69a7", "w32.win32file": "f6b51804a0ba8ff0", "win32file": "f6b51804a0ba8ff0", "w32.fileio": "d137b1f3311f3a7f", "fileio": "d137b1f3311f3a7f", "w32.win32memory": "72e2d5ccb7cedcf1", "win32memory": "72e2d5ccb7cedcf1", "w32.win32process": "067c78e9f121dce3", "win32process": "067c78e9f121dce3", "w32.win32sync": "06f53cc594b4ac6c", "win32sync": "06f53cc594b4ac6c", "w32.winsock2": "6446627d4f07a1b5", "winsock2": "6446627d4f07a1b5", "zlib.__init__": "d63d2c2a2bd9bd2a", "zlib": "d63d2c2a2bd9bd2a"} \ No newline at end of file diff --git a/Test/TestProject2/output/19f8024d10c828e8.deps.json b/Test/TestProject2/output/19f8024d10c828e8.deps.json deleted file mode 100644 index c832d07..0000000 --- a/Test/TestProject2/output/19f8024d10c828e8.deps.json +++ /dev/null @@ -1 +0,0 @@ -{"memhub": "04e5fe47ff2af528", "hashlib.__sha1": "0df65b8ed15664b0", "__sha1": "0df65b8ed15664b0", "hashlib.__md5": "19f8024d10c828e8", "__md5": "19f8024d10c828e8", "zlib.zdef": "1f6617c02fc8899d", "zdef": "1f6617c02fc8899d", "stdio": "285b6aa29a34754d", "zlib.pyzlib": "3e775aa83705b119", "pyzlib": "3e775aa83705b119", "zlib.zinflate": "451745df21e598af", "zinflate": "451745df21e598af", "main": "541a1ed9b8be53c8", "stdlib": "6c658cc728d0bbf4", "hashlib.__sha512": "6ff26590374ae6fc", "__sha512": "6ff26590374ae6fc", "testcheck": "748d0424e8976fa0", "zlib.zchecksum": "8ebed83a7817fa0c", "zchecksum": "8ebed83a7817fa0c", "zlib.zdeflate": "90921d009fdd674c", "zdeflate": "90921d009fdd674c", "string": "928c0ff6d8c69ec9", "hashlib.__init__": "96837bcc64032444", "__init__": "d63d2c2a2bd9bd2a", "hashlib": "96837bcc64032444", "atom": "aa246c6e6aa30484", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "hashlib.__sha256": "c9d54a4158f7f5a8", "__sha256": "c9d54a4158f7f5a8", "viperio": "c9f4be41ca1cc2b4", "zc.config": "cfc83b830141b00e", "config": "cfc83b830141b00e", "binascii": "d3917d97537f703c", "zlib.zhuff": "d541ade6afb689a5", "zhuff": "d541ade6afb689a5", "stdint": "f5522571bcce7bcb", "w32.win32base": "fc980acec33d69a7", "win32base": "fc980acec33d69a7", "w32.win32file": "f6b51804a0ba8ff0", "win32file": "f6b51804a0ba8ff0", "w32.fileio": "d137b1f3311f3a7f", "fileio": "d137b1f3311f3a7f", "w32.win32memory": "72e2d5ccb7cedcf1", "win32memory": "72e2d5ccb7cedcf1", "w32.win32process": "067c78e9f121dce3", "win32process": "067c78e9f121dce3", "w32.win32sync": "06f53cc594b4ac6c", "win32sync": "06f53cc594b4ac6c", "w32.winsock2": "6446627d4f07a1b5", "winsock2": "6446627d4f07a1b5", "zlib.__init__": "d63d2c2a2bd9bd2a", "zlib": "d63d2c2a2bd9bd2a"} \ No newline at end of file diff --git a/Test/TestProject2/output/1f6617c02fc8899d.deps.json b/Test/TestProject2/output/1f6617c02fc8899d.deps.json deleted file mode 100644 index c832d07..0000000 --- a/Test/TestProject2/output/1f6617c02fc8899d.deps.json +++ /dev/null @@ -1 +0,0 @@ -{"memhub": "04e5fe47ff2af528", "hashlib.__sha1": "0df65b8ed15664b0", "__sha1": "0df65b8ed15664b0", "hashlib.__md5": "19f8024d10c828e8", "__md5": "19f8024d10c828e8", "zlib.zdef": "1f6617c02fc8899d", "zdef": "1f6617c02fc8899d", "stdio": "285b6aa29a34754d", "zlib.pyzlib": "3e775aa83705b119", "pyzlib": "3e775aa83705b119", "zlib.zinflate": "451745df21e598af", "zinflate": "451745df21e598af", "main": "541a1ed9b8be53c8", "stdlib": "6c658cc728d0bbf4", "hashlib.__sha512": "6ff26590374ae6fc", "__sha512": "6ff26590374ae6fc", "testcheck": "748d0424e8976fa0", "zlib.zchecksum": "8ebed83a7817fa0c", "zchecksum": "8ebed83a7817fa0c", "zlib.zdeflate": "90921d009fdd674c", "zdeflate": "90921d009fdd674c", "string": "928c0ff6d8c69ec9", "hashlib.__init__": "96837bcc64032444", "__init__": "d63d2c2a2bd9bd2a", "hashlib": "96837bcc64032444", "atom": "aa246c6e6aa30484", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "hashlib.__sha256": "c9d54a4158f7f5a8", "__sha256": "c9d54a4158f7f5a8", "viperio": "c9f4be41ca1cc2b4", "zc.config": "cfc83b830141b00e", "config": "cfc83b830141b00e", "binascii": "d3917d97537f703c", "zlib.zhuff": "d541ade6afb689a5", "zhuff": "d541ade6afb689a5", "stdint": "f5522571bcce7bcb", "w32.win32base": "fc980acec33d69a7", "win32base": "fc980acec33d69a7", "w32.win32file": "f6b51804a0ba8ff0", "win32file": "f6b51804a0ba8ff0", "w32.fileio": "d137b1f3311f3a7f", "fileio": "d137b1f3311f3a7f", "w32.win32memory": "72e2d5ccb7cedcf1", "win32memory": "72e2d5ccb7cedcf1", "w32.win32process": "067c78e9f121dce3", "win32process": "067c78e9f121dce3", "w32.win32sync": "06f53cc594b4ac6c", "win32sync": "06f53cc594b4ac6c", "w32.winsock2": "6446627d4f07a1b5", "winsock2": "6446627d4f07a1b5", "zlib.__init__": "d63d2c2a2bd9bd2a", "zlib": "d63d2c2a2bd9bd2a"} \ No newline at end of file diff --git a/Test/TestProject2/output/3e775aa83705b119.deps.json b/Test/TestProject2/output/3e775aa83705b119.deps.json deleted file mode 100644 index c832d07..0000000 --- a/Test/TestProject2/output/3e775aa83705b119.deps.json +++ /dev/null @@ -1 +0,0 @@ -{"memhub": "04e5fe47ff2af528", "hashlib.__sha1": "0df65b8ed15664b0", "__sha1": "0df65b8ed15664b0", "hashlib.__md5": "19f8024d10c828e8", "__md5": "19f8024d10c828e8", "zlib.zdef": "1f6617c02fc8899d", "zdef": "1f6617c02fc8899d", "stdio": "285b6aa29a34754d", "zlib.pyzlib": "3e775aa83705b119", "pyzlib": "3e775aa83705b119", "zlib.zinflate": "451745df21e598af", "zinflate": "451745df21e598af", "main": "541a1ed9b8be53c8", "stdlib": "6c658cc728d0bbf4", "hashlib.__sha512": "6ff26590374ae6fc", "__sha512": "6ff26590374ae6fc", "testcheck": "748d0424e8976fa0", "zlib.zchecksum": "8ebed83a7817fa0c", "zchecksum": "8ebed83a7817fa0c", "zlib.zdeflate": "90921d009fdd674c", "zdeflate": "90921d009fdd674c", "string": "928c0ff6d8c69ec9", "hashlib.__init__": "96837bcc64032444", "__init__": "d63d2c2a2bd9bd2a", "hashlib": "96837bcc64032444", "atom": "aa246c6e6aa30484", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "hashlib.__sha256": "c9d54a4158f7f5a8", "__sha256": "c9d54a4158f7f5a8", "viperio": "c9f4be41ca1cc2b4", "zc.config": "cfc83b830141b00e", "config": "cfc83b830141b00e", "binascii": "d3917d97537f703c", "zlib.zhuff": "d541ade6afb689a5", "zhuff": "d541ade6afb689a5", "stdint": "f5522571bcce7bcb", "w32.win32base": "fc980acec33d69a7", "win32base": "fc980acec33d69a7", "w32.win32file": "f6b51804a0ba8ff0", "win32file": "f6b51804a0ba8ff0", "w32.fileio": "d137b1f3311f3a7f", "fileio": "d137b1f3311f3a7f", "w32.win32memory": "72e2d5ccb7cedcf1", "win32memory": "72e2d5ccb7cedcf1", "w32.win32process": "067c78e9f121dce3", "win32process": "067c78e9f121dce3", "w32.win32sync": "06f53cc594b4ac6c", "win32sync": "06f53cc594b4ac6c", "w32.winsock2": "6446627d4f07a1b5", "winsock2": "6446627d4f07a1b5", "zlib.__init__": "d63d2c2a2bd9bd2a", "zlib": "d63d2c2a2bd9bd2a"} \ No newline at end of file diff --git a/Test/TestProject2/output/451745df21e598af.deps.json b/Test/TestProject2/output/451745df21e598af.deps.json deleted file mode 100644 index c832d07..0000000 --- a/Test/TestProject2/output/451745df21e598af.deps.json +++ /dev/null @@ -1 +0,0 @@ -{"memhub": "04e5fe47ff2af528", "hashlib.__sha1": "0df65b8ed15664b0", "__sha1": "0df65b8ed15664b0", "hashlib.__md5": "19f8024d10c828e8", "__md5": "19f8024d10c828e8", "zlib.zdef": "1f6617c02fc8899d", "zdef": "1f6617c02fc8899d", "stdio": "285b6aa29a34754d", "zlib.pyzlib": "3e775aa83705b119", "pyzlib": "3e775aa83705b119", "zlib.zinflate": "451745df21e598af", "zinflate": "451745df21e598af", "main": "541a1ed9b8be53c8", "stdlib": "6c658cc728d0bbf4", "hashlib.__sha512": "6ff26590374ae6fc", "__sha512": "6ff26590374ae6fc", "testcheck": "748d0424e8976fa0", "zlib.zchecksum": "8ebed83a7817fa0c", "zchecksum": "8ebed83a7817fa0c", "zlib.zdeflate": "90921d009fdd674c", "zdeflate": "90921d009fdd674c", "string": "928c0ff6d8c69ec9", "hashlib.__init__": "96837bcc64032444", "__init__": "d63d2c2a2bd9bd2a", "hashlib": "96837bcc64032444", "atom": "aa246c6e6aa30484", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "hashlib.__sha256": "c9d54a4158f7f5a8", "__sha256": "c9d54a4158f7f5a8", "viperio": "c9f4be41ca1cc2b4", "zc.config": "cfc83b830141b00e", "config": "cfc83b830141b00e", "binascii": "d3917d97537f703c", "zlib.zhuff": "d541ade6afb689a5", "zhuff": "d541ade6afb689a5", "stdint": "f5522571bcce7bcb", "w32.win32base": "fc980acec33d69a7", "win32base": "fc980acec33d69a7", "w32.win32file": "f6b51804a0ba8ff0", "win32file": "f6b51804a0ba8ff0", "w32.fileio": "d137b1f3311f3a7f", "fileio": "d137b1f3311f3a7f", "w32.win32memory": "72e2d5ccb7cedcf1", "win32memory": "72e2d5ccb7cedcf1", "w32.win32process": "067c78e9f121dce3", "win32process": "067c78e9f121dce3", "w32.win32sync": "06f53cc594b4ac6c", "win32sync": "06f53cc594b4ac6c", "w32.winsock2": "6446627d4f07a1b5", "winsock2": "6446627d4f07a1b5", "zlib.__init__": "d63d2c2a2bd9bd2a", "zlib": "d63d2c2a2bd9bd2a"} \ No newline at end of file diff --git a/Test/TestProject2/output/541a1ed9b8be53c8.deps.json b/Test/TestProject2/output/541a1ed9b8be53c8.deps.json deleted file mode 100644 index 9f309f8..0000000 --- a/Test/TestProject2/output/541a1ed9b8be53c8.deps.json +++ /dev/null @@ -1 +0,0 @@ -{"memhub": "04e5fe47ff2af528", "hashlib.__sha1": "0df65b8ed15664b0", "__sha1": "0df65b8ed15664b0", "hashlib.__md5": "19f8024d10c828e8", "__md5": "19f8024d10c828e8", "zlib.zdef": "1f6617c02fc8899d", "zdef": "1f6617c02fc8899d", "stdio": "285b6aa29a34754d", "zlib.pyzlib": "3e775aa83705b119", "pyzlib": "3e775aa83705b119", "zlib.zinflate": "451745df21e598af", "zinflate": "451745df21e598af", "stdlib": "6c658cc728d0bbf4", "hashlib.__sha512": "6ff26590374ae6fc", "__sha512": "6ff26590374ae6fc", "testcheck": "748d0424e8976fa0", "zlib.zchecksum": "8ebed83a7817fa0c", "zchecksum": "8ebed83a7817fa0c", "zlib.zdeflate": "90921d009fdd674c", "zdeflate": "90921d009fdd674c", "string": "928c0ff6d8c69ec9", "hashlib.__init__": "96837bcc64032444", "__init__": "96837bcc64032444", "hashlib": "96837bcc64032444", "atom": "aa246c6e6aa30484", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "hashlib.__sha256": "c9d54a4158f7f5a8", "__sha256": "c9d54a4158f7f5a8", "viperio": "c9f4be41ca1cc2b4", "zc.config": "cfc83b830141b00e", "config": "cfc83b830141b00e", "binascii": "d3917d97537f703c", "zlib.zhuff": "d541ade6afb689a5", "zhuff": "d541ade6afb689a5", "stdint": "f5522571bcce7bcb", "w32.win32base": "fc980acec33d69a7", "win32base": "fc980acec33d69a7"} \ No newline at end of file diff --git a/Test/TestProject2/output/6ff26590374ae6fc.deps.json b/Test/TestProject2/output/6ff26590374ae6fc.deps.json deleted file mode 100644 index c832d07..0000000 --- a/Test/TestProject2/output/6ff26590374ae6fc.deps.json +++ /dev/null @@ -1 +0,0 @@ -{"memhub": "04e5fe47ff2af528", "hashlib.__sha1": "0df65b8ed15664b0", "__sha1": "0df65b8ed15664b0", "hashlib.__md5": "19f8024d10c828e8", "__md5": "19f8024d10c828e8", "zlib.zdef": "1f6617c02fc8899d", "zdef": "1f6617c02fc8899d", "stdio": "285b6aa29a34754d", "zlib.pyzlib": "3e775aa83705b119", "pyzlib": "3e775aa83705b119", "zlib.zinflate": "451745df21e598af", "zinflate": "451745df21e598af", "main": "541a1ed9b8be53c8", "stdlib": "6c658cc728d0bbf4", "hashlib.__sha512": "6ff26590374ae6fc", "__sha512": "6ff26590374ae6fc", "testcheck": "748d0424e8976fa0", "zlib.zchecksum": "8ebed83a7817fa0c", "zchecksum": "8ebed83a7817fa0c", "zlib.zdeflate": "90921d009fdd674c", "zdeflate": "90921d009fdd674c", "string": "928c0ff6d8c69ec9", "hashlib.__init__": "96837bcc64032444", "__init__": "d63d2c2a2bd9bd2a", "hashlib": "96837bcc64032444", "atom": "aa246c6e6aa30484", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "hashlib.__sha256": "c9d54a4158f7f5a8", "__sha256": "c9d54a4158f7f5a8", "viperio": "c9f4be41ca1cc2b4", "zc.config": "cfc83b830141b00e", "config": "cfc83b830141b00e", "binascii": "d3917d97537f703c", "zlib.zhuff": "d541ade6afb689a5", "zhuff": "d541ade6afb689a5", "stdint": "f5522571bcce7bcb", "w32.win32base": "fc980acec33d69a7", "win32base": "fc980acec33d69a7", "w32.win32file": "f6b51804a0ba8ff0", "win32file": "f6b51804a0ba8ff0", "w32.fileio": "d137b1f3311f3a7f", "fileio": "d137b1f3311f3a7f", "w32.win32memory": "72e2d5ccb7cedcf1", "win32memory": "72e2d5ccb7cedcf1", "w32.win32process": "067c78e9f121dce3", "win32process": "067c78e9f121dce3", "w32.win32sync": "06f53cc594b4ac6c", "win32sync": "06f53cc594b4ac6c", "w32.winsock2": "6446627d4f07a1b5", "winsock2": "6446627d4f07a1b5", "zlib.__init__": "d63d2c2a2bd9bd2a", "zlib": "d63d2c2a2bd9bd2a"} \ No newline at end of file diff --git a/Test/TestProject2/output/8ebed83a7817fa0c.deps.json b/Test/TestProject2/output/8ebed83a7817fa0c.deps.json deleted file mode 100644 index c832d07..0000000 --- a/Test/TestProject2/output/8ebed83a7817fa0c.deps.json +++ /dev/null @@ -1 +0,0 @@ -{"memhub": "04e5fe47ff2af528", "hashlib.__sha1": "0df65b8ed15664b0", "__sha1": "0df65b8ed15664b0", "hashlib.__md5": "19f8024d10c828e8", "__md5": "19f8024d10c828e8", "zlib.zdef": "1f6617c02fc8899d", "zdef": "1f6617c02fc8899d", "stdio": "285b6aa29a34754d", "zlib.pyzlib": "3e775aa83705b119", "pyzlib": "3e775aa83705b119", "zlib.zinflate": "451745df21e598af", "zinflate": "451745df21e598af", "main": "541a1ed9b8be53c8", "stdlib": "6c658cc728d0bbf4", "hashlib.__sha512": "6ff26590374ae6fc", "__sha512": "6ff26590374ae6fc", "testcheck": "748d0424e8976fa0", "zlib.zchecksum": "8ebed83a7817fa0c", "zchecksum": "8ebed83a7817fa0c", "zlib.zdeflate": "90921d009fdd674c", "zdeflate": "90921d009fdd674c", "string": "928c0ff6d8c69ec9", "hashlib.__init__": "96837bcc64032444", "__init__": "d63d2c2a2bd9bd2a", "hashlib": "96837bcc64032444", "atom": "aa246c6e6aa30484", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "hashlib.__sha256": "c9d54a4158f7f5a8", "__sha256": "c9d54a4158f7f5a8", "viperio": "c9f4be41ca1cc2b4", "zc.config": "cfc83b830141b00e", "config": "cfc83b830141b00e", "binascii": "d3917d97537f703c", "zlib.zhuff": "d541ade6afb689a5", "zhuff": "d541ade6afb689a5", "stdint": "f5522571bcce7bcb", "w32.win32base": "fc980acec33d69a7", "win32base": "fc980acec33d69a7", "w32.win32file": "f6b51804a0ba8ff0", "win32file": "f6b51804a0ba8ff0", "w32.fileio": "d137b1f3311f3a7f", "fileio": "d137b1f3311f3a7f", "w32.win32memory": "72e2d5ccb7cedcf1", "win32memory": "72e2d5ccb7cedcf1", "w32.win32process": "067c78e9f121dce3", "win32process": "067c78e9f121dce3", "w32.win32sync": "06f53cc594b4ac6c", "win32sync": "06f53cc594b4ac6c", "w32.winsock2": "6446627d4f07a1b5", "winsock2": "6446627d4f07a1b5", "zlib.__init__": "d63d2c2a2bd9bd2a", "zlib": "d63d2c2a2bd9bd2a"} \ No newline at end of file diff --git a/Test/TestProject2/output/90921d009fdd674c.deps.json b/Test/TestProject2/output/90921d009fdd674c.deps.json deleted file mode 100644 index c832d07..0000000 --- a/Test/TestProject2/output/90921d009fdd674c.deps.json +++ /dev/null @@ -1 +0,0 @@ -{"memhub": "04e5fe47ff2af528", "hashlib.__sha1": "0df65b8ed15664b0", "__sha1": "0df65b8ed15664b0", "hashlib.__md5": "19f8024d10c828e8", "__md5": "19f8024d10c828e8", "zlib.zdef": "1f6617c02fc8899d", "zdef": "1f6617c02fc8899d", "stdio": "285b6aa29a34754d", "zlib.pyzlib": "3e775aa83705b119", "pyzlib": "3e775aa83705b119", "zlib.zinflate": "451745df21e598af", "zinflate": "451745df21e598af", "main": "541a1ed9b8be53c8", "stdlib": "6c658cc728d0bbf4", "hashlib.__sha512": "6ff26590374ae6fc", "__sha512": "6ff26590374ae6fc", "testcheck": "748d0424e8976fa0", "zlib.zchecksum": "8ebed83a7817fa0c", "zchecksum": "8ebed83a7817fa0c", "zlib.zdeflate": "90921d009fdd674c", "zdeflate": "90921d009fdd674c", "string": "928c0ff6d8c69ec9", "hashlib.__init__": "96837bcc64032444", "__init__": "d63d2c2a2bd9bd2a", "hashlib": "96837bcc64032444", "atom": "aa246c6e6aa30484", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "hashlib.__sha256": "c9d54a4158f7f5a8", "__sha256": "c9d54a4158f7f5a8", "viperio": "c9f4be41ca1cc2b4", "zc.config": "cfc83b830141b00e", "config": "cfc83b830141b00e", "binascii": "d3917d97537f703c", "zlib.zhuff": "d541ade6afb689a5", "zhuff": "d541ade6afb689a5", "stdint": "f5522571bcce7bcb", "w32.win32base": "fc980acec33d69a7", "win32base": "fc980acec33d69a7", "w32.win32file": "f6b51804a0ba8ff0", "win32file": "f6b51804a0ba8ff0", "w32.fileio": "d137b1f3311f3a7f", "fileio": "d137b1f3311f3a7f", "w32.win32memory": "72e2d5ccb7cedcf1", "win32memory": "72e2d5ccb7cedcf1", "w32.win32process": "067c78e9f121dce3", "win32process": "067c78e9f121dce3", "w32.win32sync": "06f53cc594b4ac6c", "win32sync": "06f53cc594b4ac6c", "w32.winsock2": "6446627d4f07a1b5", "winsock2": "6446627d4f07a1b5", "zlib.__init__": "d63d2c2a2bd9bd2a", "zlib": "d63d2c2a2bd9bd2a"} \ No newline at end of file diff --git a/Test/TestProject2/output/_shared_sym_includes.pickle b/Test/TestProject2/output/_shared_sym_includes.pickle deleted file mode 100644 index ab8437d..0000000 Binary files a/Test/TestProject2/output/_shared_sym_includes.pickle and /dev/null differ diff --git a/Test/TestProject2/output/c9d54a4158f7f5a8.deps.json b/Test/TestProject2/output/c9d54a4158f7f5a8.deps.json deleted file mode 100644 index c832d07..0000000 --- a/Test/TestProject2/output/c9d54a4158f7f5a8.deps.json +++ /dev/null @@ -1 +0,0 @@ -{"memhub": "04e5fe47ff2af528", "hashlib.__sha1": "0df65b8ed15664b0", "__sha1": "0df65b8ed15664b0", "hashlib.__md5": "19f8024d10c828e8", "__md5": "19f8024d10c828e8", "zlib.zdef": "1f6617c02fc8899d", "zdef": "1f6617c02fc8899d", "stdio": "285b6aa29a34754d", "zlib.pyzlib": "3e775aa83705b119", "pyzlib": "3e775aa83705b119", "zlib.zinflate": "451745df21e598af", "zinflate": "451745df21e598af", "main": "541a1ed9b8be53c8", "stdlib": "6c658cc728d0bbf4", "hashlib.__sha512": "6ff26590374ae6fc", "__sha512": "6ff26590374ae6fc", "testcheck": "748d0424e8976fa0", "zlib.zchecksum": "8ebed83a7817fa0c", "zchecksum": "8ebed83a7817fa0c", "zlib.zdeflate": "90921d009fdd674c", "zdeflate": "90921d009fdd674c", "string": "928c0ff6d8c69ec9", "hashlib.__init__": "96837bcc64032444", "__init__": "d63d2c2a2bd9bd2a", "hashlib": "96837bcc64032444", "atom": "aa246c6e6aa30484", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "hashlib.__sha256": "c9d54a4158f7f5a8", "__sha256": "c9d54a4158f7f5a8", "viperio": "c9f4be41ca1cc2b4", "zc.config": "cfc83b830141b00e", "config": "cfc83b830141b00e", "binascii": "d3917d97537f703c", "zlib.zhuff": "d541ade6afb689a5", "zhuff": "d541ade6afb689a5", "stdint": "f5522571bcce7bcb", "w32.win32base": "fc980acec33d69a7", "win32base": "fc980acec33d69a7", "w32.win32file": "f6b51804a0ba8ff0", "win32file": "f6b51804a0ba8ff0", "w32.fileio": "d137b1f3311f3a7f", "fileio": "d137b1f3311f3a7f", "w32.win32memory": "72e2d5ccb7cedcf1", "win32memory": "72e2d5ccb7cedcf1", "w32.win32process": "067c78e9f121dce3", "win32process": "067c78e9f121dce3", "w32.win32sync": "06f53cc594b4ac6c", "win32sync": "06f53cc594b4ac6c", "w32.winsock2": "6446627d4f07a1b5", "winsock2": "6446627d4f07a1b5", "zlib.__init__": "d63d2c2a2bd9bd2a", "zlib": "d63d2c2a2bd9bd2a"} \ No newline at end of file diff --git a/Test/TestProject2/output/cfc83b830141b00e.deps.json b/Test/TestProject2/output/cfc83b830141b00e.deps.json deleted file mode 100644 index 6f74b41..0000000 --- a/Test/TestProject2/output/cfc83b830141b00e.deps.json +++ /dev/null @@ -1 +0,0 @@ -{"memhub": "04e5fe47ff2af528", "hashlib.__sha1": "0df65b8ed15664b0", "__sha1": "0df65b8ed15664b0", "hashlib.__md5": "19f8024d10c828e8", "__md5": "19f8024d10c828e8", "zlib.zdef": "1f6617c02fc8899d", "zdef": "1f6617c02fc8899d", "stdio": "285b6aa29a34754d", "zlib.pyzlib": "3e775aa83705b119", "pyzlib": "3e775aa83705b119", "zlib.zinflate": "451745df21e598af", "zinflate": "451745df21e598af", "main": "541a1ed9b8be53c8", "stdlib": "6c658cc728d0bbf4", "hashlib.__sha512": "6ff26590374ae6fc", "__sha512": "6ff26590374ae6fc", "testcheck": "748d0424e8976fa0", "zlib.zchecksum": "8ebed83a7817fa0c", "zchecksum": "8ebed83a7817fa0c", "zlib.zdeflate": "90921d009fdd674c", "zdeflate": "90921d009fdd674c", "string": "928c0ff6d8c69ec9", "hashlib.__init__": "96837bcc64032444", "__init__": "96837bcc64032444", "hashlib": "96837bcc64032444", "atom": "aa246c6e6aa30484", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "hashlib.__sha256": "c9d54a4158f7f5a8", "__sha256": "c9d54a4158f7f5a8", "viperio": "c9f4be41ca1cc2b4", "binascii": "d3917d97537f703c", "zlib.zhuff": "d541ade6afb689a5", "zhuff": "d541ade6afb689a5", "stdint": "f5522571bcce7bcb", "w32.win32base": "fc980acec33d69a7", "win32base": "fc980acec33d69a7"} \ No newline at end of file diff --git a/Test/TestProject2/output/d3917d97537f703c.deps.json b/Test/TestProject2/output/d3917d97537f703c.deps.json deleted file mode 100644 index c832d07..0000000 --- a/Test/TestProject2/output/d3917d97537f703c.deps.json +++ /dev/null @@ -1 +0,0 @@ -{"memhub": "04e5fe47ff2af528", "hashlib.__sha1": "0df65b8ed15664b0", "__sha1": "0df65b8ed15664b0", "hashlib.__md5": "19f8024d10c828e8", "__md5": "19f8024d10c828e8", "zlib.zdef": "1f6617c02fc8899d", "zdef": "1f6617c02fc8899d", "stdio": "285b6aa29a34754d", "zlib.pyzlib": "3e775aa83705b119", "pyzlib": "3e775aa83705b119", "zlib.zinflate": "451745df21e598af", "zinflate": "451745df21e598af", "main": "541a1ed9b8be53c8", "stdlib": "6c658cc728d0bbf4", "hashlib.__sha512": "6ff26590374ae6fc", "__sha512": "6ff26590374ae6fc", "testcheck": "748d0424e8976fa0", "zlib.zchecksum": "8ebed83a7817fa0c", "zchecksum": "8ebed83a7817fa0c", "zlib.zdeflate": "90921d009fdd674c", "zdeflate": "90921d009fdd674c", "string": "928c0ff6d8c69ec9", "hashlib.__init__": "96837bcc64032444", "__init__": "d63d2c2a2bd9bd2a", "hashlib": "96837bcc64032444", "atom": "aa246c6e6aa30484", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "hashlib.__sha256": "c9d54a4158f7f5a8", "__sha256": "c9d54a4158f7f5a8", "viperio": "c9f4be41ca1cc2b4", "zc.config": "cfc83b830141b00e", "config": "cfc83b830141b00e", "binascii": "d3917d97537f703c", "zlib.zhuff": "d541ade6afb689a5", "zhuff": "d541ade6afb689a5", "stdint": "f5522571bcce7bcb", "w32.win32base": "fc980acec33d69a7", "win32base": "fc980acec33d69a7", "w32.win32file": "f6b51804a0ba8ff0", "win32file": "f6b51804a0ba8ff0", "w32.fileio": "d137b1f3311f3a7f", "fileio": "d137b1f3311f3a7f", "w32.win32memory": "72e2d5ccb7cedcf1", "win32memory": "72e2d5ccb7cedcf1", "w32.win32process": "067c78e9f121dce3", "win32process": "067c78e9f121dce3", "w32.win32sync": "06f53cc594b4ac6c", "win32sync": "06f53cc594b4ac6c", "w32.winsock2": "6446627d4f07a1b5", "winsock2": "6446627d4f07a1b5", "zlib.__init__": "d63d2c2a2bd9bd2a", "zlib": "d63d2c2a2bd9bd2a"} \ No newline at end of file diff --git a/Test/TestProject2/output/d541ade6afb689a5.deps.json b/Test/TestProject2/output/d541ade6afb689a5.deps.json deleted file mode 100644 index c832d07..0000000 --- a/Test/TestProject2/output/d541ade6afb689a5.deps.json +++ /dev/null @@ -1 +0,0 @@ -{"memhub": "04e5fe47ff2af528", "hashlib.__sha1": "0df65b8ed15664b0", "__sha1": "0df65b8ed15664b0", "hashlib.__md5": "19f8024d10c828e8", "__md5": "19f8024d10c828e8", "zlib.zdef": "1f6617c02fc8899d", "zdef": "1f6617c02fc8899d", "stdio": "285b6aa29a34754d", "zlib.pyzlib": "3e775aa83705b119", "pyzlib": "3e775aa83705b119", "zlib.zinflate": "451745df21e598af", "zinflate": "451745df21e598af", "main": "541a1ed9b8be53c8", "stdlib": "6c658cc728d0bbf4", "hashlib.__sha512": "6ff26590374ae6fc", "__sha512": "6ff26590374ae6fc", "testcheck": "748d0424e8976fa0", "zlib.zchecksum": "8ebed83a7817fa0c", "zchecksum": "8ebed83a7817fa0c", "zlib.zdeflate": "90921d009fdd674c", "zdeflate": "90921d009fdd674c", "string": "928c0ff6d8c69ec9", "hashlib.__init__": "96837bcc64032444", "__init__": "d63d2c2a2bd9bd2a", "hashlib": "96837bcc64032444", "atom": "aa246c6e6aa30484", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "hashlib.__sha256": "c9d54a4158f7f5a8", "__sha256": "c9d54a4158f7f5a8", "viperio": "c9f4be41ca1cc2b4", "zc.config": "cfc83b830141b00e", "config": "cfc83b830141b00e", "binascii": "d3917d97537f703c", "zlib.zhuff": "d541ade6afb689a5", "zhuff": "d541ade6afb689a5", "stdint": "f5522571bcce7bcb", "w32.win32base": "fc980acec33d69a7", "win32base": "fc980acec33d69a7", "w32.win32file": "f6b51804a0ba8ff0", "win32file": "f6b51804a0ba8ff0", "w32.fileio": "d137b1f3311f3a7f", "fileio": "d137b1f3311f3a7f", "w32.win32memory": "72e2d5ccb7cedcf1", "win32memory": "72e2d5ccb7cedcf1", "w32.win32process": "067c78e9f121dce3", "win32process": "067c78e9f121dce3", "w32.win32sync": "06f53cc594b4ac6c", "win32sync": "06f53cc594b4ac6c", "w32.winsock2": "6446627d4f07a1b5", "winsock2": "6446627d4f07a1b5", "zlib.__init__": "d63d2c2a2bd9bd2a", "zlib": "d63d2c2a2bd9bd2a"} \ No newline at end of file diff --git a/Test/TestProject2/project.json b/Test/TestProject2/project.json deleted file mode 100644 index 09efc0e..0000000 --- a/Test/TestProject2/project.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/TermiNexus/TransPyC/main/schemas/project-schema.json", - "name": "TestProject2", - "version": "1.0.0", - "source_dir": "./App", - "build_dir": "./.tpv_build", - "compiler": { - "cmd": "llc", - "flags": ["-filetype=obj"] - }, - "linker": { - "cmd": "clang++", - "flags": ["-lmsvcrt", "-lucrt", "-lpthread"], - "output": "TestProject2.exe" - }, - "includes": [ - "../../includes" - ], - "target": { - "triple": "x86_64-pc-windows-gnu", - "datalayout": "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" - }, - "options": { - "slice_level": 3, - "sha1_slice_level": 1, - "target": "llvm", - "strict_mode": true - } -} \ No newline at end of file diff --git a/Test/TestProject2/temp/067c78e9f121dce3.vpi b/Test/TestProject2/temp/067c78e9f121dce3.vpi deleted file mode 100644 index a606126..0000000 --- a/Test/TestProject2/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/TestProject2/temp/06f53cc594b4ac6c.vpi b/Test/TestProject2/temp/06f53cc594b4ac6c.vpi deleted file mode 100644 index ac278f4..0000000 --- a/Test/TestProject2/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/TestProject2/temp/0df65b8ed15664b0.stub.ll.dep b/Test/TestProject2/temp/0df65b8ed15664b0.stub.ll.dep deleted file mode 100644 index 6ac7322..0000000 --- a/Test/TestProject2/temp/0df65b8ed15664b0.stub.ll.dep +++ /dev/null @@ -1 +0,0 @@ -285b6aa29a34754d|928c0ff6d8c69ec9|f5522571bcce7bcb \ No newline at end of file diff --git a/Test/TestProject2/temp/0df65b8ed15664b0.vpi b/Test/TestProject2/temp/0df65b8ed15664b0.vpi deleted file mode 100644 index 722f163..0000000 --- a/Test/TestProject2/temp/0df65b8ed15664b0.vpi +++ /dev/null @@ -1,30 +0,0 @@ -""" -Auto-generated Python stub file from hashlib.__sha1.vp -Module: hashlib.__sha1 -""" - - -import string -import t, c - -SHA1_BLOCK_LEN: t.CDefine = 64 -SHA1_DIGEST_LEN: t.CDefine = 20 - -def sha1_rotl(x: t.CUInt32T, n: t.CInt) -> t.CUInt32T: pass - -def sha1_f1(b: t.CUInt32T, c: t.CUInt32T, d: t.CUInt32T) -> t.CUInt32T: pass - -def sha1_f2(b: t.CUInt32T, c: t.CUInt32T, d: t.CUInt32T) -> t.CUInt32T: pass - -def sha1_f3(b: t.CUInt32T, c: t.CUInt32T, d: t.CUInt32T) -> t.CUInt32T: pass - - -@t.Object -class sha1: - state: t.CArray[t.CUInt32T, 5] - count: t.CUInt64T - buf: t.CArray[t.CUInt8T, SHA1_BLOCK_LEN] - def __init__(self: sha1) -> t.CInt: pass - def transform(self: sha1, block: t.CUInt8T | t.CPtr) -> t.CInt: pass - def update(self: sha1, s: str) -> t.CInt: pass - def final(self: sha1, out: t.CArray[t.CUInt8T, SHA1_DIGEST_LEN]) -> t.CInt: pass \ No newline at end of file diff --git a/Test/TestProject2/temp/19f8024d10c828e8.stub.ll.dep b/Test/TestProject2/temp/19f8024d10c828e8.stub.ll.dep deleted file mode 100644 index 6ac7322..0000000 --- a/Test/TestProject2/temp/19f8024d10c828e8.stub.ll.dep +++ /dev/null @@ -1 +0,0 @@ -285b6aa29a34754d|928c0ff6d8c69ec9|f5522571bcce7bcb \ No newline at end of file diff --git a/Test/TestProject2/temp/19f8024d10c828e8.vpi b/Test/TestProject2/temp/19f8024d10c828e8.vpi deleted file mode 100644 index c187801..0000000 --- a/Test/TestProject2/temp/19f8024d10c828e8.vpi +++ /dev/null @@ -1,35 +0,0 @@ -""" -Auto-generated Python stub file from hashlib.__md5.vp -Module: hashlib.__md5 -""" - - -import string -import t, c - -MD5_BLOCK_LEN: t.CDefine = 64 # 分组块大小 -MD5_DIGEST_LEN: t.CDefine = 16 # 摘要输出长度 - -def md5_F(x: t.CUInt32T, y: t.CUInt32T, z: t.CUInt32T) -> t.CUInt32T: pass - -def md5_G(x: t.CUInt32T, y: t.CUInt32T, z: t.CUInt32T) -> t.CUInt32T: pass - -def md5_H(x: t.CUInt32T, y: t.CUInt32T, z: t.CUInt32T) -> t.CUInt32T: pass - -def md5_I(x: t.CUInt32T, y: t.CUInt32T, z: t.CUInt32T) -> t.CUInt32T: pass - -def md5_rotl(x: t.CUInt32T, n: t.CInt) -> t.CUInt32T: pass - - -md5_T: t.CExtern | t.CArray[t.CUInt32T, 64] -md5_S: t.CExtern | t.CArray[t.CInt, 64] - -@t.Object -class md5: - state: t.CArray[t.CUInt32T, 4] - count: t.CUInt64T - buf: t.CArray[t.CUInt8T, MD5_BLOCK_LEN] - def __init__(self: md5) -> t.CInt: pass - def transform(self: md5, block: t.CUInt8T | t.CPtr) -> t.CInt: pass - def update(self: md5, s: str) -> t.CInt: pass - def final(self: md5, out: t.CArray[t.CUInt8T, MD5_DIGEST_LEN]) -> t.CInt: pass \ No newline at end of file diff --git a/Test/TestProject2/temp/1f6617c02fc8899d.stub.ll.dep b/Test/TestProject2/temp/1f6617c02fc8899d.stub.ll.dep deleted file mode 100644 index 7df8e8d..0000000 --- a/Test/TestProject2/temp/1f6617c02fc8899d.stub.ll.dep +++ /dev/null @@ -1 +0,0 @@ -04e5fe47ff2af528|285b6aa29a34754d|6c658cc728d0bbf4|928c0ff6d8c69ec9|aa246c6e6aa30484|c9f4be41ca1cc2b4|f5522571bcce7bcb \ No newline at end of file diff --git a/Test/TestProject2/temp/1f6617c02fc8899d.vpi b/Test/TestProject2/temp/1f6617c02fc8899d.vpi deleted file mode 100644 index 6f728b6..0000000 --- a/Test/TestProject2/temp/1f6617c02fc8899d.vpi +++ /dev/null @@ -1,66 +0,0 @@ -""" -Auto-generated Python stub file from zlib.zdef.vp -Module: zlib.zdef -""" - - -from stdint import * -import string -import stdlib -import memhub -import t, c - -ZDEFLATE_WINDOW_BITS: t.CDefine = 15 -ZDEFLATE_WINDOW_SIZE: t.CDefine = (1 << ZDEFLATE_WINDOW_BITS) -ZDEFLATE_WINDOW_MASK: t.CDefine = (ZDEFLATE_WINDOW_SIZE - 1) -ZDEFLATE_MIN_MATCH: t.CDefine = 3 -ZDEFLATE_MAX_MATCH: t.CDefine = 258 -ZDEFLATE_HASH_BITS: t.CDefine = 15 -ZDEFLATE_HASH_SIZE: t.CDefine = (1 << ZDEFLATE_HASH_BITS) -ZDEFLATE_HASH_MASK: t.CDefine = (ZDEFLATE_HASH_SIZE - 1) -ZDEFLATE_MAX_CODES: t.CDefine = 288 -ZDEFLATE_MAX_DIST_CODES: t.CDefine = 32 -ZDEFLATE_MAX_BITS: t.CDefine = 15 -ZDEFLATE_MAX_CODELEN_CODES: t.CDefine = 19 -ZDEFLATE_LIT_COUNT: t.CDefine = 286 -ZDEFLATE_DIST_COUNT: t.CDefine = 30 -ZDEFLATE_LEN_SYMBOLS_BASE: t.CDefine = 257 -ZDEFLATE_END_OF_BLOCK: t.CDefine = 256 -zdeflate_len_extra_bits: t.CExtern | t.CArray[t.CInt, 29] -zdeflate_len_base: t.CExtern | t.CArray[t.CInt, 29] -zdeflate_dist_extra_bits: t.CExtern | t.CArray[t.CInt, 30] -zdeflate_dist_base: t.CExtern | t.CArray[t.CInt, 30] -zdeflate_codelen_order: t.CExtern | t.CArray[int, 19] - -@t.Object -class zbit_writer: - pool: memhub.MemManager | t.CPtr - buf: BYTE | t.CPtr - cap: t.CSizeT - byte_pos: t.CSizeT - bit_pos: t.CInt - def __init__(self: zbit_writer, pool: memhub.MemManager | t.CPtr) -> t.CInt: pass - def ensure(self: zbit_writer, need: t.CSizeT) -> t.CInt: pass - def write_bits(self: zbit_writer, value: UINT, nbits: t.CInt) -> t.CInt: pass - def write_bits_rev(self: zbit_writer, code: UINT, nbits: t.CInt) -> t.CInt: pass - def stored_block(self: zbit_writer, data: UINT8PTR, length: t.CSizeT, final: t.CInt) -> t.CInt: pass - def write_zlib_header(self: zbit_writer, wbits: t.CInt, level: t.CInt) -> t.CInt: pass - def write_gzip_header(self: zbit_writer) -> t.CInt: pass - def align(self: zbit_writer) -> t.CInt: pass - def total(self: zbit_writer) -> t.CSizeT: pass - def free(self: zbit_writer) -> t.CInt: pass - def __del__(self: zbit_writer) -> t.CInt: pass -@t.Object -class zbit_reader: - buf: BYTE | t.CPtr - length: t.CSizeT - byte_pos: t.CSizeT - bit_pos: t.CInt - def init(self: zbit_reader, buf: BYTE | t.CPtr, length: t.CSizeT) -> t.CInt: pass - def read_bits(self: zbit_reader, nbits: t.CInt, out: UINTPTR) -> t.CInt: pass - def read_bits_rev(self: zbit_reader, nbits: t.CInt, out: UINTPTR) -> t.CInt: pass - def align(self: zbit_reader) -> t.CInt: pass - -def zdef_alloc(pool: memhub.MemManager | t.CPtr, n: t.CSizeT) -> VOIDPTR: pass - -def zdef_free(pool: memhub.MemManager | t.CPtr, p: VOIDPTR) -> t.CInt: pass diff --git a/Test/TestProject2/temp/285b6aa29a34754d.stub.ll.dep b/Test/TestProject2/temp/285b6aa29a34754d.stub.ll.dep deleted file mode 100644 index e69de29..0000000 diff --git a/Test/TestProject2/temp/285b6aa29a34754d.vpi b/Test/TestProject2/temp/285b6aa29a34754d.vpi deleted file mode 100644 index acc57c7..0000000 --- a/Test/TestProject2/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/TestProject2/temp/3e775aa83705b119.stub.ll.dep b/Test/TestProject2/temp/3e775aa83705b119.stub.ll.dep deleted file mode 100644 index 95be735..0000000 --- a/Test/TestProject2/temp/3e775aa83705b119.stub.ll.dep +++ /dev/null @@ -1 +0,0 @@ -04e5fe47ff2af528|1f6617c02fc8899d|285b6aa29a34754d|451745df21e598af|6c658cc728d0bbf4|8ebed83a7817fa0c|90921d009fdd674c|928c0ff6d8c69ec9|aa246c6e6aa30484|c9f4be41ca1cc2b4|d541ade6afb689a5|f5522571bcce7bcb \ No newline at end of file diff --git a/Test/TestProject2/temp/3e775aa83705b119.vpi b/Test/TestProject2/temp/3e775aa83705b119.vpi deleted file mode 100644 index 9e27d7b..0000000 --- a/Test/TestProject2/temp/3e775aa83705b119.vpi +++ /dev/null @@ -1,125 +0,0 @@ -""" -Auto-generated Python stub file from zlib.pyzlib.vp -Module: zlib.pyzlib -""" - - -from stdint import * -import zlib.zdeflate as zdeflate -import zlib.zinflate as zinflate -import zlib.zchecksum as zchecksum -import zlib.zdef as zdef -import zlib.zhuff as zhuff -import stdlib -import string -import memhub -import t, c - -Z_NO_COMPRESSION: t.CDefine = 0 -Z_BEST_SPEED: t.CDefine = 1 -Z_BEST_COMPRESSION: t.CDefine = 9 -Z_DEFAULT_COMPRESSION: t.CDefine = (-1) -DEFLATED: t.CDefine = 8 -Z_NO_FLUSH: t.CDefine = 0 -Z_PARTIAL_FLUSH: t.CDefine = 1 -Z_SYNC_FLUSH: t.CDefine = 2 -Z_FULL_FLUSH: t.CDefine = 3 -Z_FINISH: t.CDefine = 4 -Z_BLOCK: t.CDefine = 5 -Z_TREES: t.CDefine = 6 -Z_DEFAULT_STRATEGY: t.CDefine = 0 -Z_FILTERED: t.CDefine = 1 -Z_HUFFMAN_ONLY: t.CDefine = 2 -Z_RLE: t.CDefine = 3 -Z_FIXED: t.CDefine = 4 -Z_OK: t.CDefine = 0 -Z_STREAM_END: t.CDefine = 1 -Z_NEED_DICT: t.CDefine = 2 -Z_ERRNO: t.CDefine = (-1) -Z_STREAM_ERROR: t.CDefine = (-2) -Z_DATA_ERROR: t.CDefine = (-3) -Z_MEM_ERROR: t.CDefine = (-4) -Z_BUF_ERROR: t.CDefine = (-5) -Z_VERSION_ERROR: t.CDefine = (-6) -MAX_WBITS: t.CDefine = 15 -DEF_BUF_SIZE: t.CDefine = 16384 -DEF_MEM_LEVEL: t.CDefine = 8 -ZLIB_VERSION: t.CDefine = "1.3.2" -pyzlib_error_msg: t.CExtern | t.CArray[t.CChar, 512] -pyzlib_error_code_val: t.CExtern | t.CInt - -@t.Object -class Compress: - pool: memhub.MemManager | t.CPtr - stream: VOIDPTR - is_initialized: t.CInt - is_finished: t.CInt - level: t.CInt - method: t.CInt - wbits: t.CInt - memLevel: t.CInt - strategy: t.CInt - zdict: BYTEPTR - zdict_len: t.CSizeT - last_pos: t.CSizeT - input_buf: BYTEPTR - input_buf_len: t.CSizeT - input_buf_cap: t.CSizeT - header_written: t.CInt - def compress(self: Compress, data: BYTEPTR, data_len: t.CSizeT, out_len: t.CSizeT | t.CPtr) -> BYTEPTR: pass - def flush(self: Compress, mode: t.CInt, out_len: t.CSizeT | t.CPtr) -> BYTEPTR: pass - def copy(self: Compress) -> Compress | t.CPtr: pass - def delete(self: Compress) -> t.CInt: pass - def __del__(self: Compress) -> t.CInt: pass -@t.Object -class Decompress: - pool: memhub.MemManager | t.CPtr - stream: VOIDPTR - is_initialized: t.CInt - eof: t.CInt - wbits: t.CInt - zdict: BYTEPTR - zdict_len: t.CSizeT - _unused_data: BYTEPTR - _unused_data_len: t.CSizeT - _unused_data_cap: t.CSizeT - _unconsumed_tail: BYTEPTR - _unconsumed_tail_len: t.CSizeT - _unconsumed_tail_cap: t.CSizeT - input_buf: BYTEPTR - input_buf_len: t.CSizeT - input_buf_cap: t.CSizeT - def decompress(self: Decompress, data: BYTEPTR, data_len: t.CSizeT, max_length: t.CSizeT, out_len: t.CSizeT | t.CPtr) -> BYTEPTR: pass - def flush(self: Decompress, length: t.CSizeT, out_len: t.CSizeT | t.CPtr) -> BYTEPTR: pass - def copy(self: Decompress) -> Decompress | t.CPtr: pass - def delete(self: Decompress) -> t.CInt: pass - def unused_data(self: Decompress, length: t.CSizeT | t.CPtr) -> BYTEPTR: pass - def unconsumed_tail(self: Decompress, length: t.CSizeT | t.CPtr) -> BYTEPTR: pass - -def set_error(code: int, msg: str) -> t.CInt: pass - -def clone_bytes(pool: memhub.MemManager | t.CPtr, src: BYTEPTR, length: t.CSizeT) -> BYTEPTR: pass - -def append_bytes(pool: memhub.MemManager | t.CPtr, buf: BYTE | t.CPtr[t.CPtr], length: t.CSizeT | t.CPtr, cap: t.CSizeT | t.CPtr, data: BYTEPTR, data_len: t.CSizeT) -> t.CInt: pass - -def shrink_to_fit(pool: memhub.MemManager | t.CPtr, buf: BYTEPTR, length: t.CSizeT) -> BYTEPTR: pass - -def runtime_version() -> str: pass - -def get_error() -> str: pass - -def get_error_code() -> t.CInt: pass - -def clear_error() -> t.CInt: pass - -def compress(pool: memhub.MemManager | t.CPtr, data: BYTEPTR, data_len: t.CSizeT, level: t.CInt, wbits: t.CInt, out_len: t.CSizeT | t.CPtr) -> BYTEPTR: pass - -def decompress(pool: memhub.MemManager | t.CPtr, data: BYTEPTR, data_len: t.CSizeT, wbits: t.CInt, bufsize: t.CSizeT, out_len: t.CSizeT | t.CPtr) -> BYTEPTR: pass - -def compressobj(pool: memhub.MemManager | t.CPtr, level: t.CInt, method: t.CInt, wbits: t.CInt, memLevel: t.CInt, strategy: t.CInt, zdict: BYTEPTR, zdict_len: t.CSizeT) -> Compress | t.CPtr: pass - -def decompressobj(pool: memhub.MemManager | t.CPtr, wbits: t.CInt, zdict: BYTEPTR, zdict_len: t.CSizeT) -> Decompress | t.CPtr: pass - -def zlib_adler32(data: BYTEPTR, length: t.CSizeT, value: t.CUnsignedLong) -> t.CUnsignedLong: pass - -def zlib_crc32(data: BYTEPTR, length: t.CSizeT, value: t.CUnsignedLong) -> t.CUnsignedLong: pass diff --git a/Test/TestProject2/temp/451745df21e598af.stub.ll.dep b/Test/TestProject2/temp/451745df21e598af.stub.ll.dep deleted file mode 100644 index afe33f9..0000000 --- a/Test/TestProject2/temp/451745df21e598af.stub.ll.dep +++ /dev/null @@ -1 +0,0 @@ -04e5fe47ff2af528|1f6617c02fc8899d|285b6aa29a34754d|6c658cc728d0bbf4|8ebed83a7817fa0c|928c0ff6d8c69ec9|aa246c6e6aa30484|c9f4be41ca1cc2b4|d541ade6afb689a5|f5522571bcce7bcb \ No newline at end of file diff --git a/Test/TestProject2/temp/451745df21e598af.vpi b/Test/TestProject2/temp/451745df21e598af.vpi deleted file mode 100644 index 7ca1cde..0000000 --- a/Test/TestProject2/temp/451745df21e598af.vpi +++ /dev/null @@ -1,52 +0,0 @@ -""" -Auto-generated Python stub file from zlib.zinflate.vp -Module: zlib.zinflate -""" - - -from stdint import * -import zlib.zchecksum as zchecksum -import zlib.zdef as zdef -import zlib.zhuff as zhuff -import string -import memhub -import t, c - -@t.Object -class zinflate_stream: - pool: memhub.MemManager | t.CPtr - reader: zdef.zbit_reader - window: BYTEPTR - window_pos: t.CInt - window_size: t.CInt - wbits: t.CInt - is_finished: t.CInt - is_initialized: t.CInt - header_parsed: t.CInt - is_gzip: t.CInt - adler: t.CUInt32T - crc: t.CUInt32T - output: BYTEPTR - output_len: t.CSizeT - output_cap: t.CSizeT - input_data: t.CConst | BYTEPTR - input_len: t.CSizeT - input_pos: t.CSizeT - max_length: t.CSizeT - def __init__(self: zinflate_stream) -> t.CInt: pass - def output_byte(self: zinflate_stream, byte: BYTE) -> t.CInt: pass - def parse_header(self: zinflate_stream) -> t.CInt: pass - def read_bits_from_input(self: zinflate_stream, nbits: t.CInt, out: UINTPTR) -> t.CInt: pass - def read_huffman(self: zinflate_stream, dt: zhuff.zhuff_decode_tree | t.CPtr) -> t.CInt: pass - def inflate_block_stored(self: zinflate_stream) -> t.CInt: pass - def inflate_block_fixed(self: zinflate_stream) -> t.CInt: pass - def inflate_block_dynamic(self: zinflate_stream) -> t.CInt: pass - def inflate_stream(self: zinflate_stream) -> t.CInt: pass - def decompress(self: zinflate_stream, data: UINT8PTR, length: t.CSizeT, max_length: t.CSizeT, out: t.CUInt8T | t.CPtr[t.CPtr], out_len: t.CSizeT | t.CPtr) -> t.CInt: pass - def set_dictionary(self: zinflate_stream, dict: UINT8PTR, length: t.CSizeT) -> t.CInt: pass - def copy(self: zinflate_stream) -> zinflate_stream | t.CPtr: pass - def destroy(self: zinflate_stream) -> t.CInt: pass - -def zinflate_one_shot(pool: memhub.MemManager | t.CPtr, data: UINT8PTR, length: t.CSizeT, wbits: t.CInt, bufsize: t.CSizeT, out_len: t.CSizeT | t.CPtr) -> t.CUInt8T | t.CPtr: pass - -def zinflate_create(pool: memhub.MemManager | t.CPtr, wbits: t.CInt) -> zinflate_stream | t.CPtr: pass diff --git a/Test/TestProject2/temp/541a1ed9b8be53c8.doc.json b/Test/TestProject2/temp/541a1ed9b8be53c8.doc.json deleted file mode 100644 index 9e26dfe..0000000 --- a/Test/TestProject2/temp/541a1ed9b8be53c8.doc.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/Test/TestProject2/temp/541a1ed9b8be53c8.vpi b/Test/TestProject2/temp/541a1ed9b8be53c8.vpi deleted file mode 100644 index 7261d93..0000000 --- a/Test/TestProject2/temp/541a1ed9b8be53c8.vpi +++ /dev/null @@ -1,16 +0,0 @@ -""" -Auto-generated Python stub file from main.vp -Module: main -""" - - -from stdint import * -import w32.win32console -import config -import hashlib -import binascii -import zlib.pyzlib as zp -import t, c -import testcheck - -def main() -> t.CInt | t.CExport: pass diff --git a/Test/TestProject2/temp/6446627d4f07a1b5.vpi b/Test/TestProject2/temp/6446627d4f07a1b5.vpi deleted file mode 100644 index 55f6a1f..0000000 --- a/Test/TestProject2/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/TestProject2/temp/6c658cc728d0bbf4.stub.ll.dep b/Test/TestProject2/temp/6c658cc728d0bbf4.stub.ll.dep deleted file mode 100644 index 793e7ed..0000000 --- a/Test/TestProject2/temp/6c658cc728d0bbf4.stub.ll.dep +++ /dev/null @@ -1 +0,0 @@ -f5522571bcce7bcb \ No newline at end of file diff --git a/Test/TestProject2/temp/6c658cc728d0bbf4.vpi b/Test/TestProject2/temp/6c658cc728d0bbf4.vpi deleted file mode 100644 index d7c42cf..0000000 --- a/Test/TestProject2/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/TestProject2/temp/6ff26590374ae6fc.stub.ll.dep b/Test/TestProject2/temp/6ff26590374ae6fc.stub.ll.dep deleted file mode 100644 index e69de29..0000000 diff --git a/Test/TestProject2/temp/6ff26590374ae6fc.vpi b/Test/TestProject2/temp/6ff26590374ae6fc.vpi deleted file mode 100644 index a9fa7be..0000000 --- a/Test/TestProject2/temp/6ff26590374ae6fc.vpi +++ /dev/null @@ -1,39 +0,0 @@ -""" -Auto-generated Python stub file from hashlib.__sha512.vp -Module: hashlib.__sha512 -""" - - -import t, c - -SHA512_BLOCK_LEN: t.CDefine = 128 -SHA512_DIGEST_LEN: t.CDefine = 64 - -def sha512_ror(x: t.CUInt64T, n: int) -> t.CUInt64T: pass - -def sha512_shr(x: t.CUInt64T, n: int) -> t.CUInt64T: pass - -def sha512_Ch(x: t.CUInt64T, y: t.CUInt64T, z: t.CUInt64T) -> t.CUInt64T: pass - -def sha512_Maj(x: t.CUInt64T, y: t.CUInt64T, z: t.CUInt64T) -> t.CUInt64T: pass - -def sha512_BigSigma0(x: t.CUInt64T) -> t.CUInt64T: pass - -def sha512_BigSigma1(x: t.CUInt64T) -> t.CUInt64T: pass - -def sha512_Sigma0(x: t.CUInt64T) -> t.CUInt64T: pass - -def sha512_Sigma1(x: t.CUInt64T) -> t.CUInt64T: pass - - -sha512_K: t.CExtern | t.CArray[t.CUInt64T, 80] - -@t.Object -class sha512: - state: t.CArray[t.CUInt64T, 8] - count: t.CArray[t.CUInt64T, 2] - buf: t.CArray[t.CUInt8T, SHA512_BLOCK_LEN] - def __init__(self: sha512) -> t.CInt: pass - def transform(self: sha512, block: t.CArray[t.CUInt8T, SHA512_BLOCK_LEN]) -> t.CInt: pass - def update(self: sha512, s: str) -> t.CInt: pass - def final(self: sha512, out: t.CArray[t.CUInt8T, SHA512_DIGEST_LEN]) -> t.CInt: pass \ No newline at end of file diff --git a/Test/TestProject2/temp/72e2d5ccb7cedcf1.vpi b/Test/TestProject2/temp/72e2d5ccb7cedcf1.vpi deleted file mode 100644 index f85ee45..0000000 --- a/Test/TestProject2/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/TestProject2/temp/748d0424e8976fa0.stub.ll.dep b/Test/TestProject2/temp/748d0424e8976fa0.stub.ll.dep deleted file mode 100644 index be4eebc..0000000 --- a/Test/TestProject2/temp/748d0424e8976fa0.stub.ll.dep +++ /dev/null @@ -1 +0,0 @@ -285b6aa29a34754d|bbdf3bbd4c3bc28c|f5522571bcce7bcb|fc980acec33d69a7 \ No newline at end of file diff --git a/Test/TestProject2/temp/748d0424e8976fa0.vpi b/Test/TestProject2/temp/748d0424e8976fa0.vpi deleted file mode 100644 index 5ff4850..0000000 --- a/Test/TestProject2/temp/748d0424e8976fa0.vpi +++ /dev/null @@ -1,31 +0,0 @@ -""" -Auto-generated Python stub file from testcheck.vp -Module: testcheck -""" - - -import t, c -import stdio -from w32.win32console import SetConsoleOutputCP, SetConsoleCP - -CP_UTF8: t.CDefine = 65001 -_pass_count: t.CExtern | t.CInt -_fail_count: t.CExtern | t.CInt -_total_pass: t.CExtern | t.CInt -_total_fail: t.CExtern | t.CInt - -def begin(name: str) -> t.CInt: pass - -def section(name: str) -> t.CInt: pass - -def ok(msg: str) -> t.CInt: pass - -def fail(msg: str) -> t.CInt: pass - -def check(cond: t.CInt, ok_msg: str, fail_msg: str) -> t.CInt: pass - -def info(msg: str) -> t.CInt: pass - -def end() -> t.CInt: pass - -def summary() -> t.CInt: pass diff --git a/Test/TestProject2/temp/8ebed83a7817fa0c.stub.ll.dep b/Test/TestProject2/temp/8ebed83a7817fa0c.stub.ll.dep deleted file mode 100644 index 793e7ed..0000000 --- a/Test/TestProject2/temp/8ebed83a7817fa0c.stub.ll.dep +++ /dev/null @@ -1 +0,0 @@ -f5522571bcce7bcb \ No newline at end of file diff --git a/Test/TestProject2/temp/8ebed83a7817fa0c.vpi b/Test/TestProject2/temp/8ebed83a7817fa0c.vpi deleted file mode 100644 index 075933e..0000000 --- a/Test/TestProject2/temp/8ebed83a7817fa0c.vpi +++ /dev/null @@ -1,15 +0,0 @@ -""" -Auto-generated Python stub file from zlib.zchecksum.vp -Module: zlib.zchecksum -""" - - -from stdint import * -import t, c - -def zchecksum_adler32(data: UINT8PTR, length: t.CSizeT, init: UINT32) -> t.CUInt32T: pass - - -crc32_table: t.CExtern | t.CArray[t.CUInt32T, 256] - -def zchecksum_crc32(data: UINT8PTR, length: t.CSizeT, init: t.CUInt32T) -> t.CUInt32T: pass diff --git a/Test/TestProject2/temp/90921d009fdd674c.stub.ll.dep b/Test/TestProject2/temp/90921d009fdd674c.stub.ll.dep deleted file mode 100644 index afe33f9..0000000 --- a/Test/TestProject2/temp/90921d009fdd674c.stub.ll.dep +++ /dev/null @@ -1 +0,0 @@ -04e5fe47ff2af528|1f6617c02fc8899d|285b6aa29a34754d|6c658cc728d0bbf4|8ebed83a7817fa0c|928c0ff6d8c69ec9|aa246c6e6aa30484|c9f4be41ca1cc2b4|d541ade6afb689a5|f5522571bcce7bcb \ No newline at end of file diff --git a/Test/TestProject2/temp/90921d009fdd674c.vpi b/Test/TestProject2/temp/90921d009fdd674c.vpi deleted file mode 100644 index 185bb63..0000000 --- a/Test/TestProject2/temp/90921d009fdd674c.vpi +++ /dev/null @@ -1,56 +0,0 @@ -""" -Auto-generated Python stub file from zlib.zdeflate.vp -Module: zlib.zdeflate -""" - - -from stdint import * -import zlib.zchecksum as zchecksum -import zlib.zhuff as zhuff -import zlib.zdef as zdef -import string -import memhub -import t, c - -@t.Object -class zdeflate_stream: - pool: memhub.MemManager | t.CPtr - writer: zdef.zbit_writer - window: BYTE | t.CPtr - window_pos: t.CInt - window_size: t.CInt - hash_head: t.CInt | t.CPtr - hash_prev: t.CInt | t.CPtr - level: t.CInt - strategy: t.CInt - wbits: t.CInt - is_finished: t.CInt - adler: t.CUInt32T - def find_match(self: zdeflate_stream, data: BYTE | t.CPtr, data_len: t.CSizeT, pos: t.CSizeT, best_dist: t.CInt | t.CPtr) -> t.CInt: pass - def update_hash(self: zdeflate_stream, data: BYTE | t.CPtr, pos: t.CSizeT) -> t.CInt: pass - def write_fixed_block(self: zdeflate_stream, data: UINT8PTR, length: t.CSizeT, final: t.CInt) -> t.CInt: pass - def encode_block_data(self: zdeflate_stream, data: UINT8PTR, length: t.CSizeT, lit_tree: zhuff.zhuff_tree | t.CPtr, dist_tree: zhuff.zhuff_tree | t.CPtr) -> t.CInt: pass - def write_dynamic_block(self: zdeflate_stream, data: UINT8PTR, length: t.CSizeT, final: t.CInt) -> t.CInt: pass - def compress_block(self: zdeflate_stream, data: UINT8PTR, length: t.CSizeT, final: t.CInt) -> t.CInt: pass - def write_stored_block(self: zdeflate_stream, data: UINT8PTR, length: t.CSizeT, final: t.CInt) -> t.CInt: pass - def compress(self: zdeflate_stream, data: UINT8PTR, length: t.CSizeT, out: t.CUInt8T | t.CPtr[t.CPtr], out_len: t.CSizeT | t.CPtr) -> t.CInt: pass - def flush(self: zdeflate_stream, mode: t.CInt, out: t.CUInt8T | t.CPtr[t.CPtr], out_len: t.CSizeT | t.CPtr) -> t.CInt: pass - def set_dictionary(self: zdeflate_stream, dict: UINT8PTR, length: t.CSizeT) -> t.CInt: pass - def copy(self: zdeflate_stream) -> zdeflate_stream | t.CPtr: pass - def destroy(self: zdeflate_stream) -> t.CInt: pass - -def zdeflate_count_freqs(lit_freqs: INTPTR, dist_freqs: INTPTR, s: zdeflate_stream | t.CPtr, data: UINT8PTR, length: t.CSizeT) -> t.CInt: pass - -def zdeflate_hash(p: BYTE | t.CPtr) -> t.CUnsignedInt: pass - -def zdeflate_len_to_symbol(length: t.CInt) -> t.CInt: pass - -def zdeflate_dist_to_symbol(dist: t.CInt) -> t.CInt: pass - -def zdeflate_count_cl_freqs(all_lengths: INTPTR, total: t.CInt, cl_freqs: INTPTR) -> t.CInt: pass - -def zdeflate_write_cl_encoded(all_lengths: INTPTR, total: t.CInt, w: zdef.zbit_writer | t.CPtr, cl_tree: zhuff.zhuff_tree | t.CPtr) -> t.CInt: pass - -def zdeflate_create(pool: memhub.MemManager | t.CPtr, level: t.CInt, wbits: t.CInt, mem_level: t.CInt, strategy: t.CInt) -> zdeflate_stream | t.CPtr: pass - -def zdeflate_one_shot(pool: memhub.MemManager | t.CPtr, data: UINT8PTR, length: t.CSizeT, level: t.CInt, wbits: t.CInt, out_len: t.CSizeT | t.CPtr) -> t.CUInt8T | t.CPtr: pass diff --git a/Test/TestProject2/temp/96837bcc64032444.stub.ll.dep b/Test/TestProject2/temp/96837bcc64032444.stub.ll.dep deleted file mode 100644 index e69de29..0000000 diff --git a/Test/TestProject2/temp/96837bcc64032444.vpi b/Test/TestProject2/temp/96837bcc64032444.vpi deleted file mode 100644 index c81f78b..0000000 --- a/Test/TestProject2/temp/96837bcc64032444.vpi +++ /dev/null @@ -1,13 +0,0 @@ -""" -Auto-generated Python stub file from hashlib.__init__.vp -Module: hashlib.__init__ -""" - -import t -import c - - -from .__md5 import md5, MD5_DIGEST_LEN -from .__sha1 import sha1, SHA1_DIGEST_LEN -from .__sha256 import sha256, SHA256_DIGEST_LEN -from .__sha512 import sha512, SHA512_DIGEST_LEN \ No newline at end of file diff --git a/Test/TestProject2/temp/_phase1_manifest.json b/Test/TestProject2/temp/_phase1_manifest.json deleted file mode 100644 index 3ba8ce4..0000000 --- a/Test/TestProject2/temp/_phase1_manifest.json +++ /dev/null @@ -1 +0,0 @@ -{"d:\\Users\\TermiNexus\\Desktop\\TransPyC\\Test\\TestProject2\\App\\main.vp": {"sha1": "541a1ed9b8be53c8", "mtime": 1782266206.092594, "size": 881}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\Test\\TestProject2\\App\\zc\\config.vp": {"sha1": "cfc83b830141b00e", "mtime": 1778402243.1661563, "size": 531}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\atom.vp": {"sha1": "aa246c6e6aa30484", "mtime": 1785389628.701967, "size": 1198}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\binascii.vp": {"sha1": "d3917d97537f703c", "mtime": 1785777664.9648058, "size": 14946}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\hashlib\\__init__.vp": {"sha1": "96837bcc64032444", "mtime": 1777902641.540433, "size": 186}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\hashlib\\__md5.vp": {"sha1": "19f8024d10c828e8", "mtime": 1784356818.7075372, "size": 5847}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\hashlib\\__sha1.vp": {"sha1": "0df65b8ed15664b0", "mtime": 1784356827.656474, "size": 4516}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\hashlib\\__sha256.vp": {"sha1": "c9d54a4158f7f5a8", "mtime": 1782266203.9352357, "size": 5332}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\hashlib\\__sha512.vp": {"sha1": "6ff26590374ae6fc", "mtime": 1782266223.3380039, "size": 7162}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\memhub.vp": {"sha1": "04e5fe47ff2af528", "mtime": 1786093335.1900027, "size": 27855}, "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": "928c0ff6d8c69ec9", "mtime": 1786032947.9330952, "size": 11557}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\testcheck.vp": {"sha1": "748d0424e8976fa0", "mtime": 1785332415.20287, "size": 1919}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\viperio.vp": {"sha1": "c9f4be41ca1cc2b4", "mtime": 1782812279.506002, "size": 1556}, "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\\zlib\\pyzlib.vp": {"sha1": "3e775aa83705b119", "mtime": 1785894559.67875, "size": 26187}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\zlib\\zchecksum.vp": {"sha1": "8ebed83a7817fa0c", "mtime": 1782266235.9510274, "size": 4067}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\zlib\\zdef.vp": {"sha1": "1f6617c02fc8899d", "mtime": 1785894585.5916247, "size": 8577}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\zlib\\zdeflate.vp": {"sha1": "90921d009fdd674c", "mtime": 1783538197.82992, "size": 19061}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\zlib\\zhuff.vp": {"sha1": "d541ade6afb689a5", "mtime": 1782827037.897873, "size": 13495}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\zlib\\zinflate.vp": {"sha1": "451745df21e598af", "mtime": 1782827035.992862, "size": 18078}} \ No newline at end of file diff --git a/Test/TestProject2/temp/_sha1_map.txt b/Test/TestProject2/temp/_sha1_map.txt deleted file mode 100644 index 88b3741..0000000 --- a/Test/TestProject2/temp/_sha1_map.txt +++ /dev/null @@ -1,24 +0,0 @@ -04e5fe47ff2af528:includes/memhub.vp -0df65b8ed15664b0:includes/hashlib\__sha1.vp -19f8024d10c828e8:includes/hashlib\__md5.vp -1f6617c02fc8899d:includes/zlib\zdef.vp -285b6aa29a34754d:includes/stdio.vp -3e775aa83705b119:includes/zlib\pyzlib.vp -451745df21e598af:includes/zlib\zinflate.vp -541a1ed9b8be53c8:main.vp -6c658cc728d0bbf4:includes/stdlib.vp -6ff26590374ae6fc:includes/hashlib\__sha512.vp -748d0424e8976fa0:includes/testcheck.vp -8ebed83a7817fa0c:includes/zlib\zchecksum.vp -90921d009fdd674c:includes/zlib\zdeflate.vp -928c0ff6d8c69ec9:includes/string.vp -96837bcc64032444:includes/hashlib\__init__.vp -aa246c6e6aa30484:includes/atom.vp -bbdf3bbd4c3bc28c:includes/w32\win32console.vp -c9d54a4158f7f5a8:includes/hashlib\__sha256.vp -c9f4be41ca1cc2b4:includes/viperio.vp -cfc83b830141b00e:zc/config.vp -d3917d97537f703c:includes/binascii.vp -d541ade6afb689a5:includes/zlib\zhuff.vp -f5522571bcce7bcb:includes/stdint.vp -fc980acec33d69a7:includes/w32\win32base.vp diff --git a/Test/TestProject2/temp/_shared_sym.json b/Test/TestProject2/temp/_shared_sym.json deleted file mode 100644 index f56af1a..0000000 Binary files a/Test/TestProject2/temp/_shared_sym.json and /dev/null differ diff --git a/Test/TestProject2/temp/aa246c6e6aa30484.stub.ll.dep b/Test/TestProject2/temp/aa246c6e6aa30484.stub.ll.dep deleted file mode 100644 index e69de29..0000000 diff --git a/Test/TestProject2/temp/aa246c6e6aa30484.vpi b/Test/TestProject2/temp/aa246c6e6aa30484.vpi deleted file mode 100644 index 3147b54..0000000 --- a/Test/TestProject2/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/TestProject2/temp/bbdf3bbd4c3bc28c.stub.ll.dep b/Test/TestProject2/temp/bbdf3bbd4c3bc28c.stub.ll.dep deleted file mode 100644 index d4b382c..0000000 --- a/Test/TestProject2/temp/bbdf3bbd4c3bc28c.stub.ll.dep +++ /dev/null @@ -1 +0,0 @@ -f5522571bcce7bcb|fc980acec33d69a7 \ No newline at end of file diff --git a/Test/TestProject2/temp/bbdf3bbd4c3bc28c.vpi b/Test/TestProject2/temp/bbdf3bbd4c3bc28c.vpi deleted file mode 100644 index 4709b3e..0000000 --- a/Test/TestProject2/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/TestProject2/temp/c9d54a4158f7f5a8.stub.ll.dep b/Test/TestProject2/temp/c9d54a4158f7f5a8.stub.ll.dep deleted file mode 100644 index e69de29..0000000 diff --git a/Test/TestProject2/temp/c9d54a4158f7f5a8.vpi b/Test/TestProject2/temp/c9d54a4158f7f5a8.vpi deleted file mode 100644 index 0619c4b..0000000 --- a/Test/TestProject2/temp/c9d54a4158f7f5a8.vpi +++ /dev/null @@ -1,34 +0,0 @@ -""" -Auto-generated Python stub file from hashlib.__sha256.vp -Module: hashlib.__sha256 -""" - - -import t, c - -SHA256_BLOCK_LEN: t.CDefine = 64 -SHA256_DIGEST_LEN: t.CDefine = 32 -sha256_K: t.CExtern | t.CArray[t.CUInt32T, 64] - -def s0(x: t.CUInt32T) -> t.CUInt32T: pass - -def s1(x: t.CUInt32T) -> t.CUInt32T: pass - -def S0(x: t.CUInt32T) -> t.CUInt32T: pass - -def S1(x: t.CUInt32T) -> t.CUInt32T: pass - -def Ch(x: t.CUInt32T, y: t.CUInt32T, z: t.CUInt32T) -> t.CUInt32T: pass - -def Maj(x: t.CUInt32T, y: t.CUInt32T, z: t.CUInt32T) -> t.CUInt32T: pass - - -@t.Object -class sha256: - state: t.CArray[t.CUInt32T, 8] - count: t.CUInt64T - buf: t.CArray[t.CUInt8T, SHA256_BLOCK_LEN] - def __init__(self: sha256) -> t.CInt: pass - def transform(self: sha256, block: t.CUInt8T | t.CPtr) -> t.CInt: pass - def update(self: sha256, s: str) -> t.CInt: pass - def final(self: sha256, out: t.CArray[t.CUInt8T, SHA256_DIGEST_LEN]) -> t.CInt: pass \ No newline at end of file diff --git a/Test/TestProject2/temp/c9f4be41ca1cc2b4.stub.ll.dep b/Test/TestProject2/temp/c9f4be41ca1cc2b4.stub.ll.dep deleted file mode 100644 index 793e7ed..0000000 --- a/Test/TestProject2/temp/c9f4be41ca1cc2b4.stub.ll.dep +++ /dev/null @@ -1 +0,0 @@ -f5522571bcce7bcb \ No newline at end of file diff --git a/Test/TestProject2/temp/c9f4be41ca1cc2b4.vpi b/Test/TestProject2/temp/c9f4be41ca1cc2b4.vpi deleted file mode 100644 index f7ed5fd..0000000 --- a/Test/TestProject2/temp/c9f4be41ca1cc2b4.vpi +++ /dev/null @@ -1,22 +0,0 @@ -""" -Auto-generated Python stub file from viperio.vp -Module: viperio -""" - - -import t, c -from stdint import * - -class Buf: - data: t.CChar | t.CPtr - length: t.CSizeT - capacity: t.CSizeT - owned: bool - def __init__(self: Buf, data: t.CChar | t.CPtr, capacity: t.CSizeT, length: t.CSizeT = 0, owned: bool = False) -> t.CInt: pass - def clear(self: Buf) -> t.CInt: pass - def write(self: Buf, src: t.CChar | t.CPtr, count: t.CSizeT) -> t.CSizeT: pass - def cstr(self: Buf) -> t.CChar | t.CPtr: pass - def reset(self: Buf) -> t.CInt: pass - def __enter__(self: Buf) -> 'Buf' | t.CPtr: pass - def __exit__(self: Buf) -> t.CInt: pass - def free(self: Buf) -> t.CInt: pass \ No newline at end of file diff --git a/Test/TestProject2/temp/cfc83b830141b00e.doc.json b/Test/TestProject2/temp/cfc83b830141b00e.doc.json deleted file mode 100644 index 9e26dfe..0000000 --- a/Test/TestProject2/temp/cfc83b830141b00e.doc.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/Test/TestProject2/temp/cfc83b830141b00e.vpi b/Test/TestProject2/temp/cfc83b830141b00e.vpi deleted file mode 100644 index a3a9f1c..0000000 --- a/Test/TestProject2/temp/cfc83b830141b00e.vpi +++ /dev/null @@ -1,27 +0,0 @@ -""" -Auto-generated Python stub file from zc.config.vp -Module: zc.config -""" - - -import t, c - -POSMAX: t.CDefine = 100 -MAX_RETRY: t.CDefine = 5 -BUFFER_SIZE: t.CDefine = 256 -PI: t.CDefine = 3.14159 -EULER: t.CDefine = 2.71828 -TRUE: t.CDefine = 1 -FALSE: t.CDefine = 0 -NULL: t.CDefine = 0 -MATH_OFFSET: t.CDefine = 10 -MATH_SCALE: t.CDefine = 2 -THRESHOLD: t.CDefine = 50 -LOOP_LIMIT: t.CDefine = 20 -SHIFT_AMOUNT: t.CDefine = 2 -MASK_VALUE: t.CDefine = 0xFF -BIT_RANGE: t.CDefine = 4 -EXPONENT_BASE: t.CDefine = 3 -MODULO_DIVISOR: t.CDefine = 7 -SCALE_SHIFT: t.CDefine = 4 -HALF_SCALE: t.CDefine = 0.5 \ No newline at end of file diff --git a/Test/TestProject2/temp/d137b1f3311f3a7f.vpi b/Test/TestProject2/temp/d137b1f3311f3a7f.vpi deleted file mode 100644 index a85310e..0000000 --- a/Test/TestProject2/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/TestProject2/temp/d3917d97537f703c.stub.ll.dep b/Test/TestProject2/temp/d3917d97537f703c.stub.ll.dep deleted file mode 100644 index e69de29..0000000 diff --git a/Test/TestProject2/temp/d3917d97537f703c.vpi b/Test/TestProject2/temp/d3917d97537f703c.vpi deleted file mode 100644 index 9187725..0000000 --- a/Test/TestProject2/temp/d3917d97537f703c.vpi +++ /dev/null @@ -1,45 +0,0 @@ -""" -Auto-generated Python stub file from binascii.vp -Module: binascii -""" - - -import t, c - -HEX_CHARS: t.CExtern | t.CArray[t.CChar, None] -HEX_VALS: t.CExtern | t.CArray[t.CInt, 256] -B64_CHARS: t.CExtern | t.CArray[t.CChar, None] -B64_VALS: t.CExtern | t.CArray[t.CInt, 256] -HQX_CHARS: t.CExtern | t.CArray[t.CChar, 64] -HQX_VALS: t.CExtern | t.CArray[t.CInt, 256] -UU_CHARS: t.CExtern | t.CArray[t.CChar, None] -CRC32_TABLE: t.CExtern | t.CArray[t.CUnsignedInt, 256] -CRC_HQX_TABLE: t.CExtern | t.CArray[t.CUnsignedShort, 256] - -def init_binascii() -> t.CInt: pass - -def crc32(data: str, length: t.CInt, crc: t.CUnsignedInt) -> t.CUnsignedInt: pass - -def crc_hqx(data: str, length: t.CInt, crc: t.CUnsignedShort) -> t.CUnsignedShort: pass - -def hexlify(data: str, length: t.CInt) -> str: pass - -def b2a_hex(data: str, length: t.CInt) -> str: pass - -def a2b_hex(hexstr: str, length: t.CInt) -> str: pass - -def unhexlify(data: str, length: t.CInt) -> bytes: pass - -def b2a_base64(data: str, length: t.CInt) -> str: pass - -def a2b_base64(data: str, length: t.CInt) -> str: pass - -def b2a_uu(data: str, length: t.CInt) -> str: pass - -def a2b_uu(data: str) -> str: pass - -def b2a_hqx(data: str, length: t.CInt, crc: t.CUnsignedShort = 0) -> tuple[str, t.CUnsignedShort]: pass - -def a2b_hqx(data: str, crc: t.CUnsignedShort = 0) -> tuple[str, t.CUnsignedShort]: pass - -def adler32(data: str, length: t.CInt, adler: t.CUnsignedInt) -> t.CUnsignedInt: pass diff --git a/Test/TestProject2/temp/d541ade6afb689a5.stub.ll.dep b/Test/TestProject2/temp/d541ade6afb689a5.stub.ll.dep deleted file mode 100644 index 25a2827..0000000 --- a/Test/TestProject2/temp/d541ade6afb689a5.stub.ll.dep +++ /dev/null @@ -1 +0,0 @@ -04e5fe47ff2af528|1f6617c02fc8899d|285b6aa29a34754d|6c658cc728d0bbf4|928c0ff6d8c69ec9|aa246c6e6aa30484|c9f4be41ca1cc2b4|f5522571bcce7bcb \ No newline at end of file diff --git a/Test/TestProject2/temp/d541ade6afb689a5.vpi b/Test/TestProject2/temp/d541ade6afb689a5.vpi deleted file mode 100644 index 5da55b1..0000000 --- a/Test/TestProject2/temp/d541ade6afb689a5.vpi +++ /dev/null @@ -1,44 +0,0 @@ -""" -Auto-generated Python stub file from zlib.zhuff.vp -Module: zlib.zhuff -""" - - -from stdint import * -import zlib.zdef as zdef -import memhub -import t, c - -ZHUFF_MAX_CODES: t.CDefine = 288 -ZHUFF_MAX_BITS: t.CDefine = 15 - -class zhuff_code: - code: UINT - bits: t.CInt -@t.Object -class zhuff_tree: - pool: memhub.MemManager | t.CPtr - codes: t.CArray[zhuff_code, ZHUFF_MAX_CODES] - count: t.CInt - max_bits: t.CInt - def __init__(self: zhuff_tree) -> t.CInt: pass - def build_codes(self: zhuff_tree, freqs: INTPTR, count: t.CInt, max_bits: t.CInt) -> t.CInt: pass - def build_fixed_lit_tree(self: zhuff_tree) -> t.CInt: pass - def build_fixed_dist_tree(self: zhuff_tree) -> t.CInt: pass - def encode_symbol(self: zhuff_tree, symbol: int, writer: zdef.zbit_writer | t.CPtr) -> t.CInt: pass - def build_code_lengths(self: zhuff_tree, lengths: t.CInt | t.CPtr, freqs: t.CInt | t.CPtr, count: t.CInt, max_bits: t.CInt) -> t.CInt: pass - def get_fixed_lit_lengths(self: zhuff_tree, lengths: INTPTR) -> t.CInt: pass - def get_fixed_dist_lengths(self: zhuff_tree, lengths: INTPTR) -> t.CInt: pass - def build_tree_from_lengths(self: zhuff_tree, lengths: INTPTR, count: t.CInt, max_bits: t.CInt) -> t.CInt: pass -class zhuff_decode_node: - children: t.CArray[t.CInt, 2] - symbol: t.CInt -@t.Object -class zhuff_decode_tree: - pool: memhub.MemManager | t.CPtr - nodes: t.CArray[zhuff_decode_node, 2 * ZHUFF_MAX_CODES] - node_count: t.CInt - root: t.CInt - def __init__(self: zhuff_decode_tree) -> t.CInt: pass - def build_decode_tree(self: zhuff_decode_tree, ht: zhuff_tree | t.CPtr) -> t.CInt: pass - def decode_symbol(self: zhuff_decode_tree, reader: zdef.zbit_reader | t.CPtr) -> t.CInt: pass \ No newline at end of file diff --git a/Test/TestProject2/temp/d63d2c2a2bd9bd2a.vpi b/Test/TestProject2/temp/d63d2c2a2bd9bd2a.vpi deleted file mode 100644 index 300ab3b..0000000 --- a/Test/TestProject2/temp/d63d2c2a2bd9bd2a.vpi +++ /dev/null @@ -1,10 +0,0 @@ -""" -Auto-generated Python stub file from zlib.__init__.vp -Module: zlib.__init__ -""" - -import t -import c - - -from .pyzlib import * \ No newline at end of file diff --git a/Test/TestProject2/temp/f5522571bcce7bcb.stub.ll.dep b/Test/TestProject2/temp/f5522571bcce7bcb.stub.ll.dep deleted file mode 100644 index e69de29..0000000 diff --git a/Test/TestProject2/temp/f5522571bcce7bcb.vpi b/Test/TestProject2/temp/f5522571bcce7bcb.vpi deleted file mode 100644 index f0bc071..0000000 --- a/Test/TestProject2/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/TestProject2/temp/f6b51804a0ba8ff0.vpi b/Test/TestProject2/temp/f6b51804a0ba8ff0.vpi deleted file mode 100644 index 6ee80a6..0000000 --- a/Test/TestProject2/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/TestProject2/temp/fc980acec33d69a7.stub.ll.dep b/Test/TestProject2/temp/fc980acec33d69a7.stub.ll.dep deleted file mode 100644 index 793e7ed..0000000 --- a/Test/TestProject2/temp/fc980acec33d69a7.stub.ll.dep +++ /dev/null @@ -1 +0,0 @@ -f5522571bcce7bcb \ No newline at end of file diff --git a/Test/TestProject2/temp/fc980acec33d69a7.vpi b/Test/TestProject2/temp/fc980acec33d69a7.vpi deleted file mode 100644 index 3f9feff..0000000 --- a/Test/TestProject2/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/TestProject3/.tpv_build/temp/64/64ac83614c9bdbc6.vpi b/Test/TestProject3/.tpv_build/temp/64/64ac83614c9bdbc6.vpi deleted file mode 100644 index 6fd9553..0000000 --- a/Test/TestProject3/.tpv_build/temp/64/64ac83614c9bdbc6.vpi +++ /dev/null @@ -1,75 +0,0 @@ -"""Auto-generated Python stub file""" - - -import t, c -from t import CInt, CInt32T, CUInt32T, CUInt64T, CFloat64T, CPtr, CChar, CDefine, CUInt16T -import viperlib -import stdlib -import platmacro -MAX_SIZE: t.CDefine = 1024 -MIN_VAL: t.CDefine = 0 -MAX_VAL: t.CDefine = 100 -MASK_BYTE: t.CDefine = 255 -SHIFT_BITS: t.CDefine = 8 -PI_INT: t.CDefine = 3 -ENABLED: t.CDefine = 1 -DISABLED: t.CDefine = 0 -PAGE_SIZE: t.CDefine = 4096 -BUFFER_LEN: t.CDefine = 256 -CODE_SEG: t.CDefine | t.CUInt16T = 8 -DATA_SEG: t.CDefine | t.CUInt16T = 16 -STACK_SEG: t.CDefine | t.CUInt16T = 32 -def MAKE_FLAG(bit: CInt32T) -> t.CDefine: pass - -def CLAMP(x: CInt32T, lo: CInt32T, hi: CInt32T) -> t.CDefine: pass - -def test_basic_define() -> CInt: pass - -def test_define_arithmetic() -> CInt: pass - -def test_define_conditional() -> CInt: pass - -def test_define_loop() -> CInt: pass - -def test_typed_define() -> CInt: pass - -def test_define_function() -> CInt: pass - -def test_define_clamp() -> CInt: pass - -def test_define_string() -> CInt: pass - -def test_define_combined() -> CInt: pass - -def test_cif_basic() -> CInt: pass - -def test_cif_elif_else() -> CInt: pass - -def test_cifdef_cifndef() -> CInt: pass - -def test_cif_platform() -> CInt: pass - -def test_cif_nested() -> CInt: pass - -def test_cif_expr() -> CInt: pass - -def test_platmacro_platform() -> CInt: pass - -def test_platmacro_sizes() -> CInt: pass - -def test_platmacro_endian() -> CInt: pass - -def test_platmacro_features() -> CInt: pass - -def test_platmacro_align() -> CInt: pass - -def test_cifdef_cross_module() -> CInt: pass - -def test_cifdef_guard() -> CInt: pass - -def test_cifdef_undefined() -> CInt: pass - -def test_cifdef_complex() -> CInt: pass - -def define_main() -> CInt: pass - diff --git a/Test/TestProject3/.tpv_build/temp/_sha1_map.txt b/Test/TestProject3/.tpv_build/temp/_sha1_map.txt deleted file mode 100644 index 73b15aa..0000000 --- a/Test/TestProject3/.tpv_build/temp/_sha1_map.txt +++ /dev/null @@ -1,6 +0,0 @@ -64ac83614c9bdbc6:definetest.vp -1b58766d38d05de3:enumtest.vp -a0feb5ea7bc00189:fileiotest.vp -b235d6477436c524:main.vp -0019c939aae7f9f1:mpooltest.vp -b777c587cc21465a:vectortest.vp diff --git a/Test/TestProject3/App/enumtest.vp b/Test/TestProject3/App/enumtest.vp deleted file mode 100644 index c935a48..0000000 --- a/Test/TestProject3/App/enumtest.vp +++ /dev/null @@ -1,95 +0,0 @@ -import t, c -from t import CInt, CPtr, CChar, CInt32T, CExport -import viperlib -import stdlib - - -class Color(t.CEnum): - Red = 0 - Green = 1 - Blue = 2 - - -class Option(t.REnum): - class Some: - value: CInt - Empty = 1 - - -class Result(t.REnum): - class Ok: - value: CInt - class Err: - msg: t.CChar | CPtr - - -class GeoShape(t.REnum): - class GCircle: - radius: CInt - class GRect: - w: CInt - h: CInt - class GPoint: - x: CInt - y: CInt - - -def enum_main() -> CInt: - buf: CChar | CPtr = CPtr(stdlib.malloc(256)) - - c1: CInt = Color.Red - c2: CInt = Color.Green - c3: CInt = Color.Blue - viperlib.snprintf(buf, 256, "CEnum: Red=%d Green=%d Blue=%d", c1, c2, c3) - print(buf) - - opt: Option = Option.Some(42) - match opt: - case Option.Some(v): - viperlib.snprintf(buf, 256, "Option.Some: value=%d", v) - print(buf) - case Option.Empty(): - pass - - res1: Result = Result.Ok(100) - match res1: - case Result.Ok(v): - viperlib.snprintf(buf, 256, "Result.Ok: value=%d", v) - print(buf) - case Result.Err(e): - pass - - res2: Result = Result.Err("not found") - match res2: - case Result.Ok(v): - pass - case Result.Err(e): - viperlib.snprintf(buf, 256, "Result.Err: msg=%s", e) - print(buf) - - s1: GeoShape = GeoShape.GCircle(5) - match s1: - case GeoShape.GCircle(r): - viperlib.snprintf(buf, 256, "GeoShape.GCircle: radius=%d", r) - print(buf) - case _: - pass - - s2: GeoShape = GeoShape.GRect(10, 20) - match s2: - case GeoShape.GRect(w, h): - viperlib.snprintf(buf, 256, "GeoShape.GRect: w=%d h=%d", w, h) - print(buf) - case _: - pass - - s3: GeoShape = GeoShape.GPoint(3, 4) - match s3: - case GeoShape.GPoint(x, y): - viperlib.snprintf(buf, 256, "GeoShape.GPoint: x=%d y=%d", x, y) - print(buf) - case _: - pass - - stdlib.free(buf) - return 0 diff --git a/Test/TestProject3/App/fileiotest.vp b/Test/TestProject3/App/fileiotest.vp deleted file mode 100644 index 98d6e77..0000000 --- a/Test/TestProject3/App/fileiotest.vp +++ /dev/null @@ -1,395 +0,0 @@ -import t, c -from t import CInt, CInt32T, CUInt32T, CPtr, CChar, CExport -from stdint import * -import stdlib -import viperlib -import w32.win32base -import w32.win32file -import w32.win32console -import w32.fileio -from w32.fileio import File, FileW, MODE, FRESULT, SEEK_SET, SEEK_CUR, SEEK_END - - -BUF_SIZE: t.CDefine = 4096 - - -def fileio_main(): - buf: bytes = stdlib.malloc(256) - write_buf: bytes = stdlib.malloc(BUF_SIZE) - read_buf: bytes = stdlib.malloc(BUF_SIZE) - bytes_written: ULONG = 0 - bytes_read: ULONG = 0 - - w32.win32console.SetConsoleCP(65001) - w32.win32console.SetConsoleOutputCP(65001) - - hFile: w32.win32base.HANDLE = w32.win32file.CreateFileA( - "testfile.txt", - w32.win32file.GENERIC_WRITE, - w32.win32file.FILE_SHARE_READ, - None, - w32.win32file.CREATE_ALWAYS, - w32.win32file.FILE_ATTRIBUTE_NORMAL, - None - ) - - if hFile == w32.win32base.INVALID_HANDLE_VALUE: - print("Failed to create file") - return - - viperlib.snprintf(write_buf, BUF_SIZE, "Hello from TransPyC Win32 FileIO!\nLine 2: %d + %d = %d\n", 10, 20, 30) - write_len: ULONG = 0 - i: CInt = 0 - ch: bytes = write_buf - while i < BUF_SIZE: - if CInt(c.Deref(ch)) == 0: - break - write_len = write_len + 1 - i = i + 1 - ch = ch + 1 - - result: BOOL = w32.win32file.WriteFile(hFile, write_buf, write_len, c.Addr(bytes_written), None) - if result == 0: - print("WriteFile failed") - else: - viperlib.snprintf(buf, 256, "Written %d bytes to testfile.txt", bytes_written) - print(buf) - - w32.win32file.FlushFileBuffers(hFile) - w32.win32base.CloseHandle(hFile) - - hFile = w32.win32file.CreateFileA( - "testfile.txt", - w32.win32file.GENERIC_READ, - w32.win32file.FILE_SHARE_READ, - None, - w32.win32file.OPEN_EXISTING, - w32.win32file.FILE_ATTRIBUTE_NORMAL, - None - ) - - if hFile == w32.win32base.INVALID_HANDLE_VALUE: - print("Failed to open file for reading") - return - - read_len: ULONG = 0 - result = w32.win32file.ReadFile(hFile, read_buf, BUF_SIZE - 1, c.Addr(read_len), None) - if result == 0: - print("ReadFile failed") - else: - viperlib.snprintf(buf, 256, "Read %d bytes from testfile.txt", read_len) - print(buf) - - read_ptr: bytes = read_buf - read_ptr = read_ptr + read_len - c.DerefAs(read_ptr, 0) - print("--- File content ---") - print(read_buf) - print("--- End ---") - - fileSize: ULONG = w32.win32file.GetFileSize(hFile, None) - viperlib.snprintf(buf, 256, "File size: %d bytes", fileSize) - print(buf) - - w32.win32base.CloseHandle(hFile) - - attrs: ULONG = w32.win32file.GetFileAttributesA("testfile.txt") - if attrs == w32.win32base.INVALID_HANDLE_VALUE: - print("GetFileAttributes failed") - else: - viperlib.snprintf(buf, 256, "File attributes: 0x%X", attrs) - print(buf) - - w32.win32file.DeleteFileA("testfile.txt") - print("File deleted") - - stdlib.free(write_buf) - stdlib.free(read_buf) - - print("=== OOP FileIO: with context manager ===") - fileio_with_test() - - print("=== OOP FileIO: f handle style ===") - fileio_handle_test() - - print("=== OOP FileIO: RP/WP/AP modes ===") - fileio_rw_test() - - -def fileio_with_test(): - buf: bytes = stdlib.malloc(256) - write_buf: bytes = stdlib.malloc(BUF_SIZE) - read_buf: bytes = stdlib.malloc(BUF_SIZE) - - with File("oop_with.txt", MODE.W) as f: - viperlib.snprintf(write_buf, BUF_SIZE, "with context manager test!\nLine 2: %d\n", 42) - n: LONG = f.write_str(write_buf) - if n < 0: - print("[with] write failed") - else: - viperlib.snprintf(buf, 256, "[with] wrote %d bytes", n) - print(buf) - - with File("oop_with.txt", MODE.R) as f: - n = f.read_all(read_buf, BUF_SIZE) - if n < 0: - print("[with] read failed") - else: - viperlib.snprintf(buf, 256, "[with] read %d bytes", n) - print(buf) - print("[with] content:") - print(read_buf) - - with File("oop_with.txt", MODE.R) as f: - line1_len: LONG = f.readline(buf, 256) - viperlib.snprintf(read_buf, BUF_SIZE, "[with] Line1(%d): ", line1_len) - print(read_buf) - print(buf) - line2_len: LONG = f.readline(buf, 256) - viperlib.snprintf(read_buf, BUF_SIZE, "[with] Line2(%d): ", line2_len) - print(read_buf) - print(buf) - - with File("oop_with.txt", MODE.A) as f: - f.write_str("Appended line!\n") - - with File("oop_with.txt", MODE.R) as f: - n = f.read_all(read_buf, BUF_SIZE) - print("[with] after append:") - print(read_buf) - - with File("oop_with.txt", MODE.R) as f: - sz: LONGLONG = f.size() - pos: LONG = f.tell() - viperlib.snprintf(buf, 256, "[with] Size=%lld Pos=%d", sz, pos) - print(buf) - f.seek(5, SEEK_SET) - pos = f.tell() - viperlib.snprintf(buf, 256, "[with] After seek: Pos=%d", pos) - print(buf) - - w32.win32file.DeleteFileA("oop_with.txt") - print("[with] test file deleted") - - stdlib.free(buf) - stdlib.free(write_buf) - stdlib.free(read_buf) - - -def fileio_handle_test(): - buf: bytes = stdlib.malloc(256) - write_buf: bytes = stdlib.malloc(BUF_SIZE) - read_buf: bytes = stdlib.malloc(BUF_SIZE) - - fw: File = File("oop_handle.txt", MODE.W) - viperlib.snprintf(write_buf, BUF_SIZE, "f handle style test!\nLine 2: %d\n", 99) - n: LONG = fw.write_str(write_buf) - viperlib.snprintf(buf, 256, "[handle] wrote %d bytes", n) - print(buf) - fw.flush() - fw.close() - - fr: File = File("oop_handle.txt", MODE.R) - n = fr.read_all(read_buf, BUF_SIZE) - viperlib.snprintf(buf, 256, "[handle] read %d bytes", n) - print(buf) - print("[handle] content:") - print(read_buf) - fr.close() - - fr2: File = File("oop_handle.txt", MODE.R) - line1_len: LONG = fr2.readline(buf, 256) - viperlib.snprintf(read_buf, BUF_SIZE, "[handle] Line1(%d): ", line1_len) - print(read_buf) - print(buf) - line2_len: LONG = fr2.readline(buf, 256) - viperlib.snprintf(read_buf, BUF_SIZE, "[handle] Line2(%d): ", line2_len) - print(read_buf) - print(buf) - fr2.close() - - fa: File = File("oop_handle.txt", MODE.A) - fa.write_str("Appended by handle!\n") - fa.close() - - fr3: File = File("oop_handle.txt", MODE.R) - n = fr3.read_all(read_buf, BUF_SIZE) - print("[handle] after append:") - print(read_buf) - fr3.close() - - fr4: File = File("oop_handle.txt", MODE.R) - sz: LONGLONG = fr4.size() - pos: LONG = fr4.tell() - viperlib.snprintf(buf, 256, "[handle] Size=%lld Pos=%d", sz, pos) - print(buf) - fr4.seek(5, SEEK_SET) - pos = fr4.tell() - viperlib.snprintf(buf, 256, "[handle] After seek: Pos=%d", pos) - print(buf) - fr4.close() - - w32.win32file.DeleteFileA("oop_handle.txt") - print("[handle] test file deleted") - - stdlib.free(buf) - stdlib.free(write_buf) - stdlib.free(read_buf) - - -def fileio_rw_test(): - buf: bytes = stdlib.malloc(256) - - fw: File = File("rw_test.txt", MODE.W) - fw.write_str("original content\n") - fw.close() - - frp: File = File("rw_test.txt", MODE.RP) - n: LONG = frp.read_all(buf, 256) - viperlib.snprintf(buf, 256, "[rp] read %d bytes", n) - print(buf) - - frp.seek(0, SEEK_END) - frp.write_str("appended via RP\n") - frp.seek(0, SEEK_SET) - n = frp.read_all(buf, 256) - print("[rp] after RP append:") - print(buf) - frp.close() - - fwp: File = File("rw_test.txt", MODE.WP) - fwp.write_str("truncated + new\n") - fwp.seek(0, SEEK_SET) - n = fwp.read_all(buf, 256) - print("[wp] WP (truncate+read):") - print(buf) - fwp.close() - - fap: File = File("rw_test.txt", MODE.AP) - fap.write_str("a+ appended\n") - fap.seek(0, SEEK_SET) - n = fap.read_all(buf, 256) - print("[ap] AP (append+read):") - print(buf) - fap.close() - - w32.win32file.DeleteFileA("rw_test.txt") - print("[rw] test file deleted") - - print("=== OOP FileIO: wide char (u\"...\") ===") - fileio_wide_test() - - stdlib.free(buf) - - -def fileio_wide_test(): - buf: bytes = stdlib.malloc(256) - - fw: File = File("wide_test.txt", MODE.W) - fw.write_str("wide char test\n") - fw.close() - - fw2: FileW = FileW(u"wide_test.txt", MODE.R) - n: LONG = fw2.read_all(buf, 256) - viperlib.snprintf(buf, 256, "[wide] read %d bytes", n) - print(buf) - fw2.close() - - w32.win32file.DeleteFileA("wide_test.txt") - print("[wide] test file deleted") - - stdlib.free(buf) - - print("=== OOP FileIO: Chinese filename & content (u\"...\" = WCHAR_T) ===") - fileio_chinese_test() - - -def fileio_chinese_test(): - buf: bytes = stdlib.malloc(512) - bytes_written: ULONG = 0 - - # === T1: Chinese filename (WCHAR_T) + ANSI content === - print("[chinese] T1: Chinese filename + ANSI content") - fw: FileW = FileW(u"中文文件.txt", MODE.W) - if fw.closed: - print("[chinese] T1: create failed") - else: - fw.write_str("Hello from Chinese filename!\n") - fw.close() - - fr: FileW = FileW(u"中文文件.txt", MODE.R) - n: LONG = fr.read_all(buf, 512) - viperlib.snprintf(buf, 256, "[chinese] T1: read %d bytes", n) - print(buf) - print("[chinese] T1 content:") - print(buf) - fr.close() - - w32.win32file.DeleteFileW(u"中文文件.txt") - print("[chinese] T1: deleted") - - # === T2: Chinese filename + Chinese wide content (WCHAR_T) === - print("[chinese] T2: Chinese filename + Chinese wide content") - fw2: FileW = FileW(u"中文内容.txt", MODE.W) - if fw2.closed: - print("[chinese] T2: create failed") - else: - # u"你好世界\n" = 5 WCHARs = 10 bytes (UTF-16LE) - w32.win32file.WriteFile(fw2.handle, u"你好世界\n", 10, c.Addr(bytes_written), None) - viperlib.snprintf(buf, 256, "[chinese] T2: wrote %d WCHAR bytes", bytes_written) - print(buf) - fw2.close() - - fr2: FileW = FileW(u"中文内容.txt", MODE.R) - n = fr2.read_all(buf, 512) - viperlib.snprintf(buf, 256, "[chinese] T2: read %d bytes (UTF-16LE)", n) - print(buf) - fr2.close() - - w32.win32file.DeleteFileW(u"中文内容.txt") - print("[chinese] T2: deleted") - - # === T3: Chinese filename + mixed ANSI + wide content === - print("[chinese] T3: Chinese filename + mixed content") - fw3: FileW = FileW(u"混合测试.txt", MODE.WP) - if fw3.closed: - print("[chinese] T3: create failed") - else: - fw3.write_str("ASCII line\n") - # u"中文行\n" = 4 WCHARs = 8 bytes (UTF-16LE) - w32.win32file.WriteFile(fw3.handle, u"中文行\n", 8, c.Addr(bytes_written), None) - fw3.seek(0, SEEK_SET) - n: LONG = fw3.read_all(buf, 512) - viperlib.snprintf(buf, 256, "[chinese] T3: total %d bytes", n) - print(buf) - fw3.close() - - w32.win32file.DeleteFileW(u"混合测试.txt") - print("[chinese] T3: deleted") - - # === T4: Chinese filename + Chinese content via WriteConsoleW === - print("[chinese] T4: Write wide content and print via WriteConsoleW") - fw4: FileW = FileW(u"控制台测试.txt", MODE.W) - if fw4.closed: - print("[chinese] T4: create failed") - else: - # u"你好,世界!\n" = 7 WCHARs = 14 bytes (UTF-16LE) - w32.win32file.WriteFile(fw4.handle, u"你好,世界!\n", 14, c.Addr(bytes_written), None) - viperlib.snprintf(buf, 256, "[chinese] T4: wrote %d WCHAR bytes", bytes_written) - print(buf) - fw4.close() - - fr4: FileW = FileW(u"控制台测试.txt", MODE.R) - n = fr4.read_all(buf, 512) - viperlib.snprintf(buf, 256, "[chinese] T4: read %d bytes", n) - print(buf) - # Print wide content to console using WriteConsoleW - chars_written: ULONG = 0 - hOut: w32.win32base.HANDLE = w32.win32file.GetStdHandle(w32.win32file.STD_OUTPUT_HANDLE) - w32.win32console.WriteConsoleW(hOut, u"你好,世界!\n", 7, c.Addr(chars_written), None) - fr4.close() - - w32.win32file.DeleteFileW(u"控制台测试.txt") - print("[chinese] T4: deleted") - - stdlib.free(buf) diff --git a/Test/TestProject3/App/main.vp b/Test/TestProject3/App/main.vp deleted file mode 100644 index d11a1bd..0000000 --- a/Test/TestProject3/App/main.vp +++ /dev/null @@ -1,513 +0,0 @@ -from stdint import * -import w32.win32console -import t, c -from t import CInt, CPtr, CChar, CInt32T, CUInt64T, CFloat64T, CExport, State -import viperlib -import stdlib -import enumtest -import mpooltest -import vectortest -import fileiotest -import testcheck - - -# === 函数泛型 === - -def add[T](a: T, b: T) -> T: - return a + b - -def add_u64[T](a: T, b: T, c: CUInt64T) -> T: - return a + b + T(c) - -def fxi[T1, T2](a: T1, b: T2) -> T1: - return a + fxi2(a, b, CUInt64T(178900)) - -def fxi2[T1, T2, T3](a: T1, b: T2, c: T3) -> T1: - return a + T1(b) + T1(c) - -def wrap_add[T](a: T, b: T) -> T: - return add(a, b) - -def double_add[T](a: T, b: T) -> T: - return add(a, b) + add(a, b) - - -# === 结构体泛型 === - -class A[T](): - def __init__(self, a: T): - self.a = T(a) - def get_a(self) -> T: - return self.a - -class Pair[T1, T2](): - def __init__(self, first: T1, second: T2): - self.first = T1(first) - self.second = T2(second) - def get_first(self) -> T1: - return self.first - def get_second(self) -> T2: - return self.second - -class Calculator[T](): - def __init__(self, init_val: T): - self.val = T(init_val) - def compute(self, other: T) -> T: - return add(self.val, other) - def double_compute(self, other: T) -> T: - return double_add(self.val, other) - -class Container[T](): - def __init__(self, v: T): - self.value = T(v) - self.flag = CInt32T(1) - def get_value(self) -> T: - return self.value - def get_flag(self) -> CInt32T: - return self.flag - - -# === OOP 继承 + 虚方法(Gargantua 风格) === - -@t.CVTable -class Shape: - def __init__(self, x: CFloat64T, y: CFloat64T): - self.x = x - self.y = y - def area(self) -> CFloat64T: - return 0.0 - def perimeter(self) -> CFloat64T: - return 0.0 - def describe(self) -> CFloat64T: - return self.area() + self.perimeter() - -@t.CVTable -class Circle(Shape): - def __init__(self, x: CFloat64T, y: CFloat64T, r: CFloat64T): - self.x = x - self.y = y - self.r = r - def area(self) -> CFloat64T: - return 3.14159265 * self.r * self.r - def perimeter(self) -> CFloat64T: - return 2.0 * 3.14159265 * self.r - def scale(self, factor: CFloat64T) -> 'Circle' | CPtr: - self.r = self.r * factor - return t.CVoid(c.Addr(self), CPtr) - def move(self, dx: CFloat64T, dy: CFloat64T) -> 'Circle' | CPtr: - self.x = self.x + dx - self.y = self.y + dy - return t.CVoid(c.Addr(self), CPtr) - -@t.CVTable -class Rect(Shape): - def __init__(self, x: CFloat64T, y: CFloat64T, w: CFloat64T, h: CFloat64T): - self.x = x - self.y = y - self.w = w - self.h = h - def area(self) -> CFloat64T: - return self.w * self.h - def perimeter(self) -> CFloat64T: - return 2.0 * (self.w + self.h) - def scale(self, factor: CFloat64T) -> 'Rect' | CPtr: - self.w = self.w * factor - self.h = self.h * factor - return t.CVoid(c.Addr(self), CPtr) - - -# === 运算符重载 + 链式调用(Gargantua V3 风格,堆分配) === - -class Vec2: - x: CFloat64T - y: CFloat64T - - def __new__() -> 'Vec2' | CPtr: - return t.CVoid(t.CUInt64T(stdlib.malloc(16)), CPtr) - - def __init__(self, x: CFloat64T, y: CFloat64T): - self.x = x - self.y = y - - def __add__(self, b: 'Vec2' | CPtr) -> 'Vec2' | CPtr: - return Vec2(self.x + b.x, self.y + b.y) - - def __sub__(self, b: 'Vec2' | CPtr) -> 'Vec2' | CPtr: - return Vec2(self.x - b.x, self.y - b.y) - - def __mul__(self, s: CFloat64T) -> 'Vec2' | CPtr: - return Vec2(self.x * s, self.y * s) - - def __neg__(self) -> 'Vec2' | CPtr: - return Vec2(-self.x, -self.y) - - def dot(self, b: 'Vec2' | CPtr) -> CFloat64T: - return self.x * b.x + self.y * b.y - - def len_sq(self) -> CFloat64T: - return self.x * self.x + self.y * self.y - - -class Vec3: - x: CFloat64T - y: CFloat64T - z: CFloat64T - - def __new__() -> 'Vec3' | CPtr: - return t.CVoid(t.CUInt64T(stdlib.malloc(24)), CPtr) - - def __init__(self, x: CFloat64T, y: CFloat64T, z: CFloat64T): - self.x = x - self.y = y - self.z = z - - def __add__(self, b: 'Vec3' | CPtr) -> 'Vec3' | CPtr: - return Vec3(self.x + b.x, self.y + b.y, self.z + b.z) - - def __sub__(self, b: 'Vec3' | CPtr) -> 'Vec3' | CPtr: - return Vec3(self.x - b.x, self.y - b.y, self.z - b.z) - - def __mul__(self, s: CFloat64T) -> 'Vec3' | CPtr: - return Vec3(self.x * s, self.y * s, self.z * s) - - def __neg__(self) -> 'Vec3' | CPtr: - return Vec3(-self.x, -self.y, -self.z) - - def dot(self, b: 'Vec3' | CPtr) -> CFloat64T: - return self.x * b.x + self.y * b.y + self.z * b.z - - def cross(self, b: 'Vec3' | CPtr) -> 'Vec3' | CPtr: - return Vec3(self.y * b.z - self.z * b.y, - self.z * b.x - self.x * b.z, - self.x * b.y - self.y * b.x) - - def len_sq(self) -> CFloat64T: - return self.dot(self) - - -# === 独立类(非继承,避免链接问题) === - -@t.CVTable -class Dog: - def __init__(self, name_val: CInt, bark_power: CInt32T): - self.name_val = name_val - self.health = CInt32T(100) - self.bark_power = bark_power - def speak(self) -> CInt: - return 1 - def bite(self) -> CInt32T: - return self.bark_power - def take_damage(self, dmg: CInt32T) -> 'Dog' | CPtr: - self.health = self.health - dmg - return t.CVoid(c.Addr(self), CPtr) - def is_alive(self) -> CInt: - if self.health > 0: - return 1 - return 0 - -@t.CVTable -class Cat: - def __init__(self, name_val: CInt, lives: CInt32T): - self.name_val = name_val - self.health = CInt32T(80) - self.lives = lives - def speak(self) -> CInt: - return 2 - def scratch(self) -> CInt32T: - return CInt32T(15) - def take_damage(self, dmg: CInt32T) -> 'Cat' | CPtr: - self.health = self.health - dmg - return t.CVoid(c.Addr(self), CPtr) - def is_alive(self) -> CInt: - if self.health > 0: - return 1 - return 0 - - -# === 嵌套对象组合(堆分配) === - -class Transform: - px: CFloat64T - py: CFloat64T - pz: CFloat64T - scale_x: CFloat64T - scale_y: CFloat64T - scale_z: CFloat64T - - def __new__() -> 'Transform' | CPtr: - return t.CVoid(t.CUInt64T(stdlib.malloc(48)), CPtr) - - def __init__(self, px: CFloat64T, py: CFloat64T, pz: CFloat64T): - self.px = px - self.py = py - self.pz = pz - self.scale_x = 1.0 - self.scale_y = 1.0 - self.scale_z = 1.0 - - def apply_scale(self, sx: CFloat64T, sy: CFloat64T, sz: CFloat64T) -> 'Transform' | CPtr: - self.scale_x = self.scale_x * sx - self.scale_y = self.scale_y * sy - self.scale_z = self.scale_z * sz - return t.CVoid(c.Addr(self), CPtr) - - def world_position(self) -> 'Vec3' | CPtr: - return Vec3(self.px * self.scale_x, self.py * self.scale_y, self.pz * self.scale_z) - - -# === 多层继承(子类只重写需要的方法) === - -@t.CVTable -class Vehicle: - def __init__(self, speed: CInt32T): - self.speed = speed - self.fuel = CInt32T(100) - def move(self) -> CInt: - self.fuel = self.fuel - CInt32T(10) - return self.speed - def is_running(self) -> CInt: - if self.fuel > 0: - return 1 - return 0 - -@t.CVTable -class Car(Vehicle): - def __init__(self, speed: CInt32T, doors: CInt32T): - self.speed = speed - self.fuel = CInt32T(100) - self.doors = doors - def honk(self) -> CInt: - return 1 - -@t.CVTable -class ElectricCar(Car): - def __init__(self, speed: CInt32T, doors: CInt32T, battery: CInt32T): - self.speed = speed - self.fuel = CInt32T(100) - self.doors = doors - self.battery = battery - def charge(self): - self.battery = self.battery + CInt32T(20) - def move(self) -> CInt: - self.battery = self.battery - CInt32T(5) - return self.speed - - -def main() -> CInt | CExport: - w32.win32console.SetConsoleCP(65001) - w32.win32console.SetConsoleOutputCP(65001) - - testcheck.begin("TestProject3: 泛型与OOP综合测试") - - buf: CChar | CPtr = CPtr(stdlib.malloc(256)) - - # === 基础函数泛型 === - testcheck.section("基础函数泛型") - print(add(3, 5)) - print(add(1.5, 2.5)) - print(add_u64(1, 2, CUInt64T(3000000000000000))) - print(fxi(0.2, 6)) - print(wrap_add(10, 20)) - print(double_add(5, 7)) - testcheck.ok("基础函数泛型测试完成") - - # === 基础结构体泛型 === - testcheck.section("基础结构体泛型") - a = A(100) - print(a.get_a()) - p1 = Pair(10, 20) - print(p1.get_first()) - print(p1.get_second()) - testcheck.ok("基础结构体泛型测试完成") - - # === OOP 继承测试 === - testcheck.section("OOP 继承测试") - c1 = Circle(0.0, 0.0, 5.0) - viperlib.snprintf(buf, 256, "Circle area=%.2f perim=%.2f", c1.area(), c1.perimeter()) - print(buf) - - r1 = Rect(0.0, 0.0, 4.0, 3.0) - viperlib.snprintf(buf, 256, "Rect area=%.2f perim=%.2f", r1.area(), r1.perimeter()) - print(buf) - - # 链式调用: scale -> move - c2 = Circle(1.0, 2.0, 3.0) - c2.scale(2.0).move(10.0, 20.0) - viperlib.snprintf(buf, 256, "Circle after scale+move: x=%.1f y=%.1f r=%.1f area=%.2f", - c2.x, c2.y, c2.r, c2.area()) - print(buf) - - r2 = Rect(0.0, 0.0, 10.0, 5.0) - r2.scale(2.0).scale(0.5) - viperlib.snprintf(buf, 256, "Rect after double scale: w=%.1f h=%.1f area=%.2f", - r2.w, r2.h, r2.area()) - print(buf) - testcheck.ok("OOP 继承测试完成") - - # === Vec2 运算符重载 + 链式调用(堆分配) === - testcheck.section("Vec2 运算符重载 + 链式调用") - v1 = Vec2(3.0, 4.0) - v2 = Vec2(1.0, 2.0) - v3 = v1 + v2 - viperlib.snprintf(buf, 256, "Vec2 add: (%.1f, %.1f)", v3.x, v3.y) - print(buf) - - v4 = v1 - v2 - viperlib.snprintf(buf, 256, "Vec2 sub: (%.1f, %.1f)", v4.x, v4.y) - print(buf) - - v5 = v1 * 2.0 - viperlib.snprintf(buf, 256, "Vec2 mul: (%.1f, %.1f)", v5.x, v5.y) - print(buf) - - v6 = -v1 - viperlib.snprintf(buf, 256, "Vec2 neg: (%.1f, %.1f)", v6.x, v6.y) - print(buf) - - d = v1.dot(v2) - viperlib.snprintf(buf, 256, "Vec2 dot: %.1f", d) - print(buf) - - # 链式运算: (v1 + v2) * 3.0 - v_chain = (v1 + v2) * 3.0 - viperlib.snprintf(buf, 256, "Vec2 chain (v1+v2)*3: (%.1f, %.1f)", v_chain.x, v_chain.y) - print(buf) - testcheck.ok("Vec2 运算符重载测试完成") - - # === Vec3 运算符重载 + 链式调用(堆分配) === - testcheck.section("Vec3 运算符重载 + 链式调用") - a1 = Vec3(1.0, 0.0, 0.0) - a2 = Vec3(0.0, 1.0, 0.0) - cross_v = a1.cross(a2) - viperlib.snprintf(buf, 256, "Vec3 cross: (%.1f, %.1f, %.1f)", cross_v.x, cross_v.y, cross_v.z) - print(buf) - - dot_v = a1.dot(a2) - viperlib.snprintf(buf, 256, "Vec3 dot: %.1f", dot_v) - print(buf) - - # 链式: (a + b).dot(c) - a3 = Vec3(1.0, 2.0, 3.0) - a4 = Vec3(4.0, 5.0, 6.0) - a5 = Vec3(7.0, 8.0, 9.0) - chain_dot = (a3 + a4).dot(a5) - viperlib.snprintf(buf, 256, "Vec3 chain dot: %.1f", chain_dot) - print(buf) - - # 链式: (a * 2.0 - b).cross(c) - chain_cross = (a3 * 2.0 - a4).cross(a5) - viperlib.snprintf(buf, 256, "Vec3 chain cross: (%.1f, %.1f, %.1f)", chain_cross.x, chain_cross.y, chain_cross.z) - print(buf) - - # len_sq 链式 - lsq = a3.len_sq() - viperlib.snprintf(buf, 256, "Vec3 len_sq: %.1f", lsq) - print(buf) - testcheck.ok("Vec3 运算符重载测试完成") - - # === Dog/Cat 虚方法 === - testcheck.section("Dog/Cat 虚方法") - dog = Dog(1, CInt32T(30)) - cat = Cat(2, CInt32T(9)) - - viperlib.snprintf(buf, 256, "Dog speak=%d bite=%d alive=%d", dog.speak(), dog.bite(), dog.is_alive()) - print(buf) - viperlib.snprintf(buf, 256, "Cat speak=%d scratch=%d alive=%d", cat.speak(), cat.scratch(), cat.is_alive()) - print(buf) - - dog.take_damage(CInt32T(40)).take_damage(CInt32T(30)) - viperlib.snprintf(buf, 256, "Dog after 70dmg: health=%d alive=%d", dog.health, dog.is_alive()) - print(buf) - - cat.take_damage(CInt32T(50)) - viperlib.snprintf(buf, 256, "Cat after 50dmg: health=%d alive=%d", cat.health, cat.is_alive()) - print(buf) - testcheck.ok("Dog/Cat 虚方法测试完成") - - # === Transform 嵌套组合(堆分配,链式调用) === - testcheck.section("Transform 嵌套组合") - tr = Transform(10.0, 20.0, 30.0) - tr.apply_scale(2.0, 3.0, 4.0) - pos = tr.world_position() - viperlib.snprintf(buf, 256, "Transform pos: (%.1f, %.1f, %.1f)", pos.x, pos.y, pos.z) - print(buf) - - tr2 = Transform(5.0, 10.0, 15.0) - tr2.apply_scale(2.0, 2.0, 2.0) - pos2 = tr2.world_position() - viperlib.snprintf(buf, 256, "Transform2 pos: (%.1f, %.1f, %.1f)", pos2.x, pos2.y, pos2.z) - print(buf) - testcheck.ok("Transform 嵌套组合测试完成") - - # === 多层继承 === - testcheck.section("多层继承") - ec = ElectricCar(CInt32T(120), CInt32T(4), CInt32T(80)) - viperlib.snprintf(buf, 256, "ECar speed=%d doors=%d battery=%d", ec.speed, ec.doors, ec.battery) - print(buf) - ec.charge() - viperlib.snprintf(buf, 256, "ECar after charge: battery=%d", ec.battery) - print(buf) - spd = ec.move() - viperlib.snprintf(buf, 256, "ECar move: speed=%d battery=%d", spd, ec.battery) - print(buf) - viperlib.snprintf(buf, 256, "ECar honk=%d running=%d", ec.honk(), ec.is_running()) - print(buf) - testcheck.ok("多层继承测试完成") - - # === 泛型 + OOP 组合 === - testcheck.section("泛型 + OOP 组合") - calc1 = Calculator(10) - print(calc1.compute(5)) - calc2 = Calculator(1.5) - print(calc2.compute(2.5)) - - c1_gen = Container(42) - print(c1_gen.get_value()) - print(c1_gen.get_flag()) - testcheck.ok("泛型 + OOP 组合测试完成") - - # === snprintf 格式化 === - testcheck.section("snprintf 格式化") - viperlib.snprintf(buf, 256, "int=%d, float=%.2f", 42, 3.14) - print(buf) - viperlib.snprintf(buf, 256, "result=%d", add(100, 200)) - print(buf) - testcheck.ok("snprintf 格式化测试完成") - - # === 新语法类型强转 (t1|t2)(x) === - testcheck.section("新语法类型强转 (t1|t2)(x)") - val_i64: CUInt64T = CUInt64T(42) - val_i32 = (t.CInt)(val_i64) - print(val_i32) - - ptr_raw = stdlib.malloc(8) - ptr_typed = (t.CInt | t.CPtr)(ptr_raw) - viperlib.snprintf(buf, 256, "cast ptr=%p", ptr_typed) - print(buf) - - val_f = (t.CDouble)(42) - viperlib.snprintf(buf, 256, "cast float=%.1f", val_f) - print(buf) - testcheck.ok("新语法类型强转测试完成") - - # === Enum 测试 === - testcheck.section("Enum 测试") - enumtest.enum_main() - testcheck.ok("Enum 测试完成") - - # === MPool OOP 测试 === - testcheck.section("MPool OOP 测试") - mpooltest.mpool_main() - testcheck.ok("MPool OOP 测试完成") - - # === Vector 泛型测试 === - testcheck.section("Vector 泛型测试") - vectortest.vector_main() - testcheck.ok("Vector 泛型测试完成") - - # === Win32 FileIO 测试 === - testcheck.section("Win32 FileIO 测试") - fileiotest.fileio_main() - testcheck.ok("Win32 FileIO 测试完成") - - return testcheck.end() diff --git a/Test/TestProject3/App/mpooltest.vp b/Test/TestProject3/App/mpooltest.vp deleted file mode 100644 index 90012b8..0000000 --- a/Test/TestProject3/App/mpooltest.vp +++ /dev/null @@ -1,91 +0,0 @@ -import t, c -from t import CInt, CPtr, CChar -import viperlib -import viperio -import stdlib -import memhub - - -def mpool_main() -> CInt: - buf: bytes = stdlib.malloc(256) - - arena: bytes = stdlib.malloc(4096) - with memhub.MemPool(arena, 4096) as pool: - p1: bytes = pool.alloc(32) - p2: bytes = pool.alloc(64) - p3: bytes = pool.alloc(128) - if p1 != None and p2 != None and p3 != None: - viperlib.snprintf(buf, 256, "MPool bump: 3 allocs OK") - print(buf) - else: - viperlib.snprintf(buf, 256, "MPool bump: alloc FAILED") - print(buf) - - pool.reset() - p4: bytes = pool.alloc(256) - if p4 != None: - viperlib.snprintf(buf, 256, "MPool bump: reset+alloc OK") - print(buf) - else: - viperlib.snprintf(buf, 256, "MPool bump: reset+alloc FAILED") - print(buf) - - stdlib.free(arena) - - arena2: bytes = stdlib.malloc(4096) - with memhub.MemSlab(arena2, 4096, 64) as spool: - b1: bytes = spool.alloc(64) - b2: bytes = spool.alloc(64) - b3: bytes = spool.alloc(64) - if b1 != None and b2 != None and b3 != None: - viperlib.snprintf(buf, 256, "MPool slab: 3 allocs OK") - print(buf) - else: - viperlib.snprintf(buf, 256, "MPool slab: alloc FAILED") - print(buf) - - spool.free(b2) - b4: bytes = spool.alloc(64) - if b4 != None: - viperlib.snprintf(buf, 256, "MPool slab: free+realloc OK") - print(buf) - else: - viperlib.snprintf(buf, 256, "MPool slab: free+realloc FAILED") - print(buf) - - stdlib.free(arena2) - - arena3: bytes = stdlib.malloc(4096) - hpool: memhub.MemPool | CPtr = memhub.MemPool(arena3, 4096) - h1: bytes = hpool.alloc(32) - h2: bytes = hpool.alloc(64) - if h1 != None and h2 != None: - viperlib.snprintf(buf, 256, "MPool manual: 2 allocs OK") - print(buf) - else: - viperlib.snprintf(buf, 256, "MPool manual: alloc FAILED") - print(buf) - hpool.reset() - h3: bytes = hpool.alloc(128) - if h3 != None: - viperlib.snprintf(buf, 256, "MPool manual: reset+alloc OK") - print(buf) - else: - viperlib.snprintf(buf, 256, "MPool manual: reset+alloc FAILED") - print(buf) - - stdlib.free(arena3) - - arena4: bytes = stdlib.malloc(4096) - with memhub.MemPool(arena4, 4096) as bpool: - wb: viperio.Buf | CPtr = bpool.alloc_buf(128) - if wb.data != None: - viperlib.snprintf(wb.cstr(), 128, "MPool alloc_buf: hello from Buf!") - print(wb.cstr()) - else: - viperlib.snprintf(buf, 256, "MPool alloc_buf: FAILED") - print(buf) - - stdlib.free(arena4) - stdlib.free(buf) - return 0 diff --git a/Test/TestProject3/App/vectortest.vp b/Test/TestProject3/App/vectortest.vp deleted file mode 100644 index e39a5f4..0000000 --- a/Test/TestProject3/App/vectortest.vp +++ /dev/null @@ -1,43 +0,0 @@ -import t, c -from t import CInt, CPtr, CChar, CFloat64T -import viperlib -import stdlib -import vector -import memhub - -POOL_SIZE: t.CDefine = 4096 - -def vector_main() -> CInt: - buf: str = stdlib.malloc(256) - pool_mem: t.CVoid | t.CPtr = stdlib.malloc(POOL_SIZE) - pool: memhub.MemPool | CPtr = memhub.MemPool(pool_mem, POOL_SIZE) - - vi: vector.Vector | CPtr = vector.Vector(pool, 10, CInt(0)) - vi.push(CInt(10)) - vi.push(CInt(20)) - vi.push(CInt(30)) - viperlib.snprintf(buf, 256, "Vector[int]: len=%d, [0]=%d, [1]=%d, [2]=%d", vi.len(), vi.get(0), vi.get(1), vi.get(2)) - print(buf) - - vi.set(1, CInt(99)) - viperlib.snprintf(buf, 256, "Vector[int]: set[1]=99, [1]=%d", vi.get(1)) - print(buf) - - vi.clear() - viperlib.snprintf(buf, 256, "Vector[int]: cleared, len=%d", vi.len()) - print(buf) - - vi.free() - - vd: vector.Vector | CPtr = vector.Vector(pool, 8, CFloat64T(0.0)) - vd.push(CFloat64T(1.5)) - vd.push(CFloat64T(2.7)) - vd.push(CFloat64T(3.14)) - viperlib.snprintf(buf, 256, "Vector[double]: len=%d, [0]=%.1f, [1]=%.1f, [2]=%.2f", vd.len(), vd.get(0), vd.get(1), vd.get(2)) - print(buf) - - vd.free() - - stdlib.free(pool_mem) - stdlib.free(buf) - return 0 diff --git a/Test/TestProject3/output/0019c939aae7f9f1.deps.json b/Test/TestProject3/output/0019c939aae7f9f1.deps.json deleted file mode 100644 index 5e61fc0..0000000 --- a/Test/TestProject3/output/0019c939aae7f9f1.deps.json +++ /dev/null @@ -1 +0,0 @@ -{"memhub": "04e5fe47ff2af528", "enumtest": "1b58766d38d05de3", "vector": "285a822aa26bfbda", "stdio": "285b6aa29a34754d", "definetest": "64ac83614c9bdbc6", "stdlib": "6c658cc728d0bbf4", "stdarg": "71e0a3ffcb3ebfad", "testcheck": "748d0424e8976fa0", "string": "928c0ff6d8c69ec9", "atom": "aa246c6e6aa30484", "main": "b235d6477436c524", "platmacro": "b57252077e6b596b", "vectortest": "b777c587cc21465a", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "fileiotest": "c01b27dbcd683245", "viperio": "c9f4be41ca1cc2b4", "w32.fileio": "d137b1f3311f3a7f", "fileio": "d137b1f3311f3a7f", "stdint": "f5522571bcce7bcb", "viperlib": "f6ab8989f3545e83", "w32.win32file": "f6b51804a0ba8ff0", "win32file": "f6b51804a0ba8ff0", "w32.win32base": "fc980acec33d69a7", "win32base": "fc980acec33d69a7"} \ No newline at end of file diff --git a/Test/TestProject3/output/1b58766d38d05de3.deps.json b/Test/TestProject3/output/1b58766d38d05de3.deps.json deleted file mode 100644 index e33992f..0000000 --- a/Test/TestProject3/output/1b58766d38d05de3.deps.json +++ /dev/null @@ -1 +0,0 @@ -{"mpooltest": "0019c939aae7f9f1", "memhub": "04e5fe47ff2af528", "vector": "285a822aa26bfbda", "stdio": "285b6aa29a34754d", "definetest": "64ac83614c9bdbc6", "stdlib": "6c658cc728d0bbf4", "stdarg": "71e0a3ffcb3ebfad", "testcheck": "748d0424e8976fa0", "string": "928c0ff6d8c69ec9", "atom": "aa246c6e6aa30484", "main": "b235d6477436c524", "platmacro": "b57252077e6b596b", "vectortest": "b777c587cc21465a", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "fileiotest": "c01b27dbcd683245", "viperio": "c9f4be41ca1cc2b4", "w32.fileio": "d137b1f3311f3a7f", "fileio": "d137b1f3311f3a7f", "stdint": "f5522571bcce7bcb", "viperlib": "f6ab8989f3545e83", "w32.win32file": "f6b51804a0ba8ff0", "win32file": "f6b51804a0ba8ff0", "w32.win32base": "fc980acec33d69a7", "win32base": "fc980acec33d69a7"} \ No newline at end of file diff --git a/Test/TestProject3/output/285a822aa26bfbda.deps.json b/Test/TestProject3/output/285a822aa26bfbda.deps.json deleted file mode 100644 index bcdd3ee..0000000 --- a/Test/TestProject3/output/285a822aa26bfbda.deps.json +++ /dev/null @@ -1 +0,0 @@ -{"mpooltest": "0019c939aae7f9f1", "memhub": "04e5fe47ff2af528", "enumtest": "1b58766d38d05de3", "vector": "285a822aa26bfbda", "stdio": "285b6aa29a34754d", "definetest": "64ac83614c9bdbc6", "stdlib": "6c658cc728d0bbf4", "stdarg": "71e0a3ffcb3ebfad", "testcheck": "748d0424e8976fa0", "string": "928c0ff6d8c69ec9", "atom": "aa246c6e6aa30484", "main": "b235d6477436c524", "platmacro": "b57252077e6b596b", "vectortest": "b777c587cc21465a", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "fileiotest": "c01b27dbcd683245", "viperio": "c9f4be41ca1cc2b4", "w32.fileio": "d137b1f3311f3a7f", "fileio": "d137b1f3311f3a7f", "stdint": "f5522571bcce7bcb", "viperlib": "f6ab8989f3545e83", "w32.win32file": "f6b51804a0ba8ff0", "win32file": "f6b51804a0ba8ff0", "w32.win32base": "fc980acec33d69a7", "win32base": "fc980acec33d69a7", "w32.win32memory": "72e2d5ccb7cedcf1", "win32memory": "72e2d5ccb7cedcf1", "w32.win32process": "067c78e9f121dce3", "win32process": "067c78e9f121dce3", "w32.win32sync": "06f53cc594b4ac6c", "win32sync": "06f53cc594b4ac6c", "w32.winsock2": "6446627d4f07a1b5", "winsock2": "6446627d4f07a1b5"} \ No newline at end of file diff --git a/Test/TestProject3/output/64ac83614c9bdbc6.deps.json b/Test/TestProject3/output/64ac83614c9bdbc6.deps.json deleted file mode 100644 index 9f0cad3..0000000 --- a/Test/TestProject3/output/64ac83614c9bdbc6.deps.json +++ /dev/null @@ -1 +0,0 @@ -{"mpooltest": "0019c939aae7f9f1", "memhub": "04e5fe47ff2af528", "enumtest": "1b58766d38d05de3", "vector": "285a822aa26bfbda", "stdio": "285b6aa29a34754d", "stdlib": "6c658cc728d0bbf4", "stdarg": "71e0a3ffcb3ebfad", "testcheck": "748d0424e8976fa0", "string": "928c0ff6d8c69ec9", "atom": "aa246c6e6aa30484", "main": "b235d6477436c524", "platmacro": "b57252077e6b596b", "vectortest": "b777c587cc21465a", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "fileiotest": "c01b27dbcd683245", "viperio": "c9f4be41ca1cc2b4", "w32.fileio": "d137b1f3311f3a7f", "fileio": "d137b1f3311f3a7f", "stdint": "f5522571bcce7bcb", "viperlib": "f6ab8989f3545e83", "w32.win32file": "f6b51804a0ba8ff0", "win32file": "f6b51804a0ba8ff0", "w32.win32base": "fc980acec33d69a7", "win32base": "fc980acec33d69a7"} \ No newline at end of file diff --git a/Test/TestProject3/output/b235d6477436c524.deps.json b/Test/TestProject3/output/b235d6477436c524.deps.json deleted file mode 100644 index 395efe7..0000000 --- a/Test/TestProject3/output/b235d6477436c524.deps.json +++ /dev/null @@ -1 +0,0 @@ -{"mpooltest": "0019c939aae7f9f1", "memhub": "04e5fe47ff2af528", "enumtest": "1b58766d38d05de3", "vector": "285a822aa26bfbda", "stdio": "285b6aa29a34754d", "definetest": "64ac83614c9bdbc6", "stdlib": "6c658cc728d0bbf4", "stdarg": "71e0a3ffcb3ebfad", "testcheck": "748d0424e8976fa0", "string": "928c0ff6d8c69ec9", "atom": "aa246c6e6aa30484", "platmacro": "b57252077e6b596b", "vectortest": "b777c587cc21465a", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "fileiotest": "c01b27dbcd683245", "viperio": "c9f4be41ca1cc2b4", "w32.fileio": "d137b1f3311f3a7f", "fileio": "d137b1f3311f3a7f", "stdint": "f5522571bcce7bcb", "viperlib": "f6ab8989f3545e83", "w32.win32file": "f6b51804a0ba8ff0", "win32file": "f6b51804a0ba8ff0", "w32.win32base": "fc980acec33d69a7", "win32base": "fc980acec33d69a7"} \ No newline at end of file diff --git a/Test/TestProject3/output/b777c587cc21465a.deps.json b/Test/TestProject3/output/b777c587cc21465a.deps.json deleted file mode 100644 index 57634a2..0000000 --- a/Test/TestProject3/output/b777c587cc21465a.deps.json +++ /dev/null @@ -1 +0,0 @@ -{"mpooltest": "0019c939aae7f9f1", "memhub": "04e5fe47ff2af528", "enumtest": "1b58766d38d05de3", "vector": "285a822aa26bfbda", "stdio": "285b6aa29a34754d", "definetest": "64ac83614c9bdbc6", "stdlib": "6c658cc728d0bbf4", "stdarg": "71e0a3ffcb3ebfad", "testcheck": "748d0424e8976fa0", "string": "928c0ff6d8c69ec9", "atom": "aa246c6e6aa30484", "main": "b235d6477436c524", "platmacro": "b57252077e6b596b", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "fileiotest": "c01b27dbcd683245", "viperio": "c9f4be41ca1cc2b4", "w32.fileio": "d137b1f3311f3a7f", "fileio": "d137b1f3311f3a7f", "stdint": "f5522571bcce7bcb", "viperlib": "f6ab8989f3545e83", "w32.win32file": "f6b51804a0ba8ff0", "win32file": "f6b51804a0ba8ff0", "w32.win32base": "fc980acec33d69a7", "win32base": "fc980acec33d69a7"} \ No newline at end of file diff --git a/Test/TestProject3/output/c01b27dbcd683245.deps.json b/Test/TestProject3/output/c01b27dbcd683245.deps.json deleted file mode 100644 index bd79ed6..0000000 --- a/Test/TestProject3/output/c01b27dbcd683245.deps.json +++ /dev/null @@ -1 +0,0 @@ -{"mpooltest": "0019c939aae7f9f1", "memhub": "04e5fe47ff2af528", "enumtest": "1b58766d38d05de3", "vector": "285a822aa26bfbda", "stdio": "285b6aa29a34754d", "definetest": "64ac83614c9bdbc6", "stdlib": "6c658cc728d0bbf4", "stdarg": "71e0a3ffcb3ebfad", "testcheck": "748d0424e8976fa0", "string": "928c0ff6d8c69ec9", "atom": "aa246c6e6aa30484", "main": "b235d6477436c524", "platmacro": "b57252077e6b596b", "vectortest": "b777c587cc21465a", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "viperio": "c9f4be41ca1cc2b4", "w32.fileio": "d137b1f3311f3a7f", "fileio": "d137b1f3311f3a7f", "stdint": "f5522571bcce7bcb", "viperlib": "f6ab8989f3545e83", "w32.win32file": "f6b51804a0ba8ff0", "win32file": "f6b51804a0ba8ff0", "w32.win32base": "fc980acec33d69a7", "win32base": "fc980acec33d69a7"} \ No newline at end of file diff --git a/Test/TestProject3/project.json b/Test/TestProject3/project.json deleted file mode 100644 index 74f6a0a..0000000 --- a/Test/TestProject3/project.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/TermiNexus/TransPyC/main/schemas/project-schema.json", - "name": "TestProject", - "version": "1.0.0", - "source_dir": "./App", - "build_dir": "./.tpv_build", - "compiler": { - "cmd": "llc", - "flags": ["-filetype=obj", "-relocation-model=pic"] - }, - "linker": { - "cmd": "clang++", - "flags": ["-lmsvcrt", "-lucrt", "-lpthread", "-lmingwex", "-lkernel32", "-Wl,--allow-multiple-definition"], - "output": "TestProject.exe" - }, - "includes": [ - "../../includes" - ], - "target": { - "triple": "x86_64-pc-windows-gnu", - "datalayout": "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" - }, - "options": { - "slice_level": 3, - "sha1_slice_level": 1, - "target": "llvm", - "strict_mode": true - } -} diff --git a/Test/TestProject3/temp/0019c939aae7f9f1.doc.json b/Test/TestProject3/temp/0019c939aae7f9f1.doc.json deleted file mode 100644 index 9e26dfe..0000000 --- a/Test/TestProject3/temp/0019c939aae7f9f1.doc.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/Test/TestProject3/temp/0019c939aae7f9f1.vpi b/Test/TestProject3/temp/0019c939aae7f9f1.vpi deleted file mode 100644 index fcf85d8..0000000 --- a/Test/TestProject3/temp/0019c939aae7f9f1.vpi +++ /dev/null @@ -1,14 +0,0 @@ -""" -Auto-generated Python stub file from mpooltest.vp -Module: mpooltest -""" - - -import t, c -from t import CInt, CPtr, CChar -import viperlib -import viperio -import stdlib -import memhub - -def mpool_main() -> CInt: pass diff --git a/Test/TestProject3/temp/067c78e9f121dce3.vpi b/Test/TestProject3/temp/067c78e9f121dce3.vpi deleted file mode 100644 index a606126..0000000 --- a/Test/TestProject3/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/TestProject3/temp/06f53cc594b4ac6c.vpi b/Test/TestProject3/temp/06f53cc594b4ac6c.vpi deleted file mode 100644 index ac278f4..0000000 --- a/Test/TestProject3/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/TestProject3/temp/1b58766d38d05de3.doc.json b/Test/TestProject3/temp/1b58766d38d05de3.doc.json deleted file mode 100644 index 9e26dfe..0000000 --- a/Test/TestProject3/temp/1b58766d38d05de3.doc.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/Test/TestProject3/temp/1b58766d38d05de3.vpi b/Test/TestProject3/temp/1b58766d38d05de3.vpi deleted file mode 100644 index ba21b2a..0000000 --- a/Test/TestProject3/temp/1b58766d38d05de3.vpi +++ /dev/null @@ -1,35 +0,0 @@ -""" -Auto-generated Python stub file from enumtest.vp -Module: enumtest -""" - - -import t, c -from t import CInt, CPtr, CChar, CInt32T, CExport -import viperlib -import stdlib - -class Color(t.CEnum): - Red = 0 - Green = 1 - Blue = 2 -class Option(t.REnum): - class Some: - value: CInt - Empty = 1 -class Result(t.REnum): - class Ok: - value: CInt - class Err: - msg: t.CChar | CPtr -class GeoShape(t.REnum): - class GCircle: - radius: CInt - class GRect: - w: CInt - h: CInt - class GPoint: - x: CInt - y: CInt - -def enum_main() -> CInt: pass diff --git a/Test/TestProject3/temp/285a822aa26bfbda.stub.ll.dep b/Test/TestProject3/temp/285a822aa26bfbda.stub.ll.dep deleted file mode 100644 index 7df8e8d..0000000 --- a/Test/TestProject3/temp/285a822aa26bfbda.stub.ll.dep +++ /dev/null @@ -1 +0,0 @@ -04e5fe47ff2af528|285b6aa29a34754d|6c658cc728d0bbf4|928c0ff6d8c69ec9|aa246c6e6aa30484|c9f4be41ca1cc2b4|f5522571bcce7bcb \ No newline at end of file diff --git a/Test/TestProject3/temp/285a822aa26bfbda.vpi b/Test/TestProject3/temp/285a822aa26bfbda.vpi deleted file mode 100644 index 102785a..0000000 --- a/Test/TestProject3/temp/285a822aa26bfbda.vpi +++ /dev/null @@ -1,24 +0,0 @@ -""" -Auto-generated Python stub file from vector.vp -Module: vector -""" - - -import t, c -from stdint import * -import memhub - -class Vector[T]: - data: t.CVoid | t.CPtr - length: t.CSizeT - capacity: t.CSizeT - elem_size: t.CSizeT - pool: memhub.MemManager | t.CPtr - def __init__(self: Vector, pool: memhub.MemManager | t.CPtr, capacity: t.CSizeT, _hint: T) -> t.CInt: pass - def push(self: Vector, value: T) -> t.CInt: pass - def _grow(self: Vector) -> t.CInt: pass - def get(self: Vector, index: t.CSizeT) -> T: pass - def set(self: Vector, index: t.CSizeT, value: T) -> t.CInt: pass - def len(self: Vector) -> t.CSizeT: pass - def clear(self: Vector) -> t.CInt: pass - def free(self: Vector) -> t.CInt: pass \ No newline at end of file diff --git a/Test/TestProject3/temp/285b6aa29a34754d.stub.ll.dep b/Test/TestProject3/temp/285b6aa29a34754d.stub.ll.dep deleted file mode 100644 index e69de29..0000000 diff --git a/Test/TestProject3/temp/285b6aa29a34754d.vpi b/Test/TestProject3/temp/285b6aa29a34754d.vpi deleted file mode 100644 index acc57c7..0000000 --- a/Test/TestProject3/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/TestProject3/temp/6446627d4f07a1b5.vpi b/Test/TestProject3/temp/6446627d4f07a1b5.vpi deleted file mode 100644 index 55f6a1f..0000000 --- a/Test/TestProject3/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/TestProject3/temp/64ac83614c9bdbc6.doc.json b/Test/TestProject3/temp/64ac83614c9bdbc6.doc.json deleted file mode 100644 index 9e26dfe..0000000 --- a/Test/TestProject3/temp/64ac83614c9bdbc6.doc.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/Test/TestProject3/temp/64ac83614c9bdbc6.vpi b/Test/TestProject3/temp/64ac83614c9bdbc6.vpi deleted file mode 100644 index d142ea9..0000000 --- a/Test/TestProject3/temp/64ac83614c9bdbc6.vpi +++ /dev/null @@ -1,85 +0,0 @@ -""" -Auto-generated Python stub file from definetest.vp -Module: definetest -""" - - -import t, c -from t import CInt, CInt32T, CUInt32T, CUInt64T, CFloat64T, CPtr, CChar, CDefine, CUInt16T -import viperlib -import stdlib -import platmacro - -MAX_SIZE: t.CDefine = 1024 -MIN_VAL: t.CDefine = 0 -MAX_VAL: t.CDefine = 100 -MASK_BYTE: t.CDefine = 0xFF -SHIFT_BITS: t.CDefine = 8 -PI_INT: t.CDefine = 3 -ENABLED: t.CDefine = 1 -DISABLED: t.CDefine = 0 -PAGE_SIZE: t.CDefine = 4096 -BUFFER_LEN: t.CDefine = 256 -CODE_SEG: t.CDefine | t.CUInt16T = 0x08 -DATA_SEG: t.CDefine | t.CUInt16T = 0x10 -STACK_SEG: t.CDefine | t.CUInt16T = 0x20 - -def MAKE_FLAG(bit: CInt32T) -> t.CDefine: - return 1 << bit - -def CLAMP(x: CInt32T, lo: CInt32T, hi: CInt32T) -> t.CDefine: - if x < lo: - return lo - if x > hi: - return hi - return x - -def test_basic_define() -> CInt: pass - -def test_define_arithmetic() -> CInt: pass - -def test_define_conditional() -> CInt: pass - -def test_define_loop() -> CInt: pass - -def test_typed_define() -> CInt: pass - -def test_define_function() -> CInt: pass - -def test_define_clamp() -> CInt: pass - -def test_define_string() -> CInt: pass - -def test_define_combined() -> CInt: pass - -def test_cif_basic() -> CInt: pass - -def test_cif_elif_else() -> CInt: pass - -def test_cifdef_cifndef() -> CInt: pass - -def test_cif_platform() -> CInt: pass - -def test_cif_nested() -> CInt: pass - -def test_cif_expr() -> CInt: pass - -def test_platmacro_platform() -> CInt: pass - -def test_platmacro_sizes() -> CInt: pass - -def test_platmacro_endian() -> CInt: pass - -def test_platmacro_features() -> CInt: pass - -def test_platmacro_align() -> CInt: pass - -def test_cifdef_cross_module() -> CInt: pass - -def test_cifdef_guard() -> CInt: pass - -def test_cifdef_undefined() -> CInt: pass - -def test_cifdef_complex() -> CInt: pass - -def define_main() -> CInt: pass diff --git a/Test/TestProject3/temp/6c658cc728d0bbf4.stub.ll.dep b/Test/TestProject3/temp/6c658cc728d0bbf4.stub.ll.dep deleted file mode 100644 index 793e7ed..0000000 --- a/Test/TestProject3/temp/6c658cc728d0bbf4.stub.ll.dep +++ /dev/null @@ -1 +0,0 @@ -f5522571bcce7bcb \ No newline at end of file diff --git a/Test/TestProject3/temp/6c658cc728d0bbf4.vpi b/Test/TestProject3/temp/6c658cc728d0bbf4.vpi deleted file mode 100644 index d7c42cf..0000000 --- a/Test/TestProject3/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/TestProject3/temp/71e0a3ffcb3ebfad.stub.ll.dep b/Test/TestProject3/temp/71e0a3ffcb3ebfad.stub.ll.dep deleted file mode 100644 index e69de29..0000000 diff --git a/Test/TestProject3/temp/71e0a3ffcb3ebfad.vpi b/Test/TestProject3/temp/71e0a3ffcb3ebfad.vpi deleted file mode 100644 index f99012f..0000000 --- a/Test/TestProject3/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/TestProject3/temp/72e2d5ccb7cedcf1.vpi b/Test/TestProject3/temp/72e2d5ccb7cedcf1.vpi deleted file mode 100644 index f85ee45..0000000 --- a/Test/TestProject3/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/TestProject3/temp/748d0424e8976fa0.stub.ll.dep b/Test/TestProject3/temp/748d0424e8976fa0.stub.ll.dep deleted file mode 100644 index be4eebc..0000000 --- a/Test/TestProject3/temp/748d0424e8976fa0.stub.ll.dep +++ /dev/null @@ -1 +0,0 @@ -285b6aa29a34754d|bbdf3bbd4c3bc28c|f5522571bcce7bcb|fc980acec33d69a7 \ No newline at end of file diff --git a/Test/TestProject3/temp/748d0424e8976fa0.vpi b/Test/TestProject3/temp/748d0424e8976fa0.vpi deleted file mode 100644 index 5ff4850..0000000 --- a/Test/TestProject3/temp/748d0424e8976fa0.vpi +++ /dev/null @@ -1,31 +0,0 @@ -""" -Auto-generated Python stub file from testcheck.vp -Module: testcheck -""" - - -import t, c -import stdio -from w32.win32console import SetConsoleOutputCP, SetConsoleCP - -CP_UTF8: t.CDefine = 65001 -_pass_count: t.CExtern | t.CInt -_fail_count: t.CExtern | t.CInt -_total_pass: t.CExtern | t.CInt -_total_fail: t.CExtern | t.CInt - -def begin(name: str) -> t.CInt: pass - -def section(name: str) -> t.CInt: pass - -def ok(msg: str) -> t.CInt: pass - -def fail(msg: str) -> t.CInt: pass - -def check(cond: t.CInt, ok_msg: str, fail_msg: str) -> t.CInt: pass - -def info(msg: str) -> t.CInt: pass - -def end() -> t.CInt: pass - -def summary() -> t.CInt: pass diff --git a/Test/TestProject3/temp/_phase1_manifest.json b/Test/TestProject3/temp/_phase1_manifest.json deleted file mode 100644 index 98a925d..0000000 --- a/Test/TestProject3/temp/_phase1_manifest.json +++ /dev/null @@ -1 +0,0 @@ -{"d:\\Users\\TermiNexus\\Desktop\\TransPyC\\Test\\TestProject3\\App\\definetest.vp": {"sha1": "64ac83614c9bdbc6", "mtime": 1781005527.138675, "size": 9399}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\Test\\TestProject3\\App\\enumtest.vp": {"sha1": "1b58766d38d05de3", "mtime": 1781025043.7585423, "size": 2094}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\Test\\TestProject3\\App\\fileiotest.vp": {"sha1": "c01b27dbcd683245", "mtime": 1781261000.2857711, "size": 12600}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\Test\\TestProject3\\App\\main.vp": {"sha1": "b235d6477436c524", "mtime": 1782110387.1454024, "size": 15478}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\Test\\TestProject3\\App\\mpooltest.vp": {"sha1": "0019c939aae7f9f1", "mtime": 1782828388.8033123, "size": 2789}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\Test\\TestProject3\\App\\vectortest.vp": {"sha1": "b777c587cc21465a", "mtime": 1782828416.8050296, "size": 1215}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\atom.vp": {"sha1": "aa246c6e6aa30484", "mtime": 1785389628.701967, "size": 1198}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\memhub.vp": {"sha1": "04e5fe47ff2af528", "mtime": 1786093335.1900027, "size": 27855}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\platmacro.vp": {"sha1": "b57252077e6b596b", "mtime": 1785332415.2187803, "size": 1266}, "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": "928c0ff6d8c69ec9", "mtime": 1786032947.9330952, "size": 11557}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\testcheck.vp": {"sha1": "748d0424e8976fa0", "mtime": 1785332415.20287, "size": 1919}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\vector.vp": {"sha1": "285a822aa26bfbda", "mtime": 1784566611.8311827, "size": 2071}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\viperio.vp": {"sha1": "c9f4be41ca1cc2b4", "mtime": 1782812279.506002, "size": 1556}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\viperlib.vp": {"sha1": "f6ab8989f3545e83", "mtime": 1785882958.4542437, "size": 59045}, "d:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\w32\\fileio.vp": {"sha1": "d137b1f3311f3a7f", "mtime": 1785902648.1442463, "size": 13765}, "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\\win32file.vp": {"sha1": "f6b51804a0ba8ff0", "mtime": 1782531158.744144, "size": 8424}} \ No newline at end of file diff --git a/Test/TestProject3/temp/_sha1_map.txt b/Test/TestProject3/temp/_sha1_map.txt deleted file mode 100644 index 9eb655e..0000000 --- a/Test/TestProject3/temp/_sha1_map.txt +++ /dev/null @@ -1,22 +0,0 @@ -0019c939aae7f9f1:mpooltest.vp -04e5fe47ff2af528:includes/memhub.vp -1b58766d38d05de3:enumtest.vp -285a822aa26bfbda:includes/vector.vp -285b6aa29a34754d:includes/stdio.vp -64ac83614c9bdbc6:definetest.vp -6c658cc728d0bbf4:includes/stdlib.vp -71e0a3ffcb3ebfad:includes/stdarg.vp -748d0424e8976fa0:includes/testcheck.vp -928c0ff6d8c69ec9:includes/string.vp -aa246c6e6aa30484:includes/atom.vp -b235d6477436c524:main.vp -b57252077e6b596b:includes/platmacro.vp -b777c587cc21465a:vectortest.vp -bbdf3bbd4c3bc28c:includes/w32\win32console.vp -c01b27dbcd683245:fileiotest.vp -c9f4be41ca1cc2b4:includes/viperio.vp -d137b1f3311f3a7f:includes/w32\fileio.vp -f5522571bcce7bcb:includes/stdint.vp -f6ab8989f3545e83:includes/viperlib.vp -f6b51804a0ba8ff0:includes/w32\win32file.vp -fc980acec33d69a7:includes/w32\win32base.vp diff --git a/Test/TestProject3/temp/_shared_sym.json b/Test/TestProject3/temp/_shared_sym.json deleted file mode 100644 index a7ca883..0000000 Binary files a/Test/TestProject3/temp/_shared_sym.json and /dev/null differ diff --git a/Test/TestProject3/temp/aa246c6e6aa30484.stub.ll.dep b/Test/TestProject3/temp/aa246c6e6aa30484.stub.ll.dep deleted file mode 100644 index e69de29..0000000 diff --git a/Test/TestProject3/temp/aa246c6e6aa30484.vpi b/Test/TestProject3/temp/aa246c6e6aa30484.vpi deleted file mode 100644 index 3147b54..0000000 --- a/Test/TestProject3/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/TestProject3/temp/b235d6477436c524.doc.json b/Test/TestProject3/temp/b235d6477436c524.doc.json deleted file mode 100644 index 9e26dfe..0000000 --- a/Test/TestProject3/temp/b235d6477436c524.doc.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/Test/TestProject3/temp/b235d6477436c524.vpi b/Test/TestProject3/temp/b235d6477436c524.vpi deleted file mode 100644 index 8aa4d98..0000000 --- a/Test/TestProject3/temp/b235d6477436c524.vpi +++ /dev/null @@ -1,131 +0,0 @@ -""" -Auto-generated Python stub file from main.vp -Module: main -""" - - -from stdint import * -import w32.win32console -import t, c -from t import CInt, CPtr, CChar, CInt32T, CUInt64T, CFloat64T, CExport, State -import viperlib -import stdlib -import definetest -import enumtest -import mpooltest -import vectortest -import fileiotest -import testcheck - -def add[T](a: T, b: T) -> T: pass - -def add_u64[T](a: T, b: T, c: CUInt64T) -> T: pass - -def fxi[T1, T2](a: T1, b: T2) -> T1: pass - -def fxi2[T1, T2, T3](a: T1, b: T2, c: T3) -> T1: pass - -def wrap_add[T](a: T, b: T) -> T: pass - -def double_add[T](a: T, b: T) -> T: pass - - -class A[T]: - def __init__(self: A, a: T) -> t.CInt: pass - def get_a(self: A) -> T: pass -class Pair[T1, T2]: - def __init__(self: Pair, first: T1, second: T2) -> t.CInt: pass - def get_first(self: Pair) -> T1: pass - def get_second(self: Pair) -> T2: pass -class Calculator[T]: - def __init__(self: Calculator, init_val: T) -> t.CInt: pass - def compute(self: Calculator, other: T) -> T: pass - def double_compute(self: Calculator, other: T) -> T: pass -class Container[T]: - def __init__(self: Container, v: T) -> t.CInt: pass - def get_value(self: Container) -> T: pass - def get_flag(self: Container) -> CInt32T: pass -@t.CVTable -class Shape: - def __init__(self: Shape, x: CFloat64T, y: CFloat64T) -> t.CInt: pass - def area(self: Shape) -> CFloat64T: pass - def perimeter(self: Shape) -> CFloat64T: pass - def describe(self: Shape) -> CFloat64T: pass -@t.CVTable -class Circle(Shape): - def __init__(self: Circle, x: CFloat64T, y: CFloat64T, r: CFloat64T) -> t.CInt: pass - def area(self: Circle) -> CFloat64T: pass - def perimeter(self: Circle) -> CFloat64T: pass - def scale(self: Circle, factor: CFloat64T) -> 'Circle' | CPtr: pass - def move(self: Circle, dx: CFloat64T, dy: CFloat64T) -> 'Circle' | CPtr: pass -@t.CVTable -class Rect(Shape): - def __init__(self: Rect, x: CFloat64T, y: CFloat64T, w: CFloat64T, h: CFloat64T) -> t.CInt: pass - def area(self: Rect) -> CFloat64T: pass - def perimeter(self: Rect) -> CFloat64T: pass - def scale(self: Rect, factor: CFloat64T) -> 'Rect' | CPtr: pass -class Vec2: - x: CFloat64T - y: CFloat64T - def __new__() -> 'Vec2' | CPtr: pass - def __init__(self: Vec2, x: CFloat64T, y: CFloat64T) -> t.CInt: pass - def __add__(self: Vec2, b: 'Vec2' | CPtr) -> 'Vec2' | CPtr: pass - def __sub__(self: Vec2, b: 'Vec2' | CPtr) -> 'Vec2' | CPtr: pass - def __mul__(self: Vec2, s: CFloat64T) -> 'Vec2' | CPtr: pass - def __neg__(self: Vec2) -> 'Vec2' | CPtr: pass - def dot(self: Vec2, b: 'Vec2' | CPtr) -> CFloat64T: pass - def len_sq(self: Vec2) -> CFloat64T: pass -class Vec3: - x: CFloat64T - y: CFloat64T - z: CFloat64T - def __new__() -> 'Vec3' | CPtr: pass - def __init__(self: Vec3, x: CFloat64T, y: CFloat64T, z: CFloat64T) -> t.CInt: pass - def __add__(self: Vec3, b: 'Vec3' | CPtr) -> 'Vec3' | CPtr: pass - def __sub__(self: Vec3, b: 'Vec3' | CPtr) -> 'Vec3' | CPtr: pass - def __mul__(self: Vec3, s: CFloat64T) -> 'Vec3' | CPtr: pass - def __neg__(self: Vec3) -> 'Vec3' | CPtr: pass - def dot(self: Vec3, b: 'Vec3' | CPtr) -> CFloat64T: pass - def cross(self: Vec3, b: 'Vec3' | CPtr) -> 'Vec3' | CPtr: pass - def len_sq(self: Vec3) -> CFloat64T: pass -@t.CVTable -class Dog: - def __init__(self: Dog, name_val: CInt, bark_power: CInt32T) -> t.CInt: pass - def speak(self: Dog) -> CInt: pass - def bite(self: Dog) -> CInt32T: pass - def take_damage(self: Dog, dmg: CInt32T) -> 'Dog' | CPtr: pass - def is_alive(self: Dog) -> CInt: pass -@t.CVTable -class Cat: - def __init__(self: Cat, name_val: CInt, lives: CInt32T) -> t.CInt: pass - def speak(self: Cat) -> CInt: pass - def scratch(self: Cat) -> CInt32T: pass - def take_damage(self: Cat, dmg: CInt32T) -> 'Cat' | CPtr: pass - def is_alive(self: Cat) -> CInt: pass -class Transform: - px: CFloat64T - py: CFloat64T - pz: CFloat64T - scale_x: CFloat64T - scale_y: CFloat64T - scale_z: CFloat64T - def __new__() -> 'Transform' | CPtr: pass - def __init__(self: Transform, px: CFloat64T, py: CFloat64T, pz: CFloat64T) -> t.CInt: pass - def apply_scale(self: Transform, sx: CFloat64T, sy: CFloat64T, sz: CFloat64T) -> 'Transform' | CPtr: pass - def world_position(self: Transform) -> 'Vec3' | CPtr: pass -@t.CVTable -class Vehicle: - def __init__(self: Vehicle, speed: CInt32T) -> t.CInt: pass - def move(self: Vehicle) -> CInt: pass - def is_running(self: Vehicle) -> CInt: pass -@t.CVTable -class Car(Vehicle): - def __init__(self: Car, speed: CInt32T, doors: CInt32T) -> t.CInt: pass - def honk(self: Car) -> CInt: pass -@t.CVTable -class ElectricCar(Car): - def __init__(self: ElectricCar, speed: CInt32T, doors: CInt32T, battery: CInt32T) -> t.CInt: pass - def charge(self: ElectricCar) -> t.CInt: pass - def move(self: ElectricCar) -> CInt: pass - -def main() -> CInt | CExport: pass diff --git a/Test/TestProject3/temp/b57252077e6b596b.stub.ll.dep b/Test/TestProject3/temp/b57252077e6b596b.stub.ll.dep deleted file mode 100644 index e69de29..0000000 diff --git a/Test/TestProject3/temp/b57252077e6b596b.vpi b/Test/TestProject3/temp/b57252077e6b596b.vpi deleted file mode 100644 index 32c2251..0000000 --- a/Test/TestProject3/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/TestProject3/temp/b777c587cc21465a.doc.json b/Test/TestProject3/temp/b777c587cc21465a.doc.json deleted file mode 100644 index 9e26dfe..0000000 --- a/Test/TestProject3/temp/b777c587cc21465a.doc.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/Test/TestProject3/temp/b777c587cc21465a.vpi b/Test/TestProject3/temp/b777c587cc21465a.vpi deleted file mode 100644 index c1e9bd4..0000000 --- a/Test/TestProject3/temp/b777c587cc21465a.vpi +++ /dev/null @@ -1,16 +0,0 @@ -""" -Auto-generated Python stub file from vectortest.vp -Module: vectortest -""" - - -import t, c -from t import CInt, CPtr, CChar, CFloat64T -import viperlib -import stdlib -import vector -import memhub - -POOL_SIZE: t.CDefine = 4096 - -def vector_main() -> CInt: pass diff --git a/Test/TestProject3/temp/bbdf3bbd4c3bc28c.stub.ll.dep b/Test/TestProject3/temp/bbdf3bbd4c3bc28c.stub.ll.dep deleted file mode 100644 index d4b382c..0000000 --- a/Test/TestProject3/temp/bbdf3bbd4c3bc28c.stub.ll.dep +++ /dev/null @@ -1 +0,0 @@ -f5522571bcce7bcb|fc980acec33d69a7 \ No newline at end of file diff --git a/Test/TestProject3/temp/bbdf3bbd4c3bc28c.vpi b/Test/TestProject3/temp/bbdf3bbd4c3bc28c.vpi deleted file mode 100644 index 4709b3e..0000000 --- a/Test/TestProject3/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/TestProject3/temp/c01b27dbcd683245.doc.json b/Test/TestProject3/temp/c01b27dbcd683245.doc.json deleted file mode 100644 index 9e26dfe..0000000 --- a/Test/TestProject3/temp/c01b27dbcd683245.doc.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/Test/TestProject3/temp/c01b27dbcd683245.vpi b/Test/TestProject3/temp/c01b27dbcd683245.vpi deleted file mode 100644 index beda1a1..0000000 --- a/Test/TestProject3/temp/c01b27dbcd683245.vpi +++ /dev/null @@ -1,30 +0,0 @@ -""" -Auto-generated Python stub file from fileiotest.vp -Module: fileiotest -""" - - -import t, c -from t import CInt, CInt32T, CUInt32T, CPtr, CChar, CExport -from stdint import * -import stdlib -import viperlib -import w32.win32base -import w32.win32file -import w32.win32console -import w32.fileio -from w32.fileio import File, FileW, MODE, FRESULT, SEEK_SET, SEEK_CUR, SEEK_END - -BUF_SIZE: t.CDefine = 4096 - -def fileio_main() -> t.CInt: pass - -def fileio_with_test() -> t.CInt: pass - -def fileio_handle_test() -> t.CInt: pass - -def fileio_rw_test() -> t.CInt: pass - -def fileio_wide_test() -> t.CInt: pass - -def fileio_chinese_test() -> t.CInt: pass diff --git a/Test/TestProject3/temp/c9f4be41ca1cc2b4.stub.ll.dep b/Test/TestProject3/temp/c9f4be41ca1cc2b4.stub.ll.dep deleted file mode 100644 index 793e7ed..0000000 --- a/Test/TestProject3/temp/c9f4be41ca1cc2b4.stub.ll.dep +++ /dev/null @@ -1 +0,0 @@ -f5522571bcce7bcb \ No newline at end of file diff --git a/Test/TestProject3/temp/c9f4be41ca1cc2b4.vpi b/Test/TestProject3/temp/c9f4be41ca1cc2b4.vpi deleted file mode 100644 index f7ed5fd..0000000 --- a/Test/TestProject3/temp/c9f4be41ca1cc2b4.vpi +++ /dev/null @@ -1,22 +0,0 @@ -""" -Auto-generated Python stub file from viperio.vp -Module: viperio -""" - - -import t, c -from stdint import * - -class Buf: - data: t.CChar | t.CPtr - length: t.CSizeT - capacity: t.CSizeT - owned: bool - def __init__(self: Buf, data: t.CChar | t.CPtr, capacity: t.CSizeT, length: t.CSizeT = 0, owned: bool = False) -> t.CInt: pass - def clear(self: Buf) -> t.CInt: pass - def write(self: Buf, src: t.CChar | t.CPtr, count: t.CSizeT) -> t.CSizeT: pass - def cstr(self: Buf) -> t.CChar | t.CPtr: pass - def reset(self: Buf) -> t.CInt: pass - def __enter__(self: Buf) -> 'Buf' | t.CPtr: pass - def __exit__(self: Buf) -> t.CInt: pass - def free(self: Buf) -> t.CInt: pass \ No newline at end of file diff --git a/Test/TestProject3/temp/d137b1f3311f3a7f.stub.ll.dep b/Test/TestProject3/temp/d137b1f3311f3a7f.stub.ll.dep deleted file mode 100644 index 57493dc..0000000 --- a/Test/TestProject3/temp/d137b1f3311f3a7f.stub.ll.dep +++ /dev/null @@ -1 +0,0 @@ -285b6aa29a34754d|f5522571bcce7bcb|f6b51804a0ba8ff0|fc980acec33d69a7 \ No newline at end of file diff --git a/Test/TestProject3/temp/d137b1f3311f3a7f.vpi b/Test/TestProject3/temp/d137b1f3311f3a7f.vpi deleted file mode 100644 index a85310e..0000000 --- a/Test/TestProject3/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/TestProject3/temp/f5522571bcce7bcb.stub.ll.dep b/Test/TestProject3/temp/f5522571bcce7bcb.stub.ll.dep deleted file mode 100644 index e69de29..0000000 diff --git a/Test/TestProject3/temp/f5522571bcce7bcb.vpi b/Test/TestProject3/temp/f5522571bcce7bcb.vpi deleted file mode 100644 index f0bc071..0000000 --- a/Test/TestProject3/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/TestProject3/temp/f6ab8989f3545e83.stub.ll.dep b/Test/TestProject3/temp/f6ab8989f3545e83.stub.ll.dep deleted file mode 100644 index bfde8ab..0000000 --- a/Test/TestProject3/temp/f6ab8989f3545e83.stub.ll.dep +++ /dev/null @@ -1 +0,0 @@ -71e0a3ffcb3ebfad|c9f4be41ca1cc2b4|f5522571bcce7bcb \ No newline at end of file diff --git a/Test/TestProject3/temp/f6ab8989f3545e83.vpi b/Test/TestProject3/temp/f6ab8989f3545e83.vpi deleted file mode 100644 index d7cf9b6..0000000 --- a/Test/TestProject3/temp/f6ab8989f3545e83.vpi +++ /dev/null @@ -1,23 +0,0 @@ -""" -Auto-generated Python stub file from viperlib.vp -Module: viperlib -""" - - -import t, c -import viperio -from stdarg import arg, va_arg - -TEMP_BUF_SIZE: t.CDefine = 68 - -def get_digit_count(num: t.CUnsignedInt, base: t.CInt) -> t.CStatic | t.CInt: pass - -def sprintf(buf: t.CChar | t.CPtr, rule: str, *args) -> t.CVoid | t.CExport: pass - -def vsprintf(buf: t.CChar | t.CPtr, rule: str, *args) -> t.CInt: pass - -def snprintf(buf: t.CChar | t.CPtr, size: t.CSizeT, fmt: str, *args) -> t.CInt | t.CExport: pass - -def _check_special_float(fv: t.CDouble) -> t.CInt: pass - -def vsnprintf(buf: t.CChar | t.CPtr, size: t.CSizeT, fmt: str, ap: t.CChar | t.CPtr) -> t.CInt | t.CExport: pass diff --git a/Test/TestProject3/temp/f6b51804a0ba8ff0.stub.ll.dep b/Test/TestProject3/temp/f6b51804a0ba8ff0.stub.ll.dep deleted file mode 100644 index d4b382c..0000000 --- a/Test/TestProject3/temp/f6b51804a0ba8ff0.stub.ll.dep +++ /dev/null @@ -1 +0,0 @@ -f5522571bcce7bcb|fc980acec33d69a7 \ No newline at end of file diff --git a/Test/TestProject3/temp/f6b51804a0ba8ff0.vpi b/Test/TestProject3/temp/f6b51804a0ba8ff0.vpi deleted file mode 100644 index 6ee80a6..0000000 --- a/Test/TestProject3/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/TestProject3/temp/fc980acec33d69a7.stub.ll.dep b/Test/TestProject3/temp/fc980acec33d69a7.stub.ll.dep deleted file mode 100644 index 793e7ed..0000000 --- a/Test/TestProject3/temp/fc980acec33d69a7.stub.ll.dep +++ /dev/null @@ -1 +0,0 @@ -f5522571bcce7bcb \ No newline at end of file diff --git a/Test/TestProject3/temp/fc980acec33d69a7.vpi b/Test/TestProject3/temp/fc980acec33d69a7.vpi deleted file mode 100644 index 3f9feff..0000000 --- a/Test/TestProject3/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