chore: 改名同步 TransPyV -> ViperC(源码/配置内的纯替换)

This commit is contained in:
TermiNexus committed 2026-10-12 15:06:45 +08:00
1 parent 0cac59b795
commit 735f5d49af
96 files changed
+172 -172

No files matched your search

+1 -1
View File
@@ -3,7 +3,7 @@
"name": "ArgparseTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": ["-filetype=obj", "-relocation-model=pic"]
+1 -1
View File
@@ -29,7 +29,7 @@ def classify_list(lst: list[ast.AST*]*, depth: int):
def classify_print(node: ast.AST*, depth: int):
"""Recursively walk the parse tree and print each node's category at runtime
via TPV isinstance vtable subclass-set comparison (Stmt vs ExprNode vs other).
via VPC isinstance vtable subclass-set comparison (Stmt vs ExprNode vs other).
"""
if node is None:
return
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "AstTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": ["-filetype=obj", "-relocation-model=pic"]
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "BuddyTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": ["-filetype=obj", "-relocation-model=pic"]
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "BuiltinDecoratorTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "CPythonTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": ["-filetype=obj", "-relocation-model=pic"]
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "CharTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "ClassArrayTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "ClosureCallTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "ClosureTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "ClosureTest2",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "CoroTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "DecoratorTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "DefaultArgTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "DefineTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "DictTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": ["-filetype=obj", "-relocation-model=pic"]
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "DocTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "EdgeCaseTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": ["-filetype=obj", "-relocation-model=pic"]
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "EnumTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "EqTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": ["-filetype=obj", "-relocation-model=pic"]
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "ExpandKeywordsTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "Extern2Test",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "FakeDuckTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": ["-filetype=obj", "-relocation-model=pic"]
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "FileIoTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "ForAndLoopTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": ["-filetype=obj", "-relocation-model=pic"]
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "FormatStringTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": ["-filetype=obj", "-relocation-model=pic"]
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "FuncTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "G3",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "G4",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "G5",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "G6",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "G7",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "GenericOopTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "GenericTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "GenericTest2",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "GenericTest3",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "GenericTest4",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "HashLibTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "HashTableTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": ["-filetype=obj", "-relocation-model=pic"]
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "IsinstanceTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "IterTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "JsonTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "LLvmLiteTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": ["-filetype=obj", "-relocation-model=pic"]
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "ListTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": ["-filetype=obj", "-relocation-model=pic"]
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "LogicFlowTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "LoopMathTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "LoopTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+6 -6
View File
@@ -656,7 +656,7 @@ def test_struct_global(pool: memhub.MemBuddy*):
mod: mlirlite.LLVMModule* = mcore.NewModule("test_struct_global")
# ---- (1) vtable struct { i8*, i8*, i8* } ----
# Initializer is a TPV-generated LLVM syntax aggregate: null + bitcast symbol refs
# Initializer is a VPC-generated LLVM syntax aggregate: null + bitcast symbol refs
vt1: mlirlite.ParamNode* = core.NewParamNode(ty_i8ptr)
vt2: mlirlite.ParamNode* = core.NewParamNode(ty_i8ptr)
vt3: mlirlite.ParamNode* = core.NewParamNode(ty_i8ptr)
@@ -701,7 +701,7 @@ def test_struct_global(pool: memhub.MemBuddy*):
gv_arr.Initializer = init_arr
mcore.GlobalSetLinkage(gv_arr, "internal")
# ---- (2') root bare GEP (TPV pointer-global form) ----
# ---- (2') root bare GEP (VPC pointer-global form) ----
# Initializer has no type prefix; it is a bare getelementptr constant expression
gv_sp: mlirlite.GlobalVariable* = mcore.NewGlobal(mod, "sp", ty_i8ptr)
init_sp: str = pool.alloc(192)
@@ -817,7 +817,7 @@ def test_alloca_align_switch_asm(pool: memhub.MemBuddy*):
mod: mlirlite.LLVMModule* = mcore.NewModule("test_align_switch_asm")
# ---- (1) alloca alignment + (3) inline_asm (builder + TPV-injected forms) ----
# ---- (1) alloca alignment + (3) inline_asm (builder + VPC-injected forms) ----
f1: mlirlite.Function* = mcore.CreateFunction(mod, "align_asm", ty_i32)
mcore.AddParam(f1, ty_i32, "%x")
e1: mlirlite.BasicBlock* = mcore.CreateBlock(f1, "entry")
@@ -836,7 +836,7 @@ def test_alloca_align_switch_asm(pool: memhub.MemBuddy*):
v_x: mlirlite.Value* = mcore.SSAValue(ty_i32, "%x")
mlirlite.build_store(b1, v_x, v_slot, 0)
# TPV CallGenCBuiltin injected form (inteldialect + typed input operands)
# VPC CallGenCBuiltin injected form (inteldialect + typed input operands)
mlirlite.block_append_text(pool, e1,
"%7 = call i32 asm sideeffect inteldialect \"mov $0, $1\", \"=r,r\"(i32 %x)")
@@ -1173,7 +1173,7 @@ def test_named_struct(pool: memhub.MemBuddy*):
b: mlirlite.IRBuilder* = mcore.NewBuilder(fn)
mlirlite.position_at_end(b, entry)
# ---- (4) bare-name form in mid text (hand-written / TPV-injected) ----
# ---- (4) bare-name form in mid text (hand-written / VPC-injected) ----
# Print time expands it via the table; pointer form %"name"* stays !llvm.ptr
mlirlite.block_append_text(pool, entry, "%0 = alloca %\"aa11bb22cc33dd44.Cls\"")
mlirlite.block_append_text(pool, entry, "%1 = load i32, %\"aa11bb22cc33dd44.Cls\"* %0")
@@ -1255,7 +1255,7 @@ def test_extractvalue_multi_asm(pool: memhub.MemBuddy*):
func: mlirlite.Function* = mcore.CreateFunction(mod, "multi_asm", ty_i32)
entry: mlirlite.BasicBlock* = mcore.CreateBlock(func, "entry")
# (1) TPV real form: multi-result inline asm + two extractvalue (single index)
# (1) VPC real form: multi-result inline asm + two extractvalue (single index)
mlirlite.block_append_text(pool, entry,
"%2 = call {i32, i32} asm sideeffect \"mov $0, $1; mov $1, $1\", \"=r,r\"()")
mlirlite.block_append_text(pool, entry,
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "MLIRLiteTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": ["-filetype=obj", "-relocation-model=pic"]
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "MemhubTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": ["-filetype=obj", "-relocation-model=pic"]
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "MpoolOopTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -120,7 +120,7 @@ class Vec2M:
class Vec2Extra:
# Field access uses the defining class's fields (TPV model); does not
# Field access uses the defining class's fields (VPC model); does not
# reference Vec2M's x/y (cross-parent field access is out of scope here).
def extra_val(self) -> CInt:
return 7
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "MultiInheritTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "NegativeTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "NewAstTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": ["-filetype=obj", "-relocation-model=pic"]
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "NewLifetimeAnnFieldEscapeTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": ["-filetype=obj", "-relocation-model=pic"]
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "NewLifetimeAsyncTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": ["-filetype=obj", "-relocation-model=pic"]
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "NewLifetimeFieldEscapeTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": ["-filetype=obj", "-relocation-model=pic"]
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "NewLifetimeFreeTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": ["-filetype=obj", "-relocation-model=pic"]
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "NewLifetimeRetEscapeTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": ["-filetype=obj", "-relocation-model=pic"]
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "NewLifetimeRetOkTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": ["-filetype=obj", "-relocation-model=pic"]
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "NewLifetimeRetXmodTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": ["-filetype=obj", "-relocation-model=pic"]
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "NewLifetimeTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": ["-filetype=obj", "-relocation-model=pic"]
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "NewLifetimeUseAfterFreeTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": ["-filetype=obj", "-relocation-model=pic"]
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "NewLifetimeWillFreeAddrTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": ["-filetype=obj", "-relocation-model=pic"]
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "NewLifetimeWillFreeKwargTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": ["-filetype=obj", "-relocation-model=pic"]
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "NewLifetimeWillFreeMethodTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": ["-filetype=obj", "-relocation-model=pic"]
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "NewLifetimeWillFreeOkTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": ["-filetype=obj", "-relocation-model=pic"]
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "NewLifetimeWillFreeTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": ["-filetype=obj", "-relocation-model=pic"]
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "NewTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": ["-filetype=obj", "-relocation-model=pic"]
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "NoVTableCrossMixinTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": ["-filetype=obj", "-relocation-model=pic"]
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "NoVTableTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "NumpyTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "OopInheritTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "PointerTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+72 -72
View File
@@ -1,72 +1,72 @@
# ProbeGen: minimal probe for cross-generation IR instability. Do not treat as a normal feature test.
# Translate the same source with two compiler generations, then diff the emitted IR per module
# (module file name = source SHA1, so both sides are comparable).
# Gen 1: TransPyV\output\TransPyV.exe --project Test\ProbeGen\project.vpj --clean --run --build-dir Test\ProbeGen\.tpv_build_g1
# Gen 2: TransPyV\.tpv_build\output\TransPyV.exe --project Test\ProbeGen\project.vpj --clean --run --build-dir Test\ProbeGen\.tpv_build_g2
# WARNING [P6] breaks compilation from generation 2 onward; comment out [P6] to get Gen-2 IR for P1..P5.
import t
from stdint import *
import w32.win32console as w32console
# [P1] Nested union parameter: VOIDPTR (typedef of t.CPtr) unioned with t.CPtr gives i8** on one side, i8* on the other.
# Declared but never called, so no link reference is produced.
extern def ProbeNestedUnion(Context: VOIDPTR*) -> BOOL
# [P2] Struct by-value parameter: COORD without | t.CPtr gives %COORD on one side, %COORD* on the other.
extern def ProbeCoordByVal(dwSize: w32console.COORD) -> BOOL
# [P5] Sink for the local uint8 = 1 literal: store it into a global so the code is not dead-code eliminated.
U8Sink: uint8 = 0
# [P3] char -> int promotion: param char, int return. One side must emit zext i8 to i32, not ret i8.
def ProbeOrd(s: char) -> int:
return s
# [P4] double comparison: params/return double. One side must emit fcmp olt double, not icmp slt double.
def ProbeMin(a: double, b: double) -> double:
if a < b:
return a
return b
# [P5] Local uint8 = 1 assignment: literal typing must emit store i8 1, not store i32 1 or trunc+store.
def ProbeU8Literal() -> uint8:
global U8Sink
result: uint8 = 1
U8Sink = result
return result
# [P6] Class field union + subscript write: field is char | t.CPtr, must null-check before indexed write.
# Generations 2+ fail here with "SyntaxError: subscript ptr is None".
class Box:
p: char*
def __init__(self):
self.p = None
def Clear(self):
if self.p != None:
self.p[0] = 0
pass
# Entry: keep main minimal, referencing each construct above so it is really translated; return 0.
# P1/P2 are extern declarations and are not called, so their difference shows in this module's declares.
@t.CExport
def main() -> int:
Ch: char = 'A'
BoxInst: Box = Box()
BoxInst.Clear()
ProbeOrd(Ch)
ProbeMin(1.0, 2.0)
ProbeU8Literal()
return 0
# ProbeGen: minimal probe for cross-generation IR instability. Do not treat as a normal feature test.
# Translate the same source with two compiler generations, then diff the emitted IR per module
# (module file name = source SHA1, so both sides are comparable).
# Gen 1: ViperC\output\viperc.exe --project Test\ProbeGen\project.vpj --clean --run --build-dir Test\ProbeGen\__vpcbuild___g1
# Gen 2: ViperC\__vpcbuild__\output\viperc.exe --project Test\ProbeGen\project.vpj --clean --run --build-dir Test\ProbeGen\__vpcbuild___g2
# WARNING [P6] breaks compilation from generation 2 onward; comment out [P6] to get Gen-2 IR for P1..P5.
import t
from stdint import *
import w32.win32console as w32console
# [P1] Nested union parameter: VOIDPTR (typedef of t.CPtr) unioned with t.CPtr gives i8** on one side, i8* on the other.
# Declared but never called, so no link reference is produced.
extern def ProbeNestedUnion(Context: VOIDPTR*) -> BOOL
# [P2] Struct by-value parameter: COORD without | t.CPtr gives %COORD on one side, %COORD* on the other.
extern def ProbeCoordByVal(dwSize: w32console.COORD) -> BOOL
# [P5] Sink for the local uint8 = 1 literal: store it into a global so the code is not dead-code eliminated.
U8Sink: uint8 = 0
# [P3] char -> int promotion: param char, int return. One side must emit zext i8 to i32, not ret i8.
def ProbeOrd(s: char) -> int:
return s
# [P4] double comparison: params/return double. One side must emit fcmp olt double, not icmp slt double.
def ProbeMin(a: double, b: double) -> double:
if a < b:
return a
return b
# [P5] Local uint8 = 1 assignment: literal typing must emit store i8 1, not store i32 1 or trunc+store.
def ProbeU8Literal() -> uint8:
global U8Sink
result: uint8 = 1
U8Sink = result
return result
# [P6] Class field union + subscript write: field is char | t.CPtr, must null-check before indexed write.
# Generations 2+ fail here with "SyntaxError: subscript ptr is None".
class Box:
p: char*
def __init__(self):
self.p = None
def Clear(self):
if self.p != None:
self.p[0] = 0
pass
# Entry: keep main minimal, referencing each construct above so it is really translated; return 0.
# P1/P2 are extern declarations and are not called, so their difference shows in this module's declares.
@t.CExport
def main() -> int:
Ch: char = 'A'
BoxInst: Box = Box()
BoxInst.Clear()
ProbeOrd(Ch)
ProbeMin(1.0, 2.0)
ProbeU8Literal()
return 0
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "ProbeGen",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "PtrOpProbe",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": ["-filetype=obj", "-relocation-model=pic"]
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "RawArrayTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "ShortCircuitTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": ["-filetype=obj", "-relocation-model=pic"]
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "SimdTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "SlotsBugTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": ["-filetype=obj", "-relocation-model=pic"]
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "SprintfTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": ["-filetype=obj", "-relocation-model=pic"]
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "StringIterTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "StringTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "StructTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "SuperTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "SysLibTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": ["-filetype=obj", "-relocation-model=pic"]
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "TestFBProject",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "ThreadingTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": ["-filetype=obj", "-relocation-model=pic"]
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "TypeCastTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "VRandomTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": ["-filetype=obj", "-relocation-model=pic"]
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "VariadicTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "VectorGenericTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "WebTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": ["-filetype=obj", "-relocation-model=pic"]
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "ZlibTest",
"version": "1.0.0",
"source_dir": "./App",
"build_dir": "./.tpv_build",
"build_dir": "./__vpcbuild__",
"compiler": {
"cmd": "llc",
"flags": [