修正了种子编译器的错误
This commit is contained in:
176
Test/G5/App/main.py
Normal file
176
Test/G5/App/main.py
Normal file
@@ -0,0 +1,176 @@
|
||||
import t
|
||||
import stdio
|
||||
import testcheck
|
||||
import stdlib
|
||||
import memhub
|
||||
import string
|
||||
from linkedlist import GSListNode, GSList
|
||||
|
||||
|
||||
# ============================================================
|
||||
# G5: 验证 GSList[T] 被降级为 opaque 的问题
|
||||
#
|
||||
# 版本 2: 不使用 malloc/MemBuddy,直接用构造函数(像 G3 那样)
|
||||
# 这样能隔离 GSList opaque 问题
|
||||
# ============================================================
|
||||
|
||||
|
||||
# G5Node: 继承 GSListNode[G5Node](Phase2 路径,正确特化)
|
||||
@t.NoVTable
|
||||
class G5Node(GSListNode[G5Node]):
|
||||
Value: t.CInt
|
||||
|
||||
def __init__(self):
|
||||
self.Next = None
|
||||
self.Value = 0
|
||||
|
||||
|
||||
# G5ListWrapper: 包装 GSList[G5Node],测试 GSList 字段访问
|
||||
# 注意:GSList[G5Node] 走 Phase2 特化路径
|
||||
# 用 pool 工厂函数分配 GSList,避免栈分配悬垂指针
|
||||
GSLIST_SIZE: t.CDefine = 24 # Head(8) + Tail(8) + Count(8)
|
||||
|
||||
@t.NoVTable
|
||||
class G5ListWrapper:
|
||||
List: GSList[G5Node] | t.CPtr
|
||||
|
||||
def __init__(self, pool: memhub.MemBuddy | t.CPtr):
|
||||
gsl: GSList[G5Node] | t.CPtr = pool.alloc(GSLIST_SIZE)
|
||||
if gsl is None:
|
||||
self.List = None
|
||||
return
|
||||
string.memset(gsl, 0, GSLIST_SIZE)
|
||||
self.List = gsl
|
||||
|
||||
|
||||
# ============================================================
|
||||
# Test 1: G5Node 字段访问(基准测试,应通过)
|
||||
# ============================================================
|
||||
|
||||
def test_g5node_create():
|
||||
testcheck.section("Test 1: G5Node create and field access")
|
||||
n: G5Node = G5Node()
|
||||
n.Value = 42
|
||||
v: t.CInt = n.Value
|
||||
testcheck.check(v == 42, "G5Node.Value = 42", "expect 42")
|
||||
|
||||
|
||||
def test_g5node_next():
|
||||
testcheck.section("Test 2: G5Node.Next field (GSListNode inheritance)")
|
||||
n1: G5Node = G5Node()
|
||||
n2: G5Node = G5Node()
|
||||
n1.Value = 10
|
||||
n2.Value = 20
|
||||
n1.Next = n2
|
||||
next_node: G5Node = n1.Next
|
||||
if next_node is None:
|
||||
testcheck.check(False, "n1.Next is None", "FAIL")
|
||||
return
|
||||
v: t.CInt = next_node.Value
|
||||
testcheck.check(v == 20, "n1.Next.Value = 20", "expect 20")
|
||||
|
||||
|
||||
# ============================================================
|
||||
# Test 3: GSList 字段访问 — 核心测试
|
||||
# ============================================================
|
||||
|
||||
def test_gslist_create():
|
||||
testcheck.section("Test 3: GSList[G5Node] create")
|
||||
lst: GSList[G5Node] | t.CPtr = GSList[G5Node]()
|
||||
if lst is None:
|
||||
testcheck.check(False, "GSList[G5Node]() is None", "FAIL")
|
||||
return
|
||||
# 检查初始状态
|
||||
head: G5Node | t.CPtr = lst.Head
|
||||
tail: G5Node | t.CPtr = lst.Tail
|
||||
count: t.CSizeT = lst.Count
|
||||
testcheck.check(head is None, "initial Head is None", "expect None")
|
||||
testcheck.check(tail is None, "initial Tail is None", "expect None")
|
||||
testcheck.check(count == 0, "initial Count = 0", "expect 0")
|
||||
|
||||
|
||||
def test_gslist_append():
|
||||
testcheck.section("Test 4: GSList[G5Node].append 3 nodes")
|
||||
lst: GSList[G5Node] | t.CPtr = GSList[G5Node]()
|
||||
if lst is None:
|
||||
testcheck.check(False, "GSList[G5Node]() is None", "FAIL")
|
||||
return
|
||||
a: G5Node = G5Node()
|
||||
b: G5Node = G5Node()
|
||||
c: G5Node = G5Node()
|
||||
a.Value = 1
|
||||
b.Value = 2
|
||||
c.Value = 3
|
||||
|
||||
lst.append(a)
|
||||
lst.append(b)
|
||||
lst.append(c)
|
||||
|
||||
# 验证 Count
|
||||
count: t.CSizeT = lst.Count
|
||||
testcheck.check(count == 3, "Count = 3 after 3 appends", "expect 3")
|
||||
|
||||
# 验证 Head
|
||||
head: G5Node | t.CPtr = lst.Head
|
||||
if head is None:
|
||||
testcheck.check(False, "Head is None", "FAIL")
|
||||
return
|
||||
testcheck.check(head.Value == 1, "Head.Value = 1", "expect 1")
|
||||
|
||||
# 验证 Tail
|
||||
tail: G5Node | t.CPtr = lst.Tail
|
||||
if tail is None:
|
||||
testcheck.check(False, "Tail is None", "FAIL")
|
||||
return
|
||||
testcheck.check(tail.Value == 3, "Tail.Value = 3", "expect 3")
|
||||
|
||||
# 遍历链表验证顺序
|
||||
sum: t.CInt = 0
|
||||
cur: G5Node | t.CPtr = lst.Head
|
||||
while cur is not None:
|
||||
sum = sum + cur.Value
|
||||
cur = cur.Next
|
||||
testcheck.check(sum == 6, "chain sum = 1+2+3 = 6", "expect 6")
|
||||
|
||||
|
||||
# ============================================================
|
||||
# Test 5: G5ListWrapper.List 字段访问(嵌套 GSList 测试)
|
||||
# ============================================================
|
||||
|
||||
def test_wrapper_list_field():
|
||||
testcheck.section("Test 5: G5ListWrapper.List field (nested GSList, pool alloc)")
|
||||
arena: bytes = stdlib.malloc(4096)
|
||||
if arena is None:
|
||||
testcheck.check(False, "malloc arena", "FAIL")
|
||||
return
|
||||
pool: memhub.MemBuddy | t.CPtr = memhub.MemBuddy(arena, 4096)
|
||||
wrapper: G5ListWrapper = G5ListWrapper(pool)
|
||||
if wrapper is None:
|
||||
testcheck.check(False, "G5ListWrapper(pool) is None", "FAIL")
|
||||
return
|
||||
if wrapper.List is None:
|
||||
testcheck.check(False, "wrapper.List is None", "FAIL")
|
||||
return
|
||||
|
||||
n: G5Node = G5Node()
|
||||
n.Value = 999
|
||||
wrapper.List.append(n)
|
||||
|
||||
# 通过 wrapper.List 访问 GSList 字段
|
||||
head: G5Node | t.CPtr = wrapper.List.Head
|
||||
if head is None:
|
||||
testcheck.check(False, "wrapper.List.Head is None", "FAIL")
|
||||
return
|
||||
count: t.CSizeT = wrapper.List.Count
|
||||
testcheck.check(head.Value == 999, "wrapper.List.Head.Value = 999", "expect 999")
|
||||
testcheck.check(count == 1, "wrapper.List.Count = 1", "expect 1")
|
||||
|
||||
|
||||
def main() -> t.CInt:
|
||||
testcheck.begin("G5: GSList[T] field access (Phase2 path, pool alloc for wrapper)")
|
||||
test_g5node_create()
|
||||
test_g5node_next()
|
||||
test_gslist_create()
|
||||
test_gslist_append()
|
||||
test_wrapper_list_field()
|
||||
return testcheck.end()
|
||||
173
Test/G5/includes/g5container.py
Normal file
173
Test/G5/includes/g5container.py
Normal file
@@ -0,0 +1,173 @@
|
||||
import t
|
||||
import string
|
||||
from linkedlist import GSListNode, GSList
|
||||
import memhub
|
||||
|
||||
|
||||
# ============================================================
|
||||
# G5Node: 继承 GSListNode[G5Node] 的测试节点
|
||||
#
|
||||
# 与 __function.py 中的 Line(GSListNode[Line]) 模式相同。
|
||||
# 这个类在 includes 目录中,走 Phase1 路径。
|
||||
# Phase1 的 _specialize_member_types 会将 Next 字段类型 T 降级为 i8*
|
||||
# 而不是 G5Node*(与 TPV 中 Value/Line 类的情况相同)
|
||||
# ============================================================
|
||||
|
||||
@t.NoVTable
|
||||
class G5Node(GSListNode[G5Node]):
|
||||
Value: t.CInt
|
||||
|
||||
|
||||
# ============================================================
|
||||
# G5Container: 持有 GSList[G5Node] 字段的容器
|
||||
#
|
||||
# 这是 G5 测试的核心:GSList[T] 在 Phase1 中被降级为 opaque,
|
||||
# 导致 List.Head / List.Tail / List.Count 字段访问无法生成 GEP。
|
||||
#
|
||||
# 与 __function.py 中的 Function(GSListNode[Function]):
|
||||
# Params: GSList[Param] | t.CPtr
|
||||
# Blocks: GSList[BasicBlock] | t.CPtr
|
||||
# 模式完全相同。
|
||||
# ============================================================
|
||||
|
||||
@t.NoVTable
|
||||
class G5Container:
|
||||
List: GSList[G5Node] | t.CPtr
|
||||
|
||||
|
||||
# ============================================================
|
||||
# 工厂函数(与 __function.py 的 new_line/new_function 模式相同)
|
||||
# ============================================================
|
||||
|
||||
# G5Node 硬编码大小: Next(8) + Value(4) + padding(4) = 16 字节
|
||||
G5NODE_SIZE: t.CDefine = 16
|
||||
|
||||
def new_g5node(pool: memhub.MemBuddy | t.CPtr) -> G5Node | t.CPtr:
|
||||
"""从 pool 分配并零初始化一个 G5Node"""
|
||||
ptr: G5Node | t.CPtr = pool.alloc(G5NODE_SIZE)
|
||||
if ptr is None: return None
|
||||
string.memset(ptr, 0, G5NODE_SIZE)
|
||||
return ptr
|
||||
|
||||
|
||||
# GSList 硬编码大小: Head(8) + Tail(8) + Count(8) = 24 字节
|
||||
G5LIST_SIZE: t.CDefine = 24
|
||||
|
||||
def new_g5list(pool: memhub.MemBuddy | t.CPtr) -> GSList | t.CPtr:
|
||||
"""从 pool 分配并零初始化一个 GSList 容器(Head/Tail/Count 全零)"""
|
||||
gsl: t.CPtr = pool.alloc(G5LIST_SIZE)
|
||||
if gsl is None: return None
|
||||
string.memset(gsl, 0, G5LIST_SIZE)
|
||||
return gsl
|
||||
|
||||
|
||||
# G5Container 硬编码大小: List(8) = 8 字节
|
||||
G5CONTAINER_SIZE: t.CDefine = 8
|
||||
|
||||
def new_g5container(pool: memhub.MemBuddy | t.CPtr) -> G5Container | t.CPtr:
|
||||
"""从 pool 分配并零初始化一个 G5Container"""
|
||||
ptr: G5Container | t.CPtr = pool.alloc(G5CONTAINER_SIZE)
|
||||
if ptr is None: return None
|
||||
string.memset(ptr, 0, G5CONTAINER_SIZE)
|
||||
return ptr
|
||||
|
||||
|
||||
# ============================================================
|
||||
# 字段访问器(供其他模块绕过 stub 类型限制使用)
|
||||
#
|
||||
# 跨模块编译时,使用方模块只有 GSList 的 stub 类型(opaque),
|
||||
# 导致 TransPyC 静默跳过字段访问(不生成 GEP,不报错),
|
||||
# 字段值永远为 null。
|
||||
#
|
||||
# 这些访问器在拥有完整类型定义的本模块内执行,能正确访问
|
||||
# 所有字段。其他模块通过函数调用获取字段值,绕过 stub 限制。
|
||||
# ============================================================
|
||||
|
||||
def g5list_get_head(lst: GSList | t.CPtr) -> G5Node | t.CPtr:
|
||||
"""获取链表头节点"""
|
||||
if lst is None: return None
|
||||
return lst.Head
|
||||
|
||||
|
||||
def g5list_get_tail(lst: GSList | t.CPtr) -> G5Node | t.CPtr:
|
||||
"""获取链表尾节点"""
|
||||
if lst is None: return None
|
||||
return lst.Tail
|
||||
|
||||
|
||||
def g5list_get_count(lst: GSList | t.CPtr) -> t.CSizeT:
|
||||
"""获取链表节点数"""
|
||||
if lst is None: return 0
|
||||
return lst.Count
|
||||
|
||||
|
||||
def g5list_set_head(lst: GSList | t.CPtr, node: G5Node | t.CPtr):
|
||||
"""设置链表头节点"""
|
||||
if lst is None: return
|
||||
lst.Head = node
|
||||
|
||||
|
||||
def g5list_set_tail(lst: GSList | t.CPtr, node: G5Node | t.CPtr):
|
||||
"""设置链表尾节点"""
|
||||
if lst is None: return
|
||||
lst.Tail = node
|
||||
|
||||
|
||||
def g5list_set_count(lst: GSList | t.CPtr, count: t.CSizeT):
|
||||
"""设置链表节点数"""
|
||||
if lst is None: return
|
||||
lst.Count = count
|
||||
|
||||
|
||||
def g5list_append(lst: GSList | t.CPtr, node: G5Node | t.CPtr):
|
||||
"""将 node 追加到链表末尾(O(1))
|
||||
|
||||
直接操作 Head/Tail/Count 字段,不依赖 GSList.append 方法
|
||||
(因为跨模块时方法实现可能缺失)
|
||||
"""
|
||||
if lst is None or node is None: return
|
||||
node.Next = None
|
||||
if lst.Head is None:
|
||||
lst.Head = node
|
||||
else:
|
||||
lst.Tail.Next = node
|
||||
lst.Tail = node
|
||||
lst.Count += 1
|
||||
|
||||
|
||||
# ============================================================
|
||||
# G5Node 访问器
|
||||
# ============================================================
|
||||
|
||||
def g5node_get_value(node: G5Node | t.CPtr) -> t.CInt:
|
||||
if node is None: return 0
|
||||
return node.Value
|
||||
|
||||
|
||||
def g5node_set_value(node: G5Node | t.CPtr, value: t.CInt):
|
||||
if node is None: return
|
||||
node.Value = value
|
||||
|
||||
|
||||
def g5node_get_next(node: G5Node | t.CPtr) -> G5Node | t.CPtr:
|
||||
if node is None: return None
|
||||
return node.Next
|
||||
|
||||
|
||||
def g5node_set_next(node: G5Node | t.CPtr, next_node: G5Node | t.CPtr):
|
||||
if node is None: return
|
||||
node.Next = next_node
|
||||
|
||||
|
||||
# ============================================================
|
||||
# G5Container 访问器
|
||||
# ============================================================
|
||||
|
||||
def g5container_get_list(container: G5Container | t.CPtr) -> GSList | t.CPtr:
|
||||
if container is None: return None
|
||||
return container.List
|
||||
|
||||
|
||||
def g5container_set_list(container: G5Container | t.CPtr, lst: GSList | t.CPtr):
|
||||
if container is None: return
|
||||
container.List = lst
|
||||
1
Test/G5/output/5c5f2d19bc9e75ab.deps.json
Normal file
1
Test/G5/output/5c5f2d19bc9e75ab.deps.json
Normal file
@@ -0,0 +1 @@
|
||||
{"testcheck": "14d33679f7fadf1f", "atom": "271ea3decb810db2", "linkedlist": "2d39c6c7d3557b3e", "stdio": "6f62fe05c5ea1ceb", "w32.win32base": "7e529fe7a078cfef", "win32base": "7e529fe7a078cfef", "stdlib": "90c53dd6db8d41cf", "string": "ba12ed409d78139e", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "viperio": "c9f4be41ca1cc2b4", "memhub": "d089e25a15c6f6e0", "stdint": "f5522571bcce7bcb"}
|
||||
30
Test/G5/project.json
Normal file
30
Test/G5/project.json
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/TermiNexus/TransPyC/main/schemas/project-schema.json",
|
||||
"name": "G5",
|
||||
"version": "1.0.0",
|
||||
"source_dir": "./App",
|
||||
"build_dir": "./.tpv_build",
|
||||
"compiler": {
|
||||
"cmd": "llc",
|
||||
"flags": ["-filetype=obj", "-relocation-model=pic"]
|
||||
},
|
||||
"linker": {
|
||||
"cmd": "clang++",
|
||||
"flags": ["-Wl,--allow-multiple-definition", "-Wl,--unresolved-symbols=ignore-in-object-files", "-lmsvcrt", "-lucrt", "-lpthread", "-lmingwex", "-lkernel32", "-luser32", "-latomic"],
|
||||
"output": "G5.exe"
|
||||
},
|
||||
"includes": [
|
||||
"../../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": 3,
|
||||
"target": "llvm",
|
||||
"strict_mode": true
|
||||
}
|
||||
}
|
||||
31
Test/G5/temp/14d33679f7fadf1f.pyi
Normal file
31
Test/G5/temp/14d33679f7fadf1f.pyi
Normal file
@@ -0,0 +1,31 @@
|
||||
"""
|
||||
Auto-generated Python stub file from testcheck.py
|
||||
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
|
||||
1
Test/G5/temp/14d33679f7fadf1f.stub.ll.dep
Normal file
1
Test/G5/temp/14d33679f7fadf1f.stub.ll.dep
Normal file
@@ -0,0 +1 @@
|
||||
6f62fe05c5ea1ceb|7e529fe7a078cfef|bbdf3bbd4c3bc28c|f5522571bcce7bcb
|
||||
26
Test/G5/temp/271ea3decb810db2.pyi
Normal file
26
Test/G5/temp/271ea3decb810db2.pyi
Normal file
@@ -0,0 +1,26 @@
|
||||
"""
|
||||
Auto-generated Python stub file from atom.py
|
||||
Module: atom
|
||||
"""
|
||||
|
||||
|
||||
import t, c
|
||||
|
||||
ATOMIC_RELAXED: t.CDefine = 0
|
||||
ATOMIC_CONSUME: t.CDefine = 1
|
||||
ATOMIC_ACQUIRE: t.CDefine = 2
|
||||
ATOMIC_RELEASE: t.CDefine = 3
|
||||
ATOMIC_ACQ_REL: t.CDefine = 4
|
||||
ATOMIC_SEQ_CST: t.CDefine = 5
|
||||
|
||||
def __atomic_test_and_set(ptr: t.CUInt64T | t.CPtr, order: t.CInt) -> t.CBool: pass
|
||||
|
||||
def __atomic_clear(ptr: t.CUInt64T | t.CPtr, order: t.CInt) -> t.CVoid: pass
|
||||
|
||||
def __atomic_thread_fence(order: t.CInt) -> t.CVoid: pass
|
||||
|
||||
def __atomic_signal_fence(order: t.CInt) -> t.CVoid: pass
|
||||
|
||||
def __atomic_always_lock_free(size: t.CSizeT, ptr: t.CVoid | t.CPtr) -> t.CBool: pass
|
||||
|
||||
def __atomic_is_lock_free(size: t.CSizeT, ptr: t.CVoid | t.CPtr) -> t.CBool: pass
|
||||
0
Test/G5/temp/271ea3decb810db2.stub.ll.dep
Normal file
0
Test/G5/temp/271ea3decb810db2.stub.ll.dep
Normal file
63
Test/G5/temp/2d39c6c7d3557b3e.pyi
Normal file
63
Test/G5/temp/2d39c6c7d3557b3e.pyi
Normal file
@@ -0,0 +1,63 @@
|
||||
"""
|
||||
Auto-generated Python stub file from linkedlist.py
|
||||
Module: linkedlist
|
||||
"""
|
||||
|
||||
|
||||
import t, c
|
||||
from stdint import *
|
||||
|
||||
@t.NoVTable
|
||||
class LinkedNode:
|
||||
next: 'LinkedNode' | t.CPtr
|
||||
prev: 'LinkedNode' | t.CPtr
|
||||
child: 'LinkedNode' | t.CPtr
|
||||
last_child: 'LinkedNode' | t.CPtr
|
||||
parent: 'LinkedNode' | t.CPtr
|
||||
child_count: t.CSizeT
|
||||
def append(self: LinkedNode, node: 'LinkedNode' | t.CPtr) -> t.CInt: pass
|
||||
def prepend(self: LinkedNode, node: 'LinkedNode' | t.CPtr) -> t.CInt: pass
|
||||
def insert_before(self: LinkedNode, node: 'LinkedNode' | t.CPtr, new_node: 'LinkedNode' | t.CPtr) -> t.CInt: pass
|
||||
def insert_after(self: LinkedNode, node: 'LinkedNode' | t.CPtr, new_node: 'LinkedNode' | t.CPtr) -> t.CInt: pass
|
||||
def remove_child(self: LinkedNode, node: 'LinkedNode' | t.CPtr) -> t.CInt: pass
|
||||
def detach(self: LinkedNode) -> t.CInt: pass
|
||||
def unlink(self: LinkedNode) -> t.CInt: pass
|
||||
def has_children(self: LinkedNode) -> t.CInt: pass
|
||||
def child_at(self: LinkedNode, index: t.CSizeT) -> 'LinkedNode' | t.CPtr: pass
|
||||
def count_children(self: LinkedNode) -> t.CSizeT: pass
|
||||
def first_sibling(self: LinkedNode) -> 'LinkedNode' | t.CPtr: pass
|
||||
def last_sibling(self: LinkedNode) -> 'LinkedNode' | t.CPtr: pass
|
||||
@t.NoVTable
|
||||
class SListNode:
|
||||
Next: 'SListNode' | t.CPtr
|
||||
def append(self: SListNode, node: 'SListNode' | t.CPtr) -> 'SListNode' | t.CPtr: pass
|
||||
def append_after(self: SListNode, node: 'SListNode' | t.CPtr) -> 'SListNode' | t.CPtr: pass
|
||||
def count(self: SListNode) -> t.CSizeT: pass
|
||||
def at(self: SListNode, index: t.CSizeT) -> 'SListNode' | t.CPtr: pass
|
||||
def remove(self: SListNode, node: 'SListNode' | t.CPtr) -> 'SListNode' | t.CPtr: pass
|
||||
@t.NoVTable
|
||||
class GSListNode[T]:
|
||||
Next: T | t.CPtr
|
||||
@t.NoVTable
|
||||
class GSList[T]:
|
||||
Head: T | t.CPtr
|
||||
Tail: T | t.CPtr
|
||||
Count: t.CSizeT
|
||||
def __init__(self: GSList) -> t.CInt: pass
|
||||
def append(self: GSList, node: T) -> t.CInt: pass
|
||||
def count(self: GSList) -> t.CSizeT: pass
|
||||
def at(self: GSList, index: t.CSizeT) -> T | t.CPtr: pass
|
||||
@t.NoVTable
|
||||
class GTreeNode[T]:
|
||||
Next: T | t.CPtr
|
||||
Prev: T | t.CPtr
|
||||
Child: T | t.CPtr
|
||||
LastChild: T | t.CPtr
|
||||
Parent: T | t.CPtr
|
||||
Count: t.CSizeT
|
||||
def append(self: GTreeNode, node: T | t.CPtr) -> t.CInt: pass
|
||||
def prepend(self: GTreeNode, node: T | t.CPtr) -> t.CInt: pass
|
||||
def detach(self: GTreeNode) -> t.CInt: pass
|
||||
def has_children(self: GTreeNode) -> t.CInt: pass
|
||||
def child_at(self: GTreeNode, index: t.CSizeT) -> T | t.CPtr: pass
|
||||
def count_children(self: GTreeNode) -> t.CSizeT: pass
|
||||
1
Test/G5/temp/2d39c6c7d3557b3e.stub.ll.dep
Normal file
1
Test/G5/temp/2d39c6c7d3557b3e.stub.ll.dep
Normal file
@@ -0,0 +1 @@
|
||||
f5522571bcce7bcb
|
||||
1
Test/G5/temp/5c5f2d19bc9e75ab.doc.json
Normal file
1
Test/G5/temp/5c5f2d19bc9e75ab.doc.json
Normal file
@@ -0,0 +1 @@
|
||||
{}
|
||||
39
Test/G5/temp/5c5f2d19bc9e75ab.pyi
Normal file
39
Test/G5/temp/5c5f2d19bc9e75ab.pyi
Normal file
@@ -0,0 +1,39 @@
|
||||
"""
|
||||
Auto-generated Python stub file from main.py
|
||||
Module: main
|
||||
"""
|
||||
|
||||
import c
|
||||
|
||||
|
||||
import t
|
||||
import stdio
|
||||
import testcheck
|
||||
import stdlib
|
||||
import memhub
|
||||
import string
|
||||
from linkedlist import GSListNode, GSList
|
||||
|
||||
@t.NoVTable
|
||||
class G5Node(GSListNode[G5Node]):
|
||||
Value: t.CInt
|
||||
def __init__(self: G5Node) -> t.CInt: pass
|
||||
|
||||
GSLIST_SIZE: t.CDefine = 24 # Head(8) + Tail(8) + Count(8)
|
||||
|
||||
@t.NoVTable
|
||||
class G5ListWrapper:
|
||||
List: GSList[G5Node] | t.CPtr
|
||||
def __init__(self: G5ListWrapper, pool: memhub.MemBuddy | t.CPtr) -> t.CInt: pass
|
||||
|
||||
def test_g5node_create() -> t.CInt: pass
|
||||
|
||||
def test_g5node_next() -> t.CInt: pass
|
||||
|
||||
def test_gslist_create() -> t.CInt: pass
|
||||
|
||||
def test_gslist_append() -> t.CInt: pass
|
||||
|
||||
def test_wrapper_list_field() -> t.CInt: pass
|
||||
|
||||
def main() -> t.CInt: pass
|
||||
28
Test/G5/temp/6f62fe05c5ea1ceb.pyi
Normal file
28
Test/G5/temp/6f62fe05c5ea1ceb.pyi
Normal file
@@ -0,0 +1,28 @@
|
||||
"""
|
||||
Auto-generated Python stub file from stdio.py
|
||||
Module: stdio
|
||||
"""
|
||||
|
||||
|
||||
import t, c
|
||||
|
||||
def printf(fmt: t.CConst | str, *args) -> t.CInt | t.State: pass
|
||||
|
||||
def fprintf(stream: bytes, fmt: t.CConst | str, *args) -> t.CInt | t.State: pass
|
||||
|
||||
def sprintf(buf: bytes, fmt: t.CConst | str, *args) -> t.CInt | t.State: pass
|
||||
|
||||
def snprintf(buf: bytes, size: t.CSizeT, fmt: t.CConst | str, *args) -> t.CInt | t.State: pass
|
||||
|
||||
def puts(s: t.CConst | str) -> t.CInt | t.State: pass
|
||||
|
||||
def fputs(s: t.CConst | str, stream: bytes) -> t.CInt | t.State: pass
|
||||
|
||||
def fgets(buf: bytes, size: t.CInt, stream: bytes) -> bytes | t.State: pass
|
||||
|
||||
def fflush(stream: bytes) -> t.CInt | t.State: pass
|
||||
|
||||
|
||||
stdin: t.CExtern | bytes
|
||||
stdout: t.CExtern | bytes
|
||||
stderr: t.CExtern | bytes
|
||||
0
Test/G5/temp/6f62fe05c5ea1ceb.stub.ll.dep
Normal file
0
Test/G5/temp/6f62fe05c5ea1ceb.stub.ll.dep
Normal file
100
Test/G5/temp/7e529fe7a078cfef.pyi
Normal file
100
Test/G5/temp/7e529fe7a078cfef.pyi
Normal file
@@ -0,0 +1,100 @@
|
||||
"""
|
||||
Auto-generated Python stub file from w32.win32base.py
|
||||
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 = t.CVoid(-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
|
||||
1
Test/G5/temp/7e529fe7a078cfef.stub.ll.dep
Normal file
1
Test/G5/temp/7e529fe7a078cfef.stub.ll.dep
Normal file
@@ -0,0 +1 @@
|
||||
f5522571bcce7bcb
|
||||
20
Test/G5/temp/90c53dd6db8d41cf.pyi
Normal file
20
Test/G5/temp/90c53dd6db8d41cf.pyi
Normal file
@@ -0,0 +1,20 @@
|
||||
"""
|
||||
Auto-generated Python stub file from stdlib.py
|
||||
Module: stdlib
|
||||
"""
|
||||
|
||||
import c
|
||||
|
||||
|
||||
from stdint import *
|
||||
import t
|
||||
|
||||
def malloc(size: t.CSizeT) -> t.CVoid | t.CPtr | t.State: pass
|
||||
|
||||
def calloc(nmemb: t.CSizeT, size: t.CSizeT) -> t.CVoid | t.CPtr | t.State: pass
|
||||
|
||||
def realloc(p: t.CVoid | t.CPtr, size: t.CSizeT) -> t.CVoid | t.CPtr | t.State: pass
|
||||
|
||||
def free(p: t.CVoid | t.CPtr) -> t.State: pass
|
||||
|
||||
def system(cmd: t.CConst | t.CChar | t.CPtr) -> INT | t.State: pass
|
||||
1
Test/G5/temp/90c53dd6db8d41cf.stub.ll.dep
Normal file
1
Test/G5/temp/90c53dd6db8d41cf.stub.ll.dep
Normal file
@@ -0,0 +1 @@
|
||||
f5522571bcce7bcb
|
||||
1
Test/G5/temp/_phase1_manifest.json
Normal file
1
Test/G5/temp/_phase1_manifest.json
Normal file
@@ -0,0 +1 @@
|
||||
{"D:\\Users\\TermiNexus\\Desktop\\TransPyC\\Test\\G5\\App\\main.py": {"sha1": "5c5f2d19bc9e75ab", "mtime": 1784657611.1935527, "size": 5524}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\atom.py": {"sha1": "271ea3decb810db2", "mtime": 1782226548.693161, "size": 1290}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\linkedlist.py": {"sha1": "2d39c6c7d3557b3e", "mtime": 1782895405.2191627, "size": 16032}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\memhub.py": {"sha1": "d089e25a15c6f6e0", "mtime": 1784652963.6614158, "size": 19765}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\stdint.py": {"sha1": "f5522571bcce7bcb", "mtime": 1782383975.8824987, "size": 4356}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\stdio.py": {"sha1": "6f62fe05c5ea1ceb", "mtime": 1783239556.0959673, "size": 714}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\stdlib.py": {"sha1": "90c53dd6db8d41cf", "mtime": 1784566611.8606246, "size": 375}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\string.py": {"sha1": "ba12ed409d78139e", "mtime": 1784652963.6677132, "size": 10452}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\testcheck.py": {"sha1": "14d33679f7fadf1f", "mtime": 1784566611.838851, "size": 1979}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\viperio.py": {"sha1": "c9f4be41ca1cc2b4", "mtime": 1782812279.506002, "size": 1556}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\w32\\win32base.py": {"sha1": "7e529fe7a078cfef", "mtime": 1782488356.7736557, "size": 2662}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\w32\\win32console.py": {"sha1": "bbdf3bbd4c3bc28c", "mtime": 1781200703.5338137, "size": 5604}}
|
||||
12
Test/G5/temp/_sha1_map.txt
Normal file
12
Test/G5/temp/_sha1_map.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
14d33679f7fadf1f:includes/testcheck.py
|
||||
271ea3decb810db2:includes/atom.py
|
||||
2d39c6c7d3557b3e:includes/linkedlist.py
|
||||
5c5f2d19bc9e75ab:main.py
|
||||
6f62fe05c5ea1ceb:includes/stdio.py
|
||||
7e529fe7a078cfef:includes/w32\win32base.py
|
||||
90c53dd6db8d41cf:includes/stdlib.py
|
||||
ba12ed409d78139e:includes/string.py
|
||||
bbdf3bbd4c3bc28c:includes/w32\win32console.py
|
||||
c9f4be41ca1cc2b4:includes/viperio.py
|
||||
d089e25a15c6f6e0:includes/memhub.py
|
||||
f5522571bcce7bcb:includes/stdint.py
|
||||
59
Test/G5/temp/ba12ed409d78139e.pyi
Normal file
59
Test/G5/temp/ba12ed409d78139e.pyi
Normal file
@@ -0,0 +1,59 @@
|
||||
"""
|
||||
Auto-generated Python stub file from string.py
|
||||
Module: string
|
||||
"""
|
||||
|
||||
|
||||
from stdint import *
|
||||
import t, c
|
||||
|
||||
def strcpy(dest: str, src: str) -> str: pass
|
||||
|
||||
def strcat(dest: str, src: str) -> str: pass
|
||||
|
||||
def strncpy(dest: str, src: str, n: t.CSizeT) -> str: pass
|
||||
|
||||
def strlen(src: str) -> t.CSizeT | t.CExport: pass
|
||||
|
||||
def strcmp(str1: str, str2: str) -> t.CInt: pass
|
||||
|
||||
def samestr(str1: str, str2: str) -> bool: pass
|
||||
|
||||
def strncmp(str1: str, str2: str, n: t.CSizeT) -> t.CInt: pass
|
||||
|
||||
def memcmp(ptr1: t.CVoid | t.CPtr, ptr2: t.CVoid | t.CPtr, n: t.CSizeT) -> t.CInt: pass
|
||||
|
||||
def strchr(s: str, cr: t.CInt) -> str: pass
|
||||
|
||||
def strrchr(s: str, cr: t.CInt) -> str: pass
|
||||
|
||||
def strstr(s: str, needle: str) -> str: pass
|
||||
|
||||
def strspn(s: str, skip: str) -> int: pass
|
||||
|
||||
def memset(ptr: t.CVoid | t.CPtr, value: t.CInt, num: t.CSizeT) -> t.CVoid | t.CPtr | t.CExport: pass
|
||||
|
||||
def memset32(ptr: t.CVoid | t.CPtr, value: t.CUInt32T, count: t.CSizeT) -> t.CVoid | t.CPtr: pass
|
||||
|
||||
def memcpy(dest: t.CVoid | t.CPtr, src: t.CVoid | t.CPtr, num: t.CSizeT) -> t.CVoid | t.CPtr | t.CExport: pass
|
||||
|
||||
def memmove(dest: t.CVoid | t.CPtr, src: t.CVoid | t.CPtr, num: t.CSizeT) -> t.CVoid | t.CPtr: pass
|
||||
|
||||
def atoi(src: str) -> t.CInt: pass
|
||||
|
||||
def atoll(src: str) -> t.CInt64T: pass
|
||||
|
||||
def atof(src: str) -> t.CDouble: pass
|
||||
|
||||
def split(s: str, delim: str, result: t.CArray[str]) -> int: pass
|
||||
|
||||
|
||||
ascii_lowercase: t.CExtern | str
|
||||
ascii_uppercase: t.CExtern | str
|
||||
ascii_letters: t.CExtern | str
|
||||
digits: t.CExtern | str
|
||||
hexdigits: t.CExtern | str
|
||||
octdigits: t.CExtern | str
|
||||
punctuation: t.CExtern | str
|
||||
whitespace: t.CExtern | str
|
||||
printable: t.CExtern | str
|
||||
1
Test/G5/temp/ba12ed409d78139e.stub.ll.dep
Normal file
1
Test/G5/temp/ba12ed409d78139e.stub.ll.dep
Normal file
@@ -0,0 +1 @@
|
||||
f5522571bcce7bcb
|
||||
138
Test/G5/temp/bbdf3bbd4c3bc28c.pyi
Normal file
138
Test/G5/temp/bbdf3bbd4c3bc28c.pyi
Normal file
@@ -0,0 +1,138 @@
|
||||
"""
|
||||
Auto-generated Python stub file from w32.win32console.py
|
||||
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
|
||||
1
Test/G5/temp/bbdf3bbd4c3bc28c.stub.ll.dep
Normal file
1
Test/G5/temp/bbdf3bbd4c3bc28c.stub.ll.dep
Normal file
@@ -0,0 +1 @@
|
||||
7e529fe7a078cfef|f5522571bcce7bcb
|
||||
22
Test/G5/temp/c9f4be41ca1cc2b4.pyi
Normal file
22
Test/G5/temp/c9f4be41ca1cc2b4.pyi
Normal file
@@ -0,0 +1,22 @@
|
||||
"""
|
||||
Auto-generated Python stub file from viperio.py
|
||||
Module: viperio
|
||||
"""
|
||||
|
||||
|
||||
import t, c
|
||||
from stdint import *
|
||||
|
||||
class Buf:
|
||||
data: t.CChar | t.CPtr
|
||||
length: t.CSizeT
|
||||
capacity: t.CSizeT
|
||||
owned: bool
|
||||
def __init__(self: Buf, data: t.CChar | t.CPtr, capacity: t.CSizeT, length: t.CSizeT, owned: bool) -> t.CInt: pass
|
||||
def clear(self: Buf) -> t.CInt: pass
|
||||
def write(self: Buf, src: t.CChar | t.CPtr, count: t.CSizeT) -> t.CSizeT: pass
|
||||
def cstr(self: Buf) -> t.CChar | t.CPtr: pass
|
||||
def reset(self: Buf) -> t.CInt: pass
|
||||
def __enter__(self: Buf) -> 'Buf' | t.CPtr: pass
|
||||
def __exit__(self: Buf) -> t.CInt: pass
|
||||
def free(self: Buf) -> t.CInt: pass
|
||||
1
Test/G5/temp/c9f4be41ca1cc2b4.stub.ll.dep
Normal file
1
Test/G5/temp/c9f4be41ca1cc2b4.stub.ll.dep
Normal file
@@ -0,0 +1 @@
|
||||
f5522571bcce7bcb
|
||||
88
Test/G5/temp/d089e25a15c6f6e0.pyi
Normal file
88
Test/G5/temp/d089e25a15c6f6e0.pyi
Normal file
@@ -0,0 +1,88 @@
|
||||
"""
|
||||
Auto-generated Python stub file from memhub.py
|
||||
Module: memhub
|
||||
"""
|
||||
|
||||
|
||||
import t, c
|
||||
from stdint import *
|
||||
import string
|
||||
import atom
|
||||
import viperio
|
||||
import stdio
|
||||
|
||||
MEMHUB_ALIGN: t.CDefine = 8
|
||||
MEMSLAB_MIN_BLOCK: t.CDefine = 16
|
||||
MEMSLAB_BITMAP_BYTES: t.CDefine = 256
|
||||
MEMBUDDY_MIN_BLOCK: t.CDefine = 32
|
||||
MEMBUDDY_MAX_ORDERS: t.CDefine = 32
|
||||
MEMBUDDY_HEADER_SIZE: t.CDefine = 8
|
||||
|
||||
def _align_up(val: t.CSizeT, align: t.CSizeT) -> t.CSizeT: pass
|
||||
|
||||
def _largest_pow2_le(val: t.CSizeT) -> t.CSizeT: pass
|
||||
|
||||
def _block_size_at_order(order: t.CInt) -> t.CSizeT: pass
|
||||
|
||||
|
||||
@t.CVTable
|
||||
class MemManager:
|
||||
__provides__: list[str] = ['__memmgr__']
|
||||
base: t.CVoid | t.CPtr
|
||||
size: t.CSizeT
|
||||
def __init__(self: MemManager, base: t.CVoid | t.CPtr, size: t.CSizeT) -> t.CInt: pass
|
||||
def alloc(self: MemManager, size: t.CSizeT) -> t.CVoid | t.CPtr: pass
|
||||
def free(self: MemManager, ptr: t.CVoid | t.CPtr) -> t.CInt: pass
|
||||
def reset(self: MemManager) -> t.CInt: pass
|
||||
def calloc(self: MemManager, count: t.CSizeT, size: t.CSizeT) -> t.CVoid | t.CPtr: pass
|
||||
def realloc(self: MemManager, ptr: t.CVoid | t.CPtr, new_size: t.CSizeT) -> t.CVoid | t.CPtr: pass
|
||||
def __enter__(self: MemManager) -> 'MemManager' | t.CPtr: pass
|
||||
def __exit__(self: MemManager) -> t.CInt: pass
|
||||
def alloc_buf(self: MemManager, capacity: t.CSizeT) -> viperio.Buf | t.CPtr: pass
|
||||
class MemPool(MemManager):
|
||||
offset: t.CSizeT
|
||||
high_water: t.CSizeT
|
||||
def __init__(self: MemPool, base: t.CVoid | t.CPtr, size: t.CSizeT) -> t.CInt: pass
|
||||
def alloc(self: MemPool, size: t.CSizeT) -> t.CVoid | t.CPtr: pass
|
||||
def free(self: MemPool, ptr: t.CVoid | t.CPtr) -> t.CInt: pass
|
||||
def reset(self: MemPool) -> t.CInt: pass
|
||||
class MemSlab(MemManager):
|
||||
block_size: t.CSizeT
|
||||
block_count: t.CSizeT
|
||||
used_count: t.CSizeT
|
||||
free_list: t.CVoid | t.CPtr
|
||||
alloc_map: t.CUInt8T | t.CPtr
|
||||
alloc_map_size: t.CSizeT
|
||||
usable: t.CVoid | t.CPtr
|
||||
usable_size: t.CSizeT
|
||||
def __init__(self: MemSlab, base: t.CVoid | t.CPtr, size: t.CSizeT, block_size: t.CSizeT) -> t.CInt: pass
|
||||
def alloc(self: MemSlab, size: t.CSizeT) -> t.CVoid | t.CPtr: pass
|
||||
def free(self: MemSlab, ptr: t.CVoid | t.CPtr) -> t.CInt: pass
|
||||
def reset(self: MemSlab) -> t.CInt: pass
|
||||
class MemBuddy(MemManager):
|
||||
__provides__: list[str] = ['__mbuddy__', '__memmgr__']
|
||||
max_order: t.CInt
|
||||
free_lists: t.CUInt64T | t.CPtr
|
||||
lock_val: t.CVolatile | t.CInt
|
||||
usable: t.CVoid | t.CPtr
|
||||
usable_size: t.CSizeT
|
||||
def __init__(self: MemBuddy, base: t.CVoid | t.CPtr, size: t.CSizeT) -> t.CInt: pass
|
||||
def _fl_push(self: MemBuddy, order: t.CInt, block: t.CVoid | t.CPtr) -> t.CInt: pass
|
||||
def _fl_pop(self: MemBuddy, order: t.CInt) -> t.CVoid | t.CPtr: pass
|
||||
def _fl_find_and_remove(self: MemBuddy, order: t.CInt, target: t.CVoid | t.CPtr) -> t.CInt: pass
|
||||
def _buddy_of(self: MemBuddy, block: t.CVoid | t.CPtr, order: t.CInt) -> t.CVoid | t.CPtr: pass
|
||||
def _order_for_size(self: MemBuddy, size: t.CSizeT) -> t.CInt: pass
|
||||
def _split_to_order(self: MemBuddy, to_order: t.CInt) -> t.CVoid | t.CPtr: pass
|
||||
def _coalesce(self: MemBuddy, block: t.CVoid | t.CPtr, order: t.CInt) -> t.CInt: pass
|
||||
def _is_valid_ptr(self: MemBuddy, ptr: t.CVoid | t.CPtr) -> t.CInt: pass
|
||||
def _lock(self: MemBuddy) -> t.CInt: pass
|
||||
def _unlock(self: MemBuddy) -> t.CInt: pass
|
||||
def alloc(self: MemBuddy, size: t.CSizeT) -> t.CVoid | t.CPtr: pass
|
||||
def free(self: MemBuddy, ptr: t.CVoid | t.CPtr) -> t.CInt: pass
|
||||
def reset(self: MemBuddy) -> t.CInt: pass
|
||||
def realloc(self: MemBuddy, ptr: t.CVoid | t.CPtr, new_size: t.CSizeT) -> t.CVoid | t.CPtr: pass
|
||||
@property
|
||||
def mem_size(self: MemBuddy) -> t.CSizeT: pass
|
||||
def stats(self: MemBuddy) -> t.CSizeT: pass
|
||||
def free_count(self: MemBuddy) -> t.CSizeT: pass
|
||||
def self_check(self: MemBuddy) -> t.CInt: pass
|
||||
1
Test/G5/temp/d089e25a15c6f6e0.stub.ll.dep
Normal file
1
Test/G5/temp/d089e25a15c6f6e0.stub.ll.dep
Normal file
@@ -0,0 +1 @@
|
||||
271ea3decb810db2|6f62fe05c5ea1ceb|ba12ed409d78139e|c9f4be41ca1cc2b4|f5522571bcce7bcb
|
||||
100
Test/G5/temp/f5522571bcce7bcb.pyi
Normal file
100
Test/G5/temp/f5522571bcce7bcb.pyi
Normal file
@@ -0,0 +1,100 @@
|
||||
"""
|
||||
Auto-generated Python stub file from stdint.py
|
||||
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
|
||||
0
Test/G5/temp/f5522571bcce7bcb.stub.ll.dep
Normal file
0
Test/G5/temp/f5522571bcce7bcb.stub.ll.dep
Normal file
Reference in New Issue
Block a user