diff --git a/App/lib/core/Gen/Call/CallGenCall.vp b/App/lib/core/Gen/Call/CallGenCall.vp index 66fdc46..75c4c06 100644 --- a/App/lib/core/Gen/Call/CallGenCall.vp +++ b/App/lib/core/Gen/Call/CallGenCall.vp @@ -4,7 +4,6 @@ import ast import llvmlite import memhub import string -import stdio import stdlib import viperlib import lib.core.Gen.Translator as HT @@ -656,7 +655,7 @@ class CallGenCall(CallGenBase.CallGenBase): # a83d183 的三处调用点:_translate_method_call / _translate_call_with_kwargs # / CallGenDispatch 特化分支)。本路径此前直接用调用点实参类型建 # declare:泛型特化构造 `list[T](pool, 8)` 的 elem_size 字面量 i32 会把 - # 定义侧 t.CSizeT(i64) 固化窄,且池实参(MemBuddy*/i8*)与定义侧 + # 定义侧 sizet(i64) 固化窄,且池实参(MemBuddy*/i8*)与定义侧 # MemManager* 口径不一致 → 跨模块 declare/define 不一致并经 .stub.ll # 传播到未调用该函数的消费方模块。泛型特化名({sha}.list[str].__new__) # 的定义侧注解在模板类上,由 _coerce_args_to_def_params 的模板退查解析。 diff --git a/Test/App/nested_match_test.vp b/Test/App/nested_match_test.vp index 20ebf4a..21d6b63 100644 --- a/Test/App/nested_match_test.vp +++ b/Test/App/nested_match_test.vp @@ -26,24 +26,17 @@ _NMATCH_POOL_SIZE: t.CDefine = 65536 def _init_mbuddy() -> int: """初始化内存池,返回 0=成功, 1=失败""" global _mbuddy - stdio.printf("[DBG] _init_mbuddy: start\n") arena: bytes = stdlib.malloc(_NMATCH_POOL_SIZE) - stdio.printf("[DBG] _init_mbuddy: malloc arena=%d\n", arena is None) if arena is None: stdio.printf("FAIL: malloc for arena failed\n") return 1 mb: rowptr[memhub.MemBuddy] = stdlib.malloc(memhub.MemBuddy.__sizeof__()) - stdio.printf("[DBG] _init_mbuddy: malloc mb=%d\n", mb is None) if mb is None: stdio.printf("FAIL: MemBuddy init failed\n") return 1 - stdio.printf("[DBG] _init_mbuddy: before_init\n") mb.__before_init__() - stdio.printf("[DBG] _init_mbuddy: init\n") mb.__init__(arena, sizet(_NMATCH_POOL_SIZE)) - stdio.printf("[DBG] _init_mbuddy: store\n") _mbuddy = mb - stdio.printf("[DBG] _init_mbuddy: done\n") return 0 @@ -52,7 +45,6 @@ def test_single_match() -> int: stdio.printf("--- Test 1: 单层 match LLVMType ---\n") ty: llvmlite.LLVMType | t.CPtr = llvmlite.Int32(_mbuddy) - stdio.printf("[DBG] Int32 done: %d\n", ty is None) if ty is None: stdio.printf("FAIL: Int32 returned None\n") return 1