将 .py 和 .pyi 后缀名改为了 .vp 和 .vpi 后缀名

This commit is contained in:
2026-07-30 16:33:56 +08:00
parent f79c8ca643
commit cfc30d735c
322 changed files with 246 additions and 31772 deletions

View File

@@ -0,0 +1,30 @@
import t
from linkedlist import GSListNode
# ============================================================
# 最小化复现:类名 'Value' 与全局变量名冲突
#
# 这个类在 includes 目录中(走 Phase1 路径),生成 stub.ll
# 继承 GSListNode[Value] 获取 Next 字段
# 5 个自有字段 + 1 个继承字段(Next) = 6 字段
#
# 若 _get_or_create_struct('Value') 因 SymbolTable 中
# IsVariable=True 而返回 _TypedPointerType
# 则 set_body 被跳过struct 保持不完整 → GEP 越界崩溃
# ============================================================
@t.NoVTable
class Value(GSListNode[Value]):
Ty: t.CPtr
Name: t.CPtr
IsConst: t.CInt
IntVal: t.CInt64T
FloatVal: t.CDouble
def __init__(self):
self.Ty = None
self.Name = None
self.IsConst = 0
self.IntVal = 0
self.FloatVal = 0.0
self.Next = None