From 0e93f40289b1666c21870cb9afc6bbd4440ee30b Mon Sep 17 00:00:00 2001 From: TermiNexus Date: Wed, 12 Aug 2026 21:13:36 +0800 Subject: [PATCH] =?UTF-8?q?fix(includes):=20=E5=AF=BC=E5=87=BA=20llvmlite?= =?UTF-8?q?=20=E7=BC=BA=E5=A4=B1=E7=AC=A6=E5=8F=B7=20+=20=E7=A7=BB?= =?UTF-8?q?=E9=99=A4=E4=B8=B4=E6=97=B6=20DBG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - llvmlite.__init__ 导出 get_struct_fields/get_struct_fcount/DeepCopyType(HandlesAssign tuple 解包与 ClassGenMixin 深拷贝调用 fast-fail 符号未定义) - 移除 string.vp [ATOF-DBG]、ast/parser.vp [LKP-DBG] 临时插桩(保留查表逻辑) --- includes/ast/parser.vp | 3 --- includes/llvmlite/__init__.vp | 1 + includes/string.vp | 4 ---- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/includes/ast/parser.vp b/includes/ast/parser.vp index e6c8e66..ae89787 100644 --- a/includes/ast/parser.vp +++ b/includes/ast/parser.vp @@ -312,16 +312,13 @@ def _dbg_lookup_lit_val(ptr: t.CUInt64T) -> double: global _g_dbg_lit_found _g_dbg_lit_found = 0 if _g_dbg_pts is None or _g_dbg_vals is None: - stdio.printf("[LKP-DBG] pts null cnt=%d\n", _g_dbg_cnt) return 0.0 i: t.CSizeT = 0 while i < _g_dbg_cnt: if _g_dbg_pts[i] == ptr: _g_dbg_lit_found = 1 - stdio.printf("[LKP-DBG] HIT ptr=%p val=%.17g cnt=%d\n", ptr, _g_dbg_vals[i], _g_dbg_cnt) return _g_dbg_vals[i] i += 1 - stdio.printf("[LKP-DBG] MISS ptr=%p cnt=%d\n", ptr, _g_dbg_cnt) return 0.0 diff --git a/includes/llvmlite/__init__.vp b/includes/llvmlite/__init__.vp index 162a821..581560a 100644 --- a/includes/llvmlite/__init__.vp +++ b/includes/llvmlite/__init__.vp @@ -12,6 +12,7 @@ from .__types import ( new_param_node, param_list_append, paramnode_get_ty, paramnode_get_next, paramnode_set_ty, paramnode_set_next, TypePrint, PrintStructDefinition, get_struct_name, + get_struct_fields, get_struct_fcount, DeepCopyType, ) from .__values import ( Value, new_value, ConstInt, ConstNull, ConstZero, ConstFloat, SSAValue, ValuePrint, diff --git a/includes/string.vp b/includes/string.vp index ecdc6f0..89981f1 100644 --- a/includes/string.vp +++ b/includes/string.vp @@ -365,10 +365,6 @@ def atof(src: str) -> t.CDouble: while exp < 0: result = result / 10.0 exp += 1 - # ATOF-DBG: 打印长浮点字面量解析过程(定位浮点 CDefine 值错误) - if src is not None and strlen(src) >= 12: - stdio.printf("[ATOF-DBG] src=%s int=%.17g frac=%.17g div=%.17g result=%.17g\n", - src, int_part, frac_part, frac_div, result) return result